Additional keysyms for AltGr keys #13

Merged
MicheleC merged 1 commits from feat/AltGr-keysyms into master 3 years ago
Ray-V commented 3 years ago
Collaborator

Display near-equivalent characters on keys which have dead_* characters which don't display.
The correct dead_* character is printed.

There are some keysyms I don't know how to enter into the keysymtab list.

For example, keysym 0x1000301 for the Ukrainian AltGr+<TLDE> key, the xev output being:

KeyPress event, serial 66, synthetic NO, window 0x3800001,
    root 0xa4, subw 0x0, time 6669891, (-360,546), root:(394,575),
    state 0x180, keycode 49 (keysym 0x1000301, U0301), same_screen YES,
    XLookupString gives 2 bytes: (cc 81) ""
    XmbLookupString gives 2 bytes: (cc 81) ""
    XFilterEvent returns: True

KeyRelease event, serial 66, synthetic NO, window 0x3800001,
    root 0xa4, subw 0x0, time 6669893, (-360,546), root:(394,575),
    state 0x180, keycode 49 (keysym 0x1000301, U0301), same_screen YES,
    XLookupString gives 2 bytes: (cc 81) ""
    XFilterEvent returns: False

It currently shows blank, with the assigned character being combining acute [U0301].
Keying e+AltGr+<TLDE> prints е́ ok

And a similar issue with 'keysym 0xffffff, VoidSymbol' for the Turkish keyboard.

Is there any way to enter these keysyms into the keysymtab list?

Display near-equivalent characters on keys which have dead_* characters which don't display. The correct dead_* character is printed. There are some keysyms I don't know how to enter into the keysymtab list. For example, keysym 0x1000301 for the Ukrainian AltGr+&lt;TLDE> key, the xev output being: ``` KeyPress event, serial 66, synthetic NO, window 0x3800001, root 0xa4, subw 0x0, time 6669891, (-360,546), root:(394,575), state 0x180, keycode 49 (keysym 0x1000301, U0301), same_screen YES, XLookupString gives 2 bytes: (cc 81) "" XmbLookupString gives 2 bytes: (cc 81) "" XFilterEvent returns: True KeyRelease event, serial 66, synthetic NO, window 0x3800001, root 0xa4, subw 0x0, time 6669893, (-360,546), root:(394,575), state 0x180, keycode 49 (keysym 0x1000301, U0301), same_screen YES, XLookupString gives 2 bytes: (cc 81) "" XFilterEvent returns: False ``` It currently shows blank, with the assigned character being combining acute [U0301]. Keying e+AltGr+&lt;TLDE> prints е́ ok And a similar issue with 'keysym 0xffffff, VoidSymbol' for the Turkish keyboard. Is there any way to enter these keysyms into the keysymtab list?
Ray-V added 1 commit 3 years ago
2b8dd3df53
Additional keysyms for AltGr keys
MicheleC merged commit 49ea79598f into master 3 years ago
MicheleC deleted branch feat/AltGr-keysyms 3 years ago
MicheleC added this to the R14.0.10 release milestone 3 years ago
Owner

Thanks @Ray-V, PR is good and merged already.

Regarding your questions:

  1. you can see in the code that 0x01xxxxxx codes are not searched in the keysymtab array. I have no idea if that code is correct/required. If it is and we need to handle special cases, we have two ways.

    a. we add an if() for the special case, which I don't really recommend
    b. we move the search through the keysymtab array before line 849 and add the special cases in the array. In this case we can easily handle special cases without adding a multitude of if() cases.
    We will need to change "unsigned short" to unsigned int" or "long" in the keysymtab array to handle 32bits values. I suggest something like:

struct codepair {
  Keysym keysym;
  unsigned long ucs;
} keysymtab[] { ... }

unsigned long keysym2ucs(KeySym keysym) { ... }
  1. The solution b. above should be able to handle also the case for the Turkinsh void symbol.

What do you think?

Thanks @Ray-V, PR is good and merged already. Regarding your questions: 1. you can see in the [code](https://mirror.git.trinitydesktop.org/gitea/TDE/kvkbd/src/branch/master/src/Xutils.cpp#L849) that 0x01xxxxxx codes are not searched in the keysymtab array. I have no idea if that code is correct/required. If it is and we need to handle special cases, we have two ways. a. we add an if() for the special case, which I don't really recommend b. we move the search through the keysymtab array before line 849 and add the special cases in the array. In this case we can easily handle special cases without adding a multitude of if() cases. We will need to change "unsigned short" to unsigned int" or "long" in the keysymtab array to handle 32bits values. I suggest something like: ``` struct codepair { Keysym keysym; unsigned long ucs; } keysymtab[] { ... } unsigned long keysym2ucs(KeySym keysym) { ... } ``` 2. The solution b. above should be able to handle also the case for the Turkinsh void symbol. What do you think?
Ray-V commented 3 years ago
Poster
Collaborator

What do you think?

I've set up PR#14 to cover this.

> What do you think? I've set up PR#14 to cover this.
The pull request has been merged as 49ea79598f.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/kvkbd#13
Loading…
There is no content yet.