Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. keyboard
    Log in to post

    • UNSOLVED Can't use on-screen keyboard on tvOS
      Mobile and Embedded • c++ qlineedit keyboard tvos appletv • • dbaldassi  

      1
      0
      Votes
      1
      Posts
      39
      Views

      No one has replied

    • SOLVED How to get ALL the keyboard pressed keys WITHOUT RESTRICTION OR FILTER?
      QML and Qt Quick • window keyboard filter key • • jeanmilost  

      3
      0
      Votes
      3
      Posts
      35
      Views

      @J-Hilk said in How to get ALL the keyboard pressed keys WITHOUT RESTRICTION OR FILTER?: Inside main.cpp install an eventfilter on the Q(GUI)Application Thank you very much, this was exactly what I needed!
    • UNSOLVED ListView - Why Space key is never received in Keys.onPressed() signal?
      QML and Qt Quick • listview keyboard keys space keys.onpressed • • jeanmilost  

      3
      0
      Votes
      3
      Posts
      51
      Views

      @LeLev Thank you very much for your answer. It helped me to understand my issue a little more. So I tried your code, and it works, meaning that the ListView isn't eating the Space key. However my interface is a little more complex than this one, it contains other objects like SwipeView, and yes, my items contain components like buttons which may take the focus. However I already tried to deactivate them and even thus the issue remained. I played a while around the code you posted. I noticed that the following code no longer receives any key: Rectangle { anchors.fill: parent color: "transparent" visible: true SwipeView { anchors.fill: parent activeFocusOnTab: false Page { background: null ListView { id: view anchors.fill: parent spacing: 2 focus: true model: ListModel { ListElement { name: "el1" } ListElement { name: "el2" } ListElement { name: "el3" } } delegate: Button { focus: false focusPolicy: Qt.NoFocus onFocusChanged: {if (focus) focus = false;} width: parent.width height: 50 text: index === view.currentIndex ? "currentIndex" : modelData onClicked: { view.currentIndex = index } } Keys.onPressed: { console.warn("key clicked"); if (event.key === Qt.Key_Space) { console.log("space clicked"); console.log(view.model.get(view.currentIndex).name); // view.model.get(ind).name = "new value" event.accepted = true; } } } } } } So I assume that some components operate like filters and may stop internally the keyboard signals, or at least a part of them, without let the choice to the developer to bypass this behavior (or at least I don't know how to do). To be honest I'm a little puzzled, because I worked for15 years with the Windows API before changing for Qt, and receiving a keyboard notification was never an issue, even when the parent component already received it before (in fact it was the contrary: the message could be blocked in the parent, but by default it was passing). So now the question is: in the above code, how can I receive the keyboard signals, and in particular the Space key, in my ListView despite of the parent SwipeView? Or which solution is normally used in a such situation, e.g is there a way to globally listen the keyboard and intercept keys in the Windows level, BEFORE any component receives them?
    • UNSOLVED Android system keyboard shows english language
      Mobile and Embedded • android keyboard input language • • Davronito  

      2
      0
      Votes
      2
      Posts
      77
      Views

      And I've found the point of this case: it was because of "inputMethodHints: "ImhNoPredictiveText" ". But why it adds english keyset to my virtual keyboard, I didn't catch it
    • UNSOLVED How to configure keyboard layout when running QT on EGLFS without X?
      Mobile and Embedded • raspberry pi eglfs keyboard rpi locale • • JoseCastro  

      5
      0
      Votes
      5
      Posts
      572
      Views

      I eventually found out that those changes mentioned in the links in the last post require you to set "QT_IM_MODULE=compose" but even then composing didn't work. That being the case, I've reported a bug: https://bugreports.qt.io/browse/QTBUG-79097 I'm keeping this as unanswered until there is a workaround or a fix, but if you do not need dead keys or composition, just setting the XKB_DEFAULT vars and ensuring you are using libinput/xkbcommon should be enough to get your keyboard layout "working".
    • UNSOLVED How to disable physical keyboard for certain qml files?
      QML and Qt Quick • keyboard disable • • Sneha.D  

      1
      0
      Votes
      1
      Posts
      57
      Views

      No one has replied

    • UNSOLVED Impossible to detect keyboard visibility/size when using WebView on Android
      Mobile and Embedded • qml android webview keyboard • • daljit97  

      1
      0
      Votes
      1
      Posts
      549
      Views

      No one has replied

    • UNSOLVED QML Virtual keyboard Hide button not working.
      QML and Qt Quick • qml qtquick2 keyboard • • Praveen_2017  

      3
      1
      Votes
      3
      Posts
      2082
      Views

      @raven-worx If I remove the line, the keyboard will never hide and the reason for adding visible: Qt.inputMethod.visible is because of the following line that I found in an example : /* The visibility of the InputPanel can be bound to the Qt.inputMethod.visible property, but then the handwriting input panel and the keyboard input panel can be visible at the same time. Here the visibility is bound to InputPanel.active property instead, which allows the handwriting panel to control the visibility when necessary. */ Bad luck is that it's nowhere mentioned in any docs.
    • UNSOLVED Qt Virtual Keyboard layout files
      QML and Qt Quick • qtquick qt 5.7 keyboard virtualkeyboard keyboard mappin • • LeP3nguin  

      5
      0
      Votes
      5
      Posts
      2756
      Views

      here is the solution: https://forum.qt.io/topic/76802/how-to-enable-virtual-keyboard-languages/5
    • UNSOLVED Install/load QPlatformInputContextPlugin on Android
      Mobile and Embedded • android plugins keyboard • • KroMignon  

      1
      0
      Votes
      1
      Posts
      630
      Views

      No one has replied

    • UNSOLVED Keyboard disabled
      Mobile and Embedded • eglfs raspberry keyboard • • Mark81  

      1
      0
      Votes
      1
      Posts
      498
      Views

      No one has replied

    • UNSOLVED Dynamic access to QML elements from QML
      General and Desktop • qml keyboard dynamic textinput dynamic linking • • monster  

      2
      0
      Votes
      2
      Posts
      783
      Views

      @monster You can create the TextInput using createComponent and then after creating its object you can assign it to a js variable. You can store them for eg. in an array for further reference. var component = Qt.createComponent("MyTextInput.qml"); var textinput = component.createObject(parent);
    • UNSOLVED Control keyboard app
      General and Desktop • c++ keyboard light • • mandruk1331  

      4
      0
      Votes
      4
      Posts
      701
      Views

      Hi, To add to @sierdzio, what kind of light are you talking about ? What type of keyboard ?
    • SOLVED Entering Turkish character from keyboard..
      General and Desktop • static keyboard • • zeroptr  

      9
      0
      Votes
      9
      Posts
      2014
      Views

      I think problem coused from dependent dev libraries... sudo apt-get build-dep qt5-default solved the problem..
    • SOLVED How to change keyboard's key behavior?
      General and Desktop • keyboard qmap keypressevent keyboard mappin • • Nouriemm  

      7
      0
      Votes
      7
      Posts
      2685
      Views

      Thank you all, I am going to mark this discussion as solved; However, Any more comments would be much appreciated;
    • UNSOLVED QML item fixed positioning
      Mobile and Embedded • qml keyboard position • • guidupas  

      16
      0
      Votes
      16
      Posts
      5756
      Views

      @guidupas, Thanks for this post, I am in same situation , did you find any result for this, I am in same problem for android and ios both development. Please can you guide me if you have some work around.
    • UNSOLVED iOS: Sometimes Keyboard pushes up the whole qml page
      Mobile and Embedded • qml ios qtquick keyboard • • againagainst  

      2
      1
      Votes
      2
      Posts
      846
      Views

      Yes, this is a very important question, anyone know - how to fix it?
    • UNSOLVED How to hide virtual keyboard in Android?
      Mobile and Embedded • android keyboard qt 5.5.1 virtual • • HPCTECH  

      1
      0
      Votes
      1
      Posts
      555
      Views

      No one has replied

    • SOLVED Qml TextField inputMethodHints not working on ios
      QML and Qt Quick • qml ios keyboard textfield • • guidupas  

      2
      0
      Votes
      2
      Posts
      1948
      Views

      I solved that just removing the validators, but I don't know why it worked without the validator. Code below: TextField { id: numeroTelefoneTextField anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right width: parent.width * 0.70 height: parent.height * 0.6 placeholderText: qsTr("Seu nĂºmero") font.bold: true inputMethodHints: Qt.ImhDigitsOnly }
    • SOLVED Show numeric keypad in Android
      Mobile and Embedded • android keyboard qlinedit qspinbox keypad • • HPCTECH  

      3
      0
      Votes
      3
      Posts
      2514
      Views

      Hi, Glad you found out and thanks for sharing ! Just a quick note: there's no need to modify the title anymore to mark the thread as solved. You can use the "Topic Tool" button for that. That makes things cleaner :)
    • Qt Virtual Keyboard (Enterprise) - Is preloading possible?
      General and Desktop • keyboard delay enterprise • • User235251  

      1
      0
      Votes
      1
      Posts
      442
      Views

      No one has replied

    • UNSOLVED Trying to get keyboard input in Qt 5.6
      Mobile and Embedded • embedded linux embedded keyboard input 5.6.0 • • trand  

      1
      0
      Votes
      1
      Posts
      1414
      Views

      No one has replied

    • SOLVED Hide & Show QWidget in closeEvent with Keyboard key
      General and Desktop • qwidget window keyboard hide closeevent • • pusheax  

      8
      0
      Votes
      8
      Posts
      2890
      Views

      You're welcome ! As for marking the thread as solved, you can now use the "Topic Tool" button, it will keep the title clean. Also, while browsing the forum, please consider up-voting answers that helped you, that will make them easier to find for other forum users :)
    • Can't type a colon in Qt Creator 3.5.0 on Win7
      Tools • windows creator keyboard • • rosetter  

      2
      0
      Votes
      2
      Posts
      884
      Views

      Hi, IIRC, there's a similar bug but for the comment shortcut depending on what keyboard you are using. I wonder if it's related.
    • Qt Ctrl++ (Control Plus Plus) Shortcut Not Working in Qt 5.5
      General and Desktop • gui creator keyboard qt 5.5.0 shortcut dispatch • • markanth2  

      3
      0
      Votes
      3
      Posts
      1534
      Views

      Yes, you are correct. There is more information here for anyone else interested: https://bugreports.qt.io/browse/QTBUG-47701
    • Mouse cursor doesn't move
      Mobile and Embedded • qt5 keyboard mouse cursor • • Halo_Hao  

      1
      0
      Votes
      1
      Posts
      569
      Views

      No one has replied

    • Move a QGraphicsPixmapItem through keyboard
      Game Development • qgraphicsitem keyboard game graphics scene moving • • swapnilp96  

      3
      0
      Votes
      3
      Posts
      1961
      Views

      Just saw that you already posted the same question here Please, don't post the same questions multiple times in different sub forum. One is enough. Closing it.
    • Move a QGraphicsPixmapItem
      General and Desktop • keyboard game graphics scene • • swapnilp96  

      3
      0
      Votes
      3
      Posts
      1936
      Views

      Possibly the error is from the declaration of keyPressEvent protected: virtual void keyPressEvent(QKeyEvent *event); It might be better to have this handled in the parent class. When a graphics item is selected (clicked) store this information and move the item from the parent when the right key presses are seen. You might have a problem with losing focus otherwise.
    • [SOLVED] Qt-creator problems with Hungarian keyboard in Win8.1
      General and Desktop • qtcreator bug keyboard windows 8.1 qtcreator 3.3.1 • • istvan  

      6
      0
      Votes
      6
      Posts
      3995
      Views

      @koahnig I think it really is a bug, since the same Qt-creator has always worked without this issue on my Ubuntu and Mint machines. Thanks for the link, I check over. Istvan
    • Linux application does not accept keyboard input
      General and Desktop • linux keyboard • • cmulcahy  

      9
      0
      Votes
      9
      Posts
      9273
      Views

      If it's the Qt3D problem, just remove the folder from the sources when you configure Qt to build since you don't want OpenGL anyway
    • [SOLVED] QLineEdit does not receive character input on Android
      Mobile and Embedded • android qlineedit keyboard • • SteveMBay  

      30
      0
      Votes
      30
      Posts
      9929
      Views

      a solution i found is to remove only the Qt::Sheet flag and you can let the other Qt::FramelessWindowHint and Qt::Popup with no problem
    • No keyboard input on BeagleBone Black
      Mobile and Embedded • keyboard input beaglebone • • Bremenpl  

      20
      0
      Votes
      20
      Posts
      6437
      Views

      Sorry, I meant a more recent version of Qt Creator, as for Qt 4 the latest version is 4.8.7
    • [SOLVED] Qml TableView
      QML and Qt Quick • tableview keyboard • • LMdV  

      3
      0
      Votes
      3
      Posts
      8805
      Views

      @p3c0 Yes that worked. Thanks! Here is the full working code, if someone else wants to use the tableView with cell-navigation instead of row-navigation: import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 Item { width: 640 height: 480 ListModel { id: tstModel ListElement { animal: "dog" age: "10" } ListElement { animal: "cat" age: "12" } ListElement { animal: "bird" age: "1" } ListElement { animal: "elephant" age: "20" } ListElement { animal: "turtle" age: "100" } } TableView { id: tableView anchors.fill: parent anchors.topMargin: 40 highlightOnFocus: false model: tstModel property int currentColumn: 0 rowDelegate: Rectangle { color: "#fff" } itemDelegate: Rectangle { // color: "transparent" color: { var bgColor = model.index%2 ? "whitesmoke" : "white" var activeRow = tableView.currentRow === styleData.row var activeColumn = tableView.currentColumn === styleData.column activeRow && activeColumn ? "steelblue" : bgColor } Text { text: styleData.value } MouseArea { anchors.fill: parent onClicked: { print("(onClick) index: (" + model.index + "," + tableView.currentColumn+ ")") tableView.currentRow = styleData.row tableView.currentColumn = styleData.column model.currentIndex = styleData.row parent.forceActiveFocus() } } Keys.onRightPressed: { console.log("Delegate Right") if (tableView.currentColumn < tableView.columnCount - 1) tableView.currentColumn++ parent.forceActiveFocus() print("(Right) index: (" + tableView.currentRow + "," + tableView.currentColumn+ ")") } Keys.onLeftPressed: { console.log("Delegate Left") if (tableView.currentColumn > 0) tableView.currentColumn-- parent.forceActiveFocus() print("(Left) index: (" + tableView.currentRow + "," + tableView.currentColumn+ ")") } } Keys.onRightPressed: { print("(Right - Table) index: (" + tableView.currentRow + "," + tableView.currentColumn+ ")") if (tableView.currentColumn < tableView.columnCount - 1) tableView.currentColumn++ } Keys.onLeftPressed: { print("(Left - Table) index: (" + tableView.currentRow + "," + tableView.currentColumn+ ")") if (tableView.currentColumn > 0) tableView.currentColumn-- } Keys.onUpPressed: { print("(Up - Table) index: (" + tableView.currentRow + "," + tableView.currentColumn+ ")") if (tableView.currentRow > 0) tableView.currentRow-- } Keys.onDownPressed: { print("(Down - Table) index: (" + tableView.currentRow + "," + tableView.currentColumn+ ")") if (tableView.currentRow < tableView.rowCount - 1) tableView.currentRow++ } TableViewColumn { id: animalColumn title: "Animal" role: "animal" movable: false resizable: false width: parent.width / 2 } TableViewColumn { id: ageColumn title: "Age" role: "age" movable: false resizable: false width: parent.width / 2 } } }
    • How to set returnKeyType for Android Virtual Keyboard
      Mobile and Embedded • android keyboard inputmethod vkb returnkeytype • • Leonard777  

      2
      0
      Votes
      2
      Posts
      1250
      Views

      I've been experimenting further and reading through the source code. Again, I still only see the inputMethodQuery and inputMethodEvent functions as entry points to potentially return a QVariantMap with a "returnKeyType" property, and neither one can be overridden. I tried creating an inline function in my QML code for a TextEdit/TextInput, but the meta method created has a QVariant parameter instead of a Qt::InputMethodQuery, so the logic from QInputMethod does not go through this function. It looks like the android code completely ignores the ImPlatformData value (at least as of Qt 5.3.1 where I am based). It may be that this was only ever handled in iOS logic previously? If that is the case, then I will have to abandon this effort and wait for Qt 5.6 to come in with native support for returnKeyType. Unfortunately, that will be too late for this project release.
    • [Solved]Something really strange while trying to navigate in Grid
      QML and Qt Quick • keyboard grid navigation • • Zubalama  

      13
      0
      Votes
      13
      Posts
      3170
      Views

      @p3c0 it does yet I wanted to fix the problem I personally faced thanks for an advice
    • [SOLVED] Scroll ListView to Item on Tab Navigation
      QML and Qt Quick • listview keyboard • • th.thielemann  

      7
      0
      Votes
      7
      Posts
      5641
      Views

      Here is the complete solution: import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 import OskPlugin 1.0 Rectangle { id: root width: 1024 height: 633 ListModel { id: personalData ListElement { dataLabel: "Firstname"; dataValue: "Herbert"; } ListElement { dataLabel: "Lastname"; dataValue: "Roth"; } ListElement { dataLabel: "Plays"; dataValue: "Guitar"; } ListElement { dataLabel: "Age"; dataValue: "65";} ListElement { dataLabel: "Hobby"; dataValue: "Walking"; } ListElement { dataLabel: "Birthday"; dataValue: "14.12.1926"; } ListElement { dataLabel: "City";dataValue: "Suhl"; } ListElement { dataLabel: "Country"; dataValue: "Germany"; } } ScrollView { anchors.fill: parent ListView { id: listView anchors.fill: parent clip: true model: personalData focus: true delegate: FocusScope { x: rectangle.x; y: rectangle.y width: rectangle.width; height: rectangle.height Rectangle { id: rectangle height: 66 width: 500 border.color: "grey" border.width: 2 TextInput { anchors.centerIn: parent text: dataValue font.pixelSize: 24 focus: true activeFocusOnTab: true onActiveFocusChanged: if(activeFocus) { listView.currentIndex = index } } } } } } }