ynHandler should ignore keypresses with modifier keys
This commit is contained in:
parent
886cf0b243
commit
e0efe2657f
|
@ -27,7 +27,7 @@ import Graphics.Vty.Input.Events (Event (EvKey), Key (KChar))
|
||||||
|
|
||||||
-- | Handler for a yes/no prompt
|
-- | Handler for a yes/no prompt
|
||||||
ynHandler :: BrickEvent () () -> Maybe Bool
|
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
|
'Y' -> Just True
|
||||||
'N' -> Just False
|
'N' -> Just False
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
|
|
Loading…
Reference in New Issue
Block a user