Leave fullscreen with "Esc" key

This commit is contained in:
Rafostar
2021-07-18 15:34:41 +02:00
parent 5378facb46
commit 1004000ba2
2 changed files with 10 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ var actions = {
change_repeat: ['<Ctrl>r'],
reveal_controls: ['Return'],
toggle_fullscreen: ['F11', 'f'],
leave_fullscreen: ['Escape'],
quit: ['<Ctrl>q', 'q'],
};
@@ -85,6 +86,9 @@ function handleAction(action, window)
if(clapperWidget.isFullscreenMode)
clapperWidget.revealControls();
break;
case 'leave_fullscreen':
if(!clapperWidget.isFullscreenMode)
break;
case 'toggle_fullscreen':
clapperWidget.toggleFullscreen();
break;

View File

@@ -20,6 +20,12 @@
<property name="accelerator">F11 f</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes">Leave fullscreen</property>
<property name="accelerator">Escape</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes">Reveal OSD (fullscreen only)</property>