about summary refs log tree commit diff
path: root/users/grfn/xanthous
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-11-13T15·50-0500
committergrfn <grfn@gws.fyi>2021-11-13T15·57+0000
commit608e6e778eaf0aa012661063be2f6017da5fd7ac (patch)
tree578e1a702b89f860685265a11c99d0deb9ec764d /users/grfn/xanthous
parent8d82bf2d36a679b7f965701a2edec0716f82b1a5 (diff)
feat(gs/xanthous): Allow moving with the arrow keys r/3063
some... *ahem*... very insistent people have been asking for this,
despite the fact that it doesn't allow for diagonal movement.

Change-Id: Ic58e2435b34e27e3ed399c7b8f3bcbc1f634f6b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3870
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/grfn/xanthous')
-rw-r--r--users/grfn/xanthous/src/Xanthous/Command.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/users/grfn/xanthous/src/Xanthous/Command.hs b/users/grfn/xanthous/src/Xanthous/Command.hs
index 92bb0dca29..187e5c16d7 100644
--- a/users/grfn/xanthous/src/Xanthous/Command.hs
+++ b/users/grfn/xanthous/src/Xanthous/Command.hs
@@ -59,6 +59,11 @@ commandFromKey (KChar '<') [] = Just GoUp
 commandFromKey (KChar '>') [] = Just GoDown
 commandFromKey (KChar 'R') [] = Just Rest
 
+commandFromKey KUp [] = Just $ Move Up
+commandFromKey KDown [] = Just $ Move Down
+commandFromKey KLeft [] = Just $ Move Left
+commandFromKey KRight [] = Just $ Move Right
+
 -- DEBUG COMMANDS --
 commandFromKey (KChar 'r') [MMeta] = Just ToggleRevealAll