xtermjs/xterm.js
在 GitHub 查看Cannot type Shifted characters (e.g. #, ") or overlapping keys in Safari on macOS
Open
#5,374 创建于 2025年7月11日
area/imebrowser/safarihelp wantedtype/bug
描述
Details
- Browser and browser version: Safari 18.5
- OS version: macOS 15.5
- xterm.js version: 5.5.0
Steps to reproduce
- Open an xterm.js terminal on Safari (macOS 15.5) with a Japanese (JP) keyboard layout.
- Try typing Shift + 3 to input
#— nothing appears. - While still holding Shift, press 3 again — now
#appears. - Similarly, try typing Shift + 2 to input
"— same behavior occurs. - Next, press and hold the
Akey, then press theSkey without releasingA. - Only
Aappears in the terminal —Sis ignored. - If you release
Abefore pressingS, both characters are input as expected.
This issue does not occur in Google Chrome on the same macOS system.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@xterm/xterm@5.5.0/css/xterm.min.css">
<script src="https://cdn.jsdelivr.net/npm/@xterm/xterm@5.5.0/lib/xterm.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const terminal = new Terminal();
terminal.open(document.getElementById('terminal'));
terminal.focus();
terminal.onData((data) => {
terminal.write(data);
});
});
</script>
</head>
<body>
<div id="terminal"></div>
</body>
</html>