Pass various control keys to core for clipboard control, etc.

This commit is contained in:
Michael Drake 2013-01-08 12:07:56 +00:00
parent 87ee963ff2
commit 8314101ada

View File

@ -1028,7 +1028,19 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
return gdk_keyval_to_unicode(key->keyval);
case 'u':
if (key->state & GDK_CONTROL_MASK)
return KEY_CLEAR_SELECTION;
return KEY_CUT_LINE;
return gdk_keyval_to_unicode(key->keyval);
case 'c':
if (key->state & GDK_CONTROL_MASK)
return KEY_COPY_SELECTION;
return gdk_keyval_to_unicode(key->keyval);
case 'v':
if (key->state & GDK_CONTROL_MASK)
return KEY_PASTE;
return gdk_keyval_to_unicode(key->keyval);
case 'x':
if (key->state & GDK_CONTROL_MASK)
return KEY_CUT_SELECTION;
return gdk_keyval_to_unicode(key->keyval);
case GDK_KEY(Escape):
return KEY_ESCAPE;