5 ms·
Too bad there isn't a way to have your app control the touch bar even when it isn't in focus. I would have liked to write a background application that override
by orangea 10y ago
Too bad there isn't a way to have your app control the touch bar even when it isn't in focus. I would have liked to write a background application that overrides it for personal use. I already have one that does that for the caps lock key.
- nerdponx 10y agoThat's a nice idea, But I could only imagine it would lead to chaos as apps start fighting each other for Touch Bar rights.
- orangea 10y agoIf I were in charge of Apple I'd make the app have to have accessibility rights.
- chrisseaton 10y agoHow come? That seems like a totally unrelated access right to repurpose for this?
- orangea 10y agoI bet there could be some accessibility-related use for the touch bar. Also, accessibility is already tied to completely unrelated things like event taps.
- madeofpalk 10y ago"Accessibility" is kind of the catch all super-permission to give to hooks into greater parts of the operating system. For example, Dropbox requires it for some features, as does an App that hides menubar items.
- prh8 10y agoThat's also how keyboard remapping apps (like Karabiner) work, so it seems plausible here at least.
- duaneb 10y agoYou mean like the menu bar?
- ubernostrum 10y agoThey can just read this: https://blogs.msdn.microsoft.com/oldnewthing/20110310-00/?p=11253 https://blogs.msdn.microsoft.com/oldnewthing/20110310-00/?p=...
- mstange 10y agoI couldn't find an API for it, but some Apple apps do in fact do this. I've seen three examples of it: - Media playback: When a song or a video is playing in a background app, there is an extra button in the system button part on the right that lets you access a media control strip. From it you can pause the current video / audio and even scrub through it. - Xcode debugging: While Xcode is attached to a running process, there's a button in the system button part on the right side of the touch bar lets you access a debugging control strip, which lets you pause execution and step through the program. This access button is actually in the same place as the media control button, and in cases where both would be shown, the media control button wins. - QuickTime screen recording: When you start recording the screen from QuickTime, the current recording time + a stop button is displayed in a touch bar overlay even if you focus a different app. However, once you do switch to a different app, you can close the overlay, and it minimizes into that same button slot on the right of the touch bar. It surely would be nice to be able to do these things without private APIs, but I couldn't find anything so far.
- mittsh 10y agoXcode 8.1 does that (visible in the TouchBar simulator). They add a global key to control the debugger (Pause/Resume program execution, toggle breakpoints…) while you're in your app, and away from Xcode: https://cl.ly/0v0z3b2S3Q0a https://cl.ly/0v0z3b2S3Q0a