Trigger a key event from a command line? #3762
Unanswered
aleksandr-vin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys!
I'm trying to programmatically fire the
play_or_pause
key event in macos. It is possible to map a keyboard key (let's say1
) to fire that key event, but I still need to physically press the1
on my keyboard. Sending it via CGEventCreateKeyboardEvent didn't work as it is not going into the karabiner_grabber obviously.I need to trigger that somehow from the code. I was thinking of doing that with
karabiner_cli
by sending a control commands to the VirtualHIDDevice, if my understanding of the architecture is correct. Maybe there's another way?Beta Was this translation helpful? Give feedback.
All reactions