Reply to topic

Num pad shortcuts and media commands

pascpeli
Registered Member
Posts
1
Karma
0

Num pad shortcuts and media commands

Thu Feb 14, 2019 11:08 pm
Hello,

I have a keyboard with numpad. I want to use certain keys (2,4,5,6,8) for multimedia control and volume adjustments. I can easily define them in KDE settings->shortcuts so that when numlock is off I have 1=end 2=vol decrease, 3=pgdn, 4=prev song, 5=play/pause, 6=next song, 7=home 8=vol increase, 9=pgup. But when I do this when numlock is on I can only insert 1,3,7,9 meaning the keys I have not specified in the shortcut menu. The others do nothing. I also get some random numlock on/offs but this is for another post I guess...
I decided to use xbindkeys to try a workaround. But, I don't know the correct commands to assign to them. For Vol up/down I found "amixer sset Master 5%" but this does not have the exact same functionality as the Fn+left/right arrows which apart from adjusting the vol also gives a visual feedback (the bar with the vol percentage). For the prev, play/pause, next I found "qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.COMMAND" but this is only for Amarok and not for the other players and of course, doesn't provide the same functionality as the Settings->shortcuts with (I believe it uses Media Player which controls also firefox) which can choose the most recent player to apply the command.

So, can you please help me? The truth is I would prefer a solution for the first way (through KDE shortcuts). It's cleaner and easier to manage, without adding new daemons in the pipeline. But of course, a solution via xbindkeys or maybe another workaround would be appreciated as well.

P.S. do you think that creating events for acpi would be more efficient for the system?

Reply to topic

Bookmarks



Who is online

Registered users: alcinos, Arran, Baidu [Spider], Bing [Bot], boudewijn, Exabot [Bot], GamingAori, Google [Bot], jepe, kavisriranjan, kc1di-qrp, Sogou [Bot], vapip05, Yahoo [Bot]