I'm having a bit of trouble now with the "use XKB" conditional #ifdef in the XQuartz keymap handling (I reverted back to the old way for now). It was "working" before simply because xkeyboard-config wasn't installed (I installed xkbdata, it errored, and we kept our default mappings). Now that I install xkeyboard-config, we get an ugly mapping. Here's our modifier keys for example: xmodmap: up to 3 keys per modifier, (keycodes in parentheses): shift backslash (0x32), BadKey (0x3e) lock Alt_L (0x42) control 0 (0x25), F9 (0x6d) mod1 Alt_L (0x42), Alt_R (0x45) mod2 KP_Add (0x4d) mod3 mod4 End (0x7f), F2 (0x80) mod5 KP_3 (0x5d), Prior (0x7c) And if I revert back to the old way or just move the share/X11/xkb directory out of the way (which causes the fallback to the old way), I get a good mapping: xmodmap: up to 2 keys per modifier, (keycodes in parentheses): shift Shift_L (0x40), Shift_R (0x44) lock Caps_Lock (0x41) control Control_L (0x43), Control_R (0x46) mod1 Alt_L (0x42), Alt_R (0x45) mod2 Meta_L (0x3f), Meta_R (0x47) mod3 mod4 mod5 So I dug around a bit and figured this was resulting from this line picking an invalid rule set for our keyboard: XkbSetRulesDflts("base", "pc105", "us", NULL, NULL); Now, how should we go about creating rules for our keyboards? I've done some keyboard config writing for the Sun Type 6 USB keyboard, so I'm a little familiar with that, but in that case I had a "real" keyboard to work with and I didn't need to worry about international variants, etc. I'm a bit fuzzy on exactly how the keyboard data is provided to us by Quartz and how to make that play nice with xkb. For one thing, QuartzReadSystemKeymap() (the old way) gets the keymapping data (keycode -> unicode character) dynamically from the system. From what I see, xkb gets its data from the config files... it seems like a bad idea to try generating files in xkeyboard-config for all the possible keyboards that can be available. Is there a way we can still use xkb but not rely on xkeyboard-config? Should we just setup a very basic generic profile (maybe just the modifier keys) for the quartz keyboard and programatically setup the rest of the bindings? Daniel, is there a better option that you can think of? Thanks, Jeremy
participants (1)
-
Jeremy Huddleston