diff --git a/hledger-ui/Hledger/UI/AccountsScreen.hs b/hledger-ui/Hledger/UI/AccountsScreen.hs index 00371d9e0..dbb8ce128 100644 --- a/hledger-ui/Hledger/UI/AccountsScreen.hs +++ b/hledger-ui/Hledger/UI/AccountsScreen.hs @@ -144,7 +144,8 @@ asDraw AppState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}} bottomlabel = borderKeysStr [ -- ("up/down/pgup/pgdown/home/end", "move") - ("-=1234567890", "depth") + ("a", "add") + ,("-=1234567890", "depth") ,("F", "flat?") ,("E", "nonzero?") ,("C", "cleared?") @@ -255,6 +256,7 @@ asHandle st'@AppState{ -- Vty.EvKey (Vty.KChar 'l') [Vty.MCtrl] -> do Vty.EvKey Vty.KEsc [] -> continue $ resetScreens d st Vty.EvKey (Vty.KChar 'g') [] -> liftIO (stReloadJournalIfChanged copts d j st) >>= continue + Vty.EvKey (Vty.KChar 'a') [] -> suspendAndResume $ add copts j >> stReloadJournalIfChanged copts d j st Vty.EvKey (Vty.KChar '-') [] -> continue $ regenerateScreens j d $ decDepth st Vty.EvKey (Vty.KChar '+') [] -> continue $ regenerateScreens j d $ incDepth st Vty.EvKey (Vty.KChar '=') [] -> continue $ regenerateScreens j d $ incDepth st diff --git a/hledger-ui/Hledger/UI/RegisterScreen.hs b/hledger-ui/Hledger/UI/RegisterScreen.hs index e51bef5d2..b874f8c60 100644 --- a/hledger-ui/Hledger/UI/RegisterScreen.hs +++ b/hledger-ui/Hledger/UI/RegisterScreen.hs @@ -179,6 +179,7 @@ rsDraw AppState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}} bottomlabel = borderKeysStr [ -- ("up/down/pgup/pgdown/home/end", "move") ("left", "back") + ,("a", "add") ,("E", "nonzero?") ,("C", "cleared?") ,("U", "uncleared?") @@ -235,6 +236,7 @@ rsHandle st@AppState{ Vty.EvKey (Vty.KChar 'q') [] -> halt st Vty.EvKey Vty.KEsc [] -> continue $ resetScreens d st Vty.EvKey (Vty.KChar 'g') [] -> liftIO (stReloadJournalIfChanged copts d j st) >>= continue + Vty.EvKey (Vty.KChar 'a') [] -> suspendAndResume $ add copts j >> stReloadJournalIfChanged copts d j st Vty.EvKey (Vty.KChar 'E') [] -> scrollTop >> (continue $ regenerateScreens j d $ stToggleEmpty st) Vty.EvKey (Vty.KChar 'C') [] -> scrollTop >> (continue $ regenerateScreens j d $ stToggleCleared st) Vty.EvKey (Vty.KChar 'U') [] -> scrollTop >> (continue $ regenerateScreens j d $ stToggleUncleared st)