Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61458

US International keyboard 's keysequence acts as F4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.8.0, 5.9.0
    • None
    • QtCreator 3.6/4.0.2/4.1.0/4.2.0RC1 on Windows 7 English version
      But with Dutch international settings with a US International keyboard layout
    • Windows

      When using the US International keyboard it seems that QtCreator interprets the keysequence: 's (single-quote followed by an s) as F4 and will perform the SwitchHeaderSource command.
      Other dead-keys like 'e -> accented e works.

      So for example, trying to type:
      // What's

      Will result in:
      // What'
      followed by a SwitchHeaderSource command so I end up in the header file or vice versa.
      Also tried it in QML and it will jump to the designer.
      As a test I removed the F4 key binding from this command and also tested changing it to Shift+F4 and I could type the 's without any issue.
      Also adding an extra language in Windows with a 'normal' US keyboard layout works.

      Edit: minimal Qt example:

      #include <QAction>
      #include <QApplication>
      #include <QDebug>
      #include <QKeyEvent>
      #include <QWidget>
      
      class MyWidget : public QWidget
      {
      public:
          MyWidget()
          {
              auto f4Action = new QAction(this);
              f4Action->setShortcut(QKeySequence(Qt::Key_F4));
              addAction(f4Action);
              connect(f4Action, &QAction::triggered, [](){
                  qDebug() << "F4 Action";
              });
          }
      
      protected:
          void keyPressEvent(QKeyEvent *event) override
          {
              qDebug() << "key press event:" << event;
          }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          MyWidget w;
          w.show();
          return a.exec();
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            owolff Oliver Wolff
            japiekrekel Michel van Wonderen
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes