openframeworks / openframeworks/openFrameworks
Keyboard layout problem
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hello,
From what I see here: https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/app/ofAppEGLWindow.cpp#L1388
It seems that when creating a ofAppELGWindow the keyboard event directly rely on /dev/input/eventX which is not good since /dev/input/eventX seems to not take locale in account.
I tried on my dev computer AND on the RPi the following: evtest /dev/input/eventX and I do receive the "q" keycode when I press "a".
So for me, using /dev/input/eventX directly to detect key press is unreliable because it doesn't take in account my locale.
What could be a workaround? Because for me right now, it seems we cannot create an OF app running on the RPi with a different keyboard layout than the one "used" while listening to /dev/input/eventX, and that would be a major issue.
Regards
Xavier
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with libs/openFrameworks/app/ofAppEGLWindow.cpp around line 1388 and reproduce the mismatch using evtest on /dev/input/eventX, comparing the reported keycode with the configured keyboard layout. Trace how the ofAppEGLWindow keyboard event is produced and determine whether the issue can be fixed or needs a documented workaround for Raspberry Pi. Done means the expected layout is handled reliably or the limitation and workaround are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, raspberry-pi
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100