#Logi MX Keys S keyboard volume keys

2 messages · Page 1 of 1 (latest)

humble wigeon
#

I would like to use my Logitech MX keyboard with Omarchy, but I don't know how to key code the volume keys to change the volume. I know that Omarchy has a way of changing quick lauchs key presses. Can I make it so my volume buttons on my keyboard change the volume in Omarchy? Everything always blasts at full volume, and scares the crap out of me. I've checked the Ofiicial Arch, and AUR lists and tried downloading stuff, but they may be for other Logitech equipment

midnight path
#

The basic way to do this is:

  1. Find out which (if any) key your ketboard volume keys send to the OS.
  2. Add a new bind for those volume keys to your bindings.conf file. For example this is the default volume up bind, but you could edit the input key to be something other than XF86AudioRaiseVolume:
    binde = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+

To find more about keybinds in Hyprland see here: https://wiki.hypr.land/Configuring/Binds/
The Hyprland page suggests using wev to find out which key is pressed: https://github.com/jwrdegoede/wev/blob/master/wev.1.scd

Steps to take to find what your keybaord is inputting:

  1. install wev form pacman
  2. Open a terminal and run wev,
  3. select the wev window and use your volume keys, you should see something like this wl_keyboard] key: serial: 40419; time: 8582088; key: 174; state: 1 (pressed) sym: XF86AudioStop (269025045), utf8: ''
  4. Note the bit that sayssym: ..... which indicates the key pressed, in this case it was XF86AudioStop
  5. Now edit the hyprland bindings.conf file to the use the key for the corrisponding voulme command.
    Volume up:
    binde = , [your_volume_up_key_here], exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
    Volume down:
    binde = , [your_volume_down_key_here], exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-

Note: Using the above method will not trigger the volume icon to show, but it will change the volume. Maybe someone else know how to better solve it.