kernc / kernc/logkeys

Keymapping issue

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

Description

It looks like something odd is going on with keymaps. On two computers, I run:

sudo logkeys -s -u --no-daemon

I add keycode logging by adding a printf in `update_key_state` at the top of the default case.

On both, I press the "1" button. On both computers, keycode 2 is registered, which matches what I expect from ex. https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h. On both, I see `/var/log/logkeys.log` log key `2` as being pressed (incorrect).

On both, I press the "q" button. On both computers, keycode 16 is registered.
One one computer, `w` is logged to the file. On the other, `q` is logged to the file.

In short, they don't seem to be using the same keymap, even though `-u` is passed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `update_key_state` default case and trace how the `-u` option selects or applies a keymap. Reproduce `sudo logkeys -s -u --no-daemon` with keycodes 2 and 16, then compare the resulting `/var/log/logkeys.log` entries; done means the option produces consistent key names across both systems.

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
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.