Bug 479784 - Alt+8 and Alt+9 shortcuts eaten / disappearing, and not usable in applications
Summary: Alt+8 and Alt+9 shortcuts eaten / disappearing, and not usable in applications
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.114.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-14 03:03 UTC by avagordon01
Modified: 2024-03-12 14:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
xev -event keyboard output (1.58 KB, text/plain)
2024-01-14 03:03 UTC, avagordon01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avagordon01 2024-01-14 03:03:46 UTC
Created attachment 164892 [details]
xev -event keyboard output

SUMMARY
Alt+Num usually works in firefox and other programs to select the Nth or last tab, 8 and 9 aren't working under KDE (but do under other desktop environments on the same computer)

looking at `xev -event keyboard`
Alt+0-7 work as expected generating alt and then 0-7 key presses
but Alt+8 or Alt+9 generate KeymapNotify events as if they are detected as shortcuts by a global shortcut daemon (same behaviour as e.g. Alt+Tab). I've attached the output of xev

I've tried creating custom shortcuts on Alt+8 and Alt+9 that e.g. `echo "9" >> ~/out.txt`  or re-send Alt+8 key sequence, but this doesn't make the shortcuts work in applications.

STEPS TO REPRODUCE
1. open firefox with more than one tab
2. press Alt+9

OBSERVED RESULT
nothing happens

EXPECTED RESULT
last tab focused

SOFTWARE/OS VERSIONS
uname -a: Linux ava-laptop 6.6.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jan 2024 16:20:41 +0000 x86_64 GNU/Linux
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Comment 1 avagordon01 2024-01-14 03:20:18 UTC
just to add, this doesn't _just_ affect firefox, Alt+8 / Alt+9 also don't work in tmux/alacritty (but do on another DE)
Comment 2 avagordon01 2024-01-25 11:50:18 UTC
there are no visible alt+8/9 shortcuts in KDE shortcuts config, no alt+9/9 in ~/.config/kglobalshortcutsrc or ~/.config/khotkeysrc

