Skip to content

Set Escape Key

Maxmad68 edited this page Jan 9, 2021 · 1 revision

A new feature of PyTouchBar is the ability to change the escape key button.
All you have to do is create the new button (see TouchBarItems.Button), and set this button as the escape key with the set_touchbar's esc_key parameter.

button = PyTouchBar.TouchBarItems.Button(title = "Foo", action = function)
PyTouchBar.set_touchbar(... , esc_key = button) 

Example

Clone this wiki locally