11

Looking for an answer I came across this question. There's something like this:

The keycode X uses and the keycode the kernel uses are OFF BY 8 for "historical reasons". So take 97 - 8 = 89 and use 89 with the setkeycodes command (again as root):

Does anyone know what the historical reasons are and why the codes differ by 8?

1
  • For some reason, GitHub copilot created a link to here Commented Nov 29, 2021 at 6:13

1 Answer 1

8

The X11 protocol defines a keycode as a 8-bit value in the range [8,255]. The value 0 is a special value for AnyKey - I don't remember if anything uses 1-7, or they were simply reserved for future special cases.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.