How to Make a Keyboard Layout for X11/OpenOffice

Last modified: Mar 7, 2021 2:23 PM
0 227 Last modified Mar 7, 2021 2:23 PM
Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.


While OpenOffice has a setting to use standard OS X keyboard layouts, you may find that some of these do not work correctly, especially if deadkeys are involved. In that case you will need to create a new layout in the form of a keymap file, which you place in your home folder and invoke when needed via the command "xmodmap mykeymap" in an xterm (or by putting the same line in some config file).

You keymap file should just contain the minimum necessary modifications of the default X11 map, which you can see by doing the command "xmodmap -pke | less" in an xterm (after making sure the preference item for using OS X layouts is turned off).

Some fiddling with the entries of your file may be necessary, as both X11 and apps that use it have quirks and bugs of various sorts. Below is the file I made to do Vietnamese in OpenOffice as an example:

keycode 26 = abreve
keycode 27 = 0x00E2
keycode 28 = 0x00EA
keycode 29 = 0x00F4
keycode 30 = dead_hook
keycode 31 = dead_grave
keycode 33 = dead_belowdot
keycode 34 = dead_tilde
keycode 36 = dead_acute
keycode 37 = U0111
keycode 38 = U01A1
keycode 41 = U01B0

Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.