https://bugs.kde.org/show_bug.cgi?id=523088

            Bug ID: 523088
           Summary: Language key always opens a selection dialog; with
                    only two enabled languages it should toggle directly
    Classification: Plasma
           Product: Plasma Keyboard
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

STEPS TO REPRODUCE
1. System Settings -> On-Screen Keyboard -> enable exactly two languages (e.g.
German + Russian)
2. On a convertible, detach the keyboard (tablet mode) and focus a text field
so the on-screen keyboard appears
3. Tap the language (globe/earth) key

OBSERVED RESULT
A language selection dialog opens and you have to tap the wanted language.
Every single language switch costs two taps, even though there is only one
other
language to switch to.

EXPECTED RESULT
With exactly two enabled languages, a tap on the language key should switch
straight
to the other language, without a dialog. The dialog only adds value with three
or more
languages (and could stay there, or move to a long-press).

ADDITIONAL INFORMATION
plasma-keyboard sets externalLanguageSwitchEnabled: true on the InputPanel and
always
routes the key press to the dialog:

    externalLanguageSwitchEnabled: true
    onExternalLanguageSwitch: (localeList, currentIndex) => {
        languageDialog.show(inputPanel.keyboard.activeKey, localeList,
currentIndex)
    }

Without that flag, Qt Virtual Keyboard's built-in handler cycles to the next
enabled
language on a single tap - which is exactly the desired behaviour for two
languages.

Suggested fix (any of):
- Set externalLanguageSwitchEnabled: false when
PlasmaKeyboardSettings.enabledLocales.length <= 2
- Or in onExternalLanguageSwitch: if localeList.length === 2, switch directly
instead of showing the dialog
- Or generally: tap = cycle to next language, long-press = show the dialog

There is no user-facing setting for this - plasma-keyboard only knows
enabledLocales and
panelFillScreenWidth; the KCM offers just "Languages" and "Key press feedback".

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 26.04 (kernel 7.0.0-27)
KDE Plasma Version: 6.6.5
plasma-keyboard: 6.6.5
Qt Version: 6.10.2
Graphics Platform: Wayland
Hardware: Lenovo Miix 520 convertible (detachable keyboard -> tablet mode),
Intel UHD 620
Enabled OSK languages: de + ru

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to