Pass KEY_UNDO and KEY_REDO to core. (Currently ignored.)

This commit is contained in:
Michael Drake 2013-09-30 21:37:31 +01:00
parent 704e5cc839
commit 10b422b163

View File

@ -1089,6 +1089,17 @@ uint32_t gtk_gui_gdkkey_to_nskey(GdkEventKey *key)
if (key->state & GDK_CONTROL_MASK)
return KEY_CUT_SELECTION;
return gdk_keyval_to_unicode(key->keyval);
case 'y':
if (key->state & GDK_CONTROL_MASK)
return KEY_REDO;
return gdk_keyval_to_unicode(key->keyval);
case 'z':
if (key->state & GDK_CONTROL_MASK &&
key->state & GDK_SHIFT_MASK)
return KEY_REDO;
if (key->state & GDK_CONTROL_MASK)
return KEY_UNDO;
return gdk_keyval_to_unicode(key->keyval);
case GDK_KEY(Escape):
return KEY_ESCAPE;