From: Benjamin R. <Ben...@ep...> - 2004-01-25 13:07:04
|
Hi all, I just did some testing and tuning of the keyboard code these days. There are a couple of small points that I would like to run by the list for comment. If any of you have time to think about these bits, just drop a short note, please. - Option key combos - The the state in the last version and now is that e.g. the Option key combo Option-a generates an event with keysym XK_a and string value =E5 (\u00E5, a with ring). People can bind to <Option-KeyPress-a> and it will just work. If you want to bind to \u00E5, you'd have to bind to <KeyPress> or even <Option-KeyPress> and filter on "%A" =3D=3D "\u00E5" yourself. AFAICS this is the best we can do without changes to the core. - Meta =3D=3D Option - The Option key is treated as a synonym for Meta and the Command key as a synonym for Alt. It has been that way for some time, although it wasn't done consistently in all contexts. This has the consequence that we do not want Meta key combos as shortcut keys on Mac, at least not for the text widget, because that would preempt using those key combos for normal input. Before I ask Jeff for those Mac-specific changes in the bindings, I'd like to hear some comments. - Keycode 0 - On X11 the keycode 0 is documented as reserved and isn't generated from the keyboard. On MacOS, the keycode is valid ('a' on a US keyboard). I think this should usually not be problem. OTOH, there is one case in the test suite where keycode 0 is used to force a bind failure. That test could probably be changed to use -1 instead. It is also remotely conceivable that other code may rely on this. We could add (and check) a marker bit to the keycodes if we want to do something about it. benny |