mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-09-11 23:57:22 +03:00
CustomKeybindingDemo: add an example of a hard-coded key event handler
This commit is contained in:
parent
4884df8aa6
commit
d7f8e4daf4
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user