+static void
+ev_window_media_player_key_pressed (EvWindow *window,
+ const gchar *key,
+ gpointer user_data)
+{
+ if (!gtk_window_is_active (GTK_WINDOW (window)))
+ return;
+
+ /* Note how Previous/Next only go to the
+ * next/previous page despite their icon telling you
+ * they should go to the beginning/end.
+ *
+ * There's very few keyboards with FFW/RWD though,
+ * so we stick the most useful keybinding on the most
+ * often seen keys
+ */
+ if (strcmp (key, "Play") == 0) {
+ ev_window_run_presentation (window);
+ } else if (strcmp (key, "Previous") == 0) {
+ ev_window_cmd_go_previous_page (NULL, window);
+ } else if (strcmp (key, "Next") == 0) {
+ ev_window_cmd_go_next_page (NULL, window);
+ } else if (strcmp (key, "FastForward") == 0) {
+ ev_window_cmd_go_last_page (NULL, window);
+ } else if (strcmp (key, "Rewind") == 0) {
+ ev_window_cmd_go_first_page (NULL, window);
+ }
+}
+