kando-menu / kando

🥧 The Cross-Platform Pie Menu.
https://ko-fi.com/post/Kando-1-0-0-released-G2G5Z1DOS
Other
1.17k stars 25 forks source link

Single-key turbo mode #464

Closed Schneegans closed 2 weeks ago

Schneegans commented 2 weeks ago

This PR makes any key a Turbo-Mode modifier. Before only if Alt, Ctrl, Shift, and Meta were held down, you could browse through the menu in "Turbo-Mode". Now this is possible with any key. This makes it possible to easily use Turbo-Mode even if a menu is bound to a single key without a modifier.

There's a small caveat though: In order to know that a key is pressed, we have to rely on key repeat: When you keep a key pressed, after a short delay (maybe half a second?) the OS will spam an app with key-down events. However, during this short period until the key-repeat events start to arrive, we cannot enter Turbo mode yet. So there will be a small delay after you opened the menu in which Turbo-Mode will not yet work.

If this delay is too long for your liking, you can hit the key quickly twice - this way Kando will get the key-down event and Turbo-Mode will work right out of the box!