pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 516 forks source link

MacBook Pro Touch Bar #840

Open andrewstarks opened 6 years ago

andrewstarks commented 6 years ago

On a MacBook Pro, we are (blessed) with a Touch Bar, which shows context sensitive stuff based on the application's sophistication / whathaveyou.

For applications that do not support the touch bar, you can tell the mac to default to function keys:

https://www.imore.com/how-make-function-keys-default-touch-bar-display

However, this doesn't work for ZBS. I don't know why, but the mac is not able to identify ZBS when you use the method described above and so you don't get the function keys.

This makes many of the default shortcuts a pain in the butt.

It'd be awesome if:

pkulchenko commented 6 years ago

Hi Andrew, I unfortunately don't have the Touchbar to try myself, but want to confirm a couple of things.

You followed the instructions as described in your link and it shows functional keys, but those don't do anything in the IDE? Or is the app not recognized and the functional keys are not shown in the Touchbar? If they are shown, we can probably add a keypress handler to see if the codes that are generated (if any) are the same as the app expects. If the keys are not shown, maybe there is something that needs to be added to info.plist file for the touchbar to be recognized.

There is touchbar simulator, but I'm not sure how close it is to the real thing; may be worth to try still...

pkulchenko commented 6 years ago

Another way to see if the key is physically working in that case is to use the keyboard viewer, as described here: https://discussions.apple.com/message/16679941#message16679941.

andrewstarks commented 6 years ago

The function keys work fine when I hold down the "fn" key and the F keys appear. Another workaround would be to set my mac to always show them.

The mechanism that I linked to does not work and I suspect it may be something with how the mac identifies the loaded binary?

pkulchenko commented 6 years ago

The function keys work fine when I hold down the "fn" key and the F keys appear.

Andrew, do you have "Use all F1, F2, etc. keys as standard function keys" selected as described here?

andrewstarks commented 6 years ago

Yes, but I'm not sure that it works the same way for touch-bar having macs.

There is an easy way to make this a per-application setting, which I linked to in my first post. If this could be made work as it should (I verified that this works for other applications) then that would be awesome. Full on touch bar support would be even cooler, but it's not necessary.