openframeworks / openframeworks/openFrameworks

Keyboard layout problem

Open
#5,385 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.