sindresorhus/KeyboardShortcuts

Is it possible to trigger a shortcut key continuously by holding it down?

asaxing opened this issue · 1 comments

For Example, in a list, the shortcut key to move to the next element can be designed to move continuously downward when held down.

There's nothing built-in, but you could probably use .events(for name: KeyboardShortcuts.Name) for this. If the key is down, start a timer that emits as long as the key is down, with an interval of NSEvent.keyRepeatDelay.