ynHandler should ignore keypresses with modifier keys

This commit is contained in:
Jonathan Lamothe 2023-06-02 15:26:22 -04:00
parent 886cf0b243
commit e0efe2657f

View File

@ -27,7 +27,7 @@ import Graphics.Vty.Input.Events (Event (EvKey), Key (KChar))
-- | Handler for a yes/no prompt
ynHandler :: BrickEvent () () -> Maybe Bool
ynHandler (VtyEvent (EvKey (KChar c) _)) = case toUpper c of
ynHandler (VtyEvent (EvKey (KChar c) [])) = case toUpper c of
'Y' -> Just True
'N' -> Just False
_ -> Nothing