CustomKeybindingDemo: add an example of a hard-coded key event handler

This commit is contained in:
Jonathan Daugherty 2022-08-02 19:48:47 -07:00
parent 4884df8aa6
commit d7f8e4daf4

View File

@ -66,6 +66,8 @@ handlers =
counter %= succ
, K.onEvent DecrementEvent "Decrement the counter" $
counter %= subtract 1
, K.onKey (K.bind '\t') "Increment the counter by 10" $
counter %= (+ 10)
]
appEvent :: T.BrickEvent () e -> T.EventM () St ()