Merge pull request #5282 from database-client-lib/fix-unexpected-composition

Fixed CapsLock triggering input twice in MacOS.
This commit is contained in:
Daniel Imms
2025-01-08 09:34:03 -08:00
committed by GitHub
+2 -1
View File
@@ -93,7 +93,8 @@ export class CompositionHelper {
*/
public keydown(ev: KeyboardEvent): boolean {
if (this._isComposing || this._isSendingComposition) {
if (ev.keyCode === 229) {
if (ev.keyCode === 20 || ev.keyCode === 229) {
// 20 is CapsLock, 229 is Enter
// Continue composing if the keyCode is the "composition character"
return false;
}