1

Logitech K270 has media keys:

  • play/pause
  • mute/unmute
  • volume down
  • volume up
  • home
  • mail
  • power
  • calculator

I don't know what "home" is supposed to do, whereas "mail" and "calculator" don't do anything simply (I hope I'm not wrong) because I haven't installed a calculator and a mail client yet.

But: "mute/unmute" only mutes.

As a workaround I've tried to put the following two lines

"pactl set-sink-mute 0 toggle"
  XF86AudioMute

in the .xbindkeysrc file, but the key kept muting the audio, so I mapped

"playerctl previous"
  XF86AudioMute

and it still kept muting, just like the mapping I'm using is overridden or simply not working.

Finally, as a dirty workaround I've used the following two lines

"pactl set-sink-mute 0 toggle"
  shift + XF86AudioMute

which works, but requires one more keystroke.

I've tried with other keys, and it seems that xbindkeys cannot map media keys without a modifier (ordinary keys work just fine even without).

EDIT 1

By the way, I think I'm pretty confused on the argument (audio). For instance, system volume is a think, the volume set in the player is another. How to control the former? And the latter? What if I bind the same key to both?

EDIT 2

When I run xbindkeys -n in a terminal, I get

$ xbindkeys -n

*** Warning ***
Please verify that there is not another program running
which captures one of the keys captured by xbindkeys.
It seems that there is a conflict, and xbindkeys can't
grab all the keys defined in its configuration file.

closed as off-topic by Jeff Schaller, G-Man, schily, slm Jun 12 '18 at 0:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, slm
If this question can be reworded to fit the rules in the help center, please edit the question.

0

As it turns out, I was wrong in saying that play/pause and volume up/down keys were working since the beginning, I just forgot having put the following lines in ~/.config/i3/config

bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioMute exec amixer -q set Master mute

where the last line is wrong, and was overriding the .xbindkeysrc setting.

Now I have to decide wether to put all settings in the i3 config file or in xbindkeys's file.

In either case the above solves my original issue.

Not the answer you're looking for? Browse other questions tagged or ask your own question.