]> source.dussan.org Git - tigervnc.git/commitdiff
Handle AltGr from Windows' touch keyboard
authorPierre Ossman <ossman@cendio.se>
Tue, 6 Nov 2018 11:40:53 +0000 (12:40 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 6 Nov 2018 11:46:43 +0000 (12:46 +0100)
vncviewer/Viewport.cxx

index 7b5df5720e5ac36e81b2eec7b25be60056d80386..165560cb2e3c2f71afa4bd455bce86e6e9c10a0c 100644 (file)
@@ -945,6 +945,13 @@ int Viewport::handleSystemEvent(void *event, void *data)
       self->altGrArmed = false;
       Fl::remove_timeout(handleAltGrTimeout);
 
+      // Windows' touch keyboard doesn't set a scan code for the Alt
+      // portion of the AltGr sequence, so we need to help it out
+      if (!isExtended && (keyCode == 0x00)) {
+        isExtended = true;
+        keyCode = 0x38;
+      }
+
       if (isExtended && (keyCode == 0x38) && (vKey == VK_MENU) &&
           ((msg->time - self->altGrCtrlTime) < 50)) {
         // Alt seen, so this is an AltGr sequence