fix Ctrl+C handling. Fixes #1503
This commit is contained in:
parent
be9aa8ba8c
commit
6ec5d3e689
|
@ -556,10 +556,11 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
|||
def _conv_textview_key_press_event(self, widget, event):
|
||||
# translate any layout to latin_layout
|
||||
keymap = gtk.gdk.keymap_get_default()
|
||||
keycode, group, level = keymap.get_entries_for_keyval(event.keyval)[0]
|
||||
keycodec, group, level = keymap.get_entries_for_keyval(gtk.keysyms.c)[0]
|
||||
if (event.state & gtk.gdk.CONTROL_MASK and event.keyval in (keycodec,
|
||||
gtk.keysyms.Insert)) or (event.state & gtk.gdk.SHIFT_MASK and \
|
||||
keycode = keymap.get_entries_for_keyval(event.keyval)[0][0]
|
||||
keycode_c = keymap.get_entries_for_keyval(gtk.keysyms.c)[0][0]
|
||||
keycode_ins = keymap.get_entries_for_keyval(gtk.keysyms.Insert)[0][0]
|
||||
if (event.state & gtk.gdk.CONTROL_MASK and keycode in (keycode_c,
|
||||
keycode_ins)) or (event.state & gtk.gdk.SHIFT_MASK and \
|
||||
event.keyval in (gtk.keysyms.Page_Down, gtk.keysyms.Page_Up)):
|
||||
return False
|
||||
self.parent_win.notebook.emit('key_press_event', event)
|
||||
|
|
Loading…
Reference in New Issue