Merge b43a831cd7
into 653e4badeb
This commit is contained in:
commit
a05acdc986
|
@ -1357,9 +1357,20 @@ MSWindowsKeyState::getIDForKey(barrier::KeyMap::KeyItem& item,
|
|||
KeyID id = static_cast<KeyID>(unicode[0]);
|
||||
|
||||
switch (n) {
|
||||
case -1:
|
||||
return barrier::KeyMap::getDeadKey(id);
|
||||
case -1: {
|
||||
// dead key. add an space to the keyboard so we exit
|
||||
// the dead key mode and future calls to this function
|
||||
// with different modifiers are not affected.
|
||||
|
||||
BYTE emptyState[256] = { };
|
||||
n = m_ToUnicodeEx(VK_SPACE, 0, emptyState, unicode,
|
||||
sizeof(unicode) / sizeof(unicode[0]), 0, hkl);
|
||||
|
||||
// as an alternative, we could use the returned
|
||||
// buffer in unicode to look at the dead key character
|
||||
// and not rely on getDeadKey to provide the mapping.
|
||||
return barrier::KeyMap::getDeadKey(id);
|
||||
}
|
||||
default:
|
||||
case 0:
|
||||
// unmapped
|
||||
|
|
Loading…
Reference in New Issue