Send corresponding escape code for alt+space and ctrl+alt+space

The previous behavior is that this combinations do nothing.
This commit is contained in:
Jason Lin
2022-12-06 15:57:19 +11:00
parent ad1f2ac2a8
commit 7f64fa9ddd
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -360,6 +360,8 @@ export function evaluateKeyboardEvent(
keyString = keyString.toUpperCase();
}
result.key = C0.ESC + keyString;
} else if (ev.keyCode === 32) {
result.key = C0.ESC + (ev.ctrlKey ? C0.NUL : ' ');
} else if (ev.key === 'Dead' && ev.code.startsWith('Key')) {
// Reference: https://github.com/xtermjs/xterm.js/issues/3725
// Alt will produce a "dead key" (initate composition) with some