feat: add long-press diacritics for physical keyboard input

Reason for the change

Adds diacritics support for long-press of physical keyboard keys, allowing users to easily choose common special and accented characters with a physical keyboard.

Example: Long-press u:

image

Then click or press the keyboard number associated with the desired choice, for example here with 1 and the character becomes the chosen diacritic version:

image


Design

This change is designed in such a way as to provide the scaffolding necessary for all such physical keyboard/overlay features so that it will be a much simpler matter to add new ones — such as our plans for emojis and text expansion. PrefixQueryTrigger & TextExpansionTrigger are stubs that for exactly that, to be fleshed out in upcoming changes after the diacritics feature.


Test plan

kde-builder

kde-linux

Build and reload as a sysext:

kde-builder --no-src --no-include-dependencies plasma-keyboard && systemctl --user daemon-reload && sudo systemd-sysext refresh && systemctl restart --user plasma-plasmashell.service
dev session

Build and login to dev session as usual.

Flatpak

Works on any system, I've been dogfooding on my main PC this way.

Build the branch then run:

flatpak-builder --user --install --force-clean build-flatpak .flatpak-manifest.json

Then in System SettingsKeyboardVirtual Keyboard enable Plasma Keyboard (Nightly). If you already have a version active, first set it to None & Apply before switching it back to pick up the new version.


Screenshots or screen recordings

image

image

image

image

image

image

Resolves #54 (closed)

Edited by Kristen McWilliam

Merge request reports

Loading