summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app.c7
-rw-r--r--src/ui/keys.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index a2d80bf2..6f50ca7b 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1078,6 +1078,13 @@ iBool handleCommand_App(const char *cmd) {
1078 SDL_MaximizeWindow(d->window->win); 1078 SDL_MaximizeWindow(d->window->win);
1079 return iTrue; 1079 return iTrue;
1080 } 1080 }
1081 else if (equal_Command(cmd, "window.fullscreen")) {
1082 SDL_SetWindowFullscreen(d->window->win,
1083 SDL_GetWindowFlags(d->window->win) & SDL_WINDOW_FULLSCREEN_DESKTOP
1084 ? 0
1085 : SDL_WINDOW_FULLSCREEN_DESKTOP);
1086 return iTrue;
1087 }
1081 else if (equal_Command(cmd, "font.set")) { 1088 else if (equal_Command(cmd, "font.set")) {
1082 setFreezeDraw_Window(get_Window(), iTrue); 1089 setFreezeDraw_Window(get_Window(), iTrue);
1083 d->prefs.font = arg_Command(cmd); 1090 d->prefs.font = arg_Command(cmd);
diff --git a/src/ui/keys.c b/src/ui/keys.c
index 656a52ac..0f4a19f7 100644
--- a/src/ui/keys.c
+++ b/src/ui/keys.c
@@ -84,6 +84,9 @@ static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =
84 { 70, { "Zoom in", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, 0 }, 84 { 70, { "Zoom in", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, 0 },
85 { 71, { "Zoom out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, 0 }, 85 { 71, { "Zoom out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, 0 },
86 { 72, { "Reset zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, 0 }, 86 { 72, { "Reset zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, 0 },
87#if !defined (iPlatformApple) /* Ctrl-Cmd-F on macOS */
88 { 73, { "Toggle fullscreen mode", SDLK_F11, 0, "window.fullscreen" }, 0 },
89#endif
87 { 76, { "New tab", newTab_KeyShortcut, "tabs.new" }, 0 }, 90 { 76, { "New tab", newTab_KeyShortcut, "tabs.new" }, 0 },
88 { 77, { "Close tab", closeTab_KeyShortcut, "tabs.close" }, 0 }, 91 { 77, { "Close tab", closeTab_KeyShortcut, "tabs.close" }, 0 },
89 { 80, { "Previous tab", prevTab_KeyShortcut, "tabs.prev" }, 0 }, 92 { 80, { "Previous tab", prevTab_KeyShortcut, "tabs.prev" }, 0 },