dev: Support translating left and right ALT keys.
authorGabe Black <gabeblack@google.com>
Wed, 3 Dec 2014 11:06:03 +0000 (03:06 -0800)
committerGabe Black <gabeblack@google.com>
Wed, 3 Dec 2014 11:06:03 +0000 (03:06 -0800)
This is used primarily for VNC.

src/dev/ps2.cc

index dbcdfcaec38069f7115b94a7f51ee1a135883120..0d973ad709a84c99674a17a286b33776fa1e408a 100644 (file)
@@ -174,6 +174,13 @@ keySymToPs2(uint32_t key, bool down, bool &cur_shift,
                 extended = true;
                 keys.push_back(0x14);
                 break;
+             case XK_Alt_L:
+                keys.push_back(0x11);
+                break;
+             case XK_Alt_R:
+                extended = true;
+                keys.push_back(0x11);
+                break;
              default:
                warn("Unknown extended key %#x\n", key);
                return;