Merge pull request #3763 from robinfai/master

Send the record separator for C-@, like some other keyboards
This commit is contained in:
Daniel Imms
2022-06-26 07:46:38 -07:00
committed by GitHub
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
@@ -371,6 +371,9 @@ export function evaluateKeyboardEvent(
if (ev.key === '_') { // ^_
result.key = C0.US;
}
if (ev.key === '@') { // ^ + shift + 2 = ^ + @
result.key = C0.NUL;
}
}
break;
}