I would use UTF-8 strings to identify the keys. This would make it relatively obvious how to assign new ids to new keys, and make it possible for a program to report an intelligible error message when it does not recognize a key, and allow key assignment APIs to work with unknown new keys. I think also this would assist greatly in allowing an application to migrate between screens on different devices with different keyboards.

This is different than the "text" that the key produces. The "text" is computed by the input method, which honestly I'm not sure where it resides (I may try to write something about that next).

Key names might be "T", "5%", "Enter", "F0", "Keypad Enter", "Left Shift", etc. If there is concern about the lookup time then perhaps a hash method can be defined and this hash integer of the name is included in the event, but I really don't see that as being necessary.

This id is much more like an X keysym than a keycode. But really this is necessary if an appliation is to be able to migrate to different keyboards. The X server atop Wayland should translate these id's to a fake set of "keycodes" and provide the X app a keymapping table that turns those keycodes back into the closest matching keysyms.
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel
  • Keysyms Marty Jack
    • Re: Keysyms Bill Spitzak

Reply via email to