hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.21k stars 800 forks source link

catchall bindsym executes on modifier press, even if the modifier is bound #5073

Open Kommynct opened 5 months ago

Kommynct commented 5 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 66330281ff19e84c986c5ce639b670929e5dadd6 dirty (config: report errors from sourced files). Date: Sun Mar 10 21:39:00 2024 Tag: v0.36.0-98-g66330281 flags: (if any) System Information: System name: Linux Node name: anarchy-desktop Release: 6.6.10-zen1-1-zen Version: #1 ZEN SMP PREEMPT_DYNAMIC Fri, 05 Jan 2024 16:20:18 +0000 GPU information: 06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT / 6700S / 6800S] [1002:73ef] (rev c1) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ```

Bug or Regression?

Bug

Description

Pushing alt or super, even if alt and super are bound to keys inside the submap cause the submap to become deactivated if the catchall is used

I tried adding: bind=SUPERALT,Alt_L,exec,nop

to the submap, it did not help.

How to reproduce

use a submap and push a modifier that's bound in the submap, here's my config for the sake of example

#submaps
bind = ALT, a, submap,onehand
bind = SUPER_ALT, 0, submap, "Gaming Mode - Press Alt+shift+0 to exit"
submap=onehand
bind = , e, movefocus, r
bind = , a, movefocus, l
bind = , COMMA, movefocus, u
bind = , o, movefocus, d
bind = ALT, e, movewindow, r
bind = ALT, a, movewindow, l
bind = ALT, COMMA, movewindow, u
bind = ALT, o, movewindow, d
binde = SUPER,e,resizeactive,10 0
binde = SUPER,a,resizeactive,-10 0
binde = SUPER,COMMA,resizeactive,0 -10
binde = SUPER,o,resizeactive,0 10
bindel =, XF86AudioRaiseVolume, exec, $volup
bindel =, XF86AudioLowerVolume, exec, $voldown
bindl =ALT, UP, exec, $volup
bindl =ALT, DOWN, exec, $voldown
bindl =, XF86AudioMute, exec, $volmute
bindl =, XF86MonBrightnessUp, exec, $lightup
bindl =, XF86MonBrightnessDown, exec, $lightdown
bindl =, XF86AudioPlay, exec, playerctl play
bindl =, XF86AudioPause, exec, playerctl pause
bindl =, XF86AudioNext, exec, playerctl next
bindl =, XF86AudioPrev, exec, playerctl previous
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
bind = ,ESCAPE,submap,reset
bind = ,catchall,submap,reset
bind=SUPERALT,Alt_L,exec,nop
submap=reset
submap="Gaming Mode - Press Alt+shift+0 to exit"
bind = SUPER_ALT, 0, submap, reset
submap=reset

Crash reports, logs, images, videos

No response

ArtemSmaznov commented 4 months ago

Maybe you should be using something like bindr = ,catchall,submap,reset instead of regular bind?

Kommynct commented 4 months ago

that does effectively work around the issue, but that shouldn't be necessary if the modifiers are bound anyway, thanks for that though!