Send combination keysyms for some Japanese keys

Windows doesn't give us stable symbols for a bunch of Japanese IM keys,
instead alternating between two symbols. This state is not synchronised
with the IM running on the remote server so to have stable behaviour we
have to collapse these multiple symbols in to a single keysym.
This commit is contained in:
Pierre Ossman
2020-12-10 09:43:49 +01:00
committed by Lauri Kasanen
parent 102257cb32
commit 4fda2526f4
2 changed files with 48 additions and 0 deletions

View File

@@ -189,6 +189,21 @@ export function getKeysym(evt) {
}
}
// Windows sends alternating symbols for some keys when using a
// Japanese layout. We have no way of synchronising with the IM
// running on the remote system, so we send some combined keysym
// instead and hope for the best.
if (browser.isWindows()) {
switch (key) {
case 'Zenkaku':
case 'Hankaku':
return KeyTable.XK_Zenkaku_Hankaku;
case 'Romaji':
case 'KanaMode':
return KeyTable.XK_Romaji;
}
}
return DOMKeyTable[key][location];
}