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
Qt 6.11 is out! See what's new in the release blog

wince6.0 Qt4.7 Keyboard key error

Scheduled Pinned Locked Moved Solved Mobile and Embedded
21 Posts 3 Posters 12.1k 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.
  • 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