Creating a New Keyboard Layout

Good day,
I have an 86 key programmable mechanical keyboard with a layout that is a bit different from anything thought of as “standard”.
Inside the Keymap preferences I’ve seen that there are some “non standard” keyboard layouts there (i.e. kinesis), so I was wondering on how can I do the same for this keyboard.

I’ve already went through the keymap -d command and got the text file. It shows a standard 101 key keyboard layout that has nothing to do with the layout I have. So I’m not sure if this is the way to go (tweaking the text file produced by keymap -d) or I am missing something here.

Any insight appreciated.
Regards,
RR

For “standard” keys, in keymap app, you can drag and drop keys to correct their position.
Then you can use keymap -d command to save your customize keymap.
I don’t know how you can get keycodes for your extras keys but if you get some then you can edit the file produced to add them.

The format is shortly documented here: https://git.haiku-os.org/haiku/tree/src/preferences/keymap/KeyboardLayout.cpp#n190

And the files defining existing layouts are here: https://git.haiku-os.org/haiku/tree/data/system/data/KeyboardLayouts

This is unrelated to the keymap, which only maps the keys to characters and has no knowledge of how the keys themselves are laid out on the keyboard.

Good day,

Thanks @PulkoMandy. I will take a look and see if can figure out how to prepare a new keyboard layout.

Regards,
RR

Good day @PulkoMandy,
I’ve been through those links, and checked the layouts in the preferences. Now the question is, with the layout file done, is there a way to test it locally?

Thanks.
Regards,
RR

Put your file in /boot/system/non-packaged/data/KeyboardLayouts ?

Good day @Starcrasher,

Thanks for the tip. I check that location and there is no KeyboardLayouts folder. You mean I should create the folder there and add the layout?

Regards,
RR

Yes. As it is in system, it will ask confirmation. Use shift key to allow renaming of the new folder.

Ok @Starcrasher. Thanks a lot. Will do the testing and report success!

Regards,
RR