From a22ceaf165a808317d19fc48e1acc21534975f25 Mon Sep 17 00:00:00 2001 From: ostermine Date: Sat, 10 Oct 2026 01:26:09 +0300 Subject: [PATCH 1/2] add key names for punctuation keys Bindings can now use minus, equal, left-bracket, right-bracket, backslash, semicolon, apostrophe, comma, period and slash (GLFW key codes). --- src/window/input.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/window/input.cpp b/src/window/input.cpp index cbb05a888..57454020d 100644 --- a/src/window/input.cpp +++ b/src/window/input.cpp @@ -36,6 +36,16 @@ static std::unordered_map keycodes { {"left-super", GLFW_KEY_LEFT_SUPER}, {"right-super", GLFW_KEY_RIGHT_SUPER}, {"grave-accent", GLFW_KEY_GRAVE_ACCENT}, + {"minus", GLFW_KEY_MINUS}, + {"equal", GLFW_KEY_EQUAL}, + {"left-bracket", GLFW_KEY_LEFT_BRACKET}, + {"right-bracket", GLFW_KEY_RIGHT_BRACKET}, + {"backslash", GLFW_KEY_BACKSLASH}, + {"semicolon", GLFW_KEY_SEMICOLON}, + {"apostrophe", GLFW_KEY_APOSTROPHE}, + {"comma", GLFW_KEY_COMMA}, + {"period", GLFW_KEY_PERIOD}, + {"slash", GLFW_KEY_SLASH}, {"left", GLFW_KEY_LEFT}, {"right", GLFW_KEY_RIGHT}, {"down", GLFW_KEY_DOWN}, From 1a3f3e77e66b9f8289831dc96384076dd258c105 Mon Sep 17 00:00:00 2001 From: ostermine Date: Sun, 11 Oct 2026 22:46:32 +0300 Subject: [PATCH 2/2] docs: list punctuation key names --- doc/en/scripting/user-input.md | 2 ++ doc/ru/scripting/user-input.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/doc/en/scripting/user-input.md b/doc/en/scripting/user-input.md index d8a6e4e8e..654de1871 100644 --- a/doc/en/scripting/user-input.md +++ b/doc/en/scripting/user-input.md @@ -22,6 +22,8 @@ packid.binding.name="inputtype:codename" - a..z - 0..9 - f1..f25 +- grave-accent, minus, equal, left-bracket, right-bracket, backslash +- semicolon, apostrophe, comma, period, slash ## *input* library diff --git a/doc/ru/scripting/user-input.md b/doc/ru/scripting/user-input.md index ffcadd27c..413f74864 100644 --- a/doc/ru/scripting/user-input.md +++ b/doc/ru/scripting/user-input.md @@ -20,6 +20,8 @@ packid.binding.name="inputtype:codename" - a..z - 0..9 - f1..f25 +- grave-accent, minus, equal, left-bracket, right-bracket, backslash +- semicolon, apostrophe, comma, period, slash ## Библиотека input