summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-07-06 10:53:05 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-07-06 10:53:05 +0300
commit2d45e3486b7ce95e6abc10cc6f19bb00981661b7 (patch)
tree2ae72d899b5eae7b66a8f25977dd7a29d9a2a0e2 /src
parent7002917c07e8eca462391906ac1d3b2bcaf6b888 (diff)
macOS: ^⌘Space shows character palette
Diffstat (limited to 'src')
-rw-r--r--src/macos.m4
-rw-r--r--src/ui/keys.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/macos.m b/src/macos.m
index 6bacfdd1..729fe9d5 100644
--- a/src/macos.m
+++ b/src/macos.m
@@ -544,6 +544,10 @@ void handleCommand_MacOS(const char *cmd) {
544 mainIndex++; 544 mainIndex++;
545 } 545 }
546 } 546 }
547 else if (equal_Command(cmd, "emojipicker")) {
548 [NSApp orderFrontCharacterPalette:nil];
549 return iTrue;
550 }
547} 551}
548 552
549void log_MacOS(const char *msg) { 553void log_MacOS(const char *msg) {
diff --git a/src/ui/keys.c b/src/ui/keys.c
index 9df505e0..5fcfbea2 100644
--- a/src/ui/keys.c
+++ b/src/ui/keys.c
@@ -240,8 +240,9 @@ static const struct { int id; iMenuItem bind; int flags; } defaultBindings_[] =
240 { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 }, 240 { 110,{ "${menu.save.downloads}", SDLK_s, KMOD_PRIMARY, "document.save" }, 0 },
241 /* The following cannot currently be changed (built-in duplicates). */ 241 /* The following cannot currently be changed (built-in duplicates). */
242#if defined (iPlatformApple) 242#if defined (iPlatformApple)
243 { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 }, 243 { 1002, { NULL, SDLK_LEFTBRACKET, KMOD_PRIMARY, "navigate.back" }, 0 },
244 { 1003, { NULL, SDLK_RIGHTBRACKET, KMOD_PRIMARY, "navigate.forward" }, 0 }, 244 { 1003, { NULL, SDLK_RIGHTBRACKET, KMOD_PRIMARY, "navigate.forward" }, 0 },
245 { 1100, { NULL, SDLK_SPACE, KMOD_PRIMARY | KMOD_CTRL, "emojipicker" }, 0 },
245#endif 246#endif
246 { 1004, { NULL, SDLK_F5, 0, "document.reload" }, 0 }, 247 { 1004, { NULL, SDLK_F5, 0, "document.reload" }, 0 },
247 /* Media keys. */ 248 /* Media keys. */