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:
Chris Jones 2009-03-27 12:20:12 +00:00
parent 8b3b71599a
commit 9d4e07f0bf
1 changed files with 10 additions and 3 deletions

View File

@ -849,6 +849,13 @@ text/plain
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)
# handle the case where user has re-bound copy to ctrl+<key>
# 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)() getattr(self, "key_" + mapping)()
return True return True