Display AltGr and Shift+AltGr characters#6
Open
b606 wants to merge 22 commits intobvbfan:masterfrom
Open
Conversation
The call to DBus interface org.kde.KeyboardLayouts/getLayout returns the layout_index.
The call to DBus interface org.kde.KeyboardLayouts/getLayoutsList
returns an array of structure (sss).
Ex. ([Argument: a(sss) {[Argument: (sss) "fr", "fr", "Français (variante)"]}]).
Works for up to four layouts (max on X11 ?)
(X maximum clients number reaches and Display == nullptr)
…resources. * Moved Display* m_display as a member of X11Keyboard to avoid frequent calls to XOpenDisplay because groupTimer is connected to queryModState. * Starting from commit 663b8d8, ("Get QChar level3 from keyCode", 2025-11-04), one gets error message from X after a few minutes: "Maximum number of clients reached." (display == nullptr). The command `lsof -U | grep kvkbd` shows that XCloseDisplay does not keep up.
mButtonText.at(index): index = 0:normal, 1:shift, 2:altgr, 3:altgr+shift
- Most of the dead keys are displayed in the button texts. Ex. Two keys with Alt.Gr not displayed in "gr" layout: keycodes 47, 48. CHANGES - Class ButtonText changed to QList<QString> with four components : normal, shift, alt-gr, shift+alt-gr labels. - Added button action "shiftLevel3Text" in src/themes/standard.xml - Use of functions in <X11/XKBlib.h>. "keysymconvert.h" is not needed in X11Keyboard anymore. - Added member Display* X11Keyboard::m_display in order to reduce frequent call to XOpenDisplay/XCloseDisplay. This fixes X error on older PC with a message : "Maximum number of clients reached." (XCloseDisplay does not catch up and one gets a display == nullptr).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Characters for Shift Level 3 (AltGr and Shift+AltGr) are displayed in the keys labels.
Still not real Qt 6 yet but if xvkbd is in most of linux repository, why not kvkbd :-)
PS. This PR is based on my previous PR #4 which fixes the layouts and doc compilation problem that blocked
make, and can be rebased on it. The relevant part starts at commit 663b8d8, introducing the changes listed below.CHANGES
Class ButtonText changed to
QList<QString>instead ofQList<QChar>, with four components : normal, shift, alt-gr and shift+alt-gr labels.Added button action "shiftLevel3Text" bound to Alt.Gr in src/themes/standard.xml
Use of functions in X11/XKBlib.h. The files "keysymconvert.{h,cpp}" are not needed in X11Keyboard class anymore but still left in the codebase.
Added member Display* X11Keyboard::m_display in order to reduce frequent calls to XOpenDisplay/XCloseDisplay. This fixes X error on older PC with a message : "Maximum number of clients reached."
(XCloseDisplay does not catch up and one gets a display == nullptr).