bind key by ext cmd function */
| 2729 | |
| 2730 | /* bind key by ext cmd function */ |
| 2731 | staticfn boolean |
| 2732 | bind_key_fn(uchar key, int (*fn)(void)) |
| 2733 | { |
| 2734 | struct ext_func_tab *extcmd; |
| 2735 | |
| 2736 | for (extcmd = extcmdlist; extcmd->ef_txt; extcmd++) { |
| 2737 | if (extcmd->ef_funct != fn) |
| 2738 | continue; |
| 2739 | if ((extcmd->flags & INTERNALCMD) != 0) |
| 2740 | continue; |
| 2741 | cmdbind_add(key, extcmd, FALSE); |
| 2742 | return TRUE; |
| 2743 | } |
| 2744 | |
| 2745 | return FALSE; |
| 2746 | } |
| 2747 | |
| 2748 | /* initialize all keyboard commands */ |
| 2749 | staticfn void |
no test coverage detected