Tuomo Valkonen wrote:

On Mon, Jul 12, 2004 at 12:37:55AM +1000, Nicholas FitzRoy-Dale wrote:

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.

The real problem is grabbing keys, as that has to be done on keycode basis.

Hi again Tuomo,

I tried a slightly different approach. In do_action in ioncore/conf-bindings.c, we iterate through all possible keycodes and add them whenever XKeycodeToKeysym() matches. This seems to be the approach used by at least fvwm:

http://www.hpc.uh.edu/fvwm/archive/9902/msg00372.html

This means that things work, as long as I change the Lua mapping files to use the lowercase equivalent of the alphabetic keys (eg rather than MOD1.."S" I use MOD1.."s", because of course the shifted and unshifted versions of a given keycode have different keysyms.

It's not an elegant solution, but I'm not sure if there is such a thing for this problem. :) Thoughts?

- Nicholas



Reply via email to