Sublime Forum

Support for Touch Bar (MacBook Pro 2016)

#5

I wonder if this could be implemented using apps like Keyboard Maestro too? Since most (all?) Sublime features can be keyboard bound, so if not Sublime will offer it, maybe keyboard helper apps will?

EDIT: “The API for the Touch Bar does not appear to allow non-front applications to affect the Touch Bar, except that Apple does this themselves in Xcode and Screen Capture and the like. So Apple knows and understands the need, but have not made the facility available for Third Party macro trigger style applications.”

So I guess we’re left to hope that Sublime can integrate it then :slight_smile:

0 Likes

#7

I came across this thread, looking exactly for this feature. In my opinion, this should match the power of flexibility of sublime text.
We can imagine a file like sublime-keymap-touchbar, where you can simply add shortcut like the sublime keymap file, but with the possibility to add a label or an icon to display in the touchbar.
Or, for more power, A full plugin with advanced functionalities.
I dont have the 2016 macbook yet, it’s a matter of days, but as soon as I get it, I will look the touchbar API and see what can be done.
It could be good to start thinking what are the bests uses for sublime on the touchbar.

1 Like

#8

I frequently flip between full-screen and distraction free mode, so touch bar buttons to quickly change view mode would be welcome!

0 Likes

#9

It is a hardware specific feature (and also os-specific) so I doubt it would fit in a cross-platform API like ST’s. You are free to use the ctypes python package to access these OS APIs however.

Personally, I would create a package in a way that allows specifying arbitrary commands and arguments to be run on touch, and optionally a way to modify displayed text (or image?) for each button. Anything more custom should be directly implemented.

0 Likes

#10

Would love to see this.

0 Likes

#11

Why would Jon implement this for a small group of users? He won’t implement printing in ST which has been requested by a larger group of users, so you guys are beating a dead horse.

0 Likes

#12

We’re all developers - just a basic API would be enough, so we could program our own plugins for this.

Someone mentioned ctypes: any idea how difficult would it be to build a plugin using that?

0 Likes

#13

As of Dev buil 3132, there is now a “Basic TouchBar support on macOS Sierra”.

jps:

With regards to Touch Bar support on macOS, all you get out of the box is buttons for next/prev result (i.e., F4/Shift+F4 equivalents). You can enable the show_navigation_bar preference to turn on a list of recently visited files there, too. It’s off by default because it’s very much just an experiment at this stage: it needs some testing to see if it’s even useful.

0 Likes

#14

@Paapaa :information_source: The updated forum now lets you accept answers and/or mark a topic (=issue?) as resolved.

1 Like

#15

@rppn: I have no idea how to do it. Is it possible for old threads? There is not checkbox to accept an answer. (Or I’m just blind…)

0 Likes

#16

Comments can be selected as an answer from the left most icon which kinda looks like this :ballot_box_with_check:

0 Likes

#17

You can only accept an answer in the Technical Support category.

2 Likes

#18

This would be so fantastic, I’d love the option to assign macros or sublime functions to the touch bar.

1 Like

#19

This was added in Build 3143.

1 Like

#20

Oh! Fantastic - I’m surprised my searching didn’t find the docs for this - do you happen to have a link to them handy?

0 Likes

#21

See here.

0 Likes

#22

Thanks but theres no information or links to documentation there, it only states “Mac: Added Touch Bar support” and that’s it from what I can see?

0 Likes

#23

Sorry, I don’t have a Mac, so I can’t help you. I would suggest that you consult your Mac documentation or the Apple support web site.

0 Likes

#24

It’s not macOS that I need documentation for though, it’s Sublime Text, it’s all good and well to say it ‘supports the touch bar’, but - what does it support? How do you configure Sublime to do things with it? It’s application specific.

0 Likes

#25

This article should help you. Pay attention to the section “From within Apps”.

0 Likes