<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>344638</bug_id>
          
          <creation_ts>2015-02-27 19:37:56 +0000</creation_ts>
          <short_desc>numeric keypad not working</short_desc>
          <delta_ts>2015-09-27 18:30:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kcalc</product>
          <component>general</component>
          <version>2.13</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>UPSTREAM</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harald Pollak">harald.pollak</reporter>
          <assigned_to name="Evan Teran">evan.teran</assigned_to>
          <cc>a.wiekens</cc>
    
    <cc>anakin.cs</cc>
    
    <cc>bugs5.kde.org</cc>
    
    <cc>chiporo</cc>
    
    <cc>darose</cc>
    
    <cc>ddrs</cc>
    
    <cc>erbengi</cc>
    
    <cc>fademind</cc>
    
    <cc>h-trader</cc>
    
    <cc>h.k.ghost</cc>
    
    <cc>harald.pollak</cc>
    
    <cc>jonathan.chiarella</cc>
    
    <cc>josiah.barber</cc>
    
    <cc>kdebugs</cc>
    
    <cc>kimle.michal</cc>
    
    <cc>luislezcair</cc>
    
    <cc>maxi</cc>
    
    <cc>oleg.dydyshko</cc>
    
    <cc>pelardonable</cc>
    
    <cc>proteus5</cc>
    
    <cc>rdieter</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>150</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1502596</commentid>
    <comment_count>0</comment_count>
    <who name="Harald Pollak">harald.pollak</who>
    <bug_when>2015-02-27 19:37:56 +0000</bug_when>
    <thetext>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 &lt;&lt; &quot;Key pressed: &quot; &lt;&lt; e-&gt;key() &lt;&lt; std::endl;

