Package: kde-plasma-desktop
Version: 5:142

I have a Microsoft Natural Ergonomic Keyboard 4000. It has buttons
along the top for shortcuts to various applications and functions. I
use one of them as a launcher for kcalc. When I assign a KDE keyboard
shortcut key to it, it is labelled "Launch (1)" and it has a picture
of a calculator on it.

When launching kcalc from one of the shortcut buttons, it will behave
as if NumLock is off until I either toggle it off then on or click out
of the application and back in. When launching kcalc from another
shortcut, like Ctrl-Alt-K for example, the number pad will work
correctly right away.

If I launch kcalc from this button and press keys on the number pad,
they will behave as if NumLock is off. PgUp/PgDn in the number pad
will highlight the buttons in kcalc for C and AC in the application as
if I were hitting the normal PgUp/PgDn keys. The operand keys (/ * -
+) all also highlight the intended key in the application. Numbers
will not type.

I am reporting this against kde-plasma-desktop because it seems like
it's deeper than kcalc. I tried using the old Debian Buster package of
kcalc (installed in Bookworm), and it is also broken by whatever
underlying KDE libraries are being used here.

STEPS TO REPRODUCE
1. Assign a shortcut to launcing kcalc for the "Launch (1)" button on
my keyboard or any other shortcut button along the top of the
keyboard.
2. Open kcalc with that shortcut key.

OBSERVED RESULT
1. Press numbers and operands in the number pad. Operands will press
the operand buttons in the kcalc window. Most numbers will be ignored.
9 will act like PgUp and press the C button in the application (as if
NumLock was off). 3 will act like PgDn and press the AC button in the
application (as if NumLock was off).
2. I can toggle NumLock off and on by pressing it twice, and then the
number pad will work as expected.
2 (alternate). I can also just click to another window and then back
to kcalc, and the number will work as expected.

EXPECTED RESULT
I expect kcalc to recognize the number pad presses as numbers as soon
as it opens.

OTHER VARIATIONS TRIED
* This behavior was new when I upgraded from Debian 11 Bullseye to
Debian 12 Bookworm.
* I tried installing the Debian oldstable/11/Bullseye version of kcalc
in Bookworm, and it didn't make a difference. Both versions of kcalc
exhibited the above behavior, even though I'm sure the old version
didn't exhibit this behavior when I was running Bullseye and whatever
KDE version was there.
* I created shortcuts to kcalc with other extra keyboard shortcut
buttons, and I still get the weird NumLock behavior. It is not only
the "Launch (1)" button exhibiting this broken behavior.
* I created shortcuts to kcalc with "normal" keyboard keys, like
Ctrl-Alt-K, and it behaves as expected. KCalc works correctly if
launched from these "normal" key combinations, from the application
launcher, from a konsole prompt, etc.
* I created shortcuts to other applications with the built-in shortcut
buttons, and the number pad works correctly right away in those
programs.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-23-amd64 (64-bit)
Graphics Platform: offscreen
Processors: 16 × Intel® Core™ i9-9880H CPU @ 2.30GHz
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

Reply via email to