Map Alt to Alt and Cmd to Meta. This is not only more logical but also

2008-04-30  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c:
	(get_keyboard_modifiers_from_ns_event), (create_key_event): Map
	Alt to Alt and Cmd to Meta. This is not only more logical but also
	makes it easier to have Mac-like behavior.

svn path=/trunk/; revision=20054
This commit is contained in:
Richard Hult 2008-04-30 17:42:27 +00:00 committed by Richard Hult
parent 5f32702708
commit 49f341f12c
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2008-04-30 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(get_keyboard_modifiers_from_ns_event), (create_key_event): Map
Alt to Alt and Cmd to Meta. This is not only more logical but also
makes it easier to have Mac-like behavior.
2008-04-25 Björn Lindqvist <bjourne@gmail.com>
* gtk/gtkentry.c: (gtk_entry_expose) Use existing window size when

View File

@ -480,6 +480,8 @@ get_keyboard_modifiers_from_ns_event (NSEvent *nsevent)
if (nsflags & NSControlKeyMask)
modifiers |= GDK_CONTROL_MASK;
if (nsflags & NSCommandKeyMask)
modifiers |= GDK_META_MASK;
if (nsflags & NSAlternateKeyMask)
modifiers |= GDK_MOD1_MASK;
return modifiers;
@ -1585,7 +1587,7 @@ create_key_event (GdkWindow *window,
{
case GDK_Meta_R:
case GDK_Meta_L:
mask = GDK_MOD1_MASK;
mask = GDK_META_MASK;
break;
case GDK_Shift_R:
case GDK_Shift_L:
@ -1596,7 +1598,7 @@ create_key_event (GdkWindow *window,
break;
case GDK_Alt_R:
case GDK_Alt_L:
mask = GDK_MOD5_MASK;
mask = GDK_MOD1_MASK;
break;
case GDK_Control_R:
case GDK_Control_L:
@ -2032,4 +2034,3 @@ gdk_screen_get_setting (GdkScreen *screen,
return FALSE;
}