Index: gnome-settings-daemon/gnome-settings-multimedia-keys.c
===================================================================
--- gnome-settings-daemon/gnome-settings-multimedia-keys.c	(revision 8259)
+++ gnome-settings-daemon/gnome-settings-multimedia-keys.c	(working copy)
@@ -224,17 +224,6 @@
 }
 
 static void
-do_sleep_action (char *cmd1, char *cmd2)
-{
-	if (g_spawn_command_line_async (cmd1, NULL) == FALSE) {
-		if (g_spawn_command_line_async (cmd2, NULL) == FALSE) {
-			acme_error (_("Couldn't put the machine to sleep.\n"
-					"Verify that the machine is correctly configured."));
-		}
-	}
-}
-
-static void
 dialog_init (Acme *acme)
 {
 	if (acme->dialog != NULL &&
@@ -389,14 +378,39 @@
 	acme->current_screen = (GdkScreen *)acme->screens->data;
 }
 
+static Key *
+parse_key (const char *string)
+{
+	Key *key;
+
+	if (!is_valid_shortcut (string))
+		return NULL;
+
+	key = g_new0 (Key, 1);
+	if (!egg_accelerator_parse_virtual (string, &key->keysym, &key->keycode, &key->state)
+	    || key->keycode == 0) {
+		g_free (key);
+		return NULL;
+	}
+
+	/* Avoid grabbing all the keyboard when KeyCode cannot be retrieved */
+	if (key->keycode == AnyKey)  {
+		g_warning ("The shortcut key \"%s\" cannot be found on the current system, ignoring the binding", string);
+		g_free (key);
+		return NULL;
+	}
+
+	return key;
+}
+
 static void
 init_kbd (Acme *acme)
 {
+	Key *key;
 	int i;
 
 	for (i = 0; i < HANDLED_KEYS; i++) {
 		char *tmp;
-		Key *key;
 
 		gconf_client_notify_add (acme->conf_client,
 				keys[i].gconf_key, update_kbd_cb,
@@ -404,32 +418,23 @@
 
 		tmp = gconf_client_get_string (acme->conf_client,
 				keys[i].gconf_key, NULL);
-		if (!is_valid_shortcut (tmp)) {
-		        g_free (tmp);
-			continue;
-		}
 
-		key = g_new0 (Key, 1);
-		if (!egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state)
-		    || key->keycode == 0) {
-		        g_free (tmp);
-			g_free (key);
+		key = parse_key (tmp);
+		g_free (tmp);
+		if (key == NULL)
 			continue;
-		}
-	/*avoid grabbing all the keyboard when KeyCode cannot be retrieved */
-		if (key->keycode == AnyKey)  {
-			g_warning ("The shortcut key \"%s\" cannot be found on the current system, ignoring the binding", tmp);
-			g_free (tmp);
-			g_free (key);
-			continue;
-		}
-
-		g_free (tmp);
-
 		keys[i].key = key;
 
 		grab_key (acme, key, TRUE);
 	}
+
+	for (i = 0; hardcoded_keys[i].key_type > 0; i++) {
+		key = parse_key (hardcoded_keys[i].keysym);
+		if (key == NULL)
+			continue;
+		hardcoded_keys[i].key = key;
+		grab_key (acme, key, TRUE);
+	}
 }
 
 static void
@@ -590,7 +595,7 @@
 }
 
 static void
-do_exit_action (Acme *acme)
+do_logout_action (Acme *acme)
 {
 	execute (acme, "gnome-session-save --kill", FALSE, FALSE);
 }
@@ -688,8 +693,8 @@
 	case VOLUME_UP_KEY:
 		do_sound_action (acme, type);
 		break;
-	case POWER_KEY:
-		do_exit_action (acme);
+	case LOGOUT_KEY:
+		do_logout_action (acme);
 		break;
 	case EJECT_KEY:
 		do_eject_action (acme);
@@ -707,9 +712,6 @@
 	case EMAIL_KEY:
 		do_mail_action (acme);
 		break;
-	case SLEEP_KEY:
-		do_sleep_action ("apm", "xset dpms force off");
-		break;
 	case SCREENSAVER_KEY:
 		if ((cmd = g_find_program_in_path ("gnome-screensaver-command")))
 			execute (acme, "gnome-screensaver-command --lock", FALSE, FALSE);
