Index: capplets/keybindings/gnome-keybinding-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/keybindings/gnome-keybinding-properties.c,v
retrieving revision 1.56
diff -u -p -r1.56 gnome-keybinding-properties.c
--- capplets/keybindings/gnome-keybinding-properties.c	27 Jul 2006 11:42:11 -0000	1.56
+++ capplets/keybindings/gnome-keybinding-properties.c	15 Nov 2006 16:53:29 -0000
@@ -30,6 +30,7 @@ typedef struct
   const char *name;
   KeyListEntryVisibility visibility;
   gint data;
+  guint32 should_bind_keysym;
 } KeyListEntry;
 
 static const KeyListEntry desktop_key_list[] =
@@ -55,12 +56,12 @@ static const KeyListEntry sounds_key_lis
   { "/apps/gnome_settings_daemon/keybindings/volume_down", ALWAYS_VISIBLE, 0 },
   { "/apps/gnome_settings_daemon/keybindings/volume_up", ALWAYS_VISIBLE, 0 },
   /* Other ones that need keysyms bindings */
-  { "/apps/gnome_settings_daemon/keybindings/play", ALWAYS_VISIBLE, 0 },        
-  { "/apps/gnome_settings_daemon/keybindings/pause", ALWAYS_VISIBLE, 0 },       
-  { "/apps/gnome_settings_daemon/keybindings/stop", ALWAYS_VISIBLE, 0 },        
-  { "/apps/gnome_settings_daemon/keybindings/previous", ALWAYS_VISIBLE, 0 },    
-  { "/apps/gnome_settings_daemon/keybindings/next", ALWAYS_VISIBLE, 0 },        
-  { "/apps/gnome_settings_daemon/keybindings/eject", ALWAYS_VISIBLE, 0 },
+  { "/apps/gnome_settings_daemon/keybindings/play", ALWAYS_VISIBLE, 0, TRUE },        
+  { "/apps/gnome_settings_daemon/keybindings/pause", ALWAYS_VISIBLE, 0, TRUE },       
+  { "/apps/gnome_settings_daemon/keybindings/stop", ALWAYS_VISIBLE, 0, TRUE },        
+  { "/apps/gnome_settings_daemon/keybindings/previous", ALWAYS_VISIBLE, 0, TRUE },    
+  { "/apps/gnome_settings_daemon/keybindings/next", ALWAYS_VISIBLE, 0, TRUE },        
+  { "/apps/gnome_settings_daemon/keybindings/eject", ALWAYS_VISIBLE, 0, TRUE },
   { NULL }
 };
 
@@ -136,7 +137,8 @@ typedef struct
   guint keyval;
   guint keycode;
   EggVirtualModifierType mask;
-  gboolean editable;
+  guint32 editable : 1;
+  guint32 should_bind_keysym : 1;
   GtkTreeModel *model;
   guint gconf_cnxn;
   char *description;
@@ -502,6 +504,7 @@ append_keys_to_tree (GladeXML           
       key_entry = g_new0 (KeyEntry, 1);
       key_entry->gconf_key = g_strdup (key_string);
       key_entry->editable = gconf_entry_get_is_writable (entry);
+      key_entry->should_bind_keysym = keys_list[j].should_bind_keysym;
       key_entry->model = model;
       gconf_client_add_dir (client, key_string, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
       key_entry->gconf_cnxn = gconf_client_notify_add (client,
@@ -627,6 +630,13 @@ accel_edited_callback (GtkCellRendererTe
   if (key_entry == NULL)
     return;
 
+  /* These keys are special, in that we'll remap the keysym
+   * to whatever keycode the user picks.  This means we should
+   * always store the keycode instead of the keysym in gconf.
+   */
+  if (key_entry->should_bind_keysym)
+    keyval = 0;
+
   model = get_real_model (view);
   tmp_key.model  = model;
   tmp_key.keyval = keyval;
@@ -641,8 +651,10 @@ accel_edited_callback (GtkCellRendererTe
       (GtkTreeModelForeachFunc) cb_check_for_uniqueness,
       &tmp_key);
 
-  /* Check for unmodified keys */
-  if (tmp_key.mask == 0 && tmp_key.keycode != 0)
+  /* Check for unmodified keys or non-multimedia key for multimedia action
+   */ 
+  if ((tmp_key.mask == 0 && tmp_key.keycode != 0) || 
+      key_entry->should_bind_keysym)
     {
       if ((tmp_key.keyval >= GDK_a && tmp_key.keyval <= GDK_z)
 	   || (tmp_key.keyval >= GDK_A && tmp_key.keyval <= GDK_Z)
@@ -654,9 +666,12 @@ accel_edited_callback (GtkCellRendererTe
 	   || (tmp_key.keyval >= GDK_Thai_kokai && tmp_key.keyval <= GDK_Thai_lekkao)
 	   || (tmp_key.keyval >= GDK_Hangul && tmp_key.keyval <= GDK_Hangul_Special)
 	   || (tmp_key.keyval >= GDK_Hangul_Kiyeog && tmp_key.keyval <= GDK_Hangul_J_YeorinHieuh)
-	   || tmp_key.keyval == GDK_Mode_switch) {
+	   || (tmp_key.keyval == GDK_Mode_switch)
+	   || (key_entry->should_bind_keysym && tmp_key.mask != 0)) {
         GtkWidget *dialog;
 	char *name;
+	static const char unmodified_key_message[] = "The shortcut \"%s\" cannot be used because it will become unusable to type using this key.\nPlease try with a key such as Control, Alt or Shift at the same time.\n";
+	static const char non_multimedia_key_message[] = "The shortcut \"%s\" cannot be used because it is not a multimedia key.\n";
 
 	name = egg_virtual_accelerator_name (keyval, keycode, mask);
 
@@ -665,8 +680,9 @@ accel_edited_callback (GtkCellRendererTe
 			  	  GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
 				  GTK_MESSAGE_WARNING,
 				  GTK_BUTTONS_CANCEL,
-				  _("The shortcut \"%s\" cannot be used because it will become unusable to type using this key.\n"
-				  "Please try with a key such as Control, Alt or Shift at the same time.\n"),
+				  !key_entry->should_bind_keysym? 
+				  _(unmodified_key_message):
+				  _(non_multimedia_key_message),
 				  name);
 
 	g_free (name);
Index: gnome-settings-daemon/gnome-settings-multimedia-keys.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c,v
retrieving revision 1.21
diff -u -p -r1.21 gnome-settings-multimedia-keys.c
--- gnome-settings-daemon/gnome-settings-multimedia-keys.c	24 Aug 2006 14:44:43 -0000	1.21
+++ gnome-settings-daemon/gnome-settings-multimedia-keys.c	15 Nov 2006 16:53:30 -0000
@@ -346,7 +346,8 @@ update_kbd_cb (GConfClient *client, guin
 
 			key = g_new0 (Key, 1);
 			if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE
-			    || key->keycode == 0)
+			    || key->keycode == 0
+			    || (key->state & USED_MODS) != 0)
 			{
 				g_free (tmp);
 				g_free (key);
@@ -467,7 +468,8 @@ init_kbd (Acme *acme)
 
 		key = g_new0 (Key, 1);
 		if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE
-		    || key->keycode == 0)
+		    || key->keycode == 0
+		    || (key->state & USED_MODS) != 0)
 		{                                       
 			g_free (tmp);
 			g_free (key);
