billziss-gh / EnergyBar

Supercharge your Mac's Touch Bar.
GNU General Public License v3.0
749 stars 34 forks source link

[idea] Disable touches while typing #47

Closed developersteve closed 5 years ago

developersteve commented 5 years ago

As someone that sometimes accidentally hits the task bar icons when typing i'm wondering if its possible to have the touchbar icon touches disable while typing.

Did some digging but cant see too much on it either to do it via code or as part of OSX but thought it might be handy. Maybe a transparent overlay over the touchbar screen for 100ms after a keypress or something.

billziss-gh commented 5 years ago

That is a pretty neat idea and could be built into EnergyBar.

The only problem is with finding the correct heuristic; your suggestion of ignoring touchbar taps for a short delay after a keypress is a good one. (Except for the ESC button which should be allowed always.)

billziss-gh commented 5 years ago

A bit of internet research:

One of these could perhaps be used to implement the detection part of your heuristic.

billziss-gh commented 5 years ago

I ended up implementing this. I need to test it for a few days to make sure that it works and solves the problem, but if it does I will commit the changes soon.

developersteve commented 5 years ago

Amazing, was planning to do it as well 👍

billziss-gh commented 5 years ago

Thanks! It was a good idea and a nice break from tinkering in the Windows kernel :)

billziss-gh commented 5 years ago

Latest release includes this. Closing.