I have a new Macbook Pro and I installed Arch Linux on it. One thing I want to be able to do is use the media keys to seek through a track (in mpd) and goto the next or previous track. This is possible on OSX with iTunes so I assume it's not fundamentally impossible. Using
xev only shows Key Press and Key Release events. Holding a key just seems to cycle through those two events rapidly.
So what I want to be able to do is:
- go to next mpd track when XF86AudioNext key is pressed; or
- seek through the current mpd track when XF86AudioNext key is held down
and of course the same (but in the other direction) for the XF86AudioPrev key.
It seems like this is only possible through some advanced scripting. Hopefully one of you can point me in the right direction.
showkey doesn't cycle between Press and Release when holding a key down. Rather it just shows a bunch of Press events for the duration of which the key is held down and a final Release event when it's finally let go.
Another interesting thing I just noticed is that when disabling the autorepeat using
xev will only show a single Key Press event no matter how long the key is held down and a single Key Release event when it's let go. On the otherahnd
showkey's output doesn't change. It shows a bunch of Key Press event and a final Key Release when it's let go.
There's probably a way to use that to script what I want to do but
sxhkd the hotkey tool I'm using appears to follow the
xev way. So is