#371 Maliit Virtual Keyboard Partially Broken
Opened by belsar. Modified

Issue

After the KDE Plasma Workspaces environment group has been installed (Fedora 38, x86_64), the following bugs occur when using the built in Maliit virtual keyboard:

  • Post-login lockscreens cannot access virtual keyboard (only the initial sddm login screen has access).
  • The keyboard does not pop up for text input areas automatically.
  • If plasma-mobile is installed alongside the KDE Plasma Workspaces environment group, the mobile environment will suffer the two bugs listed above.
  • The keyboard can be manually toggled on from the panel, but cannot be toggled off from the panel.

Cause

This is happening because the KDE Plasma Workspaces environment group installs the Input Methods group. That group contains a package called imsettings-plasma, which includes a file: /etc/xdg/plasma-workspace/env/xinput.sh. In that file, there are two functions imported and called from another file: /usr/libexec/imsettings-functions. Those functions are as follows:

function setup_gtk_immodule() {
    if is_imsettings_enabled && is_gtk_supported; then
    # Ensure GTK_IM_MODULE is empty. otherwise GTK+ doesn't pick up immodule through XSETTINGS
    unset GTK_IM_MODULE
    export GTK_IM_MODULE
    else
    [ -n "$GTK_IM_MODULE" ] && export GTK_IM_MODULE
    fi
}
function setup_qt_immodule() {
    if is_imsettings_enabled && is_qt_supported; then
    # FIXME: Qt doesn't support XSETTINGS for immodule yet.
    #        We still need to go with the older way.
    [ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE
    else
    [ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE
    fi
}

The first function sets GTK_IM_MODULE to a non-null value, which prevents post-login lockscreens from having access to the virtual keyboard.

The second function is setting QT_IM_MODULE to a non-null value, which prevents the keyboard from popping up for text input areas, and from disappearing otherwise.

Current workaround

Update the respective functions above to unset, the GTK_IM_MODULE and QT_IM_MODULE, regardless of the conditional logic. If those values are null, the Maliit keyboard works as intended for all use cases I listed previously.

Caveats

I have no idea how my workaround affects non-english / latin languages. I'm not knowledgeable on the input method modules in general, but I'm happy to take a deeper look if someone wants to provide additional guidance.


Bugzilla report: https://bugzilla.redhat.com/show_bug.cgi?id=2226646

Metadata Update from @ngompa:
- Issue tagged with: experience

Metadata Update from @ngompa:
- Issue tagged with: a11y

Metadata