Send the record separator for C-@, like some other keyboards

This commit is contained in:
binghuiluo
2022-05-07 17:19:04 +08:00
parent 656912c934
commit 5019e14753
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -313,5 +313,9 @@ describe('Keyboard', () => {
assert.equal(testEvaluateKeyboardEvent({ shiftKey: true, keyCode: 49, key: '!' }).key, '!');
});
it('should return proper sequence for ctrl+@', () => {
assert.equal(testEvaluateKeyboardEvent({ ctrlKey: true, shiftKey: true, keyCode: 50, key: '@' }).key, '\x00');
});
});
});
+3
View File
@@ -367,6 +367,9 @@ export function evaluateKeyboardEvent(
if (ev.key === '_') { // ^_
result.key = C0.US;
}
if (ev.key === '@') { // ^ + shift + 2 = ^ + @
result.key = C0.NUL;
}
}
break;
}