-
Notifications
You must be signed in to change notification settings - Fork 169
Description
I accidentally wrote a keybinding in uppercase, like Ctrl-T, and it turns out this means it parses successfully, with no errors or warnings, but simply does not work --- both Ctrl-t and Ctrl-Shift-t do nothing. I suspect it turns into a keybinding which is impossible to ever see, because Ctrl-Shift-t is not the same as Ctrl-T. Well, I don't know, perhaps it is possible to get Ctrl-T by turning on caps lock and then typing Ctrl-t? In any case it seems like some kind of warning here would be nice.
@byorgey in swarm-game/swarm#1979 (comment)
I am also confused by the behavior. Neither the Brick nor Vty documentation specifies what the case should be.
I suspect this code:
brick/src/Brick/Keybindings/Parse.hs
Lines 126 to 128 in 79c9317
pKey t | |
| T.length t == 1 = | |
return (Vty.KChar $ T.last s) |
Should use the lowercase
t
instead of the original s
text:
pKey t
| [c] <- T.unpack t = return (Vty.KChar c)
Either way, I tried configuring a keybinding with Ctrl and Shift and could not get it to run:
; these do not seem to work
pause = S-C-P,S-C-p,C-P,S-P,S-p
; without shift it works
pause = C-p