Index: gtk/gtkstock.c
===================================================================
--- gtk/gtkstock.c	(revision 18074)
+++ gtk/gtkstock.c	(working copy)
@@ -35,6 +35,7 @@
 
 static GHashTable *translate_hash = NULL;
 static GHashTable *stock_hash = NULL;
+static GHashTable *special_keys_hash = NULL;
 static void init_stock_hash (void);
 
 /* We use an unused modifier bit to mark stock items which
@@ -50,6 +51,20 @@
   GtkDestroyNotify notify;
 };
 
+typedef struct _GtkStockItemKey GtkStockItemKey;
+struct _GtkStockItemKey
+{
+  GdkModifierType modifier;
+  guint keyval;
+};
+
+typedef struct _GtkStockItemPrivate GtkStockItemPrivate;
+struct _GtkStockItemPrivate
+{
+  GtkStockItem item;
+  GtkStockItemKey special_key;
+};
+
 static void
 real_add (const GtkStockItem *items,
           guint               n_items,
@@ -281,126 +296,126 @@
   g_free (item);
 }
 
-static const GtkStockItem builtin_items [] =
+static const GtkStockItemPrivate builtin_items [] =
 {
   /* KEEP IN SYNC with gtkiconfactory.c stock icons, when appropriate */ 
  
