hyprwm / Hypr

Hypr is a tiling window manager written in modern C++.
BSD 3-Clause "New" or "Revised" License
1.09k stars 33 forks source link

Can't set keybinds to Q #65

Closed H-mate closed 2 years ago

H-mate commented 2 years ago

Please describe the bug I can't set keybindings to Q despite not using it elsewhere in my config

And when I use watch -n 0.3 "cat /tmp/hypr/hypr.log | grep -v \"dirty\" | grep -v \"nimation\" | tail -n 60" I don't see any reaction to pressing the keybind

Steps to reproduce: install the AUR package copy the example config edit the bind=SUPER,C,killactive, part to bind=SUPER,Q,killactive, and change the bind=SUPER,Q,exec,kitty part to not use Q

Expected behavior Hypr should kill the active window when I press Super+Q but it doesn't

vaxerski commented 2 years ago

what's the output of xmodmap -pk | grep "(Q)" and is the keysym consistent with xev -event keyboard?

H-mate commented 2 years ago

what's the output of xmodmap -pk | grep "(Q)" and is the keysym consistent with xev -event keyboard?

the output of xmodmap -pk | grep "(Q)" is 24 0x0027 (apostrophe) 0x0022 (quotedbl) 0x0071 (q) 0x0051 (Q) 0xfe51 (dead_acute) 0xfe57 (dead_diaeresis) 53 0x0071 (q) 0x0051 (Q) 0x0078 (x) 0x0058 (X) 0x00f6 (odiaeresis) 0xfe5c (dead_ogonek)

and xev -event keyboard gives KeymapNotify event, serial 24, synthetic NO, window 0x0, this I think this means consistant but I'm not really familiar with theese commands

vaxerski commented 2 years ago

try using 113 instead of Q

H-mate commented 2 years ago

try using 113 instead of Q

this only helps when I set my keyboard layout back from dvorak-alt-intl to us

vaxerski commented 2 years ago

give the entire output of a key log of xev then maybe and not just the first line?

H-mate commented 2 years ago

give the entire output of a key log of xev then maybe and not just the first line?

Here you go. sorry I excluded the other part first

Outer window is 0x1c00001, inner window is 0x1c00002

KeymapNotify event, serial 24, synthetic NO, window 0x0, keys: 4294967170 0 0 0 16 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

KeymapNotify event, serial 24, synthetic NO, window 0x0, keys: 4294967170 0 0 0 16 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

KeyRelease event, serial 25, synthetic NO, window 0x1c00001, root 0x6be, subw 0x0, time 9979250, (312,505), root:(2877,509), state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES, " XLookupString gives 1 bytes: (0d) " XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1c00001, root 0x6be, subw 0x0, time 9989306, (154,297), root:(2719,301), state 0x0, keycode 53 (keysym 0x71, q), same_screen YES, XLookupString gives 1 bytes: (71) "q" XmbLookupString gives 1 bytes: (71) "q" XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1c00001, root 0x6be, subw 0x0, time 9989370, (154,297), root:(2719,301), state 0x0, keycode 53 (keysym 0x71, q), same_screen YES, XLookupString gives 1 bytes: (71) "q" XFilterEvent returns: False

vaxerski commented 2 years ago

well keysym is 0x71, so 113. I can't see why it wouldnt work.

H-mate commented 2 years ago

The only thing I could think of is that my dvorak-alt-intl layout is a bit modified but I only edited the A O E U I key to include the Á Ó É Ú Í keys. This is the only thing that I modified about my keyboard layout but it doesn't seem logical that this would have caused anything with my Q key because I didn't touch that

vaxerski commented 2 years ago

Check with the last commit. Should improve key handling

H-mate commented 2 years ago

I checked and it still isn't working but I've got new things

I tweaked a few things to my liking and some of them didn't work so here's all bind=SUPER,P,exec,rofi -modi run,drun -show drun this worked bind=SUPER,RETURN,exec,kitty this worked too bind=SUPER,B,exec,vivaldi-stable but then this didn't bind=SUPER,Q,killactive, then there's this after theese I haven't changed anything

vaxerski commented 2 years ago

damnit, what the actual fuck is wrong with your keyboard...

Use xev -event keyboard keysyms. If that doesn't work, your system is haunted or something, I don't know. I simply don't know anymore.

H-mate commented 2 years ago

I tried using those too and it didn't work Then I tried converting them from hexadecimal to decimal and that didn't work so then I uninstalled the AUR package and I built hypr manually and that also didn't work So what should I do now, reinstall my system or call a priest?

vaxerski commented 2 years ago

call a priest.

Also since u mentioned using dvorak, try maybe using the keysym for the key that normally is on the place of Q? I have no clue how those layouts work on Xorg though.

H-mate commented 2 years ago

Tried using those (both letters and keysyms) too with no succes

vaxerski commented 2 years ago

then sorry, I have no idea. try searching online. I don't use dvorak and so I can't even test this.

H-mate commented 2 years ago

I didn't find anything useful by searching so now I'm trying to recreate the situation in a virtual machine to see if it's working there. I don't have any idea what to do either way but at least I'm gonna have the logs

H-mate commented 2 years ago

Hypr wouldn't build in the vm so I'm gonna try on my laptop

H-mate commented 2 years ago

it works on my laptop

H-mate commented 2 years ago

Here are the specs:

Laptop (81DC Lenovo Ideapad 330-15IKB): CPU: i3-6006U 2.0 GHz GPU: Intel HD Graphics 520 RAM 4 GB OS: fully up to date Arch Linux

PC: CPU: AMD Ryzen 5 5600 3.9GHz GPU: AMD ATI Radeon RX 6500XT RAM: 8GB Kingston Fury Beast OS: fully up to date Arch Linux

vaxerski commented 2 years ago

¯\_(ツ)_/¯

your PC keyboard haunted

H-mate commented 2 years ago

I reinstalled my system and it works now