Commit f2ce92b4 authored by Bastien Nocera's avatar Bastien Nocera
Browse files

main: Add 0-9 keys as shortcuts to seek to 0-90%

Add keyboard shortcut for Numbers 1 to 9 (not on the numeric pad) to
seek to the 10% to 90% of the video.

As used on YouTube:
https://support.google.com/youtube/answer/7631406?hl=en

Closes: #466
parent e5b9ddaa
Pipeline #366748 passed with stage
in 14 minutes and 8 seconds
......@@ -31,6 +31,8 @@ Ctrl+H:
Undocumented shortcuts:
M (when playing a DVD):
Menu
0-9:
Skip to 0%-90% of the video
Ctrl+Q:
Quit
Ctrl+W:
......
......@@ -3625,10 +3625,6 @@ totem_object_handle_key_press (TotemObject *totem, GdkEventKey *event)
if (bacon_video_widget_has_menus (totem->bvw) != FALSE)
bacon_video_widget_dvd_event (totem->bvw, BVW_DVD_ROOT_MENU_SELECT);
break;
case GDK_KEY_0:
if (mask == GDK_CONTROL_MASK)
totem_object_set_zoom (totem, FALSE);
break;
case GDK_KEY_Menu:
case GDK_KEY_F10:
show_popup (totem);
......@@ -3643,6 +3639,23 @@ totem_object_handle_key_press (TotemObject *totem, GdkEventKey *event)
case GDK_KEY_Time:
show_popup (totem);
break;
case GDK_KEY_0:
if (mask == GDK_CONTROL_MASK) {
totem_object_set_zoom (totem, FALSE);
break;
}
/* fall-through */
case GDK_KEY_1:
case GDK_KEY_2:
case GDK_KEY_3:
case GDK_KEY_4:
case GDK_KEY_5:
case GDK_KEY_6:
case GDK_KEY_7:
case GDK_KEY_8:
case GDK_KEY_9:
totem_object_seek (totem, (event->keyval - GDK_KEY_0) * 0.1);
break;
case GDK_KEY_equal:
if (mask == GDK_CONTROL_MASK)
totem_object_set_zoom (totem, TRUE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment