mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Fix a regression in 0.26.0 that broke mapping of native keys who key codes did not fit in 21 bits
Fixes #5452
This commit is contained in:
@@ -535,7 +535,7 @@ class TestDataTypes(BaseTest):
|
||||
q('a\x1b[bc', 'ac')
|
||||
q('a\x1b[12;34:43mbc', 'abc')
|
||||
|
||||
def test_SingleKey(self):
|
||||
def test_single_key(self):
|
||||
from kitty.fast_data_types import (
|
||||
GLFW_MOD_KITTY, GLFW_MOD_SHIFT, SingleKey
|
||||
)
|
||||
@@ -548,6 +548,7 @@ class TestDataTypes(BaseTest):
|
||||
self.ae(repr(SingleKey(key=23, mods=2, is_native=True)), 'SingleKey(mods=2, is_native=True, key=23)')
|
||||
self.ae(repr(SingleKey(key=23, mods=2)), 'SingleKey(mods=2, key=23)')
|
||||
self.ae(repr(SingleKey(key=23)), 'SingleKey(key=23)')
|
||||
self.ae(repr(SingleKey(key=0x1008ff57)), 'SingleKey(key=269025111)')
|
||||
self.ae(repr(SingleKey(key=23)._replace(mods=2)), 'SingleKey(mods=2, key=23)')
|
||||
self.ae(repr(SingleKey(key=23)._replace(key=-1, mods=GLFW_MOD_KITTY)), f'SingleKey(mods={GLFW_MOD_KITTY})')
|
||||
self.assertEqual(SingleKey(key=1), SingleKey(key=1))
|
||||
|
||||
Reference in New Issue
Block a user