@@ -772,13 +774,59 @@
 	return NULL;
 }
 
+static gboolean
+handle_key (Key *key, int key_type, GdkXEvent *xevent, Acme *acme, GdkFilterReturn *ret)
+{
+	XEvent *xev = (XEvent *) xevent;
+	XAnyEvent *xanyev;
+	guint keycode, state;
+	int type;
+
+	if (key == NULL)
+		return FALSE;
+
+	keycode = xev->xkey.keycode;
+	state = xev->xkey.state;
+	type = xev->type;
+
+	xanyev = (XAnyEvent *) xevent;
+
+	if (key->keycode == keycode &&
+	    (state & USED_MODS) == key->state) {
+		switch (key_type) {
+		case VOLUME_DOWN_KEY:
+		case VOLUME_UP_KEY:
+			/* auto-repeatable keys */
+			if (type != KeyPress) {
+				*ret = GDK_FILTER_CONTINUE;
+				return TRUE;
+			}
+			break;
+		default:
+			if (type != KeyRelease) {
+				*ret = GDK_FILTER_CONTINUE;
+				return TRUE;
+			}
+		}
+
+		acme->current_screen = acme_get_screen_from_event
+			(acme, xanyev);
+
+		if (do_action (acme, key_type) == FALSE)
+			*ret = GDK_FILTER_REMOVE;
+		else
+			*ret = GDK_FILTER_CONTINUE;
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
 static GdkFilterReturn
 acme_filter_events (GdkXEvent *xevent, GdkEvent *event, gpointer data)
 {
 	Acme *acme = (Acme *) data;
 	XEvent *xev = (XEvent *) xevent;
-	XAnyEvent *xanyev = (XAnyEvent *) xevent;
-	guint keycode, state;
 	int i;
 
 	/* verify we have a key event */
@@ -786,35 +834,19 @@
 			xev->xany.type != KeyRelease)
 		return GDK_FILTER_CONTINUE;
 
-	keycode = xev->xkey.keycode;
-	state = xev->xkey.state;
+	for (i = 0; hardcoded_keys[i].key_type > 0; i++) {
+		GdkFilterReturn ret;
 
+		if (handle_key (hardcoded_keys[i].key, hardcoded_keys[i].key_type,
+				xevent, acme, &ret) != FALSE)
+			return ret;
+	}
+
 	for (i = 0; i < HANDLED_KEYS; i++) {
-		if (keys[i].key == NULL)
-			continue;
+		GdkFilterReturn ret;
 
-		if (keys[i].key->keycode == keycode &&
-				(state & USED_MODS) == keys[i].key->state) {
-			switch (keys[i].key_type) {
-			case VOLUME_DOWN_KEY:
-			case VOLUME_UP_KEY:
-				/* auto-repeatable keys */
-				if (xev->type != KeyPress)
-					return GDK_FILTER_CONTINUE;
-				break;
-			default:
-				if (xev->type != KeyRelease)
-					return GDK_FILTER_CONTINUE;
-			}
-
-			acme->current_screen = acme_get_screen_from_event
-				(acme, xanyev);
-
-			if (do_action (acme, keys[i].key_type) == FALSE)
-				return GDK_FILTER_REMOVE;
-			else
-				return GDK_FILTER_CONTINUE;
-		}
+		if (handle_key (keys[i].key, keys[i].key_type, xevent, acme, &ret) != FALSE)
+			return ret;
 	}
 
 	return GDK_FILTER_CONTINUE;
Index: gnome-settings-daemon/actions/acme.h
===================================================================
--- gnome-settings-daemon/actions/acme.h	(revision 8259)
+++ gnome-settings-daemon/actions/acme.h	(working copy)
@@ -29,14 +29,13 @@
 	MUTE_KEY,
 	VOLUME_DOWN_KEY,
 	VOLUME_UP_KEY,
-	POWER_KEY,
+	LOGOUT_KEY,
 	EJECT_KEY,
 	HOME_KEY,
 	MEDIA_KEY,
 	CALCULATOR_KEY,
 	SEARCH_KEY,
 	EMAIL_KEY,
-	SLEEP_KEY,
 	SCREENSAVER_KEY,
 	HELP_KEY,
 	WWW_KEY,
@@ -62,14 +61,13 @@
 	{ MUTE_KEY, GCONF_BINDING_DIR "/volume_mute",NULL },
 	{ VOLUME_DOWN_KEY, GCONF_BINDING_DIR "/volume_down", NULL },
 	{ VOLUME_UP_KEY, GCONF_BINDING_DIR "/volume_up", NULL },
-	{ POWER_KEY, GCONF_BINDING_DIR "/power", NULL },
+	{ LOGOUT_KEY, GCONF_BINDING_DIR "/logout", NULL },
 	{ EJECT_KEY, GCONF_BINDING_DIR "/eject", NULL },
 	{ HOME_KEY, GCONF_BINDING_DIR "/home", NULL },
 	{ MEDIA_KEY, GCONF_BINDING_DIR "/media", NULL },
 	{ CALCULATOR_KEY, GCONF_BINDING_DIR "/calculator", NULL },
 	{ SEARCH_KEY, GCONF_BINDING_DIR "/search", NULL },
 	{ EMAIL_KEY, GCONF_BINDING_DIR "/email", NULL },
-	{ SLEEP_KEY, GCONF_BINDING_DIR "/sleep", NULL },
 	{ SCREENSAVER_KEY, GCONF_BINDING_DIR "/screensaver", NULL },
 	{ HELP_KEY, GCONF_BINDING_DIR "/help", NULL },
 	{ WWW_KEY, GCONF_BINDING_DIR "/www", NULL },
@@ -80,5 +78,30 @@
 	{ NEXT_KEY, GCONF_BINDING_DIR "/next", NULL },
 };
 
+static struct {
+	int key_type;
+	const char *keysym;
+	Key *key;
+} hardcoded_keys[] = {
+	{ MUTE_KEY, "XF86AudioMute", NULL },
+	{ VOLUME_DOWN_KEY, "XF86AudioLowerVolume", NULL },
+	{ VOLUME_UP_KEY, "XF86AudioRaiseVolume", NULL },
+	{ EJECT_KEY, "XF86Eject", NULL },
+	{ SEARCH_KEY, "XF86Search", NULL },
+	{ SCREENSAVER_KEY, "XF86Lock", NULL },
+	{ EMAIL_KEY, "XF86Mail", NULL },
+	{ LOGOUT_KEY, "XF86LogOff", NULL },
+	{ SCREENSAVER_KEY, "XF86ScreenSaver", NULL },
+	{ CALCULATOR_KEY, "XF86Calculator", NULL },
+	{ WWW_KEY, "XF86WWW", NULL },
+	{ MEDIA_KEY, "XF86AudioMedia", NULL },
+	{ PLAY_KEY, "XF86AudioPlay", NULL },
+	{ PAUSE_KEY, "XF86AudioPause", NULL },
+	{ STOP_KEY, "XF86AudioStop", NULL },
+	{ PREVIOUS_KEY, "XF86AudioPrev", NULL },
+	{ NEXT_KEY, "XF86AudioNext", NULL },
+	{ -1, NULL, NULL }
+};
+
 #endif /* __ACME_H__ */
 
Index: schemas/apps_gnome_settings_daemon_keybindings.schemas.in
===================================================================
--- schemas/apps_gnome_settings_daemon_keybindings.schemas.in	(revision 8259)
+++ schemas/apps_gnome_settings_daemon_keybindings.schemas.in	(working copy)
@@ -17,7 +17,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/volume_mute</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/volume_mute</applyto>
             <type>string</type>
-            <default>XF86AudioMute</default>
+            <default></default>
             <locale name="C">
                 <short>Volume mute</short>
                 <long>Volume mute's shortcut.</long>
@@ -29,7 +29,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/volume_down</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/volume_down</applyto>
             <type>string</type>
-            <default>XF86AudioLowerVolume</default>
+            <default></default>
             <locale name="C">
                 <short>Volume down</short>
                 <long>Volume down's shortcut.</long>
@@ -41,7 +41,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/volume_up</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/volume_up</applyto>
             <type>string</type>
-            <default>XF86AudioRaiseVolume</default>
+            <default></default>
             <locale name="C">
                 <short>Volume up</short>
                 <long>Volume up's shortcut.</long>
@@ -50,8 +50,8 @@
 
 
         <schema>
-            <key>/schemas/apps/gnome_settings_daemon/keybindings/power</key>
-            <applyto>/apps/gnome_settings_daemon/keybindings/power</applyto>
+            <key>/schemas/apps/gnome_settings_daemon/keybindings/logout</key>
+            <applyto>/apps/gnome_settings_daemon/keybindings/logout</applyto>
             <type>string</type>
             <default>&lt;Control&gt;&lt;Alt&gt;Delete</default>
             <locale name="C">
@@ -65,7 +65,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/eject</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/eject</applyto>
             <type>string</type>
-            <default>XF86Eject</default>
+            <default></default>
             <locale name="C">
                 <short>Eject</short>
                 <long>Eject's shortcut.</long>
@@ -89,7 +89,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/search</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/search</applyto>
             <type>string</type>
-            <default>XF86Search</default>
+            <default></default>
             <locale name="C">
                 <short>Search</short>
                 <long>Search's shortcut.</long>
@@ -101,7 +101,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/email</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/email</applyto>
             <type>string</type>
-            <default>XF86Mail</default>
+            <default></default>
             <locale name="C">
                 <short>E-mail</short>
                 <long>E-mail's shortcut.</long>
@@ -110,18 +110,6 @@
 
 
         <schema>
-            <key>/schemas/apps/gnome_settings_daemon/keybindings/sleep</key>
-            <applyto>/apps/gnome_settings_daemon/keybindings/sleep</applyto>
-            <type>string</type>
-            <default></default>
-            <locale name="C">
-                <short>Sleep</short>
-                <long>Sleep's shortcut.</long>
-            </locale>
-        </schema>
-
-
-        <schema>
             <key>/schemas/apps/gnome_settings_daemon/keybindings/screensaver</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/screensaver</applyto>
             <type>string</type>
@@ -148,7 +136,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/calculator</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/calculator</applyto>
             <type>string</type>
-            <default>XF86Calculator</default>
+            <default></default>
             <locale name="C">
                 <short>Launch calculator</short>
                 <long>Launch calculator's shortcut</long>
@@ -160,7 +148,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/www</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/www</applyto>
             <type>string</type>
-            <default>XF86WWW</default>
+            <default></default>
             <locale name="C">
                 <short>Launch web browser</short>
                 <long>Launch web browser's shortcut.</long>
@@ -171,7 +159,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/media</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/media</applyto>
             <type>string</type>
-            <default>XF86AudioMedia</default>
+            <default></default>
             <locale name="C">
                 <short>Media player</short>
                 <long>Media player key's shortcut.</long>
@@ -182,7 +170,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/play</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/play</applyto>
             <type>string</type>
-            <default>XF86AudioPlay</default>
+            <default></default>
             <locale name="C">
                 <short>Play (or play/pause)</short>
                 <long>Play (or play/pause) key's shortcut.</long>
@@ -194,7 +182,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/pause</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/pause</applyto>
             <type>string</type>
-            <default>XF86AudioPause</default>
+            <default></default>
             <locale name="C">
                 <short>Pause</short>
                 <long>Pause key's shortcut.</long>
@@ -206,7 +194,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/stop</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/stop</applyto>
             <type>string</type>
-            <default>XF86AudioStop</default>
+            <default></default>
             <locale name="C">
                 <short>Stop playback key</short>
                 <long>Stop playback key's shortcut.</long>
@@ -218,7 +206,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/previous</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/previous</applyto>
             <type>string</type>
-            <default>XF86AudioPrev</default>
+            <default></default>
             <locale name="C">
                 <short>Skip to previous track</short>
                 <long>Previous track key's shortcut.</long>
@@ -230,7 +218,7 @@
             <key>/schemas/apps/gnome_settings_daemon/keybindings/next</key>
             <applyto>/apps/gnome_settings_daemon/keybindings/next</applyto>
             <type>string</type>
-            <default>XF86AudioNext</default>
+            <default></default>
             <locale name="C">
                 <short>Skip to next track</short>
                 <long>Next track key's shortcut.</long>
