mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 09:18:08 +02:00
Unicode input kitten: Fix a regression in 0.20.0 that broke keyboard handling when the num lock or caps lock modifiers were engaged.
Fixes #3587
This commit is contained in:
@@ -416,7 +416,7 @@ class UnicodeInput(Handler):
|
||||
self.refresh()
|
||||
|
||||
def on_key(self, key_event: KeyEvent) -> None:
|
||||
if self.mode is HEX and key_event.type is not EventType.RELEASE and not key_event.mods:
|
||||
if self.mode is HEX and key_event.type is not EventType.RELEASE and not key_event.has_mods:
|
||||
try:
|
||||
val = int(self.line_edit.current_input, 16)
|
||||
except Exception:
|
||||
@@ -434,7 +434,7 @@ class UnicodeInput(Handler):
|
||||
self.line_edit.current_input = hex(val - 1)[2:]
|
||||
self.refresh()
|
||||
return
|
||||
if self.mode is NAME and key_event.type is not EventType.RELEASE and not key_event.mods:
|
||||
if self.mode is NAME and key_event.type is not EventType.RELEASE and not key_event.has_mods:
|
||||
if key_event.matches('shift+tab'):
|
||||
self.table.move_current(cols=-1)
|
||||
self.refresh()
|
||||
|
||||
Reference in New Issue
Block a user