You are not logged in.

#1 2023-08-19 15:55:21

arch4life
Member
Registered: 2023-08-19
Posts: 2

Issue: Keybinding for Volume Control Triggering Unwanted Focus Events

Hello Arch community,

I recently installed Qtile on my laptop with PulseAudio to try out a new window manager. I've configured volume control keybindings, setting F2 to lower the volume and F3 to increase it. However, I've run into an issue where pressing these volume control keys seems to toggle the currently opened application. Here is how I configured my config.py file:

...
Key([], "XF86AudioLowerVolume", lazy.spawn("pactl -- set-sink-volume 0 -5%")),
Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl -- set-sink-volume 0 +5%"))
...

I did some investigation with xev and I noticed when I press F2 or F3 it firstly toggles FocusIn and FocusOut and only then it raises or lowers the volume. Here is some snippet from that xev investigation:

...
FocusOut event, serial 35, synthetic NO, window 0x1000001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 35, synthetic NO, window 0x1000001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 35, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
              0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
...

In my efforts to troubleshoot, I've taken the following steps:
- Searched for potential causes in xkb configurations, but didn't find anything relevant.
- Tried using just F2 and F3 arguments instead of XF86Audio arguments, considering my laptop have FnLock, but the issue persisted.
- Installed and configured sxhkd in case it might provide a solution, but it didn't resolve the issue.
- Checked my UEFI settings for anything that might be causing the problem, but no luck there either.
- Searched through Arch Wiki to see if I can find the solution, but I didn't find anything relevant to this.

About hardware
machine that I have is Lenovo IdeaPad 1 laptop with Ryzen 7 5000U CPU and AMD Radeon graphics. I have dual-boot set up with Windows 11.

Despite my efforts, I haven't been able to identify the cause of this issue and fix it. I am reaching out to community for assistance and understanding why focus events occur and how I can get the volume key bindings work as expected.
Any help or insights would be greatly appreciated.

Thank you,
Petar

Offline

Board footer

Powered by FluxBB