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:
Thomas Hurst 2009-01-26 16:33:00 +00:00
parent 7517c02aa7
commit 58e4722763
1 changed files with 2 additions and 2 deletions

View File

@ -87,10 +87,10 @@ class TerminatorKeybindings:
def lookup(self, event):
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:
err ("keybindings.lookup failed to translate keyboard event: %s"%dir(event))
return None
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)