Hi,
After growing to like ion3 on my Linux machine, I decided to install it under X11 on my iBook. All was well, except the arrow keys didn't work.
This turns out to be because on my Mac the arrow keys have two different sets of keycodes assigned. Left, for example - keysym 0xFF51 - is mapped to both keycode 78 and keycode 131. Curiously, XKeysymToKeycode() returns 78, but XEvents contain keycode 131. This is what causes the problem, because ion3 stores 78 in its list of bindings on startup, and therefore can't find an appropriate binding when it gets the XEvent containing 131.
My solution to this was to change the event handler to do an XKeycodeToKeysym call during the event handler. I then changed the relevant keyboard binding lookup to compare keysyms rather than keycodes.
Any opinions on this solution? The obvious downside is the extra X11 call on XEvents, but I'm not sure of the impact of that. Only a few lines of code need changing; I'd be happy to send a patch for consideration.
- Nicholas
