So far, what I've learnt/found :).<br><br>1) I assume my build is using X11-display, since my keyboard events are generated there :P.<br><br>2) The X11 keyboard events are adapted to sq events in sqUnixX11.c >> x2sqKeyPlain<br>
<br>3) This build uses XLookupString, which brings char codes in Latin 1 instead of UTF-8. But X11 seems to support UTF-8 :/.<br><br>4) When pressing a function key, XLookupString does not fill the buffer with chars... and the KeySym is not handled. I added a line like<br>
<br> case XK_F1: return 50;<br><br>and<br><br>Character class>>F1<br> ^ self value: 50<br><br>to test, and It works :). But I'm not sure which code is better to be returned yet :P.<br><br>5) My image now handles the F1, but only the keyDown and keyUp, since in sqUnixX11.c >> handleEvent I have something like:<br>
<br>if (ucs4) /* only generate a key char event if there's a code. */<br> recordKeyboardEvent(keyCode, EventKeyChar, modifierState, ucs4);<br><br>6) I tried commenting the if, but that generates some garbage in my image when pressing Alt, Shift, Control...<br>
<br><br>So, some questions I have at this point:<br><br>- Which are the restrictions on the codes returned on translateCode (point 4) ? Are they ascii characters? In the image I see the value is the keychar + the modifiers encoded<br>
- Based on the prior question, Which codes should be assigned to function keys?<br>- I don't fully understand yet what a ucs4 code is, but the keysyms are translated to them in sqUnixX11.c >> xkeysym2ucs4 which looks pretty magical :). Does someone know how this works? The comments are not really helpful :(.<br>
<br><br>Thanks!<br>Guille, vming :)<br>