Questions about disabling key repeat for a keycode or a keysym
Ran Benita
ran234 at gmail.com
Wed Apr 20 13:15:38 UTC 2016
On Wed, Apr 20, 2016 at 06:47:22AM +0000, 박성진 wrote:
> Dear Ran,
> what I did is following. :)
>
> 1. define a custom keysym in libxkbcommon
> - add a custom keysym into xkbcommon/xkbcommon-keysyms.h file (e.g. XF86VoiceWakeUp)
> - build ks_table.h again to reflect the custom keysym in libxkbcommon
> 2. add a mapping between a keycode and a keysym in xkeyboard-config
> - symbols/inet
> key <I153> { [XF86VoiceWakeUp ] }
I see there is already
key <I153> { [ XF86Send ] };
in the "evdev" map; do you override it, or you're not using "evdev"?
Anyway, to make it not repeat, you can write this:
key <I153> { [XF86VoiceWakeUp ], repeat=False }
> Is it enough information ? :)
>
> And one more question is... what's the desirable way to define custom keysyms and to do map between
> each keysym to each keycode ?
There is nothing stopping you from modifying xkbcommon-keysyms.h like
you did, but note that xkbcommon-keysyms.h is generated from
/usr/include/X11/keysymdef.h and other files, which are maintained in
the "xproto" package[0]. So, if the keysyms you are adding make general
sense, consider proposing to add them to xproto first. If they're
accepted they will be added in a subsequent xkbcommon release.
[0] https://cgit.freedesktop.org/xorg/proto/xproto/
Alternatively, you can use an "anonymous" keysym, written like
`0x123456`, with an appropriate value, then you can name it in your code
instead of patching xkbcommon.
Ran
More information about the wayland-devel
mailing list