ysoftwareab / xkb-for-macos

PC keyboard layouts for MacOS straight from X11 xkb
The Unlicense
23 stars 5 forks source link
keyboard keyboard-layout keylayout linux macos pc windows x11 xkb

xkb-for-macos

PC keyboard layouts for MacOS straight from X11 xkb.

Thanks to klfc, we converted all keyboard layouts from an Ubuntu 20.04 distribution (X11 xkb) to MacOS (keylayout).

Outcome: type on your Mac the same way you would type on a PC.

Installation

You can either do the following in /Library/Keyboard Layouts for all users (recommended) or ~/Library/Keyboard Layouts only for your own user.

The preferred way is to clone this git repository

sudo rm -rf /Library/Keyboard\ Layouts
sudo git clone https://github.com/ysoftwareab/xkb-for-macos.git /Library/Keyboard\ Layouts

but you can also copy individual y-xkb-<language>.* files.

You can then activate the ysoftwareab xkb <language> via System Preferences - Keyboard - Keyboard (tab) - Input Sources.

NOTE If you are having issues activating a keyboard, try the following and restart (source).

sudo rm /System/Library/Caches/com.apple.IntlDataCache*
sudo find /var/ -name "*IntlDataCache*" -exec rm {} \;

But why?

The reasons stem from the Swedish keyboard layout on MacOS.

Basic keys for programming are a killer to reach:

Same keys on PC:

Similar issues surface in other languages as you can see in Related Work.

What is different from other initiatives is that this is not a manual conversion.

For a visual diff, please consult the original MacOS keyboard layout se.pdf and the PC keyboard layout y-xkb-se.pdf, as exported by Ukelele.

Related Work

See also

License

UNLICENSE