diff options
Diffstat (limited to 'src/Chelleport.hs')
| -rw-r--r-- | src/Chelleport.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Chelleport.hs b/src/Chelleport.hs index ae5ec6e..d00d112 100644 --- a/src/Chelleport.hs +++ b/src/Chelleport.hs @@ -53,11 +53,16 @@ eventHandler event = SDL.QuitEvent -> Just ShutdownApp SDL.KeyboardEvent ev | isKeyPressWith ev SDL.KeycodeEscape -> Just ShutdownApp + | isKeyPressWith ev SDL.KeycodeMinus || isKeyPressWith ev SDL.KeycodeUnderscore -> + if withShift ev + then Just $ ChainMouseClick RightClick + else Just $ TriggerMouseClick RightClick | isKeyPressWith ev SDL.KeycodeSpace -> if withShift ev then Just $ ChainMouseClick LeftClick else Just $ TriggerMouseClick LeftClick - | isKeyPressWith ev SDL.KeycodeTab -> Just ResetKeys + | isKeyPressWith ev SDL.KeycodeTab || isKeyPressWith ev SDL.KeycodeBackspace -> + Just ResetKeys | isKeyPressed ev && isValidKey (eventToKeycode ev) -> Just $ HandleKeyInput $ eventToKeycode ev | isKeyPressWith ev SDL.KeycodeLShift || isKeyPressWith ev SDL.KeycodeRShift -> |
