diff --git a/data/init/dfhack.keybindings.init b/data/init/dfhack.keybindings.init index e32a7c58e..f38840e06 100644 --- a/data/init/dfhack.keybindings.init +++ b/data/init/dfhack.keybindings.init @@ -8,6 +8,8 @@ # Generic dwarfmode bindings # ############################## +keybinding add ` gui/launcher + # show all current key bindings keybinding add Ctrl-F1 hotkeys keybinding add Alt-F1 hotkeys diff --git a/docs/Builtin.rst b/docs/Builtin.rst index 2d938e30f..cf58337bc 100644 --- a/docs/Builtin.rst +++ b/docs/Builtin.rst @@ -107,8 +107,8 @@ To set keybindings, use the built-in ``keybinding`` command. Like any other command it can be used at any time from the console, but bindings are not remembered between runs of the game unless re-created in `dfhack.init`. -Currently, any combinations of Ctrl/Alt/Shift with A-Z, 0-9, or F1-F12 are -supported. +Currently, any combinations of Ctrl/Alt/Shift with A-Z, 0-9, F1-F12, or ``\``` +are supported. Possible ways to call the command: diff --git a/library/Core.cpp b/library/Core.cpp index 62fe366f1..a4feab742 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -2558,6 +2558,9 @@ static bool parseKeySpec(std::string keyspec, int *psym, int *pmod, std::string if (keyspec.size() == 1 && keyspec[0] >= 'A' && keyspec[0] <= 'Z') { *psym = SDL::K_a + (keyspec[0]-'A'); return true; + } else if (keyspec.size() == 1 && keyspec[0] == '`') { + *psym = SDL::K_BACKQUOTE; + return true; } else if (keyspec.size() == 1 && keyspec[0] >= '0' && keyspec[0] <= '9') { *psym = SDL::K_0 + (keyspec[0]-'0'); return true;