Keyboard protocol: Fix the Enter Tab and Backspace keys generating spurious release events even when report all keys as escape codes is not set

Fixes #7136
This commit is contained in:
Kovid Goyal
2024-02-18 11:12:24 +05:30
parent d35f391725
commit b2391553f9
4 changed files with 21 additions and 3 deletions

View File

@@ -438,6 +438,9 @@ class TestKeys(BaseTest):
ae(tq(ord('a'), action=defines.GLFW_REPEAT), csi(num='a', action=2))
ae(tq(ord('a'), action=defines.GLFW_RELEASE), csi(num='a', action=3))
ae(tq(ord('a'), action=defines.GLFW_RELEASE, mods=shift), csi(shift, num='a', action=3))
tq = partial(enc, key_encoding_flags=0b11)
ae(tq(defines.GLFW_FKEY_BACKSPACE), '\x7f')
ae(tq(defines.GLFW_FKEY_BACKSPACE, action=release), '')
# test alternate key reporting
aq = partial(enc, key_encoding_flags=0b100)