48

Looking in the conventional place: View -> Customize Touch Bar... The option is not present. Is this option not currently available? I'd like to disable most of the options it provides is where I am going.

I continually accidentally press the Forward and Back buttons while editing and it has become annoying very quickly.

I figured I would ask while I attempt update my finger muscle memory.

Ed Randall
  • 6,887
  • 2
  • 50
  • 45
AJ Venturella
  • 4,742
  • 4
  • 33
  • 62

4 Answers4

55

I kept running into this issue as well and it was quite frustrating. I appreciate the ability to customize via an extension, but I really like the drag-and-drop mechanism provided universally (or nearly) that is missing here.

As a result, I ended up disabling the touch bar within VS Code by going to:

Code -> Preferences -> Settings

and then:

Application -> Keyboard

There you will find the checkbox for enabling/disabling the touch bar on macOS. Hope this helps someone else discover it quickly!

Matt Ray
  • 1,274
  • 1
  • 12
  • 26
  • 2
    Ah, this must be a new setting in recent VS Code releases. Probably the preferred way over my other way below: https://stackoverflow.com/a/48428763/1060314. I'll mark this as the answer since it's now supported. – AJ Venturella Oct 01 '18 at 20:23
  • Even though I have "Touch bar shows `App Controls` in System Preferences, I always just get the F keys, it's really annoying. I've added a bunch of Touch Bar extensions to no avail as well. Any ideas what's wrong? Thanks. – sming Feb 23 '20 at 03:48
  • @sming what happens if you hit the fn key on the keyboard? If you see the touchbar controls then it's just your macos touchbar settings have been set to always show the function keys by default. You can change this setting following the other answer here https://stackoverflow.com/a/48428763/5189714 – TimmyGee Jan 15 '21 at 14:35
  • @TimmyGee I'll check it out, thanks. FWIW I've purchased BTT and it finally makes the Touch Bar useful. I have my agenda, `htop`, volume & brightness sliders on it. Game changer. – sming Jan 16 '21 at 13:34
  • Ahh. I didn't realise Better Touch Tool allowed touch bar customisations now too. I will check that out! – TimmyGee Feb 02 '21 at 18:40
37

I just ended up making it always show function keys:

https://support.apple.com/en-us/HT207240

Effectively:

System Preferences -> Keyboard -> Shortcuts Tab

At the bottom of the left pane, you will see Function Keys select that. On the right hand side you can +/- apps you want to always show the function keys.

AJ Venturella
  • 4,742
  • 4
  • 33
  • 62
32

You could check out the Nasc VSCode Touchbar extension

Customisable Mac touch bar

It allows you to choose from a bunch of preset commands by updating your settings.json to toggle buttons on/off

There are some other extensions you can try out that have come out since time of this post's publishing: https://marketplace.visualstudio.com/search?term=touchbar&target=VSCode&category=All%20categories&sortBy=Relevance

eg

{
    nasc-touchbar.goToDefinition: true,
    nasc-touchbar.goToNext: false,
    // ..etc
}

And if you're game you can write your own.

Jay Wick
  • 12,325
  • 10
  • 54
  • 78
1

If you're using macOS version Ventura 13, you can have Visual Studio Code (or other apps too) to always show function keys in the touch bar

  1. Go to > Apple menu (top left on screen) > System Settings...
  2. Select Keyboard on the left menu
  3. Click Keyboard Shortcuts... on the main menu
  4. Select Function Keys on the left menu (refer second image)
  5. Click that tiny + button
  6. And add Visual Studio Code or any other application you want (remember VS Code needs to be added to Applications so that you can find it here)

enter image description here enter image description here

Arghya C
  • 9,805
  • 2
  • 47
  • 66