mirror of
https://github.com/ddeverill/SteamlessController.git
synced 2026-10-21 22:22:16 -05:00
Let Escape be captured as a key-combo binding (#105)
Escape used to be intercepted globally as the remap window's cancel affordance, so pressing it while listening just exited capture instead of binding anything. Now it only dismisses the unsaved-changes modal or the game picker; while a row is listening, Escape falls through to the normal capture path (alone or as part of a combo), and the VK table gained the missing entry so it resolves to a real binding. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f56559fe35
commit
09ca4c30b4
2 files changed
+11
-9
No files matched your search
@@ -8,8 +8,7 @@ namespace {
|
||||
struct JsCodeToVk { const char* code; uint16_t vk; };
|
||||
|
||||
// KeyboardEvent.code values are physical positions, so a binding made on one
|
||||
// keyboard layout means the same physical key on another. Escape is absent on
|
||||
// purpose — the remap window uses it to cancel listening.
|
||||
// keyboard layout means the same physical key on another.
|
||||
const JsCodeToVk kCodeMap[] = {
|
||||
// Letters
|
||||
{"KeyA",'A'},{"KeyB",'B'},{"KeyC",'C'},{"KeyD",'D'},{"KeyE",'E'},{"KeyF",'F'},
|
||||
@@ -29,6 +28,7 @@ const JsCodeToVk kCodeMap[] = {
|
||||
{"Backspace", VK_BACK},
|
||||
{"Delete", VK_DELETE},
|
||||
{"Insert", VK_INSERT},
|
||||
{"Escape", VK_ESCAPE},
|
||||
|
||||
// Navigation
|
||||
{"ArrowUp", VK_UP},
|
||||
|
||||
Reference in new issue
Block a user