Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
asaxing opened this issue Nov 17, 2023 · 1 comment
Open

Comments

@asaxing
Copy link

asaxing commented Nov 17, 2023

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

@sindresorhus
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants