Keypress stuff #3081
Answered
by
latenitefilms
onetribegamingcodes
asked this question in
Technical Support
Keypress stuff
#3081
-
Just a random question i had, is there a way that you can hold any keypress when the midi note is on and have it release when its off?? |
Beta Was this translation helpful? Give feedback.
Answered by
latenitefilms
Aug 15, 2022
Replies: 1 comment 3 replies
-
We have "press and hold" and "release" actions already for the modifier keys. If you want non-modifier keys though, you'd need to make your own "press" and "release" Lua Snippets. For the "a" key for example: Press: hs.eventtap.event.newKeyEvent("a", true):post() Release: hs.eventtap.event.newKeyEvent("a", false):post() See: http://www.hammerspoon.org/docs/hs.eventtap.event.html#newKeyEvent |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
latenitefilms
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have "press and hold" and "release" actions already for the modifier keys. If you want non-modifier keys though, you'd need to make your own "press" and "release" Lua Snippets. For the "a" key for example:
Press:
Release:
See: http://www.hammerspoon.org/docs/hs.eventtap.event.html#newKeyEvent