Vscode: F11 (step in) on mac conflicts with show desktop

Created on 8 Apr 2016  路  10Comments  路  Source: microsoft/vscode

  • VSCode Version: March Insiders
  • OS Version: Mac osx el capitan

Steps to Reproduce:

  1. Start debugging
  2. Hit f11 to step in

EXPECTED: step in
ACTUAL: window minimizes to show the desktop

debug verified

Most helpful comment

In case anyone reads this thread as I did and still doesn't know how to resolve the conflict, here's how to disable Mac's F11 behavior:

  1. Go to System Preferences -> Keyboard -> Shortcuts
  2. Uncheck the "Show Desktop F11" option

All 10 comments

What others are doing:

  • Chrome debugger on the mac, they use the same keyboard shortcut as us and have the same behavior
  • Xamarin is not using F keys for shorcuts

The F11 show desktop behavior can easily be disabled on the mac. A user can also easily change the step in shorcut that we have.

@weinand @jacdavis I am open for suggestions here. Should we use a different default keyboard shorcut, if yes then which one?

Yes, after I looked into this further, I discovered how to disable the desktop grabbing these shortcuts. This is a tough problem since using different shortcuts may also annoy users, I'm afraid I don't have any other suggestion though. Perhaps adding the command or function key on the mac?

We already have ctrl + F11 to step out. Function + F11 also has native mac behavior (volume up), cmd + f11 could be an option, however changing the current shortcut could break some users which have disabled the default mac behavior
Also cmd + f11 might easily get confused with ctrl + F11.

I would leave it as it is since there are two workarounds (disable natvie mac behvaior, configure step in shortcut in vscode).
I am still open for suggestions though :)

Closing this due to the reasons above.
Will reopen if we somebody has a nice idea on how to tackle this

I've enabled the option to use Fn keys as standard function keys:

2016-05-04 12-31-16

This requires to press the 'fn' key to get the Mac behaviour (e.g. 'Show Desktop') but in this mode I do not have to reconfigure function keys for individual applications.

I think there is no need for VS Code to do anything special here.

In case anyone reads this thread as I did and still doesn't know how to resolve the conflict, here's how to disable Mac's F11 behavior:

  1. Go to System Preferences -> Keyboard -> Shortcuts
  2. Uncheck the "Show Desktop F11" option

@lukecwilliams so my comment from above (with the screenshot) didn't work for you?

@weinand I needed more granular control to solve the issue - whether F keys are on by default or not, I still was getting OSX overriding VS Code's F11 (in one case holding Fn+F11, in the other case hitting F11).

@lukecwilliams thank you!! 2 years of mac and you teach me something new... fantastic.

@lukecwilliams there is also an excellent solution to this problem. Without disabling "Show Desktop."
Change it to F12!
screen shot 2017-11-02 at 10 26 53

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryan-wong picture ryan-wong  路  3Comments

biij5698 picture biij5698  路  3Comments

chrisdias picture chrisdias  路  3Comments

sijad picture sijad  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments