Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. wince6.0 Qt4.7 Keyboard key error
Forum Updated to NodeBB v4.3 + New Features

wince6.0 Qt4.7 Keyboard key error

Scheduled Pinned Locked Moved Solved Mobile and Embedded
21 Posts 3 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by SGaist
    #4

    You do realize that you answered only two of all the questions I asked ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    1
    • CraigTaoC Offline
      CraigTaoC Offline
      CraigTao
      wrote on last edited by
      #5

      if not run qt4 application, keyboard input no problem,
      also run Qt4 application, wince system keyboard input no problem.

      the bug just in qt4 application, i don't changed any other setting.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #6

        Again, you did not answer all of my questions.

        What do you mean by system keyboard ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • CraigTaoC Offline
          CraigTaoC Offline
          CraigTao
          wrote on last edited by
          #7

          For example: I create a folder, change the name of the folder, the physical keyboard is normal

          However, when inputting in the QLineEdit control(also QTableWidget too), the above phenomenon occurs on the physical keyboard

          sorry, my english not good.

          1 Reply Last reply
          0
          • CraigTaoC Offline
            CraigTaoC Offline
            CraigTao
            wrote on last edited by
            #8

            Wince's own virtual keyboard does not have this problem

            1 Reply Last reply
            0
            • CraigTaoC Offline
              CraigTaoC Offline
              CraigTao
              wrote on last edited by
              #9

              There is also this phenomenon: long press the s button, you can enter s

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #10

                What kind of keyboard is that exactly ?
                Are you using any special locale ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • CraigTaoC Offline
                  CraigTaoC Offline
                  CraigTao
                  wrote on last edited by
                  #11

                  I come from China,
                  use English keyboard.
                  I think not use any special locale.

                  just the key "s" has problem, All other keys are normal.

                  1 Reply Last reply
                  0
                  • CraigTaoC Offline
                    CraigTaoC Offline
                    CraigTao
                    wrote on last edited by
                    #12

                    Let me summarize the problem:
                    1 wince system virtual keyboard no problem;
                    2 physical keyboard is normal when use in wince system
                    For example, I create a folder and then change the name of the folder,
                    3 The s key has the same function as BackSpace key
                    4 If I press and hold the s button, can enter the s character normally

                    only The s key has this problem

                    jsulmJ 1 Reply Last reply
                    0
                    • CraigTaoC CraigTao

                      Let me summarize the problem:
                      1 wince system virtual keyboard no problem;
                      2 physical keyboard is normal when use in wince system
                      For example, I create a folder and then change the name of the folder,
                      3 The s key has the same function as BackSpace key
                      4 If I press and hold the s button, can enter the s character normally

                      only The s key has this problem

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      @CraigTao Is the keyboard maybe broken?
                      Did you configure the correct keyboard layout?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • CraigTaoC Offline
                        CraigTaoC Offline
                        CraigTao
                        wrote on last edited by
                        #14

                        I replaced keyboard, the problem still exists.

                        I don't configure keyboard layout. only the s key.

                        and

                        "2 physical keyboard is normal when use in wince system
                        For example, I create a folder and then change the name of the folder,"

                        so. I think maybe Qt internal problem?

                        which part of Qt source code is handle system key message?

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #15

                          As I already suggested, first test with Qt 4.8.7.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • CraigTaoC Offline
                            CraigTaoC Offline
                            CraigTao
                            wrote on last edited by
                            #16

                            When I debugged, I found something interesting

                            Inherit from class QLineEdit to implement a LineEdit

                            void LineEdit::keyPressEvent( QKeyEvent* pEvent )
                            {
                            int val = pEvent->key();
                            QString = pEvent->text();
                            QLineEdit::keyPressEvent(pEvent);
                            }

                            key s character is ‘s' , but the key value is same as BackSpace : 16777219

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #17

                              What locale are you using ?
                              And again, please test against the latest version of the Qt 4 series.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • CraigTaoC Offline
                                CraigTaoC Offline
                                CraigTao
                                wrote on last edited by
                                #18

                                @SGaist thank you so much.
                                I can't update Qt version to 4.8.

                                Now use a method to solve this problem.

                                bool VirtualRunQt::eventFilter( QObject* pObject, QEvent* pEvent )
                                {
                                	if (pEvent->type() == QEvent::KeyPress) {
                                		QKeyEvent *ke = static_cast<QKeyEvent*>(pEvent);
                                		if (ke->text() == "s" && ke->key() == 16777219) {
                                			QKeyEventHelp* pKey = reinterpret_cast<QKeyEventHelp*>(ke);
                                			pKey->k = 83;
                                		}
                                	}
                                	return QObject::eventFilter(pObject, pEvent);
                                }
                                
                                qApp->installEventFilter(this);
                                

                                but I still think this is a bug in Qt4.73

                                jsulmJ 1 Reply Last reply
                                0
                                • CraigTaoC CraigTao

                                  @SGaist thank you so much.
                                  I can't update Qt version to 4.8.

                                  Now use a method to solve this problem.

                                  bool VirtualRunQt::eventFilter( QObject* pObject, QEvent* pEvent )
                                  {
                                  	if (pEvent->type() == QEvent::KeyPress) {
                                  		QKeyEvent *ke = static_cast<QKeyEvent*>(pEvent);
                                  		if (ke->text() == "s" && ke->key() == 16777219) {
                                  			QKeyEventHelp* pKey = reinterpret_cast<QKeyEventHelp*>(ke);
                                  			pKey->k = 83;
                                  		}
                                  	}
                                  	return QObject::eventFilter(pObject, pEvent);
                                  }
                                  
                                  qApp->installEventFilter(this);
                                  

                                  but I still think this is a bug in Qt4.73

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #19

                                  @CraigTao said in wince6.0 Qt4.7 Keyboard key error:

                                  I can't update Qt version to 4.8

                                  It's just to test whether it is an issue with older Qt version you're using.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • CraigTaoC Offline
                                    CraigTaoC Offline
                                    CraigTao
                                    wrote on last edited by
                                    #20

                                    I will test when I am free, now so busy.

                                    How do I set the post to be resolved?

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • CraigTaoC CraigTao

                                      I will test when I am free, now so busy.

                                      How do I set the post to be resolved?

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #21

                                      @CraigTao Bottom right corner "Topic Tools"

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved