Closed jgillman closed 9 years ago
I've added extra command line tool post-hid-event
at v10.6.8.
Please upgrade to the latest beta version.
How to upgrade to the latest beta version: https://pqrs.org/osx/karabiner/document.html#check-for-updates
Usage:
$ /Applications/Karabiner.app/Contents/Library/utilities/bin/post-hid-event NX_KEYTYPE_NEXT
$ /Applications/Karabiner.app/Contents/Library/utilities/bin/post-hid-event NX_KEYTYPE_PREVIOUS
Show list of keycodes
$ /Applications/Karabiner.app/Contents/Library/utilities/bin/post-hid-event
Note: If you want to send normal key event from command line, use JXA. https://github.com/dtinth/JXA-Cookbook/wiki/System-Events
I just updated to the latest beta (v10.6.11) via the "Check for update including beta version" button, but I don't see the post-hid-event
in /Applications/Karabiner.app/Contents/Library/utilities/bin/
. I do see your commit that should add the utility but for some reason it's not there.
I can try completely uninstalling and reinstalling Karabiner.
Excuse me. post-hid-event was not included in recent beta versions.
I've fixed this issue at v10.6.12. Please upgrade again.
:beers: Awesome! Works like a charm. Thank you so much for the quick turn around!
I don't think this is currently possible, but it would be really handy to be able to trigger key presses from the command line interface.
In my particular use case I use the app Alfred along with their companion app Alfred Remote. They have iTunes controls built into the app which is nice, but what I REALLY want to do it be able to emulate media key presses. Right now if I'm using another app to play music (e.g. Spotify or Rdio) their iTunes integration doesn't work.
Is this a realistic idea? I'm curious if anyone else would find this useful or if I'm just totally off base and there's a simpler solution.
Example
Just as an example, I would imagine the interface would be something like:
Or maybe more explicit: