fix(config): resolve enter key submission and keybinding issues (#89)
closes #88 closes #85
This commit is contained in:
@@ -15,6 +15,15 @@ func MatchKey(input []byte, expected string) (matched bool, consumed int) {
|
||||
expected = strings.ToLower(strings.TrimSpace(expected))
|
||||
expected = strings.TrimPrefix(expected, "<")
|
||||
expected = strings.TrimSuffix(expected, ">")
|
||||
expected = strings.ReplaceAll(expected, "-", "+")
|
||||
expected = strings.ReplaceAll(expected, "ctrk", "ctrl")
|
||||
expected = strings.ReplaceAll(expected, "ctl", "ctrl")
|
||||
|
||||
if len(expected) == 1 {
|
||||
if input[0] == expected[0] {
|
||||
return true, 1
|
||||
}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(expected, "ctrl+") && len(expected) == 6 {
|
||||
char := expected[5]
|
||||
|
||||
Reference in New Issue
Block a user