This commit is contained in:
Vaclav Tvrdik
2026-09-09 21:42:37 +02:00
parent 301f1f8114
commit 00bab25d5d
9 changed files with 134 additions and 11 deletions

View File

@@ -52,6 +52,15 @@ for char in string.ascii_letters + string.digits + string.punctuation:
assert produced == char, "{!r} would send {!r}".format(char, produced)
assert get_key_code(key="space") == " ", "space must send a space"
# legacy encodings by default; while the app has modifyOtherKeys on, the keys
# whose modified form is ambiguous take the CSI 27 form instead. pi reads a
# bare ESC CR as alt+enter and submits on it
assert get_key_code(key="enter", shift=True) == "\x1b\r"
assert get_key_code(key="enter", shift=True, modify_other_keys=2) == "\x1b[27;2;13~"
assert get_key_code(key="space", ctrl=True, modify_other_keys=2) == "\x1b[27;5;32~"
assert get_key_code(key="enter", modify_other_keys=2) == "\r", "unmodified keys stay legacy"
assert get_key_code(key="c", ctrl=True, modify_other_keys=2) == "\x03", "ctrl+c stays a control byte"
load_sublime_json("Default (OSX).sublime-mousemap")
# scheme manager produces scopes and rules