if (e-&gt;key() == Qt::Key_1) {
            pb1-&gt;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-&gt;enimateClick() is called ( no it&apos;s allso displayed correctly ) and on console: &quot;Key pressed: 49&quot; displayed.

Maybe its better to work with key-events than shortcuts ( so far i&apos;ve seen only one shortcut is possible for each Button )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502651</commentid>
    <comment_count>1</comment_count>
    <who name="Harald Pollak">harald.pollak</who>
    <bug_when>2015-02-28 07:34:20 +0000</bug_when>
    <thetext>I thinkthis is a Problem with the QT-Shortcuts: this work-arround works vor me:

in kcalc.cpp at the end of &quot;void KCalculator::keyPressEvent(QKeyEvent *e)&quot;:

        switch (e-&gt;key()) {
        case Qt::Key_0:
            // 0 is available in all number systems, so the Button will never be deactivated
            pb0-&gt;animateClick();
            break;
        case Qt::Key_1:
            // 1 is available in all number systems, so the Button will never be deactivated
            pb1-&gt;animateClick();
            break;
        case Qt::Key_2:
            if(pb2-&gt;isEnabled())
                pb2-&gt;animateClick();
            break;
        case Qt::Key_3:
            if(pb3-&gt;isEnabled())
                pb3-&gt;animateClick();
            break;
        case Qt::Key_4:
            if(pb4-&gt;isEnabled())
                pb4-&gt;animateClick();
            break;
        case Qt::Key_5:
            if(pb5-&gt;isEnabled())
                pb5-&gt;animateClick();
            break;
        case Qt::Key_6:
            if(pb6-&gt;isEnabled())
                pb6-&gt;animateClick();
            break;
        case Qt::Key_7:
            if(pb7-&gt;isEnabled())
                pb7-&gt;animateClick();
            break;
        case Qt::Key_8:
            if(pb8-&gt;isEnabled())
                pb8-&gt;animateClick();
            break;
        case Qt::Key_9:
            if(pb9-&gt;isEnabled())
                pb9-&gt;animateClick();
            break;
        case Qt::Key_Enter:
            if(pbEqual-&gt;isEnabled())
                pbEqual-&gt;animateClick();
            break;
        case Qt::Key_Equal:
            if(pbEqual-&gt;isEnabled())
                pbEqual-&gt;animateClick();
            break;
        case Qt::Key_Plus:
            if(pbPlus-&gt;isEnabled())
                pbPlus-&gt;animateClick();
            break;
        case Qt::Key_Minus:
            if(pbMinus-&gt;isEnabled())
                pbMinus-&gt;animateClick();
            break;
        case Qt::Key_Comma:
            if(pbPeriod-&gt;isEnabled())
                pbPeriod-&gt;animateClick();
            break;
        case Qt::Key_Asterisk:
            if(pbMultiplication-&gt;isEnabled())
                pbMultiplication-&gt;animateClick();
            break;
        case Qt::Key_Slash:
            if(pbDivision-&gt;isEnabled())
                pbDivision-&gt;animateClick();
            break;
        default:
            break;
        }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502686</commentid>
    <comment_count>2</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-02-28 12:47:19 +0000</bug_when>
    <thetext>*** Bug 340846 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1512645</commentid>
    <comment_count>3</comment_count>
    <who name="">fademind</who>
    <bug_when>2015-04-21 15:58:52 +0000</bug_when>
    <thetext>*** This bug has been confirmed by popular vote. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1512646</commentid>
    <comment_count>4</comment_count>
    <who name="">fademind</who>
    <bug_when>2015-04-21 16:01:59 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1514114</commentid>
    <comment_count>5</comment_count>
    <who name="Luis Lezcano Airaldi">luislezcair</who>
    <bug_when>2015-04-27 18:24:19 +0000</bug_when>
    <thetext>I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1516388</commentid>
    <comment_count>6</comment_count>
    <who name="Vojtěch Erben">erbengi</who>
    <bug_when>2015-05-05 18:15:18 +0000</bug_when>
    <thetext>Same issue on Kubuntu 15.04 with KDE 5.3 (via kubuntu/backports ppa)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1516660</commentid>
    <comment_count>7</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-05-06 18:50:53 +0000</bug_when>
    <thetext>*** Bug 347325 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1516670</commentid>
    <comment_count>8</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-05-06 19:15:06 +0000</bug_when>
    <thetext>This is a regression in Qt5.

See patch and link to bug at https://codereview.qt-project.org/#/c/95219/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1517181</commentid>
    <comment_count>9</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-05-09 09:39:48 +0000</bug_when>
    <thetext>*** Bug 347459 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1517218</commentid>
    <comment_count>10</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2015-05-09 13:41:44 +0000</bug_when>
    <thetext>I can confirm the qt patch referenced in comment #8 seems to work as advertised.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1518143</commentid>
    <comment_count>11</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-05-12 13:40:35 +0000</bug_when>
    <thetext>*** Bug 347609 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1518361</commentid>
    <comment_count>12</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-05-13 10:28:57 +0000</bug_when>
    <thetext>*** Bug 347648 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1518680</commentid>
    <comment_count>13</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-05-14 15:12:02 +0000</bug_when>
    <thetext>*** Bug 347713 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524094</commentid>
    <comment_count>14</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-06-05 10:29:13 +0000</bug_when>
    <thetext>*** Bug 348695 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524194</commentid>
    <comment_count>15</comment_count>
    <who name="">proteus5</who>
    <bug_when>2015-06-05 17:42:54 +0000</bug_when>
    <thetext>So what&apos;s the solution of this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524197</commentid>
    <comment_count>16</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2015-06-05 17:45:22 +0000</bug_when>
    <thetext>See comment #8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524209</commentid>
    <comment_count>17</comment_count>
    <who name="">proteus5</who>
    <bug_when>2015-06-05 18:19:32 +0000</bug_when>
    <thetext>(In reply to Rex Dieter from comment #16)
&gt; See comment #8

the explanation is a bit superficial, developer has to explain every single step to the common user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524210</commentid>
    <comment_count>18</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2015-06-05 18:20:43 +0000</bug_when>
    <thetext>In short, it&apos;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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524212</commentid>
    <comment_count>19</comment_count>
    <who name="">proteus5</who>
    <bug_when>2015-06-05 18:29:35 +0000</bug_when>
    <thetext>(In reply to Rex Dieter from comment #18)
&gt; In short, it&apos;s a Qt5 bug/issue, and the link in comment #8 is a proposed fix
&gt; (but not included in Qt5 sources yet, as of this moment)

Ok thanks I&apos;ll wait for an update of kcalc itself which the bug will be fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524213</commentid>
    <comment_count>20</comment_count>
    <who name="Rex Dieter">rdieter</who>
    <bug_when>2015-06-05 18:32:32 +0000</bug_when>
    <thetext>It&apos;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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1524227</commentid>
    <comment_count>21</comment_count>
    <who name="">proteus5</who>
    <bug_when>2015-06-05 18:56:51 +0000</bug_when>
    <thetext>(In reply to Rex Dieter from comment #20)
&gt; It&apos;s not a kcalc bug, so no kcalc update will fix this, but rather,
&gt; hopefully some future version of Qt5 will include a fix.
&gt; 
&gt; Feel free to bug/nag your distro into considering including the candidate
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525149</commentid>
    <comment_count>22</comment_count>
    <who name="">proteus5</who>
    <bug_when>2015-06-09 21:45:08 +0000</bug_when>
    <thetext>EDIT: NEWS... I&apos;ve installed again KUBUNTU 15.04 Before installing it I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1531562</commentid>
    <comment_count>23</comment_count>
    <who name="Hermann">h-trader</who>
    <bug_when>2015-07-13 09:54:21 +0000</bug_when>
    <thetext>I&apos;m also suffering this bug now and I don&apos;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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1533714</commentid>
    <comment_count>24</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-07-28 10:30:41 +0000</bug_when>
    <thetext>Hermann, kcalc since version 15.04 uses Qt5, regardless of your Plasma desktop version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546125</commentid>
    <comment_count>25</comment_count>
    <who name="real">pelardonable</who>
    <bug_when>2015-09-25 01:52:07 +0000</bug_when>
    <thetext>Please fix num-pad input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546654</commentid>
    <comment_count>26</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2015-09-27 18:30:28 +0000</bug_when>
    <thetext>It is fixed in Qt (at least in the 5.6 branch, not sure if it was backported to Qt 5.5.x).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>