[Interest] Issue with VirtualKeyboad and Wayland compositor.

Christian Gagneraud chgans at gmail.com
Wed Oct 17 02:51:26 CEST 2018


I'm running the QtWayland 'pure-qml' example on an imx61 board with
linuxfb QPA, Qt-5.11.1 (I'm waiting for a 5.11.2 build).
I followed instructions from
http://doc.qt.io/qt-5/qtvirtualkeyboard-deployment-guide.html#using-qt-virtual-keyboard-with-qt-wayland.
The wayland client is the QtWidget's 'wiggly' example.

When I click on the QLineEdit of Wiggly, the VKB pops up, but every
key i tap send QKeyEvent to wiggly, where the key code is always null
(zero).

The key codes are correct on the wayland compositor side, from Qt logging:
qt.virtualkeyboard: InputEngine::virtualKeyPress(): Qt::Key(Key_O) "O"
QFlags<Qt::KeyboardModifiers>(ShiftModifier) false
qt.virtualkeyboard: InputEngine::virtualKeyRelease(): Qt::Key(Key_O)
"O" QFlags<Qt::KeyboardModifiers>(ShiftModifier)
qt.virtualkeyboard: InputContext::::sendKeyClick(): 79

But from Wiggly (dumping QKeyEvent via eventFilter on the line edit):
QKeyEvent(KeyRelease, 0)
QKeyEvent(KeyPress, 0)
QKeyEvent(KeyRelease, 0)
QKeyEvent(KeyPress, 0)
QKeyEvent(KeyRelease, 0)

All of the above is done with QtCreator:

Wiggly is run with "-platform wayland" command line arguments and the
following 'Clean Run Environment':
QML2_IMPORT_PATH=/usr/lib/qt-5.11.1-imx61-shared/qml
QT_PLUGIN_PATH=/usr/lib/qt-5.11.1-imx61-shared/plugins
QT_QPA_PLATFORM=wayland
XDG_RUNTIME_DIR=/tmp

pure-qml is run with "-platform linuxfb -plugin evdevtouch" command
line arguments and the following 'Clean Run Environment':
QML2_IMPORT_PATH=/usr/lib/qt-5.11.1-imx61-shared/qml
QT_IM_MODULE=qtvirtualkeyboard
QT_LOGGING_DEBUG=1
QT_LOGGING_RULES=qt.virtualkeyboard=true;qt.qpa.wayland*=true;
QT_PLUGIN_PATH=/usr/lib/qt-5.11.1-imx61-shared/plugins
QT_QPA_FB_DISABLE_INPUT=1
QT_QPA_FONTDIR=/usr/share/fonts
XDG_RUNTIME_DIR=/tmp
___QML_IMPORT_TRACE=1
___QT_DEBUG_PLUGINS=1

Any idea about what is going on? As anyone successfully use such a setup?
Any tip on how to debug this further?

Thanks,
Chris

Notes:

I have issues with udev and /dev/input, not sure if this can influence
the VKB. I'm currently waiting for a fix from our platform team.

Full log from pure-qml:

QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
Failed to open tty (No such device)
This plugin does not support createPlatformOpenGLContext!
QtCompositor: Failed to initialize EGL display. Could not get
EglDisplay for window.
qt.virtualkeyboard: InputContext::setLocale(): "en_GB"
qt.virtualkeyboard: PlatformInputContext::setLocale():
QLocale(English, Latin, UnitedKingdom)
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle)
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle)
qt.virtualkeyboard: PlatformInputContext::setFocusObject():
QQuickRootItem(0x80368)
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImQueryAll)
qt.virtualkeyboard: PlatformInputContext::commit()
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImInputItemClipRectangle)
qt.virtualkeyboard: PlatformInputContext::setFocusObject():
Chrome_QMLTYPE_4(0x321f98)
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImQueryAll)
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImEnabled|ImQueryInput)
qt.virtualkeyboard: InputContext::setFocus(): true
qt.virtualkeyboard: InputEngine::setInputMethod():
QtVirtualKeyboard::PlainInputMethod(0xa51e0)
qt.virtualkeyboard: InputEngine::setInputMode():
QtVirtualKeyboard::InputEngine::InputMode(Latin)
qt.virtualkeyboard: PlatformInputContext::reset()
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImEnabled|ImMicroFocus|ImCursorPosition|ImSurroundingText|ImCurrentSelection|ImAnchorPosition)
qt.virtualkeyboard: InputEngine::reselect(): 12 QFlags(0x1|0x2)
qt.virtualkeyboard: PlatformInputContext::reset()
qt.virtualkeyboard: PlatformInputContext::update():
QFlags<Qt::InputMethodQuery>(ImEnabled|ImMicroFocus)
qt.virtualkeyboard: PlatformInputContext::showInputPanel()
qt.virtualkeyboard: InputEngine::virtualKeyPress():
Qt::Key(Key_Backspace) "" QFlags<Qt::KeyboardModifiers>(ShiftModifier)
true
qt.virtualkeyboard: InputEngine::virtualKeyRelease():
Qt::Key(Key_Backspace) "" QFlags<Qt::KeyboardModifiers>(ShiftModifier)
qt.virtualkeyboard: InputContext::::sendKeyClick(): 16777219
...

Not sure if the iconv and tty warnings are related.

Full log from wiggly:

QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
Using Wayland-EGL
EGL not available
Using the 'xdg-shell-v6' shell integration
QFocusEvent(FocusIn, ActiveWindowFocusReason)
QKeyEvent(KeyPress, 0) 0
QKeyEvent(KeyRelease, 0) 0
...

Currently EGL is not ready, hence the warnings, I beleive this is not
an issue here as QtWayland will fallback to SHM buffers.



More information about the Interest mailing list