[Vm-dev] Adding Function keys support to unix vm

Guillermo Polito guillermopolito at gmail.com
Tue Jan 24 19:30:17 UTC 2012


Adding the foolowing lines in *translateCode* function in sqUnixX11.c:

translateCode(KeySym symbolic, int *modp, XKeyEvent *evt)
...
     case XK_KP_Home:   return  1;
     case XK_KP_End:    return  4;

+    case XK_F1: return 16;
+    case XK_F2: return 17;
+    case XK_F3: return 18;
+    case XK_F4: return 19;
+    case XK_F5: return 20;
+    case XK_F6: return 21;
+    case XK_F7: return 22;
+    case XK_F8: return 23;
+    case XK_F9: return 24;
+    case XK_F10: return 25;

what stops me to get F11 and F12 working is that they have the same keysyms
thant XK_L1 and XK_L2 and they are handled too (but XK_L1 mapping is not
working because withMetaSet does not set the modifier) :/.

+    /* XL_F11 and XK_L1 are the same keysym */
+    /* XL_F12 and XK_L2 are the same keysym */

Does anyone know if those keycodes (16-27) are used?  What do you think
about adding this?

Thanks!
Guille
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120124/dda49e8b/attachment-0001.htm


More information about the Vm-dev mailing list