Abandon attempts to handle empty keypress events. Relates to LP #280959
This commit is contained in:
parent
3d5bc38964
commit
46774d8f9e
|
@ -81,6 +81,8 @@ class TerminatorKeybindings:
|
|||
raise KeymapError("Unhandled modifier '<%s>'" % modifier)
|
||||
|
||||
def lookup(self, event):
|
||||
if not event:
|
||||
raise KeymapError("lookup called with no event")
|
||||
keyval, egroup, level, consumed = self.keymap.translate_keyboard_state(event.hardware_keycode, event.state, event.group)
|
||||
mask = (event.state & ~consumed) & self._masks
|
||||
return self._lookup.get(mask, self.empty).get(event.keyval, None)
|
||||
|
|
|
@ -676,6 +676,9 @@ text/plain
|
|||
#the selected terminal)
|
||||
UnhandledKeybindings = ('close_window', 'full_screen')
|
||||
def on_vte_key_press (self, term, event):
|
||||
if not event:
|
||||
dbg ('on_vte_key_press: Called on %s with no event'%term)
|
||||
return False
|
||||
mapping = self.terminator.keybindings.lookup(event)
|
||||
|
||||
if mapping and mapping not in self.UnhandledKeybindings:
|
||||
|
|
Loading…
Reference in New Issue