Skip to content

Commit

Permalink
fix: mac fullscreen shortcut f11 is system shortcut show desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Dec 13, 2023
1 parent 3191048 commit 105e844
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/extensionsIntegrated/NoDistractions/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ define(function (require, exports, module) {
CMD_TOGGLE_PANELS = "view.togglePanels";

//key binding keys
const togglePureCodeKey = "Ctrl-Shift-2",
togglePureCodeKeyMac = "Cmd-Shift-2",
const togglePureCodeKey = "Shift-F11",
toggleFullScreenKey = "F11",
toggleFullScreenKeyMac = "Cmd-F11",
togglePanelsKey = "Ctrl-Shift-1",
togglePanelsKeyMac = "Cmd-Shift-1",
togglePanelsKey_EN = "Ctrl-Shift-`",
Expand Down Expand Up @@ -151,10 +152,8 @@ define(function (require, exports, module) {
CommandManager.register(Strings.CMD_TOGGLE_PANELS, CMD_TOGGLE_PANELS, _togglePanels);

Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(CMD_TOGGLE_PANELS, "", Menus.AFTER, Commands.VIEW_HIDE_SIDEBAR);
Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(CMD_TOGGLE_PURE_CODE, "", Menus.AFTER, CMD_TOGGLE_PANELS);
Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(CMD_TOGGLE_FULLSCREEN, "F11", Menus.AFTER, CMD_TOGGLE_PURE_CODE);

KeyBindingManager.addBinding(CMD_TOGGLE_PURE_CODE, [ {key: togglePureCodeKey}, {key: togglePureCodeKeyMac, platform: "mac"} ]);
Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(CMD_TOGGLE_PURE_CODE, togglePureCodeKey, Menus.AFTER, CMD_TOGGLE_PANELS);
Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(CMD_TOGGLE_FULLSCREEN, [ {key: toggleFullScreenKey}, {key: toggleFullScreenKeyMac, platform: "mac"} ], Menus.AFTER, CMD_TOGGLE_PURE_CODE);

//default toggle panel shortcut was ctrl+shift+` as it is present in one vertical line in the keyboard. However, we later learnt
//from IQE team than non-English keyboards does not have the ` char. So added one more shortcut ctrl+shift+1 which will be preferred
Expand Down

0 comments on commit 105e844

Please sign in to comment.