Add key rebinding
This is a modified version of Jason Dorje Short's key rebinding patch, and allows also binding special keys, such as the ones used in getloc and getpos. One of the ways to play NetHack on nethack.alt.org is via a HTML terminal in browser. Unfortunately this means several ctrl-key combinations cannot be entered, because the browser intercepts those. Similar thing applies to some international keyboard layouts on Windows. With this patch, the user can just rebind the command to a key that works best for them. I've tested this on Linux TTY, X11, and Windows TTY and GUI.
This commit is contained in:
@@ -184,7 +184,10 @@ E void FDECL(set_occupation, (int (*)(void), const char *, int));
|
||||
E char NDECL(pgetchar);
|
||||
E void FDECL(pushch, (CHAR_P));
|
||||
E void FDECL(savech, (CHAR_P));
|
||||
E void NDECL(add_debug_extended_commands);
|
||||
E const char *FDECL(key2extcmddesc, (UCHAR_P));
|
||||
E boolean FDECL(bind_specialkey, (UCHAR_P, char *));
|
||||
E char FDECL(txt2key, (char *));
|
||||
E void FDECL(parseautocomplete, (char *, BOOLEAN_P));
|
||||
E void FDECL(reset_commands, (BOOLEAN_P));
|
||||
E void FDECL(rhack, (char *));
|
||||
E int NDECL(doextlist);
|
||||
@@ -193,6 +196,8 @@ E int NDECL(enter_explore_mode);
|
||||
E void FDECL(enlightenment, (int, int));
|
||||
E void FDECL(youhiding, (BOOLEAN_P, int));
|
||||
E void FDECL(show_conduct, (int));
|
||||
E void FDECL(bind_key, (UCHAR_P, char *));
|
||||
E void NDECL(dokeylist);
|
||||
E int FDECL(xytod, (SCHAR_P, SCHAR_P));
|
||||
E void FDECL(dtoxy, (coord *, int));
|
||||
E int FDECL(movecmd, (CHAR_P));
|
||||
@@ -211,6 +216,7 @@ E void NDECL(end_of_input);
|
||||
#endif
|
||||
E char NDECL(readchar);
|
||||
E void NDECL(sanity_check);
|
||||
E char* FDECL(key2txt, (UCHAR_P, char *));
|
||||
E char FDECL(yn_function, (const char *, const char *, CHAR_P));
|
||||
E boolean FDECL(paranoid_query, (BOOLEAN_P, const char *));
|
||||
|
||||
@@ -847,6 +853,7 @@ E char *FDECL(lcase, (char *));
|
||||
E char *FDECL(ucase, (char *));
|
||||
E char *FDECL(upstart, (char *));
|
||||
E char *FDECL(mungspaces, (char *));
|
||||
E char *FDECL(trimspaces, (char *));
|
||||
E char *FDECL(strip_newline, (char *));
|
||||
E char *FDECL(eos, (char *));
|
||||
E boolean FDECL(str_end_is, (const char *, const char *));
|
||||
@@ -1661,6 +1668,7 @@ E void FDECL(next_opt, (winid, const char *));
|
||||
E int FDECL(fruitadd, (char *, struct fruit *));
|
||||
E int FDECL(choose_classes_menu, (const char *, int, BOOLEAN_P,
|
||||
char *, char *));
|
||||
E void FDECL(parsebindings, (char *));
|
||||
E void FDECL(add_menu_cmd_alias, (CHAR_P, CHAR_P));
|
||||
E char FDECL(map_menu_cmd, (CHAR_P));
|
||||
E void FDECL(assign_warnings, (uchar *));
|
||||
|
||||
Reference in New Issue
Block a user