and when I kill kglobalaccel5, alt+8/9 work in applications
Comment 3 avagordon01 2024-03-08 12:42:40 UTC
these shortcuts are documented in firefox here https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_windows-tabs
Comment 4 Dashon 2024-03-11 17:28:30 UTC
It appears to be working for me. Doing alt + 8 and alt + 9 in firefox. Plasma 6 is out on arch and that is what I am using. Are you still able to reproduce this?
Comment 5 avagordon01 2024-03-11 18:50:24 UTC
yep, still able to reproduce, using plasma 6, firefox 123 on arch
Comment 6 Dashon 2024-03-11 18:53:47 UTC
(In reply to avagordon01 from comment #5)
> yep, still able to reproduce, using plasma 6, firefox 123 on arch

x11 or wayland? I believe your issue is related to the fact that khotkeys is deprecated. Shouldn't even be in the arch repos anymore.
Comment 7 Dashon 2024-03-11 18:55:19 UTC
Never mind the khotekeys thing I misread one of your comments, but it is still deprecated.
Comment 8 avagordon01 2024-03-11 18:57:30 UTC
x11, I've just removed khotkeys and rebooted and it doesn't change, still broken
Comment 9 Dashon 2024-03-11 18:58:48 UTC
(In reply to avagordon01 from comment #8)
> x11, I've just removed khotkeys and rebooted and it doesn't change, still
> broken

I see I'm on wayland. Let me grab another machine and test on x11.
Comment 10 avagordon01 2024-03-11 19:02:20 UTC
thanks! I appreciate your help trying to repro
Comment 11 Dashon 2024-03-11 19:33:53 UTC
(In reply to avagordon01 from comment #10)
> thanks! I appreciate your help trying to repro

No problem, so far regardless of if I use x11 or wayland on my test machine. Those keybindings are recognized. The problem is they are only recognized once. If I manually use the mouse to change tabs and then use either alt + 8 or alt + 9 to change tabs. It will work once. However, on my main machine it works everytime. The difference is that my test machine is a laptop and my main machine is a desktop. I'll keep trying to find out what is going on.
Comment 12 avagordon01 2024-03-11 19:37:02 UTC
do you have any other programs that use alt+8/9 keybindings that you can test with?
I have some tmux bindings that also don't work with alt+8/9
my only machine is also a laptop
Comment 13 Dashon 2024-03-11 19:38:12 UTC
(In reply to avagordon01 from comment #12)
> do you have any other programs that use alt+8/9 keybindings that you can
> test with?
> I have some tmux bindings that also don't work with alt+8/9
> my only machine is also a laptop

I don't know of any other programs that use them, but if I find any or if you recommend any other ones. I'll try them out on my test machine.
Comment 14 avagordon01 2024-03-11 19:40:04 UTC
yes! just tried in dolphin file browser and the same behaviour, if you create a load of tabs, alt+[0-7] work as expected, and alt+[89] don't
Comment 15 Dashon 2024-03-11 19:45:37 UTC
(In reply to avagordon01 from comment #14)
> yes! just tried in dolphin file browser and the same behaviour, if you
> create a load of tabs, alt+[0-7] work as expected, and alt+[89] don't

Alt + 9 and Alt + 9 work fine for me in dolphin, but I'm still having the issue in firefox.
Comment 16 Dashon 2024-03-11 20:23:48 UTC
(In reply to avagordon01 from comment #14)
> yes! just tried in dolphin file browser and the same behaviour, if you
> create a load of tabs, alt+[0-7] work as expected, and alt+[89] don't

I went the nuclear option and deleted $HOME/.config/systemsettingsrc, $HOME/.local/share/kded, $HOME/.local/share/kded5, $HOME/.local/share/systemsettings, $HOME/.local/share/kglobalshortcutsrc, and finally reinstalled systemsettings. The alt + [8-9] keys are working, but I'm not sure they were ever not working in my case. I thought alt + 8 and alt + 9 were supposed to go to previous tab and last tab in firefox. Which is not the case. alt + 8 goes to the 8th tab and alt + 9 goes to the last tab, so that was my misunderstanding. This was done on wayland, so I will switch back to x11 for one final test.
Comment 17 Dashon 2024-03-11 20:31:56 UTC
(In reply to avagordon01 from comment #14)
> yes! just tried in dolphin file browser and the same behaviour, if you
> create a load of tabs, alt+[0-7] work as expected, and alt+[89] don't

Alright works for me on x11 too. Do you use any input remapper programs, touchegg for gestures, or anything of that kind? I tried xev on both my test machine and main machine and the output is identical. The keymap notify event, serial 28 happens when I move the cursor over the xev window that gets open when I use the "xev -event keyboard" command. It doesn't happen when I am actually pressing any keys though.
Comment 18 Dashon 2024-03-12 01:12:01 UTC
I should have thought of this earlier, but try creating a new user and seeing if the behavior is the  same there.
Comment 19 avagordon01 2024-03-12 09:12:24 UTC
yes, tried a new user and it doesn't have the same behaviour.
that means it's something about my settings
tried resetting all keyboard shortcuts to default and that fixes it
I exported the shortcuts scheme before resetting and there's nothing referring to alt+8/9 though!
I guess it's "fixed" but I don't know why or what went wrong
thanks for all your help!
Comment 20 avagordon01 2024-03-12 09:22:15 UTC
also just figured out, the problem only occurs when I have another seperate shortcut bound to alt+[ or alt+], does that reproduce it for you?
Comment 21 avagordon01 2024-03-12 09:24:58 UTC
_but_, this only happens with kde/kglobalaccel, it hasn't happened with any other desktop environment where I've had those same shortcuts (gnome, sxhkd)
Comment 22 Dashon 2024-03-12 14:10:45 UTC
(In reply to avagordon01 from comment #20)
> also just figured out, the problem only occurs when I have another seperate
> shortcut bound to alt+[ or alt+], does that reproduce it for you?

I'll try and reproduce that within the next few hours when I get some time.
Comment 23 Dashon 2024-03-12 14:31:41 UTC
(In reply to avagordon01 from comment #20)
> also just figured out, the problem only occurs when I have another seperate
> shortcut bound to alt+[ or alt+], does that reproduce it for you?

Unfortunately, I was not able to reproduce it with that. I set a shortcut to open dolphin to "alt + [". Alt + opening bracket.
Comment 24 avagordon01 2024-03-12 14:37:31 UTC
huh, okay, thanks for trying. in the meantime, I've moved to wayland, so this is no longer important?
but for posterity, the most specific reproduction I have is x11, firefox, and a random other action bound to alt+[ or alt+], and then alt+8 / 9 don't work in firefox or dolphin
Comment 25 Dashon 2024-03-12 14:40:29 UTC
(In reply to avagordon01 from comment #24)
> huh, okay, thanks for trying. in the meantime, I've moved to wayland, so
> this is no longer important?
> but for posterity, the most specific reproduction I have is x11, firefox,
> and a random other action bound to alt+[ or alt+], and then alt+8 / 9 don't
> work in firefox or dolphin

No problem. If this ever pops up again. Hopefully someone will find this, so that we can get some more input. I believe on wayland kglobalaccel isn't being used at the very least its systemd service does not run on wayland, since I was switching back and forth between the two. I wonder if that messed things up when trying to reproduce on my end.