roadrunner2 / macbook12-spi-driver

Input driver for the SPI touchpad / keyboard found in the 12" MacBook (MacBook8,1 + MacBook9,1) and 2016 through 2018 Macbook Pro's (MacBookPro13,* and 14,*); a Touch Bar driver is also available.
GNU General Public License v2.0
255 stars 50 forks source link

fn doesn't change mode when waking up touchbar #15

Closed Dunedan closed 5 years ago

Dunedan commented 5 years ago

When the Touch Bar is switched off (after the idle timeout), pressing fn will wake it up again, although it won't switch into the different state, it would when pressing fn while it is switched on. Releasing and pressing fn again does get it into the desired state. I believe pressing fn should always have the same effect on the keys shown on the Touch Bar, whether it's switched on or off.

I confirmed this behavior with the unsplit driver, as well as with the split drivers.

roadrunner2 commented 5 years ago

Thanks for finding and reporting this - I can always rely on you find the bugs I missed :wink: It should be fixed now.

Dunedan commented 5 years ago

I'm happy to confirm that your fix works. :+1: What's still a bit odd that in that situation the Touch Bar will show the keys without fn-key for a very brief moment, before switching to the correct ones. If that's inevitable you can consider this issue solved. :slightly_smiling_face:

roadrunner2 commented 5 years ago

I'm happy to confirm that your fix works.

Thanks!

What's still a bit odd that in that situation the Touch Bar will show the keys without fn-key for a very brief moment, before switching to the correct ones. If that's inevitable you can consider this issue solved.

Ok, I pushed a fix, though it's slightly hacky. While the mode is set before the display is turned on, it appears that there's a delay inside the device that causes the mode switch to occur a little later. So I've added a small delay between setting the mode and turning on the display which seems to fix this - see if it works for you too.

Dunedan commented 5 years ago

While being hacky it looks much nicer now. Great job! :+1: