diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ca9bf18b10..8bcb4a17ec2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ changes. - **BREAKING** Changes to persisted state: - The internal chain state serialization changed when switching to inline datums. +- Fixed TUI key bindings for exiting in dialogs. + ## [0.13.0] - 2023-10-03 - **BREAKING** Update to plutus 1.9. This changes the script hashes. diff --git a/hydra-tui/src/Hydra/TUI/Handlers.hs b/hydra-tui/src/Hydra/TUI/Handlers.hs index 5842edfb2f6..307cf56ce28 100644 --- a/hydra-tui/src/Hydra/TUI/Handlers.hs +++ b/hydra-tui/src/Hydra/TUI/Handlers.hs @@ -43,7 +43,6 @@ handleEvent :: BrickEvent Name (HydraEvent Tx) -> EventM Name RootState () handleEvent cardanoClient client e = do - handleGlobalEvents e handleVtyEventVia (handleExtraHotkeys (handleEvent cardanoClient client)) () e zoom logStateL $ handleVtyEventVia handleVtyEventsLogState () e handleAppEventVia handleTick () e @@ -52,6 +51,9 @@ handleEvent cardanoClient client e = do zoom connectionL $ handleBrickEventsConnection cardanoClient client e zoom (logStateL . logMessagesL) $ handleAppEventVia handleHydraEventsInfo () e + -- XXX: Global events must be handled as the very last step. + -- 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 diff --git a/hydra-tui/src/Hydra/TUI/Handlers/Global.hs b/hydra-tui/src/Hydra/TUI/Handlers/Global.hs index a0b90ba8d6c..6aacebeabb2 100644 --- a/hydra-tui/src/Hydra/TUI/Handlers/Global.hs +++ b/hydra-tui/src/Hydra/TUI/Handlers/Global.hs @@ -11,6 +11,7 @@ handleVtyQuitEvents = \case EvKey (KChar 'c') [MCtrl] -> halt EvKey (KChar 'd') [MCtrl] -> halt EvKey (KChar 'q') [] -> halt + EvKey (KChar 'Q') [] -> halt _ -> pure () handleVtyGlobalEvents :: Vty.Event -> EventM n s ()