fix(config): resolve enter key submission and keybinding issues (#89)

closes #88
closes #85
This commit is contained in:
VERSE
2026-07-31 18:38:31 +07:00
committed by GitHub
parent 85a9a7d55d
commit 235a7f98ea
3 changed files with 54 additions and 9 deletions
+9
View File
@@ -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]