Block LOCK_MASK from reaching translate_keyboard_state: <Ctrl><Capslock>E now no longer behaves like <Ctrl><Shift>E, the state of capslock is completely ignored for keybinding purposes.
This commit is contained in:
parent
7517c02aa7
commit
58e4722763
|
@ -87,10 +87,10 @@ class TerminatorKeybindings:
|
||||||
|
|
||||||
def lookup(self, event):
|
def lookup(self, event):
|
||||||
try:
|
try:
|
||||||
keyval, egroup, level, consumed = self.keymap.translate_keyboard_state(event.hardware_keycode, event.state, event.group)
|
keyval, egroup, level, consumed = self.keymap.translate_keyboard_state(event.hardware_keycode, event.state & ~gtk.gdk.LOCK_MASK, event.group)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
err ("keybindings.lookup failed to translate keyboard event: %s"%dir(event))
|
err ("keybindings.lookup failed to translate keyboard event: %s"%dir(event))
|
||||||
return None
|
return None
|
||||||
mask = (event.state & ~consumed) & self._masks
|
mask = (event.state & ~consumed) & self._masks
|
||||||
return self._lookup.get(mask, self.empty).get(event.keyval, None)
|
return self._lookup.get(mask, self.empty).get(keyval, None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue