16 char *keybind
[MAX_KEYS
];
21 int rc_bindkey(char *keyname
, char *cmd
)
26 key
= k_keycode(keyname
);
30 if (!a
) die("out of memory binding key\n");
32 if (keybind
[key
]) free(keybind
[key
]);
40 int rc_unbindkey(char *keyname
)
44 key
= k_keycode(keyname
);
47 if (keybind
[key
]) free(keybind
[key
]);
57 for (i
= 0; i
< MAX_KEYS
; i
++)
69 void rc_dokey(int key
, int st
)
71 if (!keybind
[key
]) return;
72 if (keybind
[key
][0] != '+' && !st
) return;
75 rc_command(keybind
[key
]);
78 keybind
[key
][0] = '-';
79 rc_command(keybind
[key
]);
80 keybind
[key
][0] = '+';