aboutsummaryrefslogtreecommitdiffhomepage
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs13
1 files changed, 12 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index b834218..b166ba2 100644
--- a/Main.hs
+++ b/Main.hs
@@ -66,8 +66,18 @@ drawUI st = [ui]
]
)
+handleQ :: St -> EventM () (Next St)
+handleQ st = undefined
+
+handleRET :: St -> EventM () (Next St)
+handleRET st = undefined
+
+handleSPC :: St -> EventM () (Next St)
+handleSPC st = undefined
+
handleHotKey :: St -> Char -> EventM () (Next St)
-handleHotKey st 'q' = halt st
+handleHotKey st 'q' = handleQ st
+handleHotKey st ' ' = handleSPC st
handleHotKey st 'o' = continue $ st & stOCR .~ (not $ st^.stOCR)
handleHotKey st 'c' = continue $
st & stColour .~ (cycleColour $ st^.stColour)
@@ -80,6 +90,7 @@ handleHotKey st c = case lookupPreset c of
appEvent :: St -> BrickEvent () e -> EventM () (Next St)
appEvent st (VtyEvent e) =
case e of
+ V.EvKey (V.KEnter) [] -> handleRET st
V.EvKey (V.KChar c) [] -> handleHotKey st c
_ -> continue st
appEvent st _ = continue st