Skip to content

Commit

Permalink
Remove unnecessary vty event handler for extra hot keys.
Browse files Browse the repository at this point in the history
As EvKey KDown and KUp seem to have default behavior on the forms used.
  • Loading branch information
ffakenz committed Mar 14, 2024
1 parent 89ec3f6 commit 6e32886
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions hydra-tui/src/Hydra/TUI/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ handleEvent ::
BrickEvent Name (HydraEvent Tx) ->
EventM Name RootState ()
handleEvent cardanoClient client e = do
handleVtyEventVia (handleExtraHotkeys (handleEvent cardanoClient client)) () e
zoom logStateL $ handleVtyEventVia handleVtyEventsLogState () e
handleAppEventVia handleTick () e
zoom connectedStateL $ do
Expand All @@ -55,12 +54,6 @@ handleEvent cardanoClient client e = do
-- Any `EventM` that decides to `Continue` would override the `Halt` decision.
handleGlobalEvents e

handleExtraHotkeys :: (BrickEvent w e -> EventM n s ()) -> Vty.Event -> EventM n s ()
handleExtraHotkeys f = \case
EvKey KDown [] -> f $ VtyEvent $ EvKey (KChar '\t') []
EvKey KUp [] -> f $ VtyEvent $ EvKey KBackTab []
_ -> pure ()

handleTick :: HydraEvent Tx -> EventM Name RootState ()
handleTick = \case
Tick now -> nowL .= now
Expand Down

0 comments on commit 6e32886

Please sign in to comment.