Dont encode enter, tab and backspace when lock mods are set

Otherwise user cant type reset when num lock is set.
This commit is contained in:
Kovid Goyal
2025-01-01 06:10:47 +05:30
parent f13ee32c3c
commit dd249df5eb
2 changed files with 12 additions and 0 deletions

View File

@@ -441,6 +441,9 @@ class TestKeys(BaseTest):
tq = partial(enc, key_encoding_flags=0b11)
ae(tq(defines.GLFW_FKEY_BACKSPACE), '\x7f')
ae(tq(defines.GLFW_FKEY_BACKSPACE, action=release), '')
tq = partial(enc, key_encoding_flags=0b11, mods=num_lock|caps_lock)
ae(tq(defines.GLFW_FKEY_ENTER), '\r')
ae(tq(defines.GLFW_FKEY_ENTER, action=release), '')
# test alternate key reporting
aq = partial(enc, key_encoding_flags=0b100)