Bug 471063 - Apps launched from calc key breaks num lock/number pad use
Summary: Apps launched from calc key breaks num lock/number pad use
Status: RESOLVED UPSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-15 06:14 UTC by Roy Orbitson
Modified: 2023-08-09 17:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Orbitson 2023-06-15 06:14:43 UTC
SUMMARY
When I launch apps from my Calculator key (keycode 148, keysym 0x1008ff1d, XF86Calculator), they either don't  run or behave as if Num Lock is off

STEPS TO REPRODUCE
1. Use keyboard with a Calculator key
2. Go to System Settings > Shortcuts and assign that key to launch an app (I used KCalc), it should show as "Launch (1)"
3. Ensure Num Lock is on
4. Press the Calc key

OBSERVED RESULT
Depends on app, will not launch, or launches but does not accept numeric keys, e.g. `.` behaves as Del.

EXPECTED RESULT
Normal launch, numeric keys produce input.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I normally have that button assigned to launch KCalc. I have Num Lock on all the time, including at boot, and haven't noticed any problems with other apps respecting number pad keys/num lock, generally.

It occurs only from that type of launch; if I set and use a different shortcut, e.g. the Pause key or Ctrl + Alt + K, or launch it from KRunner or the main apps menu, it's fine. If I switch to another app and back, or toggle Num Lock off and on, the app respects Num Lock again.

I tested by assigning the Calc button to launch KCharSelect. It assigns okay, but won't launch the app. The same occurs if I set it to launch Kate. Assigning it to launch Emoji Selector produces similar behaviour to Kcalc, e.g. 2, 4, 6, & 8 move the selection highlight the same way dedicated arrow keys do.

I wonder if it's somehow related to bug 433645, though I am able to assign shortcuts with it.
Comment 1 Roy Orbitson 2023-06-21 04:18:21 UTC
Just to make this bug even weirder, It seems to be related to use of external keyboards.

If I launch from an external keyboard's Calc key, neither its numpad nor any other connected keyboard (including the one built-in to my notebook) behave as though Num Lock is on, despite all indicator lights showing it is. However, If I launch from the built-in keyboard's Calc key, its numpad will work as expected like Num Lock is on, unless I press any key on an external keyboard's numpad, then all numpads begin to behave as though Num Lock has been turned off, though the Num Lock keys have never been touched.

I've also discovered the effects aren't limited to Calc key launches as I'd previously thought. If I launch KCalc from KRunner, the numpad behaves, but as soon as I press a numpad key on any other keyboard, they all begin to (mis)behave as if Num Lock is off.

I've tried this with multiple external keyboards, including ones that have no Calc key.
Comment 2 Nate Graham 2023-08-04 20:12:27 UTC
Are you using X11 or Wayland? If you're on X11, I'd be curious to know if it happens on Wayland too. If it doesn't, then this suggests that the X server is doing something deeply bizarre.
Comment 3 Roy Orbitson 2023-08-04 23:57:03 UTC
It only happens under X11. I didn't switch to Wayland because it misbehaved a bit for me, and because of Bug 455444 (the closing of which I disagree with). I guess I could just use an X11 session only if I need to edit those commands, but I don't enjoy closing everything I'm working on in order to do so.
Comment 4 Nate Graham 2023-08-07 19:06:28 UTC
Can you try Wayland for testing purposes? You don't have to marry it, just see if this bug reproduces there.
Comment 5 Roy Orbitson 2023-08-08 01:10:13 UTC
I did: "It only happens under X11". Wayland's okay.

I tried using Wayland for my regular session, and was immediately reminded why I couldn't stick with it: bug 413310 breaks all the shortcuts I use for window positioning and virtual desktops.
Comment 6 Nate Graham 2023-08-08 19:35:26 UTC
Ok, if it doesn't happen on Wayland then I'm reasonably confident this is in fact a problem with the X server itself. :/
Comment 7 Roy Orbitson 2023-08-09 02:20:05 UTC
Were you able to reproduce it? What happens from here, out of curiosity? I can live with the bug.
Comment 8 Nate Graham 2023-08-09 17:29:09 UTC
I did not try to reproduce it as I'm living on Wayland full-time now, and I honestly don't have the time to either triage or work on fixing X11-specific bugs anymore. In all likelihood, what happens now is that the bug never gets fixed and people experiencing it stop experiencing it over time as their personal Wayland blockers get fixed and they move to Wayland.