Re:NSTouchBar API Reference
by ben174 on Thursday October 27, 2016 @09:16PM
(#12812120)
Looking forward to seeing if a web standard comes of this. Would love to be able to make use of this additional UI in my web apps.
[ Parent
| on HN ]
Please don't. I really don't want to be forced to look at my keyboard.
Re:NSTouchBar API Reference
by leesalminen on Thursday October 27, 2016 @09:56PM
(#12812363)
This seems like a developer-centric viewpoint. Users of my app are not tech savvy and this could be a very convenient way of providing shortcuts to things. We already offer customizable keyboard shortcuts but nobody uses them.
Ever heard of a UI element called the "toolbar"?
Re:NSTouchBar API Reference
by spiderfarmer on Friday October 28, 2016 @07:18AM
(#12814757)
Why so condescending? The touchbar's sole reason for existing is for enhancing productivity by making shortcuts discoverable.
I think it's a very "I can type without looking at my keyboard" centric view. If your keyboard shortcuts are already going unused it may be a discoverability problem, or it may just be that people who aren't power users will always prefer the mouse/track pad. If that's the case then I'm not sure glitzy icons on the keyboard help them.
This is also Apple-specific hardware, which kind of flies in the face of becoming a "standard".
I hope it doesn't get adopted by other laptop manufacturers. Imagine it does. Then we'll need desktop keyboards to support this standard. I like my wireless keyboard's battery life, and I don't see any benefit in buying a more expensive keyboard with decreased battery life in order to support UI I don't intend to use.
Re:NSTouchBar API Reference
by madeofpalk on Friday October 28, 2016 @12:00AM
(#12812958)
There can still be a JS API for it that's not standardised. See Apple's JS APIs for Force/3D Touch in Safari on Mac and iOS. Unfortunately though they both have different APIs :(
In saying that though, I doubt Apple would actually make this available for website.
They showed Safari using the bar for various general browser functionality, e.g. back button and tab switcher, so that would require adding a toggle to switch from that UI to the one the webpage has defined.
I think Apple is going to use this to differentiate its native app offerings from competing web apps, particularly Google's web apps, so I doubt they put much effort into that.
Its not likely that Apple will really start to embrace the web, but we can go the other direction! Somebody could figure out how to tie this into an Electron API. (It would be awesome to use the touch bar with Atom, for example)
With a bit of legwork, you could refactor and ship a React app with react-native-macos, and write a module that allows you to use NSTouchBar from JS.
Well that was fast: https://github.com/ptmt/react-native-touchbar