![](https://i-blog.csdnimg.cn/blog_migrate/5fb4659778f38c391eade28c6e44a8d9.png)
Is there a button, or piece of information, you wish you could add to the Touch Bar on your MacBook Pro? You can, and we’ll show you how to do it.
您是否希望将按钮或一条信息添加到MacBook Pro的触摸栏中? 您可以,我们将向您展示如何做。
We’ve shown you how to add or remove icons to your Touch Bar, sticking with Apple’s own customization options. There’s a surprising amount of choice there, but it’s not infinite, meaning you’re out of luck if you want trigger scripts or replace keyboard shortcuts using Touch Bar buttons. Fortunately, BetterTouchTool ($5, 45-day free trial)—which lets you add powerful gesture controls to macOS—now makes it possible to put whatever you want in the Touch Bar via a custom menu. You can map buttons to keyboard shortcuts, program-specific functionality, or just about anything else you can imagine. Even better: you can make these buttons specific to any program, allowing you to retroactively add Touch Bar support to applications that otherwise wouldn’t have it.
我们已经向您展示了如何使用Apple自己的自定义选项在触摸栏中添加或删除图标。 那里有很多令人惊讶的选择,但是它并不是无限的,这意味着如果您想要触发脚本或使用触摸栏按钮替换键盘快捷键,那么您就不走运了。 幸运的是, BetterTouchTool (5天免费试用,为期45天的免费试用)可让您向macOS添加功能强大的手势控件,现在它可以通过自定义菜单将所需的内容放置在触摸栏中。 您可以将按钮映射到键盘快捷键,特定于程序的功能,或者几乎可以想象的其他任何东西。 更好的是:您可以使这些按钮专用于任何程序,从而使您可以向没有该功能的应用程序追溯添加Touch Bar支持。
Launch the latest version of BetterTouchTool for the first time and you’ll see a new button in the Touch Bar’s control strip.
首次启动最新版本的BetterTouchTool,您将在触摸栏的控制栏中看到一个新按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/33a2004ca65413e8eecca5a785562f10.png)
Tap this button and it expands to the left section of the Touch Bar, which is otherwise taken up by App Controls. You can put whatever buttons you want here.
点击此按钮,它将扩展到触摸栏的左侧,否则由App Controls占用。 您可以在此处放置任何想要的按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/ae79e2b7c690c0aed392c942fed33cac.png)
I added a battery time remaining widget, and a button that launches one of the dumbest Touch Bar apps I could find. You could also add buttons that launch useful things. Here’s how.
我添加了电池剩余时间小部件,并添加了一个按钮,该按钮可以启动我所能找到的最笨的Touch Bar应用程序之一。 您还可以添加启动有用内容的按钮。 这是如何做。
将按钮添加到触摸栏 (Add Buttons to the Touch Bar)
To add a custom button to your Touch Bar, open the BetterTouchTool preferences window, then head to the “Touch Bar” section. Click the “+ TouchBar Button” tab at the bottom to reveal options for a custom button.
要将自定义按钮添加到触摸栏,请打开BetterTouchTool首选项窗口,然后转到“触摸栏”部分。 单击底部的“ + TouchBar按钮”选项卡以显示自定义按钮的选项。
![](https://i-blog.csdnimg.cn/blog_migrate/e5a61371189fd8ee372db5326f53a699.png)
You can select an icon and name at the left. Click “Advanced Configuration” and you can pick a color for the button. To the right you can choose whether this buttons triggers a keyboard shortcut, or some other predefined action.
您可以在左侧选择图标和名称。 单击“高级配置”,然后可以为按钮选择颜色。 在右侧,您可以选择此按钮是触发键盘快捷键还是其他预定义的操作。
![](https://i-blog.csdnimg.cn/blog_migrate/c1b94da1a73b6620f35f835c07f3384e.png)
If you’ve used BetterTouchTool before, you’ve got an idea of the sort of actions it can trigger. If not, know that there are tons of options.
如果您以前使用过BetterTouchTool,则已经了解了它可以触发的操作。 如果没有,请知道有很多选择。
![](https://i-blog.csdnimg.cn/blog_migrate/524dfda8d6c66f7f52cb08c3cecea0b8.png)
You can create a button to launch programs, re-size windows, take screenshots, shut down your computer, launch a script, or even emulate mouse clicks. BetterTouchTool can map just about anything to a button. Explore the options and you’ll see what we mean.
您可以创建一个按钮来启动程序,调整窗口大小,截屏,关闭计算机,启动脚本,甚至模拟鼠标单击。 BetterTouchTool几乎可以将任何内容映射到按钮。 探索这些选项,您将明白我们的意思。
添加小部件 (Adding Widgets)
You can also use BetterTouchTool to add widgets to the TouchBar. These function just like buttons—you can assign an action to them—but they also display information. Just click the “+ Widget” option, which is right beside the “+TouchBar Button” option.
您还可以使用BetterTouchTool将小部件添加到TouchBar。 这些功能就像按钮一样(您可以为其分配操作),但是它们还显示信息。 只需单击“ + TouchBar按钮”选项旁边的“ +小部件”选项。
![](https://i-blog.csdnimg.cn/blog_migrate/0deb4eb859aaf4c5a3bef10479ea2212.png)
There aren’t many widgets offered by default, but the ones that are there are pretty useful.
默认情况下,没有提供很多小部件,但是那里的小部件非常有用。
![](https://i-blog.csdnimg.cn/blog_migrate/32c883bbdb738cde8a750b936448ffeb.png)
The “Remaining Battery Time” widget shows you battery time on the Touchbar. You’ll see volume and brightness sliders (though I prefer to adjust volume and brightness in one gesture). And there’s even the ability to switch or launch apps from the Touch Bar from within BetterTouchTool, which is good because BetterTouchTool and other applications for switching between applications do not play nicely together. And if none of this is what you want, you can output the result of anything put together in AppleScript.
“剩余电池时间”小部件显示触摸栏上的电池时间。 您会看到音量和亮度滑块(尽管我更喜欢用一个手势调整音量和亮度)。 甚至还可以从BetterTouchTool内的触摸栏中切换或启动应用程序,这很好,因为BetterTouchTool和其他用于在应用程序之间切换的应用程序不能很好地配合使用。 并且,如果这些都不是您想要的,则可以输出AppleScript中所有内容的结果。
![](https://i-blog.csdnimg.cn/blog_migrate/487f53376698e8502ac12008e2ca2029.png)
It’s easy to fill a lot of space with these things, and some of them are pretty useful. See what combination works best for you!
这些东西很容易填充很多空间,其中一些非常有用。 看看哪种组合最适合您!
添加特定于应用程序的按钮 (Adding App-Specific Buttons)
So far we’ve been adding universal buttons, which show up regardless of which application is open. But you can also add app-specific buttons and widgets.
到目前为止,我们一直在添加通用按钮,无论打开哪个应用程序,该按钮都会显示。 但是您也可以添加特定于应用程序的按钮和小部件。
I’m a big fan of Civilization V. It’s an old game at this point, and isn’t likely to see an update with Touch Bar compatibility. No matter: I can add my own. In BetterTouchTool’s left panel, you can create custom buttons for any application you want. Just click the “+” icon below the panel to add an application, then select it and add whatever buttons you like.
我是Civilization V的忠实拥护者。这是一款旧游戏,因此不太可能看到与Touch Bar兼容的更新。 没关系:我可以添加自己的。 在BetterTouchTool的左侧面板中,您可以为所需的任何应用程序创建自定义按钮。 只需单击面板下方的“ +”图标即可添加应用程序,然后选择它并添加所需的任何按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/77ee3b5c15a45c6e7a9e7761d4f9def8.png)
These buttons will only show up when that program is open, allowing you to add functionality to the Touch Bar specific to that game. Here, I’ve added some buttons for basic game commands.
这些按钮仅在该程序打开时显示,从而使您可以为该游戏特定的触摸栏添加功能。 在这里,我添加了一些用于基本游戏命令的按钮。
![](https://i-blog.csdnimg.cn/blog_migrate/0da2aa387ce4c7a4f8ea2b2491dd9d68.png)
You can map the buttons to do whatever you want, so go ahead: get creative. It makes the otherwise empty space on your Touch Bar much more useful while running older software.
您可以映射按钮以执行所需的任何操作,因此继续:发挥创意。 运行较旧的软件时,它可以使触控栏上否则很空白的空间更加有用。
翻译自: https://www.howtogeek.com/307468/how-to-add-custom-buttons-to-the-macbook-pro-touch-bar/