This is the first step in
https://invent.kde.org/plasma/plasma-keyboard/-/merge_requests/109
(please see it for context and rationale), and
introduces a basic input engine and layout framework.
The virtual keyboard library and engine are in /virtualkeyboard:
- /virtualkeyboard/components - QML components for building keyboard layouts and the keyboard itself
- /virtualkeyboard/inputbackend.h - generic input "backend" for sending events from the vkbd, currently just for input-method-v1 but could be for xdg-remote-desktop?
- /virtualkeyboard/inputengine.h - internal input method "state"
- /virtualkeyboard/keyboardcontroller.h - internal virtual keyboard panel "state"
- /virtualkeyboard/keyboardpackageresolver.h - utilities to find and parse keyboard "layout packages"
- /virtualkeyboard/textcomposers/abstracttextcomposer.h - abstract interface that implements event handling from the keyboard layout and talks to InputEngine for the final "text" (needed for CJK, text prediction)
- /virtualkeyboard/textcomposers/directtextcomposer.h - directly enters text (enough for most layouts)
For an example keyboard package (not included in this MR), please see https://invent.kde.org/plasma/plasma-keyboard/-/tree/e8e33ef2103c545decaed556a43907349e789fb8/layouts/en (shared layouts in https://invent.kde.org/plasma/plasma-keyboard/-/tree/e8e33ef2103c545decaed556a43907349e789fb8/layouts/defaultplugin)
- Metadata is in metadata.json, which lists the locales the package is
meant for, and what layouts it provides
- Each keyboard layout has predefined "required" layouts: main, symbols,
digits, numbers and dialpad
- Each keyboard layout can define which form factors to show up for (ex.
desktop ones won't show up in the mobile kcm keyboard selector by default)
In the current implementation, the 'Defaults' button has no
functionality, and when settings are changed back to the last saved
state without using the 'Reset' button, the 'Apply' and 'Reset'
buttons don't get disabled again as they should. Additionally the
KConfigXT documentation states that singleton config instances
shouldn't be used in KCMs.
Previously if the connection to the compositor was lost, we would just
continue running while being unable to do any input method work.
This was problematic for the flatpak installation of plasma-keyboard,
which could even accumulate multiple running instances if toggled on/off
in the KCM repeatedly.
Resolves https://invent.kde.org/plasma/plasma-keyboard/-/work_items/85
`inputMethod->activeContext()` is clearer than `inputMethod->current()`,
and we avoid using `isActive()` which shadows the `isActive()` method of
`QWaylandClientExtension`.
Added low quotation mark and swapped guillemets
### Reason for the change
Hungarian uses the following quotation marks (with nesting): „ » « ”
The starting quotation mark was missing, so I added it. The inner quotation marks are also in the opposite order on the base layout, so I added an override for them.
I left the American English opening quotation mark in place, as I feel like it might be confusing if it was demoted to be behind the closing quotation mark.
### Test plan
I'm new to contributing to KDE and I haven't been able to test this. Sorry about that. I did build, install, and reboot, but could observe no changes. If someone else has a clue about what I might be doing wrong, please help.
Either way, you should be able to see the changed list after holding down the " key.
- Before: “ ” « »
- After: “ „ ” » «
### Bugs fixed
BUG: 522221
Since 6.7 there have been more people using the feature, and several
complaining that it pops up when they are just typing.
Lets assume that most people are much more slow and hesitant at typing
than us techies, and increase the default delay to 600ms; the same that
the key repeat delay is set to by default.
This should fix the accidental overlays for most people, and anyone who
uses it regularly can still easily change the setting to a lower value
if they prefer.