kernc / kernc/logkeys

Capital letter not recognize

Open
#128 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
834
Forks
254
PR merge metrics
No merged PRs in 30d

Description

Hello, logkeys works almost good. It detect small and capital letters from ASCII..
It detect small character for my locale (polish map from https://github.com/kernc/logkeys/issues/123).
But when I try capital letter specific for my locale I need press AltGR + LShift + one of e/o/a/s/l/z/x/c/n key and logkeys detect it wrong - it should be capital letter but it is recognized as small letter. Here is example:

This is what work good:
eoaslzxcn is logged as eoaslzxcn (OK!)
AltGr EOASLZXCN is logged as AltGr EOASLZXCN (OK!)

Now I press and hold AltGr until end of letters
AltGr ęóąśłżźćń is logged as AltGr ęóąśłżźćń (OK!)

Now I press and hold both then letters
AltGr LShift ĘÓĄŚŁŻŹĆŃ is logged as AltGr LShft ęóąśłżźćń (FAIL! It shoud be logged as AltGr LShft ĘÓĄŚŁŻŹĆŃ)

This is important, because I can unhold LShift durning still holding AltGr and for example:
AltGr ęó LShft ĄŚŁżźćń is logged as AltGr ęó LShft ąśłżźćń (FAIL! Should be ęóĄŚŁżźćń)

In this log it is impossible to detect what letter should be small or capital.
How I it can be fixed? If it is impossible(I don't know, I am not programmer, sorry) to get capital letter in logs, logkeys should detect when function keys are hold and unhold.. So for last example for ęóĄŚŁżźćń it should log something like below to detect manually what letter is small or capital:

1) Solution one:
Input: ęóĄŚŁżźćń
Output log shoud be like this: AltGr_hold ęó LShift_hold ąśł LShift_unhold żźćń AltGr_unhold
And now, I know that AltGr was holded all the time and LShit was pressed and hold only for ĄŚŁ.

2) Solution two (better if using --no-func-keys)
Implement capital letter for AltGr LShift function keys in logs.

I hope you can understand. If not, please tell me. I'll try to explain in more detail.
Anyway, great work and if you can implement when function key is hold and unhold (press/unpress) it would be the best improvment ever :). Without this improvment it is impossible to detect all characters correctly.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Polish keyboard case described in the issue, especially AltGr combined with LShift and the transition when LShift is released. Trace how modifier state and locale-specific key events are converted into logged characters; done means capital Polish characters are preserved, or modifier press and release events are logged distinctly when character detection is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.