| Summary: | numeric keypad not working | ||
|---|---|---|---|
| Product: | [Applications] kcalc | Reporter: | Harald Pollak <harald.pollak> |
| Component: | general | Assignee: | Evan Teran <evan.teran> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | normal | CC: | a.wiekens, anakin.cs, bugs5.kde.org, chiporo, darose, ddrs, erbengi, fademind, h-trader, h.k.ghost, harald.pollak, jonathan.chiarella, josiah.barber, kdebugs, kimle.michal, luislezcair, maxi, oleg.dydyshko, pelardonable, proteus5, rdieter |
| Priority: | NOR | ||
| Version First Reported In: | 2.13 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
I thinkthis is a Problem with the QT-Shortcuts: this work-arround works vor me:
in kcalc.cpp at the end of "void KCalculator::keyPressEvent(QKeyEvent *e)":
switch (e->key()) {
case Qt::Key_0:
// 0 is available in all number systems, so the Button will never be deactivated
pb0->animateClick();
break;
case Qt::Key_1:
// 1 is available in all number systems, so the Button will never be deactivated
pb1->animateClick();
break;
case Qt::Key_2:
if(pb2->isEnabled())
pb2->animateClick();
break;
case Qt::Key_3:
if(pb3->isEnabled())
pb3->animateClick();
break;
case Qt::Key_4:
if(pb4->isEnabled())
pb4->animateClick();
break;
case Qt::Key_5:
if(pb5->isEnabled())
pb5->animateClick();
break;
case Qt::Key_6:
if(pb6->isEnabled())
pb6->animateClick();
break;
case Qt::Key_7:
if(pb7->isEnabled())
pb7->animateClick();
break;
case Qt::Key_8:
if(pb8->isEnabled())
pb8->animateClick();
break;
case Qt::Key_9:
if(pb9->isEnabled())
pb9->animateClick();
break;
case Qt::Key_Enter:
if(pbEqual->isEnabled())
pbEqual->animateClick();
break;
case Qt::Key_Equal:
if(pbEqual->isEnabled())
pbEqual->animateClick();
break;
case Qt::Key_Plus:
if(pbPlus->isEnabled())
pbPlus->animateClick();
break;
case Qt::Key_Minus:
if(pbMinus->isEnabled())
pbMinus->animateClick();
break;
case Qt::Key_Comma:
if(pbPeriod->isEnabled())
pbPeriod->animateClick();
break;
case Qt::Key_Asterisk:
if(pbMultiplication->isEnabled())
pbMultiplication->animateClick();
break;
case Qt::Key_Slash:
if(pbDivision->isEnabled())
pbDivision->animateClick();
break;
default:
break;
}
*** Bug 340846 has been marked as a duplicate of this bug. *** *** This bug has been confirmed by popular vote. *** Distro: Arch Linux x64 Package details: kcalc 15.04.0-1 plasma-desktop 5.2.2-3 plasma-framework 5.9.0-1 plasma-workspace 5.2.2-2 I'm also facing this issue. The problem is that KConfig (the library that manages keyboard shortcuts) is not reading Qt::Keypad_Modifier which is set when pressing keypad keys. https://bugs.kde.org/show_bug.cgi?id=346806 Same issue on Kubuntu 15.04 with KDE 5.3 (via kubuntu/backports ppa) *** Bug 347325 has been marked as a duplicate of this bug. *** This is a regression in Qt5. See patch and link to bug at https://codereview.qt-project.org/#/c/95219/ *** Bug 347459 has been marked as a duplicate of this bug. *** I can confirm the qt patch referenced in comment #8 seems to work as advertised. *** Bug 347609 has been marked as a duplicate of this bug. *** *** Bug 347648 has been marked as a duplicate of this bug. *** *** Bug 347713 has been marked as a duplicate of this bug. *** *** Bug 348695 has been marked as a duplicate of this bug. *** So what's the solution of this bug? See comment #8 (In reply to Rex Dieter from comment #16) > See comment #8 the explanation is a bit superficial, developer has to explain every single step to the common user. In short, it's a Qt5 bug/issue, and the link in comment #8 is a proposed fix (but not included in Qt5 sources yet, as of this moment) (In reply to Rex Dieter from comment #18) > In short, it's a Qt5 bug/issue, and the link in comment #8 is a proposed fix > (but not included in Qt5 sources yet, as of this moment) Ok thanks I'll wait for an update of kcalc itself which the bug will be fixed. It's not a kcalc bug, so no kcalc update will fix this, but rather, hopefully some future version of Qt5 will include a fix. Feel free to bug/nag your distro into considering including the candidate Qt5 fix (fedora does, for example) (In reply to Rex Dieter from comment #20) > It's not a kcalc bug, so no kcalc update will fix this, but rather, > hopefully some future version of Qt5 will include a fix. > > Feel free to bug/nag your distro into considering including the candidate > Qt5 fix (fedora does, for example) Ok thanks... by the way is chromium played by qtwebengine planned to be realized in the near future or some other KDE browser? note: which=when in the previous comment. EDIT: NEWS... I've installed again KUBUNTU 15.04 Before installing it I've tested and kcalculator works by numlock activated it on the keyboard. NOw or the problems concern with keyboard controller I changed it enabling numlock boot activation, or problem concerns with PLASMA upgrade I made before using kcalculator. I'm also suffering this bug now and I don't have Qt5 (it worked on openSUSE 13.2 all the time. Must be something with latest KDE updates...). ~ kde4-config --version Qt: 4.8.6 KDE: 4.14.9 kde4-config: 1.0 I had kcalc v15.04.3-1.2 installed (from KDE:Applications repo) i | kcalc | Paket | 15.04.3-1.2 | x86_64 | KDE:Applications So I tried downgrading kcalc package to latest version from openSUSE 13.2 OSS Update repo zypper install --oldpackage kcalc-14.12.3-16.1.x86_64 and with that version the numkeys are working again! Hermann, kcalc since version 15.04 uses Qt5, regardless of your Plasma desktop version. Please fix num-pad input. It is fixed in Qt (at least in the 5.6 branch, not sure if it was backported to Qt 5.5.x). |
Input from standard keys ( keysym as written by xev: 0x31, 1 ) works fine, the number 1 is displayed in the display, but when i press the number 1 on my numerickey pad ( xev: 0ffb1, KP_1 ) nothing happens in the display. Reproducible: Always Steps to Reproduce: after kcalc started 1. press 1 from standard keyboard 2. press 1 from numeric keypad Actual Results: 1. 1 is displayed correctly 2. nothing happens Expected Results: 1. 1 is displayed 2. 11 is displayed It tried to make a quick and dirty test in the code ( inside void KCalculator::keyPressEvent(QKeyEvent *e) ): I added: std::cout << "Key pressed: " << e->key() << std::endl; if (e->key() == Qt::Key_1) { pb1->animateClick(); } If I press std-key 1 no output on console ( it seems shortcut action as used is cauth before key-pressed event sent ). After press key 1 from nummeric-keypad: pb1->enimateClick() is called ( no it's allso displayed correctly ) and on console: "Key pressed: 49" displayed. Maybe its better to work with key-events than shortcuts ( so far i've seen only one shortcut is possible for each Button )