If people are mad enough to use Ctrl-C for Copy, at least let them still be able to kill things. Closes LP #340604
This commit is contained in:
parent
8b3b71599a
commit
9d4e07f0bf
|
@ -848,9 +848,16 @@ text/plain
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if mapping and mapping not in self.UnhandledKeybindings:
|
if mapping and mapping not in self.UnhandledKeybindings:
|
||||||
dbg("on_vte_key_press: lookup found %r" % mapping)
|
dbg("on_vte_key_press: lookup found %r" % mapping)
|
||||||
getattr(self, "key_" + mapping)()
|
# handle the case where user has re-bound copy to ctrl+<key>
|
||||||
return True
|
# we only copy if there is a selection otherwise let it fall through to ^<key>
|
||||||
|
if (mapping == "copy" and event.state & gtk.gdk.CONTROL_MASK):
|
||||||
|
if self._vte.get_has_selection ():
|
||||||
|
getattr(self, "key_" + mapping)()
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
getattr(self, "key_" + mapping)()
|
||||||
|
return True
|
||||||
|
|
||||||
if self._group and self._vte.is_focus ():
|
if self._group and self._vte.is_focus ():
|
||||||
self.terminator.group_emit (self, self._group, 'key-press-event', event)
|
self.terminator.group_emit (self, self._group, 'key-press-event', event)
|
||||||
|
|
Loading…
Reference in New Issue