aboutsummaryrefslogtreecommitdiffhomepage
path: root/UI.hs
diff options
context:
space:
mode:
Diffstat (limited to 'UI.hs')
-rw-r--r--UI.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/UI.hs b/UI.hs
index b685c18..872b30a 100644
--- a/UI.hs
+++ b/UI.hs
@@ -99,16 +99,20 @@ drawUI st = [ui]
)
handleQ :: St -> EventM () (Next St)
-handleQ st = undefined
+handleQ st = halt $ ifScanSess st
+ (setScanSessCommand Finalise st)
+ (resetScanSess st)
handleRET :: St -> EventM () (Next St)
-handleRET st = undefined
+handleRET st = halt $ setScanSessCommand FinalPage st
handleSPC :: St -> EventM () (Next St)
-handleSPC st = undefined
+handleSPC st = halt $ setScanSessCommand NextPage st
handleESC :: St -> EventM () (Next St)
-handleESC st = undefined
+handleESC st = ifScanSess st
+ (halt $ setScanSessCommand Abort st)
+ (continue st)
handleHotKey :: St -> Char -> EventM () (Next St)
handleHotKey st 'q' = handleQ st