-  { GTK_STOCK_DIALOG_INFO, N_("Information"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_DIALOG_WARNING, N_("Warning"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_DIALOG_ERROR, N_("Error"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_DIALOG_QUESTION, N_("Question"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_DIALOG_INFO, N_("Information"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_DIALOG_WARNING, N_("Warning"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_DIALOG_ERROR, N_("Error"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_DIALOG_QUESTION, N_("Question"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
 
   /*  FIXME these need accelerators when appropriate, and
    * need the mnemonics to be rationalized
    */
-  { GTK_STOCK_ABOUT, N_("_About"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ADD, N_("_Add"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_APPLY, N_("_Apply"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_BOLD, N_("_Bold"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_CANCEL, N_("_Cancel"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_CDROM, N_("_CD-Rom"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_CLEAR, N_("_Clear"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_CLOSE, N_("_Close"), GDK_CONTROL_MASK, 'w', GETTEXT_PACKAGE },
-  { GTK_STOCK_CONNECT, N_("C_onnect"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_CONVERT, N_("_Convert"), 0, 0, GETTEXT_PACKAGE },
-   { GTK_STOCK_COPY, N_("_Copy"), GDK_CONTROL_MASK, 'c', GETTEXT_PACKAGE },
-  { GTK_STOCK_CUT, N_("Cu_t"), GDK_CONTROL_MASK, 'x', GETTEXT_PACKAGE },
-  { GTK_STOCK_DELETE, N_("_Delete"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_DISCONNECT, N_("_Disconnect"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_EXECUTE, N_("_Execute"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_EDIT, N_("_Edit"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_FIND, N_("_Find"), GDK_CONTROL_MASK, 'f', GETTEXT_PACKAGE },
-  { GTK_STOCK_FIND_AND_REPLACE, N_("Find and _Replace"), GDK_CONTROL_MASK, 'r', GETTEXT_PACKAGE },
-  { GTK_STOCK_FLOPPY, N_("_Floppy"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_ABOUT, N_("_About"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ADD, N_("_Add"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_APPLY, N_("_Apply"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_BOLD, N_("_Bold"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_CANCEL, N_("_Cancel"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Cancel } },
+  { { GTK_STOCK_CDROM, N_("_CD-Rom"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_CLEAR, N_("_Clear"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Clear } },
+  { { GTK_STOCK_CLOSE, N_("_Close"), GDK_CONTROL_MASK, 'w', GETTEXT_PACKAGE }, { 0, GDK_Close } },
+  { { GTK_STOCK_CONNECT, N_("C_onnect"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_CONVERT, N_("_Convert"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_COPY, N_("_Copy"), GDK_CONTROL_MASK, 'c', GETTEXT_PACKAGE }, { 0, GDK_Copy } },
+  { { GTK_STOCK_CUT, N_("Cu_t"), GDK_CONTROL_MASK, 'x', GETTEXT_PACKAGE }, { 0, GDK_Cut } },
+  { { GTK_STOCK_DELETE, N_("_Delete"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_DISCONNECT, N_("_Disconnect"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_EXECUTE, N_("_Execute"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_EDIT, N_("_Edit"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_FIND, N_("_Find"), GDK_CONTROL_MASK, 'f', GETTEXT_PACKAGE }, { 0, GDK_Find } },
+  { { GTK_STOCK_FIND_AND_REPLACE, N_("Find and _Replace"), GDK_CONTROL_MASK, 'r', GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_FLOPPY, N_("_Floppy"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GOTO_BOTTOM, N_("Navigation|_Bottom"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GOTO_BOTTOM, N_("Navigation|_Bottom"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GOTO_FIRST, N_("Navigation|_First"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GOTO_FIRST, N_("Navigation|_First"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GOTO_LAST, N_("Navigation|_Last"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GOTO_LAST, N_("Navigation|_Last"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GOTO_TOP, N_("Navigation|_Top"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GOTO_TOP, N_("Navigation|_Top"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GO_BACK, N_("Navigation|_Back"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GO_BACK, N_("Navigation|_Back"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GO_DOWN, N_("Navigation|_Down"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GO_DOWN, N_("Navigation|_Down"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GO_FORWARD, N_("Navigation|_Forward"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GO_FORWARD, N_("Navigation|_Forward"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_GO_UP, N_("Navigation|_Up"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_HARDDISK, N_("_Harddisk"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_HELP, N_("_Help"), GDK_CONTROL_MASK, 'h', GETTEXT_PACKAGE },
-  { GTK_STOCK_HOME, N_("_Home"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_INDENT, N_("Increase Indent"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_UNINDENT, N_("Decrease Indent"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_INDEX, N_("_Index"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_INFO, N_("_Information"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ITALIC, N_("_Italic"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_JUMP_TO, N_("_Jump to"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_GO_UP, N_("Navigation|_Up"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_HARDDISK, N_("_Harddisk"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_HELP, N_("_Help"), GDK_CONTROL_MASK, 'h', GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_HOME, N_("_Home"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_INDENT, N_("Increase Indent"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_UNINDENT, N_("Decrease Indent"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_INDEX, N_("_Index"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_INFO, N_("_Information"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ITALIC, N_("_Italic"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_JUMP_TO, N_("_Jump to"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_JUSTIFY_CENTER, N_("Justify|_Center"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_JUSTIFY_CENTER, N_("Justify|_Center"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_JUSTIFY_FILL, N_("Justify|_Fill"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_JUSTIFY_FILL, N_("Justify|_Fill"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_JUSTIFY_LEFT, N_("Justify|_Left"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_JUSTIFY_LEFT, N_("Justify|_Left"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_JUSTIFY_RIGHT, N_("Justify|_Right"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_JUSTIFY_RIGHT, N_("Justify|_Right"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
 
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_FORWARD, N_("Media|_Forward"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_FORWARD, N_("Media|_Forward"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioForward } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_NEXT, N_("Media|_Next"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_NEXT, N_("Media|_Next"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioNext } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_PAUSE, N_("Media|P_ause"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_PAUSE, N_("Media|P_ause"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioPause } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_PLAY, N_("Media|_Play"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_PLAY, N_("Media|_Play"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioPlay } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_PREVIOUS, N_("Media|Pre_vious"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_PREVIOUS, N_("Media|Pre_vious"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioPrev } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_RECORD, N_("Media|_Record"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_RECORD, N_("Media|_Record"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioRecord } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_REWIND, N_("Media|R_ewind"), 0, 0, GETTEXT_PACKAGE },
+  { { GTK_STOCK_MEDIA_REWIND, N_("Media|R_ewind"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioRewind } },
   /* translators, strip the prefix up to and including the first | */
-  { GTK_STOCK_MEDIA_STOP, N_("Media|_Stop"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_NETWORK, N_("_Network"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_NEW, N_("_New"), GDK_CONTROL_MASK, 'n', GETTEXT_PACKAGE },
-  { GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_OPEN, N_("_Open"), GDK_CONTROL_MASK, 'o', GETTEXT_PACKAGE },
-  { GTK_STOCK_ORIENTATION_LANDSCAPE, N_("Landscape"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ORIENTATION_PORTRAIT, N_("Portrait"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE, N_("Reverse landscape"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT, N_("Reverse portrait"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_PASTE, N_("_Paste"), GDK_CONTROL_MASK, 'v', GETTEXT_PACKAGE },
-  { GTK_STOCK_PREFERENCES, N_("_Preferences"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_PRINT, N_("_Print"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_PROPERTIES, N_("_Properties"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_QUIT, N_("_Quit"), GDK_CONTROL_MASK, 'q', GETTEXT_PACKAGE },
-  { GTK_STOCK_REDO, N_("_Redo"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_REFRESH, N_("_Refresh"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_REMOVE, N_("_Remove"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_REVERT_TO_SAVED, N_("_Revert"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SAVE, N_("_Save"), GDK_CONTROL_MASK, 's', GETTEXT_PACKAGE },
-  { GTK_STOCK_SAVE_AS, N_("Save _As"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SELECT_ALL, N_("Select _All"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SELECT_COLOR, N_("_Color"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SELECT_FONT, N_("_Font"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SORT_ASCENDING, N_("_Ascending"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SORT_DESCENDING, N_("_Descending"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_SPELL_CHECK, N_("_Spell Check"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_STOP, N_("_Stop"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_STRIKETHROUGH, N_("_Strikethrough"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_UNDELETE, N_("_Undelete"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_UNDERLINE, N_("_Underline"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_UNDO, N_("_Undo"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_YES, N_("_Yes"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ZOOM_100, N_("_Normal Size"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ZOOM_FIT, N_("Best _Fit"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ZOOM_IN, N_("Zoom _In"), 0, 0, GETTEXT_PACKAGE },
-  { GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), 0, 0, GETTEXT_PACKAGE }
+  { { GTK_STOCK_MEDIA_STOP, N_("Media|_Stop"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_AudioStop } },
+  { { GTK_STOCK_NETWORK, N_("_Network"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_NEW, N_("_New"), GDK_CONTROL_MASK, 'n', GETTEXT_PACKAGE }, { 0, GDK_New } },
+  { { GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_OPEN, N_("_Open"), GDK_CONTROL_MASK, 'o', GETTEXT_PACKAGE }, { 0, GDK_Open } },
+  { { GTK_STOCK_ORIENTATION_LANDSCAPE, N_("Landscape"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ORIENTATION_PORTRAIT, N_("Portrait"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE, N_("Reverse landscape"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT, N_("Reverse portrait"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_PASTE, N_("_Paste"), GDK_CONTROL_MASK, 'v', GETTEXT_PACKAGE }, { 0, GDK_Paste } },
+  { { GTK_STOCK_PREFERENCES, N_("_Preferences"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_PRINT, N_("_Print"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Print } },
+  { { GTK_STOCK_PRINT_PREVIEW, N_("Print Pre_view"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_PROPERTIES, N_("_Properties"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_QUIT, N_("_Quit"), GDK_CONTROL_MASK, 'q', GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_REDO, N_("_Redo"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Redo } },
+  { { GTK_STOCK_REFRESH, N_("_Refresh"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Refresh } },
+  { { GTK_STOCK_REMOVE, N_("_Remove"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_REVERT_TO_SAVED, N_("_Revert"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SAVE, N_("_Save"), GDK_CONTROL_MASK, 's', GETTEXT_PACKAGE }, { 0, GDK_Save } },
+  { { GTK_STOCK_SAVE_AS, N_("Save _As"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SELECT_ALL, N_("Select _All"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SELECT_COLOR, N_("_Color"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SELECT_FONT, N_("_Font"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SORT_ASCENDING, N_("_Ascending"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SORT_DESCENDING, N_("_Descending"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_SPELL_CHECK, N_("_Spell Check"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Spell } },
+  { { GTK_STOCK_STOP, N_("_Stop"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Stop } },
+  { { GTK_STOCK_STRIKETHROUGH, N_("_Strikethrough"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_UNDELETE, N_("_Undelete"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_UNDERLINE, N_("_Underline"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_UNDO, N_("_Undo"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_Undo } },
+  { { GTK_STOCK_YES, N_("_Yes"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ZOOM_100, N_("_Normal Size"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ZOOM_FIT, N_("Best _Fit"), 0, 0, GETTEXT_PACKAGE }, { 0, 0 } },
+  { { GTK_STOCK_ZOOM_IN, N_("Zoom _In"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_ZoomIn } },
+  { { GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), 0, 0, GETTEXT_PACKAGE }, { 0, GDK_ZoomOut } }
 };
 
 /**
@@ -449,6 +464,71 @@
   g_hash_table_insert (translate_hash, domainname, translate);
 }
 
+/**
+ * gtk_stock_lookup_special_key:
+ * @stock_id: a stock item name
+ * @modifier: #GdkModifierType to initialize with value
+ * @keyval: guint to initialize with value
+ *
+ * Fills @keyval and @modifier with the registered value for the special key
+ * (aka Multimedia key) value for the @stock_id passed, returning %TRUE if
+ * @stock_id was known and has a special key.
+ *
+ * Return value: %TRUE if @keyval and @modifier were initialized
+ *
+ * Since: 2.12
+ **/
+gboolean
+gtk_stock_lookup_special_key (const gchar     *stock_id,
+			      GdkModifierType *modifier,
+			      guint           *keyval)
+{
+  GtkStockItemKey *found;
+
+  g_return_val_if_fail (stock_id != NULL, FALSE);
+  g_return_val_if_fail (keyval != NULL, FALSE);
+  g_return_val_if_fail (modifier != NULL, FALSE);
+
+  init_stock_hash ();
+
+  found = g_hash_table_lookup (special_keys_hash, stock_id);
+
+  if (found)
+    {
+      *keyval = found->keyval;
+      *modifier = found->modifier;
+    }
+
+  return found != NULL;
+}
+
+/**
+ * gtk_stock_add_accelerator:
+ * @stock_id: a stock item name
+ * @modifier: modifier combination of the accelerator
+ * @keyval: key value of the accelerator
+ *
+ * Add an accelerator for the stock item referenced by @stock_id.
+ *
+ * Since: 2.12
+ **/
+void
+gtk_stock_add_accelerator (const gchar     *stock_id,
+			   GdkModifierType  modifier,
+			   guint            keyval)
+{
+  GtkStockItemKey *key;
+
+  g_return_if_fail (stock_id != NULL);
+  g_return_if_fail (keyval != 0);
+
+  key = g_new0 (GtkStockItemKey, 1);
+  key->keyval = keyval;
+  key->modifier = modifier;
+
+  g_hash_table_insert (special_keys_hash, stock_id, key);
+}
+
 static gchar *
 sgettext_swapped (const gchar *msgid, 
 		  gpointer     data)
@@ -464,9 +544,14 @@
 {
   if (stock_hash == NULL)
     {
+      guint i;
+
       stock_hash = g_hash_table_new (g_str_hash, g_str_equal);
 
-      gtk_stock_add_static (builtin_items, G_N_ELEMENTS (builtin_items));
+      for (i = 0; i < G_N_ELEMENTS (builtin_items); i++)
+        {
+          gtk_stock_add_static (&(builtin_items[i].item), 1);
+	}
     }
 
   if (translate_hash == NULL)
@@ -479,6 +564,22 @@
 				    GETTEXT_PACKAGE,
 				    NULL);
     }
+
+  if (special_keys_hash == NULL)
+    {
+      guint i;
+
+      special_keys_hash = g_hash_table_new (g_str_hash, g_int_equal);
+
+      for (i = 0; i < G_N_ELEMENTS (builtin_items); i++)
+        {
+          if (builtin_items[i].special_key.keyval == 0)
+            continue;
+          g_hash_table_insert (special_keys_hash,
+			       builtin_items[i].item.stock_id,
+			       &(builtin_items[i].special_key));
+	}
+    }
 }
 
 #define __GTK_STOCK_C__
Index: gtk/gtk.symbols
===================================================================
--- gtk/gtk.symbols	(revision 18074)
+++ gtk/gtk.symbols	(working copy)
@@ -3466,6 +3466,8 @@
 gtk_stock_item_free
 gtk_stock_list_ids
 gtk_stock_lookup
+gtk_stock_lookup_special_key
+gtk_stock_add_accelerator
 gtk_stock_set_translate_func
 #endif
 #endif
Index: gtk/gtkstock.h
===================================================================
--- gtk/gtkstock.h	(revision 18074)
+++ gtk/gtkstock.h	(working copy)
@@ -50,6 +50,12 @@
                                guint                n_items);
 gboolean gtk_stock_lookup     (const gchar         *stock_id,
                                GtkStockItem        *item);
+gboolean gtk_stock_lookup_special_key (const gchar     *stock_id,
+				       GdkModifierType *modifier,
+				       guint           *keyval);
+void     gtk_stock_add_accelerator    (const gchar     *stock_id,
+				       GdkModifierType  modifier,
+				       guint            keyval);
 
 /* Should free the list (and free each string in it also).
  * This function is only useful for GUI builders and such.
Index: gtk/gtkimagemenuitem.c
===================================================================
--- gtk/gtkimagemenuitem.c	(revision 18074)
+++ gtk/gtkimagemenuitem.c	(working copy)
@@ -456,6 +456,9 @@
 
   if (gtk_stock_lookup (stock_id, &stock_item))
     {
+      guint keyval;
+      GdkModifierType modifier;
+
       item = gtk_image_menu_item_new_with_mnemonic (stock_item.label);
 
       gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
@@ -467,6 +470,16 @@
 				    stock_item.keyval,
 				    stock_item.modifier,
 				    GTK_ACCEL_VISIBLE);
+
+      if (gtk_stock_lookup_special_key (stock_id, &keyval, &modifier))
+        {
+          gtk_widget_add_accelerator (item,
+				      "activate",
+				      accel_group,
+				      keyval,
+				      modifier,
+				      0);
+	}
     }
   else
     {
Index: configure.in
===================================================================
--- configure.in	(revision 18074)
+++ configure.in	(working copy)
@@ -1362,6 +1362,9 @@
     GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
   fi
 
+  # Checks for X11/Sunkeysym.h
+  AC_CHECK_HEADERS([X11/Sunkeysym.h])
+
   CPPFLAGS="$gtk_save_cppflags"
   LIBS="$gtk_save_libs"
 
Index: gdk/gdkkeysyms.h
===================================================================
--- gdk/gdkkeysyms.h	(revision 18074)
+++ gdk/gdkkeysyms.h	(working copy)
@@ -1,6 +1,6 @@
 /* GDK - The GIMP Drawing Kit
  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * Copyright (C) 2005 GNOME Foundation
+ * Copyright (C) 2005, 2006, 2007 GNOME Foundation
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -19,13 +19,13 @@
  */
 
 /*
- * File auto-generated from script gdkkeysyms-update.pl
+ * File auto-generated from script http://svn.gnome.org/viewcvs/gtk%2B/trunk/gdk/gdkkeysyms-update.pl
  * using the input file
- * http://cvs.freedesktop.org/xorg/xc/include/keysymdef.h
+ * http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
  */
 
 /*
- * Modified by the GTK+ Team and others 1997-2001.  See the AUTHORS
+ * Modified by the GTK+ Team and others 1997-2007.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
@@ -212,6 +212,9 @@
 #define GDK_ISO_Level3_Shift 0xfe03
 #define GDK_ISO_Level3_Latch 0xfe04
 #define GDK_ISO_Level3_Lock 0xfe05
+#define GDK_ISO_Level5_Shift 0xfe11
+#define GDK_ISO_Level5_Latch 0xfe12
+#define GDK_ISO_Level5_Lock 0xfe13
 #define GDK_ISO_Group_Shift 0xff7e
 #define GDK_ISO_Group_Latch 0xfe06
 #define GDK_ISO_Group_Lock 0xfe07
@@ -263,6 +266,7 @@
 #define GDK_dead_belowdot 0xfe60
 #define GDK_dead_hook 0xfe61
 #define GDK_dead_horn 0xfe62
+#define GDK_dead_stroke 0xfe63
 #define GDK_First_Virtual_Screen 0xfed0
 #define GDK_Prev_Virtual_Screen 0xfed1
 #define GDK_Next_Virtual_Screen 0xfed2
@@ -1743,5 +1747,419 @@
 #define GDK_notapproxeq 0x1002247
 #define GDK_notidentical 0x1002262
 #define GDK_stricteq 0x1002263
+#define GDK_braille_dot_1 0xfff1
+#define GDK_braille_dot_2 0xfff2
+#define GDK_braille_dot_3 0xfff3
+#define GDK_braille_dot_4 0xfff4
+#define GDK_braille_dot_5 0xfff5
+#define GDK_braille_dot_6 0xfff6
+#define GDK_braille_dot_7 0xfff7
+#define GDK_braille_dot_8 0xfff8
+#define GDK_braille_dot_9 0xfff9
+#define GDK_braille_dot_10 0xfffa
+#define GDK_braille_blank 0x1002800
+#define GDK_braille_dots_1 0x1002801
+#define GDK_braille_dots_2 0x1002802
+#define GDK_braille_dots_12 0x1002803
+#define GDK_braille_dots_3 0x1002804
+#define GDK_braille_dots_13 0x1002805
+#define GDK_braille_dots_23 0x1002806
+#define GDK_braille_dots_123 0x1002807
+#define GDK_braille_dots_4 0x1002808
+#define GDK_braille_dots_14 0x1002809
+#define GDK_braille_dots_24 0x100280a
+#define GDK_braille_dots_124 0x100280b
+#define GDK_braille_dots_34 0x100280c
+#define GDK_braille_dots_134 0x100280d
+#define GDK_braille_dots_234 0x100280e
+#define GDK_braille_dots_1234 0x100280f
+#define GDK_braille_dots_5 0x1002810
+#define GDK_braille_dots_15 0x1002811
+#define GDK_braille_dots_25 0x1002812
+#define GDK_braille_dots_125 0x1002813
+#define GDK_braille_dots_35 0x1002814
+#define GDK_braille_dots_135 0x1002815
+#define GDK_braille_dots_235 0x1002816
+#define GDK_braille_dots_1235 0x1002817
+#define GDK_braille_dots_45 0x1002818
+#define GDK_braille_dots_145 0x1002819
+#define GDK_braille_dots_245 0x100281a
+#define GDK_braille_dots_1245 0x100281b
+#define GDK_braille_dots_345 0x100281c
+#define GDK_braille_dots_1345 0x100281d
+#define GDK_braille_dots_2345 0x100281e
+#define GDK_braille_dots_12345 0x100281f
+#define GDK_braille_dots_6 0x1002820
+#define GDK_braille_dots_16 0x1002821
+#define GDK_braille_dots_26 0x1002822
+#define GDK_braille_dots_126 0x1002823
+#define GDK_braille_dots_36 0x1002824
+#define GDK_braille_dots_136 0x1002825
+#define GDK_braille_dots_236 0x1002826
+#define GDK_braille_dots_1236 0x1002827
+#define GDK_braille_dots_46 0x1002828
+#define GDK_braille_dots_146 0x1002829
+#define GDK_braille_dots_246 0x100282a
+#define GDK_braille_dots_1246 0x100282b
+#define GDK_braille_dots_346 0x100282c
+#define GDK_braille_dots_1346 0x100282d
+#define GDK_braille_dots_2346 0x100282e
+#define GDK_braille_dots_12346 0x100282f
+#define GDK_braille_dots_56 0x1002830
+#define GDK_braille_dots_156 0x1002831
+#define GDK_braille_dots_256 0x1002832
+#define GDK_braille_dots_1256 0x1002833
+#define GDK_braille_dots_356 0x1002834
+#define GDK_braille_dots_1356 0x1002835
+#define GDK_braille_dots_2356 0x1002836
+#define GDK_braille_dots_12356 0x1002837
+#define GDK_braille_dots_456 0x1002838
+#define GDK_braille_dots_1456 0x1002839
+#define GDK_braille_dots_2456 0x100283a
+#define GDK_braille_dots_12456 0x100283b
+#define GDK_braille_dots_3456 0x100283c
+#define GDK_braille_dots_13456 0x100283d
+#define GDK_braille_dots_23456 0x100283e
+#define GDK_braille_dots_123456 0x100283f
+#define GDK_braille_dots_7 0x1002840
+#define GDK_braille_dots_17 0x1002841
+#define GDK_braille_dots_27 0x1002842
+#define GDK_braille_dots_127 0x1002843
+#define GDK_braille_dots_37 0x1002844
+#define GDK_braille_dots_137 0x1002845
+#define GDK_braille_dots_237 0x1002846
+#define GDK_braille_dots_1237 0x1002847
+#define GDK_braille_dots_47 0x1002848
+#define GDK_braille_dots_147 0x1002849
+#define GDK_braille_dots_247 0x100284a
+#define GDK_braille_dots_1247 0x100284b
+#define GDK_braille_dots_347 0x100284c
+#define GDK_braille_dots_1347 0x100284d
+#define GDK_braille_dots_2347 0x100284e
+#define GDK_braille_dots_12347 0x100284f
+#define GDK_braille_dots_57 0x1002850
+#define GDK_braille_dots_157 0x1002851
+#define GDK_braille_dots_257 0x1002852
+#define GDK_braille_dots_1257 0x1002853
+#define GDK_braille_dots_357 0x1002854
+#define GDK_braille_dots_1357 0x1002855
+#define GDK_braille_dots_2357 0x1002856
+#define GDK_braille_dots_12357 0x1002857
+#define GDK_braille_dots_457 0x1002858
+#define GDK_braille_dots_1457 0x1002859
+#define GDK_braille_dots_2457 0x100285a
+#define GDK_braille_dots_12457 0x100285b
+#define GDK_braille_dots_3457 0x100285c
+#define GDK_braille_dots_13457 0x100285d
+#define GDK_braille_dots_23457 0x100285e
+#define GDK_braille_dots_123457 0x100285f
+#define GDK_braille_dots_67 0x1002860
+#define GDK_braille_dots_167 0x1002861
+#define GDK_braille_dots_267 0x1002862
+#define GDK_braille_dots_1267 0x1002863
+#define GDK_braille_dots_367 0x1002864
+#define GDK_braille_dots_1367 0x1002865
+#define GDK_braille_dots_2367 0x1002866
+#define GDK_braille_dots_12367 0x1002867
+#define GDK_braille_dots_467 0x1002868
+#define GDK_braille_dots_1467 0x1002869
+#define GDK_braille_dots_2467 0x100286a
+#define GDK_braille_dots_12467 0x100286b
+#define GDK_braille_dots_3467 0x100286c
+#define GDK_braille_dots_13467 0x100286d
+#define GDK_braille_dots_23467 0x100286e
+#define GDK_braille_dots_123467 0x100286f
+#define GDK_braille_dots_567 0x1002870
+#define GDK_braille_dots_1567 0x1002871
+#define GDK_braille_dots_2567 0x1002872
+#define GDK_braille_dots_12567 0x1002873
+#define GDK_braille_dots_3567 0x1002874
+#define GDK_braille_dots_13567 0x1002875
+#define GDK_braille_dots_23567 0x1002876
+#define GDK_braille_dots_123567 0x1002877
+#define GDK_braille_dots_4567 0x1002878
+#define GDK_braille_dots_14567 0x1002879
+#define GDK_braille_dots_24567 0x100287a
+#define GDK_braille_dots_124567 0x100287b
+#define GDK_braille_dots_34567 0x100287c
+#define GDK_braille_dots_134567 0x100287d
+#define GDK_braille_dots_234567 0x100287e
+#define GDK_braille_dots_1234567 0x100287f
+#define GDK_braille_dots_8 0x1002880
+#define GDK_braille_dots_18 0x1002881
+#define GDK_braille_dots_28 0x1002882
+#define GDK_braille_dots_128 0x1002883
+#define GDK_braille_dots_38 0x1002884
+#define GDK_braille_dots_138 0x1002885
+#define GDK_braille_dots_238 0x1002886
+#define GDK_braille_dots_1238 0x1002887
+#define GDK_braille_dots_48 0x1002888
+#define GDK_braille_dots_148 0x1002889
+#define GDK_braille_dots_248 0x100288a
+#define GDK_braille_dots_1248 0x100288b
+#define GDK_braille_dots_348 0x100288c
+#define GDK_braille_dots_1348 0x100288d
+#define GDK_braille_dots_2348 0x100288e
+#define GDK_braille_dots_12348 0x100288f
+#define GDK_braille_dots_58 0x1002890
+#define GDK_braille_dots_158 0x1002891
+#define GDK_braille_dots_258 0x1002892
+#define GDK_braille_dots_1258 0x1002893
+#define GDK_braille_dots_358 0x1002894
+#define GDK_braille_dots_1358 0x1002895
+#define GDK_braille_dots_2358 0x1002896
+#define GDK_braille_dots_12358 0x1002897
+#define GDK_braille_dots_458 0x1002898
+#define GDK_braille_dots_1458 0x1002899
+#define GDK_braille_dots_2458 0x100289a
+#define GDK_braille_dots_12458 0x100289b
+#define GDK_braille_dots_3458 0x100289c
+#define GDK_braille_dots_13458 0x100289d
+#define GDK_braille_dots_23458 0x100289e
+#define GDK_braille_dots_123458 0x100289f
+#define GDK_braille_dots_68 0x10028a0
+#define GDK_braille_dots_168 0x10028a1
+#define GDK_braille_dots_268 0x10028a2
+#define GDK_braille_dots_1268 0x10028a3
+#define GDK_braille_dots_368 0x10028a4
+#define GDK_braille_dots_1368 0x10028a5
+#define GDK_braille_dots_2368 0x10028a6
+#define GDK_braille_dots_12368 0x10028a7
+#define GDK_braille_dots_468 0x10028a8
+#define GDK_braille_dots_1468 0x10028a9
+#define GDK_braille_dots_2468 0x10028aa
+#define GDK_braille_dots_12468 0x10028ab
+#define GDK_braille_dots_3468 0x10028ac
+#define GDK_braille_dots_13468 0x10028ad
+#define GDK_braille_dots_23468 0x10028ae
+#define GDK_braille_dots_123468 0x10028af
+#define GDK_braille_dots_568 0x10028b0
+#define GDK_braille_dots_1568 0x10028b1
+#define GDK_braille_dots_2568 0x10028b2
+#define GDK_braille_dots_12568 0x10028b3
+#define GDK_braille_dots_3568 0x10028b4
+#define GDK_braille_dots_13568 0x10028b5
+#define GDK_braille_dots_23568 0x10028b6
+#define GDK_braille_dots_123568 0x10028b7
+#define GDK_braille_dots_4568 0x10028b8
+#define GDK_braille_dots_14568 0x10028b9
+#define GDK_braille_dots_24568 0x10028ba
+#define GDK_braille_dots_124568 0x10028bb
+#define GDK_braille_dots_34568 0x10028bc
+#define GDK_braille_dots_134568 0x10028bd
+#define GDK_braille_dots_234568 0x10028be
+#define GDK_braille_dots_1234568 0x10028bf
+#define GDK_braille_dots_78 0x10028c0
+#define GDK_braille_dots_178 0x10028c1
+#define GDK_braille_dots_278 0x10028c2
+#define GDK_braille_dots_1278 0x10028c3
+#define GDK_braille_dots_378 0x10028c4
+#define GDK_braille_dots_1378 0x10028c5
+#define GDK_braille_dots_2378 0x10028c6
+#define GDK_braille_dots_12378 0x10028c7
+#define GDK_braille_dots_478 0x10028c8
+#define GDK_braille_dots_1478 0x10028c9
+#define GDK_braille_dots_2478 0x10028ca
+#define GDK_braille_dots_12478 0x10028cb
+#define GDK_braille_dots_3478 0x10028cc
+#define GDK_braille_dots_13478 0x10028cd
+#define GDK_braille_dots_23478 0x10028ce
+#define GDK_braille_dots_123478 0x10028cf
+#define GDK_braille_dots_578 0x10028d0
+#define GDK_braille_dots_1578 0x10028d1
+#define GDK_braille_dots_2578 0x10028d2
+#define GDK_braille_dots_12578 0x10028d3
+#define GDK_braille_dots_3578 0x10028d4
+#define GDK_braille_dots_13578 0x10028d5
+#define GDK_braille_dots_23578 0x10028d6
+#define GDK_braille_dots_123578 0x10028d7
+#define GDK_braille_dots_4578 0x10028d8
+#define GDK_braille_dots_14578 0x10028d9
+#define GDK_braille_dots_24578 0x10028da
+#define GDK_braille_dots_124578 0x10028db
+#define GDK_braille_dots_34578 0x10028dc
+#define GDK_braille_dots_134578 0x10028dd
+#define GDK_braille_dots_234578 0x10028de
+#define GDK_braille_dots_1234578 0x10028df
+#define GDK_braille_dots_678 0x10028e0
+#define GDK_braille_dots_1678 0x10028e1
+#define GDK_braille_dots_2678 0x10028e2
+#define GDK_braille_dots_12678 0x10028e3
+#define GDK_braille_dots_3678 0x10028e4
+#define GDK_braille_dots_13678 0x10028e5
+#define GDK_braille_dots_23678 0x10028e6
+#define GDK_braille_dots_123678 0x10028e7
+#define GDK_braille_dots_4678 0x10028e8
+#define GDK_braille_dots_14678 0x10028e9
+#define GDK_braille_dots_24678 0x10028ea
+#define GDK_braille_dots_124678 0x10028eb
+#define GDK_braille_dots_34678 0x10028ec
+#define GDK_braille_dots_134678 0x10028ed
+#define GDK_braille_dots_234678 0x10028ee
+#define GDK_braille_dots_1234678 0x10028ef
+#define GDK_braille_dots_5678 0x10028f0
+#define GDK_braille_dots_15678 0x10028f1
+#define GDK_braille_dots_25678 0x10028f2
+#define GDK_braille_dots_125678 0x10028f3
+#define GDK_braille_dots_35678 0x10028f4
+#define GDK_braille_dots_135678 0x10028f5
+#define GDK_braille_dots_235678 0x10028f6
+#define GDK_braille_dots_1235678 0x10028f7
+#define GDK_braille_dots_45678 0x10028f8
+#define GDK_braille_dots_145678 0x10028f9
+#define GDK_braille_dots_245678 0x10028fa
+#define GDK_braille_dots_1245678 0x10028fb
+#define GDK_braille_dots_345678 0x10028fc
+#define GDK_braille_dots_1345678 0x10028fd
+#define GDK_braille_dots_2345678 0x10028fe
+#define GDK_braille_dots_12345678 0x10028ff
+#define GDK_ModeLock 0x1008ff01
+#define GDK_MonBrightnessUp 0x1008ff02
+#define GDK_MonBrightnessDown 0x1008ff03
+#define GDK_KbdLightOnOff 0x1008ff04
+#define GDK_KbdBrightnessUp 0x1008ff05
+#define GDK_KbdBrightnessDown 0x1008ff06
+#define GDK_Standby 0x1008ff10
+#define GDK_AudioLowerVolume 0x1008ff11
+#define GDK_AudioMute 0x1008ff12
+#define GDK_AudioRaiseVolume 0x1008ff13
+#define GDK_AudioPlay 0x1008ff14
+#define GDK_AudioStop 0x1008ff15
+#define GDK_AudioPrev 0x1008ff16
+#define GDK_AudioNext 0x1008ff17
+#define GDK_HomePage 0x1008ff18
+#define GDK_Mail 0x1008ff19
+#define GDK_Start 0x1008ff1a
+#define GDK_Search 0x1008ff1b
+#define GDK_AudioRecord 0x1008ff1c
+#define GDK_Calculator 0x1008ff1d
+#define GDK_Memo 0x1008ff1e
+#define GDK_ToDoList 0x1008ff1f
+#define GDK_Calendar 0x1008ff20
+#define GDK_PowerDown 0x1008ff21
+#define GDK_ContrastAdjust 0x1008ff22
+#define GDK_RockerUp 0x1008ff23
+#define GDK_RockerDown 0x1008ff24
+#define GDK_RockerEnter 0x1008ff25
+#define GDK_Back 0x1008ff26
+#define GDK_Forward 0x1008ff27
+#define GDK_Stop 0x1008ff28
+#define GDK_Refresh 0x1008ff29
+#define GDK_PowerOff 0x1008ff2a
+#define GDK_WakeUp 0x1008ff2b
+#define GDK_Eject 0x1008ff2c
+#define GDK_ScreenSaver 0x1008ff2d
+#define GDK_WWW 0x1008ff2e
+#define GDK_Sleep 0x1008ff2f
+#define GDK_Favorites 0x1008ff30
+#define GDK_AudioPause 0x1008ff31
+#define GDK_AudioMedia 0x1008ff32
+#define GDK_MyComputer 0x1008ff33
+#define GDK_VendorHome 0x1008ff34
+#define GDK_LightBulb 0x1008ff35
+#define GDK_Shop 0x1008ff36
+#define GDK_History 0x1008ff37
+#define GDK_OpenURL 0x1008ff38
+#define GDK_AddFavorite 0x1008ff39
+#define GDK_HotLinks 0x1008ff3a
+#define GDK_BrightnessAdjust 0x1008ff3b
+#define GDK_Finance 0x1008ff3c
+#define GDK_Community 0x1008ff3d
+#define GDK_AudioRewind 0x1008ff3e
+#define GDK_AudioForward 0x1008ff3f
+#define GDK_Launch0 0x1008ff40
+#define GDK_Launch1 0x1008ff41
+#define GDK_Launch2 0x1008ff42
+#define GDK_Launch3 0x1008ff43
+#define GDK_Launch4 0x1008ff44
+#define GDK_Launch5 0x1008ff45
+#define GDK_Launch6 0x1008ff46
+#define GDK_Launch7 0x1008ff47
+#define GDK_Launch8 0x1008ff48
+#define GDK_Launch9 0x1008ff49
+#define GDK_LaunchA 0x1008ff4a
+#define GDK_LaunchB 0x1008ff4b
+#define GDK_LaunchC 0x1008ff4c
+#define GDK_LaunchD 0x1008ff4d
+#define GDK_LaunchE 0x1008ff4e
+#define GDK_LaunchF 0x1008ff4f
+#define GDK_ApplicationLeft 0x1008ff50
+#define GDK_ApplicationRight 0x1008ff51
+#define GDK_Book 0x1008ff52
+#define GDK_CD 0x1008ff53
+#define GDK_Calculater 0x1008ff54
+#define GDK_Clear 0x1008ff55
+#define GDK_Close 0x1008ff56
+#define GDK_Copy 0x1008ff57
+#define GDK_Cut 0x1008ff58
+#define GDK_Display 0x1008ff59
+#define GDK_DOS 0x1008ff5a
+#define GDK_Documents 0x1008ff5b
+#define GDK_Excel 0x1008ff5c
+#define GDK_Explorer 0x1008ff5d
+#define GDK_Game 0x1008ff5e
+#define GDK_Go 0x1008ff5f
+#define GDK_iTouch 0x1008ff60
+#define GDK_LogOff 0x1008ff61
+#define GDK_Market 0x1008ff62
+#define GDK_Meeting 0x1008ff63
+#define GDK_MenuKB 0x1008ff65
+#define GDK_MenuPB 0x1008ff66
+#define GDK_MySites 0x1008ff67
+#define GDK_New 0x1008ff68
+#define GDK_News 0x1008ff69
+#define GDK_OfficeHome 0x1008ff6a
+#define GDK_Open 0x1008ff6b
+#define GDK_Option 0x1008ff6c
+#define GDK_Paste 0x1008ff6d
+#define GDK_Phone 0x1008ff6e
+#define GDK_Reply 0x1008ff72
+#define GDK_Reload 0x1008ff73
+#define GDK_RotateWindows 0x1008ff74
+#define GDK_RotationPB 0x1008ff75
+#define GDK_RotationKB 0x1008ff76
+#define GDK_Save 0x1008ff77
+#define GDK_ScrollUp 0x1008ff78
+#define GDK_ScrollDown 0x1008ff79
+#define GDK_ScrollClick 0x1008ff7a
+#define GDK_Send 0x1008ff7b
+#define GDK_Spell 0x1008ff7c
+#define GDK_SplitScreen 0x1008ff7d
+#define GDK_Support 0x1008ff7e
+#define GDK_TaskPane 0x1008ff7f
+#define GDK_Terminal 0x1008ff80
+#define GDK_Tools 0x1008ff81
+#define GDK_Travel 0x1008ff82
+#define GDK_UserPB 0x1008ff84
+#define GDK_User1KB 0x1008ff85
+#define GDK_User2KB 0x1008ff86
+#define GDK_Video 0x1008ff87
+#define GDK_WheelButton 0x1008ff88
+#define GDK_Word 0x1008ff89
+#define GDK_Xfer 0x1008ff8a
+#define GDK_ZoomIn 0x1008ff8b
+#define GDK_ZoomOut 0x1008ff8c
+#define GDK_Away 0x1008ff8d
+#define GDK_Messenger 0x1008ff8e
+#define GDK_WebCam 0x1008ff8f
+#define GDK_MailForward 0x1008ff90
+#define GDK_Pictures 0x1008ff91
+#define GDK_Music 0x1008ff92
+#define GDK_Switch_VT_1 0x1008fe01
+#define GDK_Switch_VT_2 0x1008fe02
+#define GDK_Switch_VT_3 0x1008fe03
+#define GDK_Switch_VT_4 0x1008fe04
+#define GDK_Switch_VT_5 0x1008fe05
+#define GDK_Switch_VT_6 0x1008fe06
+#define GDK_Switch_VT_7 0x1008fe07
+#define GDK_Switch_VT_8 0x1008fe08
+#define GDK_Switch_VT_9 0x1008fe09
+#define GDK_Switch_VT_10 0x1008fe0a
+#define GDK_Switch_VT_11 0x1008fe0b
+#define GDK_Switch_VT_12 0x1008fe0c
+#define GDK_Ungrab 0x1008fe20
+#define GDK_ClearGrab 0x1008fe21
+#define GDK_Next_VMode 0x1008fe22
+#define GDK_Prev_VMode 0x1008fe23
 
 #endif /* __GDK_KEYSYMS_H__ */
Index: gdk/gdkkeysyms-update.pl
===================================================================
--- gdk/gdkkeysyms-update.pl	(revision 18074)
+++ gdk/gdkkeysyms-update.pl	(working copy)
@@ -33,6 +33,20 @@
 	print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h\n\n";
 }
 
+if ( ! -f "XF86keysym.h" )
+{
+	print "Trying to download XF86keysym.h from\n";
+	print "http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\n";
+	die "Unable to download keysymdef.h from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\n" 
+		unless system("wget -c -O XF86keysym.h \"http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\"") == 0;
+	print " done.\n\n";
+}
+else
+{
+	print "We are using existing XF86keysym.h found in this directory.\n";
+	print "It is assumed that you took care and it is a recent version\n";
+	print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=XF86keysym.h\n\n";
+}
 
 if ( -f "gdkkeysyms.h" )
 {
@@ -41,7 +55,7 @@
 	die "Exiting...\n\n";
 }
 
-# Source: http://cvs.freedesktop.org/xorg/xc/include/keysymdef.h
+# Source: http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h
 die "Could not open file keysymdef.h: $!\n" unless open(IN_KEYSYMDEF, "<:utf8", "keysymdef.h");
 
 # Output: gtk+/gdk/gdkkeysyms.h
@@ -106,11 +120,42 @@
 	printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]);
 }
 
+close IN_KEYSYMDEF;
+
 #$gdksyms{"0"} = "0000";
 
-close IN_KEYSYMDEF;
+# Source: http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=XF86keysym.h
+die "Could not open file XF86keysym.h: $!\n" unless open(IN_XF86KEYSYM, "<:utf8", "XF86keysym.h");
 
+while (<IN_XF86KEYSYM>)
+{
+	next if ( ! /^#define / );
 
+	@keysymelements = split(/\s+/);
+	die "Internal error, no \@keysymelements: $_\n" unless @keysymelements;
+
+	$_ = $keysymelements[1];
+	die "Internal error, was expecting \"XF86XK_*\", found: $_\n" if ( ! /^XF86XK_/ );
+
+	# Work-around https://bugs.freedesktop.org/show_bug.cgi?id=11193
+	if ($_ eq "XF86XK_XF86BackForward") {
+		$keysymelements[1] = "XF86XK_AudioForward";
+	}
+
+	# Ignore XF86XK_Q
+	next if ( $_ eq "XF86XK_Q");
+	
+	$_ = $keysymelements[2];
+	die "Internal error, was expecting \"0x*\", found: $_\n" if ( ! /^0x/ );
+
+	$keysymelements[1] =~ s/^XF86XK_/GDK_/g;
+
+	printf OUT_GDKKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]);
+}
+
+close IN_XF86KEYSYM;
+
+
 print OUT_GDKKEYSYMS<<EOF;
 
 #endif /* __GDK_KEYSYMS_H__ */
Index: gdk/x11/gdkevents-x11.c
===================================================================
--- gdk/x11/gdkevents-x11.c	(revision 18074)
+++ gdk/x11/gdkevents-x11.c	(working copy)
@@ -57,6 +57,10 @@
 #include <X11/extensions/Xfixes.h>
 #endif
 
+#ifdef HAVE_X11_SUNKEYSYM_H
+#include <X11/Sunkeysym.h>
+#endif /* HAVE_X11_SUNKEYSYM_H */
+
 #include <X11/Xatom.h>
 
 typedef struct _GdkIOClosure GdkIOClosure;
@@ -603,6 +607,39 @@
   return FALSE;
 }
 
+#ifdef HAVE_X11_SUNKEYSYM_H
+static guint
+sun_keysym_to_gdk (guint keyval)
+{
+  /* Translate Sun specific keysyms to the GDK ones */
+  switch (keyval)
+    {
+    case SunXK_Copy:
+      return GDK_Copy;
+    case SunXK_Open:
+      return GDK_Open;
+    case SunXK_Paste:
+      return GDK_Paste;
+    case SunXK_Cut:
+      return GDK_Cut;
+    case SunXK_PowerSwitch:
+      return GDK_PowerOff;
+    case SunXK_AudioLowerVolume:
+      return GDK_AudioLowerVolume;
+    case SunXK_AudioMute:
+      return GDK_AudioMute;
+    case SunXK_AudioRaiseVolume:
+      return GDK_AudioRaiseVolume;
+    case SunXK_VideoLowerBrightness:
+      return GDK_MonBrightnessDown;
+    case SunXK_VideoRaiseBrightness:
+      return GDK_MonBrightnessUp;
+    default:
+      return keyval;
+    }
+}
+#endif /* HAVE_X11_SUNKEYSYM_H */
+
 static void
 translate_key_event (GdkDisplay *display,
 		     GdkEvent   *event,
@@ -628,6 +665,10 @@
 				       &event->key.keyval,
 				       NULL, NULL, NULL);
 
+#ifdef HAVE_X11_SUNKEYSYM_H
+  event->key.keyval = sun_keysym_to_gdk (event->key.keyval);
+#endif /* HAVE_X11_SUNKEYSYM_H */
+
   _gdk_keymap_add_virtual_modifiers (keymap, &event->key.state);
   event->key.is_modifier = _gdk_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
 
