KeyShortcutHandler allow capital letters. close #68

This commit is contained in:
2022-06-18 19:26:11 +00:00
parent f68c71c55a
commit 6376a9c555
2 changed files with 3 additions and 1 deletions

View File

@@ -36,5 +36,7 @@
(case (id.toString)
((when (KEY_MAP.exists key) key)
(dictGet KEY_MAP key))
((when FlxG.keys.pressed.SHIFT key)
(.toUpperCase key))
(key (.toLowerCase key))
(otherwise (throw "FlxKey.toString returned null!")))))))

View File

@@ -51,7 +51,7 @@
((Some _)
(case (stream.takeUntilAndDrop "]")
((Some newShortcuts)
(extractKeyboardShortcuts str stream (+ shortcuts (newShortcuts.toLowerCase))))
(extractKeyboardShortcuts str stream (+ shortcuts newShortcuts)))
(otherwise
(tryCallOrThrow onBadShortcut "unclosed [ in $str" str null)
"")))