PDA

View Full Version : ~/.adom.data/adom.kbd ASCII v.3.3.3:how to map PgUp, PgDn, Home, End, Insert, Delete?



cosurgi
07-22-2019, 12:49 PM
Hi,

I want to play the game on keyboard without numpad on linux devuan. I have installed latest https://www.adom.de/home/download/current/adom_linux_debian_64_3.3.3.tar.gz

I don't know what exactly to write in `~/.adom.data/adom.kbd` to represent following keyboard keys:

Insert, Delete, Home, End, Page Up, Page Down.

I want to use Insert, Delete and PgUP, PgDown to go in diagonal directions. But I searched all the forums, and someone said he used this mapping (https://www.adom.de/forums/showthread.php/11904-Anyone-play-on-a-laptop-without-a-numpad-Share-your-keybindings?p=69429#post69429) but he didn't say what to put in `~/.adom.data/adom.kbd`

I know I will have to change:



MSW:1
MSE:3
MNW:7
MNE:9

Currently when I press Insert I see "Kick: +0 bonus to hit, 1d4-1 damage", when I press End I see "You don't see anything specific to handle.", when I press Page Up the PC starts to move in some random directions.

Is there a way to to press some key in adom and it will display the mapping name for the pressed key?

cosurgi
07-22-2019, 02:29 PM
With command `showkey -a` I can check what keycodes are sent to xterm console after pressing those keys:



Insert:

^[[2~ 27 0033 0x1b
91 0133 0x5b
50 0062 0x32
126 0176 0x7e

Delete:

^[[3~ 27 0033 0x1b
91 0133 0x5b
51 0063 0x33
126 0176 0x7e

Home:

^[[H 27 0033 0x1b
91 0133 0x5b
72 0110 0x48

End:

^[[F 27 0033 0x1b
91 0133 0x5b
70 0106 0x46

Page Up:

^[[5~ 27 0033 0x1b
91 0133 0x5b
53 0065 0x35
126 0176 0x7e

Page Down:

^[[6~ 27 0033 0x1b
91 0133 0x5b
54 0066 0x36
126 0176 0x7e


The "^[" is the ESC character used to send special characters to terminal.

Can I convert them into format which adom will understand inside ~/.adom.data/adom.kbd ?

cosurgi
07-22-2019, 03:02 PM
I saw that:



# \Mx -- press the alt key and some key x (for letters use the
# lowercase letter)


And I noticed in `showkey -a` that pressing Alt-[ produces:



^[[ 27 0033 0x1b
91 0133 0x5b

So it looks almost like what I need - the first two bytes that preceed the keys that I need. So I have put into adom.kbd this:



MSW:1 \M[3~
MSE:3 \M[6~
MNW:7 \M[2~
MNE:9 \M[5~


But it didn't work :(