don't pass SHIFT to FlxKeyShortcutHandler
This commit is contained in:
@@ -29,14 +29,18 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
// automatically pass the last pressed key to handle key
|
// automatically pass the last pressed key to handle key
|
||||||
(method update []
|
(method :Void update []
|
||||||
(let [:FlxKey id (FlxG.keys.firstJustPressed)]
|
(let [:FlxKey id (FlxG.keys.firstJustPressed)]
|
||||||
(unless (= id -1)
|
(unless (= id -1)
|
||||||
(handleKey
|
(let [key (id.toString)]
|
||||||
(case (id.toString)
|
(case key
|
||||||
((when (KEY_MAP.exists key) key)
|
("SHIFT" (return))
|
||||||
(dictGet KEY_MAP key))
|
(otherwise
|
||||||
((when FlxG.keys.pressed.SHIFT key)
|
(handleKey
|
||||||
(.toUpperCase key))
|
(case key
|
||||||
(key (.toLowerCase key))
|
((when (KEY_MAP.exists key) key)
|
||||||
(otherwise (throw "FlxKey.toString returned null!")))))))
|
(dictGet KEY_MAP key))
|
||||||
|
((when FlxG.keys.pressed.SHIFT key)
|
||||||
|
(.toUpperCase key))
|
||||||
|
(key (.toLowerCase key))
|
||||||
|
(otherwise (throw "FlxKey.toString returned null!"))))))))))
|
||||||
Reference in New Issue
Block a user