On 2022.08.25 20:16, Walter Dnes wrote:
On Wed, Aug 24, 2022 at 05:58:28PM -0400, Jack wrote

> Ah - I expect the game is interpreting keycodes fairly directly. You
> can use xev (or similar) to find what the various keys are currently
> producing, and there must be some (Xorg related) program to translate > them to whatever the program is expecting - perhaps determined by using
> xev with a "proper" keyboard.

  1..9 on a real keyboard numeric keypad.  The "XLookupString" line
tells you which key is pressed. I think the "keycode" entry is what is being acted on by the game. Google seems to indicate that setxkbmap is
what I need,  Once I emerge it, then what?

KeyPress event, serial 38, synthetic NO, window 0x1000001,
    root 0x76b, subw 0x0, time 2031605618, (-448,387), root:(368,623),
    state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

The XLookupString looks like the ascii for the character/digit. The keycode does seem like what you want. Googling "linux remap keycodes" should be a good start, but it looks like xmodmap is proabably what you want to use. However, you also need to know the keycode of the key you want to remap. Essentially, you need to remap whatever keycode your current keyboard is generating to that which the game expects for that key. I'm not at all familiar with either program beyond browsing a few Google results, but perhaps setxkbmap is used for a major remap of most/all keys on a keyboard and xmodmap can be used for single or a small number of keys.

Reply via email to