1 |
On 2022.08.25 20:16, Walter Dnes wrote: |
2 |
> On Wed, Aug 24, 2022 at 05:58:28PM -0400, Jack wrote |
3 |
> |
4 |
> > Ah - I expect the game is interpreting keycodes fairly directly. |
5 |
> You |
6 |
> > can use xev (or similar) to find what the various keys are currently |
7 |
> > producing, and there must be some (Xorg related) program to |
8 |
> translate |
9 |
> > them to whatever the program is expecting - perhaps determined by |
10 |
> using |
11 |
> > xev with a "proper" keyboard. |
12 |
> |
13 |
> 1..9 on a real keyboard numeric keypad. The "XLookupString" line |
14 |
> tells you which key is pressed. I think the "keycode" entry is what |
15 |
> is |
16 |
> being acted on by the game. Google seems to indicate that setxkbmap |
17 |
> is |
18 |
> what I need, Once I emerge it, then what? |
19 |
> |
20 |
> KeyPress event, serial 38, synthetic NO, window 0x1000001, |
21 |
> root 0x76b, subw 0x0, time 2031605618, (-448,387), root:(368,623), |
22 |
> state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES, |
23 |
> XLookupString gives 1 bytes: (31) "1" |
24 |
> XmbLookupString gives 1 bytes: (31) "1" |
25 |
> XFilterEvent returns: False |
26 |
|
27 |
The XLookupString looks like the ascii for the character/digit. The |
28 |
keycode does seem like what you want. Googling "linux remap keycodes" |
29 |
should be a good start, but it looks like xmodmap is proabably what you |
30 |
want to use. However, you also need to know the keycode of the key you |
31 |
want to remap. Essentially, you need to remap whatever keycode your |
32 |
current keyboard is generating to that which the game expects for that |
33 |
key. I'm not at all familiar with either program beyond browsing a few |
34 |
Google results, but perhaps setxkbmap is used for a major remap of |
35 |
most/all keys on a keyboard and xmodmap can be used for single or a |
36 |
small number of keys. |