hyprwm / Hyprland

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

XF86ScreenSaver key not working #5892

Closed shadowelite-sec closed 1 week ago

shadowelite-sec commented 1 week ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch makepkg at commit 589f758d947cb4e8b888d2da00076a9fb0a6d521 (CI/Nix: build with submodules). Date: Sun May 5 19:00:39 2024 Tag: v0.40.0-8-g589f758d, commits: 4614 flags: (if any) System Information: System name: Linux Node name: elite Release: 6.8.7-arch1-2 Version: #1 SMP PREEMPT_DYNAMIC Fri, 19 Apr 2024 09:51:31 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] [10de:1f95] (rev a1) (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

XF86ScreenSaver not working

wev output

[14:     wl_keyboard] key: serial: 21521; time: 7218986; key: 160; state: 1 (pressed)
                      sym: XF86ScreenSaver (269025069), utf8: ''
[14:     wl_keyboard] key: serial: 21522; time: 7218986; key: 160; state: 0 (released)
                      sym: XF86ScreenSaver (269025069), utf8: ''
[14:     wl_keyboard] keymap: format: 1 (xkb v1), size: 64754

Sunday_18_2024_21_33_37_PM

How to reproduce

bind = ,XF86ScreenSaver, exec, hyprctl notify 5 2000 "rgb(22DA6E)" " i am working"

add this keybind in your config

Crash reports, logs, images, videos

No response

vaxerski commented 1 week ago

have you tried binding by code? lowercase?

shadowelite-sec commented 1 week ago

Yes, the code is working!

But I'm pretty sure XF86ScreenSaver worked before. I commented out this keybind for some reason for a long time. I just uncommented this today. I don't know; I think something affected this keybind.

ikalco commented 1 week ago

same stuff as CKeybindManager::handleKeybinds

test.c


#include <xkbcommon/xkbcommon.h>

int main() { char buf[20]; xkb_keysym_t kk = xkb_keysym_from_name("XF86ScreenSaver", XKB_KEYSYM_CASE_INSENSITIVE);

printf("XF86ScreenSaver -> %d", kk);

kk = xkb_keysym_to_upper(kk);
xkb_keysym_get_name(kk, buf, 20);
printf("-> %s\n", buf);

kk = 269025069;
printf("%d ", kk);
kk = xkb_keysym_to_upper(kk);
xkb_keysym_get_name(kk, buf, 20);
printf("-> %s\n", buf);

return 0;

}

gcc test.c -o test -lxkbcommon && ./test XF86ScreenSaver -> 268964421-> XF86Screensaver 269025069 -> XF86ScreenSaver

¯\(ツ)

ikalco commented 1 week ago

try this patch patch.txt

shadowelite-sec commented 1 week ago

try this patch patch.txt

yes now XF86ScreenSaver is working but

some keys stoped working

eg :

$mainMod = SUPER

bind = $mainMod, RETURN, exec, foot
bind = $mainMod, SPACE, exec, ~/.config/rofi/bin/launcher
ikalco commented 1 week ago

oops, try this patch.txt

shadowelite-sec commented 1 week ago

oops, try this patch.txt

yes its working now :smiley_cat:

ikalco commented 1 week ago

this can be closed btw