skhd icon indicating copy to clipboard operation
skhd copied to clipboard

Media keys emulation

Open ghost opened this issue 5 years ago • 3 comments

I'am trying to run

skhd -k "sound_up" or khd -k "play"

but it does not make any effect. Am I understand correct how it should work?

I'am trying to emulate media keys on keyboard not supported by osx.

ghost avatar Sep 06 '20 21:09 ghost

Media keys cannot be synthesized in the current version. They can only be bound as the trigger for some hotkey action.

asmvik avatar Nov 30 '20 13:11 asmvik

this might be useful https://github.com/yorhodes/dotfiles/commit/ce74bccb45590c91435cdc321d5860e0222806e5

yorhodes avatar Sep 24 '21 20:09 yorhodes

possible to do this with safari? taking notes while watching video. Need to pause/rewind/forward. Usually I'd move to next screen, hit j/k/l move back finish the notes again go to safari screen hit k and return to notes screen. A simple shortcut to tell safari to play/pause would have been nicer. Any ways I could achieve this ?

I've seen some multiline AppleScript to that searches for specific tab and uses javascript selector to play/pause : here https://www.reddit.com/r/applescript/comments/gb031a/applescript_to_pause_media_in_safari/ but not sure how to use multiline AppleScript with skhd, still new here!

Thanks :)


alternate solution I found : as I also use karabiner-elements, allows remapping key-combinations to media actions (playpause/next/prev). However, this doesn't resolve skipping 10s ahead/back.

anandkumar89 avatar Mar 28 '24 18:03 anandkumar89