Bug 53840 - Completion does not work with NumPad Keys
Summary: Completion does not work with NumPad Keys
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-01 17:22 UTC by domseichter
Modified: 2008-01-16 12:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description domseichter 2003-02-01 17:22:26 UTC
Version:            (using KDE KDE 3.1)
Installed from:    SuSE RPMs
OS:          Linux

I discovered the following bug in my application kbarcode (www.kbarcode.net). The user has to enter an article number in a KLineEdit and the KLineEdit shows matching completions in a completion box. Everything is working fine, but as you can imagine, the article numbers contain _lot's_ of numbers. It is easier for the user to enter the numbers using the number keys on the num pad (I hope this is the correct term). But unfortunately the completion does not work with the num pad keys. If the same numbers are enter on the normal keyboard (the number keys above the letter keys) it works just as expected.
This bug does not only appear in kbarcode but also in e.g. konqueror. Create a new directorie called "1" in $HOME/Desktop. Now open konqui and type in the addresswidget $HOME/Desktop/ and you will see a completion of all dirs. Now type "1" with num pad key and the completion does not go into the directory "1", but it does when you use the normal "1" key.

CU Dom
Comment 1 Tobias Koenig 2003-10-30 00:17:58 UTC
Subject: kdelibs/kdeui

CVS commit by tokoe: 

Allow autocompletion when NumKey is on, otherwise you won't be able to work
with Keypad. That fixes #53840
CCMAIL:53840-done@bugs.kde.org


  M +2 -1      klineedit.cpp   1.168


--- kdelibs/kdeui/klineedit.cpp  #1.167:1.168
@@ -398,5 +398,6 @@ void KLineEdit::keyPressEvent( QKeyEvent
         KeyBindingMap keys = getKeyBindings();
         KGlobalSettings::Completion mode = completionMode();
-        bool noModifier = (e->state() == NoButton || e->state()== ShiftButton);
+        bool noModifier = (e->state() == NoButton || e->state() == ShiftButton
+                           || e->state() == Keypad);
 
         if ( (mode == KGlobalSettings::CompletionAuto ||