From 56257134192498af69ff6f2a99f7c35d4012f5d5 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Sun, 15 May 2016 00:24:27 -0500 Subject: [PATCH] fix(linux): Make F11 show up in menu as shortcut --- src/browser/application-menu.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/browser/application-menu.coffee b/src/browser/application-menu.coffee index 6bf1e167c..887a9551f 100644 --- a/src/browser/application-menu.coffee +++ b/src/browser/application-menu.coffee @@ -199,14 +199,16 @@ class ApplicationMenu firstKeystroke = keystrokesByCommand[command]?[0] return null unless firstKeystroke + if /f\d+/.test(firstKeystroke) + firstKeystroke = firstKeystroke.toUpperCase() + modifiers = firstKeystroke.split('+') - modReplacement = if process.platform is "darwin" then "Command" else "Ctrl" key = modifiers.pop() modifiers = modifiers.map (modifier) -> modifier.replace(/shift/ig, "Shift") .replace(/command/ig, "Command") - .replace(/mod/ig, modReplacement) + .replace(/mod/ig, "CmdOrCtrl") .replace(/ctrl/ig, "Ctrl") .replace(/alt/ig, "Alt")