From 608e6e778eaf0aa012661063be2f6017da5fd7ac Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 13 Nov 2021 10:50:00 -0500 Subject: [PATCH] feat(gs/xanthous): Allow moving with the arrow keys 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 Tested-by: BuildkiteCI --- users/grfn/xanthous/src/Xanthous/Command.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/users/grfn/xanthous/src/Xanthous/Command.hs b/users/grfn/xanthous/src/Xanthous/Command.hs index 92bb0dca2..187e5c16d 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