initialize all keyboard commands */
| 2747 | |
| 2748 | /* initialize all keyboard commands */ |
| 2749 | staticfn void |
| 2750 | commands_init(void) |
| 2751 | { |
| 2752 | struct ext_func_tab *extcmd; |
| 2753 | |
| 2754 | for (extcmd = extcmdlist; extcmd->ef_txt; extcmd++) |
| 2755 | if (extcmd->key) |
| 2756 | cmdbind_add(extcmd->key, extcmd, FALSE); |
| 2757 | |
| 2758 | (void) bind_mousebtn(1, "therecmdmenu"); |
| 2759 | (void) bind_mousebtn(2, "clicklook"); |
| 2760 | |
| 2761 | /* number_pad */ |
| 2762 | (void) bind_key(C('l'), "redraw", FALSE); |
| 2763 | (void) bind_key('h', "help", FALSE); |
| 2764 | (void) bind_key('j', "jump", FALSE); |
| 2765 | (void) bind_key('k', "kick", FALSE); |
| 2766 | (void) bind_key('l', "loot", FALSE); |
| 2767 | (void) bind_key(C('n'), "annotate", FALSE); |
| 2768 | (void) bind_key('N', "name", FALSE); |
| 2769 | (void) bind_key('u', "untrap", FALSE); |
| 2770 | (void) bind_key('5', "run", FALSE); |
| 2771 | (void) bind_key(M('5'), "rush", FALSE); |
| 2772 | (void) bind_key('-', "fight", FALSE); |
| 2773 | |
| 2774 | /* alt keys: */ |
| 2775 | (void) bind_key(M('O'), "overview", FALSE); |
| 2776 | (void) bind_key(M('2'), "twoweapon", FALSE); |
| 2777 | (void) bind_key(M('N'), "name", FALSE); |
| 2778 | #if 0 |
| 2779 | /* don't do this until the rest_on_space option is set or cleared */ |
| 2780 | (void) bind_key(' ', "wait", FALSE); |
| 2781 | #endif |
| 2782 | } |
| 2783 | |
| 2784 | staticfn boolean |
| 2785 | keylist_func_has_key(const struct ext_func_tab *extcmd, |
no test coverage detected