Post Saturday, 17th December 2016, 14:34

Rebinding the vi keys and numpad

Hello,

As an angband player i am often trying using l instead of x to look/examine. Unfortunately this moves my @ and has resulted in YASD. So now i am trying to rebind this key, but i'm having trouble.

Default behaviour: l key moves @ to the right, numpad-6 moves @ to the right
Desired behavior: l e(x)amines [or does nothing would be acceptable], numpad-6 still moves @ to the right

Attempted solutions:
1. edit init.txt with contents of no_vi_commands.txt (i.e. "bindkey = [L] CMD_NO_CMD_DEFAULT", "bindkey = [^L] CMD_NO_CMD_DEFAULT", "bindkey = [l] CMD_NO_CMD_DEFAULT")
Behaviour: l key does nothing, numpad-6 does nothing

2. add more to init.txt "bindkey = [6] CMD_MOVE_RIGHT" and "bindkey = [^6] CMD_ATTACK_RIGHT"
Behaviour: On load get message "cannot bind synthetic keys to a command"

3. go back to default init.txt and make autohotkey file to intercept/disable l before the input gets to crawl "l::return"
This suceeds, but feels really kludgy. Is there really no way to simply configure the numpad keys separately from the vi-command keys, or is this hardcoded? If so can someone tell me where it's hardcoded so i can change the source and re-compile?

Thank you for any assistance,
Tim

Edit: I'm looking through the source code (i'm only half literate, so i could well be reading it incorrectly) and it does appear that the number and direction keys are hardcoded to redirect to the vi keys in https://github.com/crawl/crawl/blob/mas ... rce/cio.cc

Can anyone confirm i'm reading this correctly? That would at least maybe give me a jumping off point to separate out the inputs. Or someone tell me i'm being dumb and there's an easy way to do what i want and i should stop trying to figure things out that i have no idea what i'm doing :))))