How to modify keymap?


I am using a MacBook Pro with Portuguese keyboard layout. I have selected the language and tried some of the available key maps, but there are some keys that are not mapped correctly. How can I change it and create a better key mapping?


In keymap preflet you can edit some existing keymap (by grabbing and exchanging keys in app or by dropping characters on them), edited keymap you can save with different name. Also you can exchange control keys and make dead keys there.
App can make up to 4 levels keymap plus dead keys level (and there is also CapsLock levels). Also you can decompile keymap into text file and edit it, and compile it again (it can be useful to check if something wrong or not with your new keymap), commands in terminal:
keymap -d -o keymap.txt
keymap -c keymap.txt
(it will decompile active keymap)


I will give it a try. Thanks!


How can we contribute with these customized keyboard layouts to the Haiku built-in keymap list?


Send us the modified keymap.txt, we can integrate it.


I did a few changes using the Keymap application. I must now generate a text file for the currently active key mapping using keymap -d -o keymap.txt - is that correct?

I suppose I should swap back the Command/Alt keys before generating the file, since I have changed them to reflect my usual Mac keyboard setup, right?

Where do I submit the file?


Correct, correct, and the preferred way would be a change request at, but if you are not familiar with git, attach it to a ticket in the bugtracker at


Ok. I will try to test it in my two Macs, and then I will send it.

I am having a hard time assigning a forward Delete key using the Keymap application. In these compact keyboards, it’s supposed to be used by pressing fn + Backspace. However, the fn key seems to produce no effect at all. The best I was able to do was swapping the keys using the extended keyboard layout view and assigning it to Shift + Backspace. But while it works ok for text manipulation, it does not open the Team Monitor on Control + Alt + Shift + Backspace. Any suggestions?


Non-standard keyboard shortcuts shouldn’t be added to a Keymap. I guess this MacBook must use “software” Fn instead of “hardware” Fn, in which case we need to modify Haiku to support it…


Right. Is there anything I can do on my side, as an user, to help on that?


Is there anything I can do on my side, as an user, to help on that?


Not really, it would need to be a code change in the input_server.


Ok. I will try to start over from the currently provided Portuguese layout and redo some of the changes. And I will list a few suggestions that may need technical consideration.