parseBinding: do not ignore case on parsed base key character

This commit is contained in:
Jonathan Daugherty 2022-08-01 11:56:25 -07:00
parent 276cf22331
commit e8557117e7

View File

@ -113,8 +113,8 @@ parseBinding s = go (T.splitOn "-" $ T.toLower s) []
pKey "space" = return (Vty.KChar ' ')
pKey "tab" = return (Vty.KChar '\t')
pKey t
| Just (c, "") <- T.uncons t =
return (Vty.KChar c)
| T.length t == 1 =
return (Vty.KChar $ T.last s)
| Just n <- T.stripPrefix "f" t =
case readMaybe (T.unpack n) of
Nothing -> Left ("Unknown keybinding: " ++ show t)