Re: definekey only grabs one key

Shawn Betts <[email protected]>
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
2009/10/7 Torbjörn Söderstedt <[email protected]>:
> Using definekey for the top keymap, I tried to assign a command to "minus". It
> didn't work, and after some investigation I found that I have two minus keys on
> my keyboard:
>
> $ xmodmap -pk | grep minus
>     20       0x002d (minus)    0x005f (underscore)     0x002d (minus)  0x005f (underscore)     0x0aaa (endash) 0x0aa9 (emdash)
>     94       0x002d (minus)    0x005f (underscore)     0x002d (minus)  0x005f (underscore)     0x0aaa (endash) 0x0aa9 (emdash)
>    126       0x00b1 (plusminus)       0x0000 (NoSymbol)       0x00b1 (plusminus)               0x0000 (NoSymbol)      0x00b1 (plusminus)
>
> After remapping the key to the scancode with the lower value, it works as
> expected. Is this a limitation in ratpoison, or some peculiarity of X11?

This is a limitation of ratpoison. The problem is it only gets one
keycode back when it converts a keysym to a keycode. The fix is to
find a way to return all keycodes for a keysym. ratpoison uses the
function XKeysymToKeycode and I can't find a function that returns all
the keycodes so one would probably need to roll one's own.

-Shawn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.