Special-case shift-tab and map it to GDK_ISO_Left_Tab, fixes bug #350806.

2006-09-06  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkkeys-quartz.c: (maybe_update_keymap): Special-case
	shift-tab and map it to GDK_ISO_Left_Tab, fixes bug #350806.
This commit is contained in:
Richard Hult 2006-09-06 17:29:28 +00:00 committed by Richard Hult
parent 0f830ba9d9
commit 7724832996
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-09-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkkeys-quartz.c: (maybe_update_keymap): Special-case
shift-tab and map it to GDK_ISO_Left_Tab, fixes bug #350806.
2006-09-04 Kristian Rietveld <kris@imendio.com>
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):

View File

@ -206,7 +206,7 @@ maybe_update_keymap (void)
for (i = 0; i < NUM_KEYCODES; i++)
{
int j;
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey|optionKey};
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
p = keyval_array + i * KEYVALS_PER_KEYCODE;
@ -216,7 +216,7 @@ maybe_update_keymap (void)
UInt16 key_code;
UniChar uc;
key_code = modifiers[j]|i;
key_code = modifiers[j] | i;
c = KeyTranslate (chr_data, key_code, &state);
if (state != 0)
@ -248,6 +248,12 @@ maybe_update_keymap (void)
}
}
/* Special-case shift-tab since GTK+ expects
* GDK_ISO_Left_Tab for that.
*/
if (found && p[j] == GDK_Tab && modifiers[j] == shiftKey)
p[j] = GDK_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
}
@ -275,7 +281,7 @@ maybe_update_keymap (void)
for (i = 0; i < NUM_KEYCODES; i++)
{
int j;
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey|optionKey};
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
UniChar chars[4];
UniCharCount nChars;
@ -288,7 +294,7 @@ maybe_update_keymap (void)
UInt16 key_code;
UniChar uc;
key_code = modifiers[j]|i;
key_code = modifiers[j] | i;
err = UCKeyTranslate (chr_data, i, kUCKeyActionDown,
(modifiers[j] >> 8) & 0xFF,
LMGetKbdType(),