This is an old revision of the document!
For keyboard usage see Movement and for keybinding the bind command and topic keybinding .
This page is about the keys file inside the user's HOME directory .crossfire .
When the client starts the first time, then there will be no “keys” file,
and if the user never would use the bind and unbind commands,
then would that file likely never exist there.
The file gets created when the first key-binding is committed.
Even if it is just one command(line), a whole bunch of key bindings
will be printed to the keys file.
This keys file consists of lines as
KeyName or KeySym | 0 | String of FLAGS | Command-Line |
Where the '0' will be always a '0'
- likely because some GTK+ functions probably need some value there,
never tried to set this '0' manually to something else -
and the FLAGS are
#define KEYF_NORMAL | 0x01 | 'N' Used in normal mode |
#define KEYF_FIRE | 0x02 | 'F' Used in fire mode |
#define KEYF_RUN | 0x04 | 'R' Used in run mode |
#define KEYF_EDIT | 0x08 | 'E' Line editor |
#define KEYF_STANDARD | 0x10 | 'S' For standard/built-in keybinds |
#define KEYF_ALT | 0x20 | 'L' For ALT key modifier |
#define KEYF_META | 0x40 | 'M' For Meta key modifier |
#define KEYF_MODIFIERS | 0x67 | 'A' Mask for actual keyboard modifiers, not action modifiers |
In this example using a GTK-1 client v1.11.0 ,
the small letter w is bound to
apply -u rod of create earth wall; apply -a rod of create earth wall
to forcibly apply and ready that item
and the newly created keys file looks as this :
Tab 0 NS rotatespells 1 Tab 0 FRS rotatespells -1 quotedbl 0 AES say plus 0 NFS rotateshoottype comma 0 AS take minus 0 NS rotateshoottype -1 period 0 NS stay fire question 0 AS help at 0 AS pickup A 0 NS apply inventory A 0 FRS apply B 0 AS southwest E 0 NS examine inventory E 0 FRS examine H 0 AS west J 0 AS south K 0 AS north L 0 AS east N 0 AS southeast Left 0 AS west Left 0 AS west S 0 AS brace Up 0 AS north Up 0 AS north U 0 AS northeast Right 0 AS east Right 0 AS east Down 0 AS south Down 0 AS south Y 0 AS northwest a 0 NS apply a 0 FRS apply b 0 AS southwest d 0 NS disarm e 0 NS examine inventory e 0 FRS examine h 0 AS west j 0 AS south k 0 AS north l 0 AS east n 0 AS southeast s 0 AS search t 0 AS ready_skill throw u 0 AS northeast
w 0 A apply -u rod of create earth wall; apply -a rod of create earth wall
x 0 NFS show y 0 AS northwest KP_Home 0 AS northwest KP_Left 0 AS west KP_Up 0 AS north KP_Right 0 AS east KP_Down 0 AS south KP_Prior 0 AS northeast KP_Next 0 AS southeast KP_End 0 AS southwest KP_Add 0 AS rotateshoottype KP_Subtract 0 AS rotateshoottype - KP_1 0 AS southwest KP_2 0 AS south KP_3 0 AS southeast KP_4 0 AS west KP_5 0 AS stay KP_6 0 AS east KP_7 0 AS northwest KP_8 0 AS north KP_9 0 AS northeast F27 0 AS northwest F28 0 AS north F29 0 AS northeast F30 0 AS west F31 0 AS stay F32 0 AS east F33 0 AS southwest F34 0 AS south F35 0 AS southeast