Custom keyboard layout based on the Logitech Swiss German keyboard layout.
- Download
CustomSwissGerman.keylayout
andCustomSwissGerman.icns
- Copy both files to
/Library/Keyboard Layouts
:sudo cp CustomSwissGerman.* /Library/Keyboard\ Layouts
- Log out of macOS and log in again
- Go to System Preferences > Keyboard > Text Input > Edit... > [+] > Others
- Locate the Custom Swiss German keyboard layout in the list and add it
Tested on Windows 10.
To install the keyboard layout, you must build a setup package from the CustomSw.klc
file and then install this package:
- Download and install the Microsoft Keyboard Layout Creator (MSKLC)
- Download the
CustomSw.klc
file - In MSKLC, go to File > Load Source File... and select the
CustomSw.klc
file - Click on Project > Build DLL and Setup Package
This creates a directory called
customsw
in the current working directory. There may be a dialog notifying about warnings during the build which can be ignored. - Run
setup.exe
in thecustomsw
directoryThis installs the keyboard layout as
CustomSw.dll
toC:\Windows\System32
and creates the necessary registry entries to make the layout available to the system. Ifsetup.exe
doesn't work for some reason, try executingCustomSw_amd64.msi
. - In Windows, go to Settings > Time & Language > Language > Keyboard > Override for default input method and activate the Custom Swiss German keyboard layout
Important: after the installation, keep the
customsw
directory somewhere on the system. This is because the containedsetup.exe
file allows to cleanly uninstall the keyboard layout. Uninstallation is necessary if you want to make changes to the keyboard layout (i.e. by editing the.klc
file and rebuilding the DLL and setup package as described above) and then reapply it. The reason that the keyboard layout must be uninstalled before making changes is that MSKLC refuses to export a keyboard layout with the same name as an already installed keyboard layout.
The keyboard layout is based on the Logitech Swiss German layout. The differences to the Logitech Swiss German layout, and also the native macOS Swiss German layout, are listed below:
Character | Custom | Logitech Swiss German | macOS Swiss German |
---|---|---|---|
` | ` | Opt-1 |
Opt-1 |
– (en dash) |
Opt-[-] |
Opt-[-] |
Opt-[-] |
— (em dash) |
Ctrl-Opt-[-] |
— | — |
ā , ē , ī , ō , ū |
Opt-[AEIOU] |
— | — |
Ā , Ē , Ī , Ō , Ū |
Opt-Shift-[AEIOU] |
— | — |
€ |
Opt-R |
Opt-E |
Opt-E |
As can be seen, the custom keyboard layout, among others, adds key mappings for vowels with macrons (e.g
ā
) as they are used, for example, in Japanese romanisation systems.
Obtained from Ukelele by opening its DMG file and navigating to Resources/Standard Keyboards. The Logitech Swiss German keyboard layout is located in the Logitech Keyboard Layouts.bundle file.
Created with Ukelele by using the LogitechSwissGerman.keylayout
as a base.
Generated from LogitechSwissGerman.keylayout
as explained in Windows keyboard layout file generation below.
The following explains how to generate the CustomSw.klc
file from CustomSwissGerman.keylayout
:
- Clone adobe-type-tools/keyboard-layouts:
git clone https://github.com/adobe-type-tools/keyboard-layouts
- Execute the following command:
python3 mac2winKeyboard.py CustomSwissGerman.keylayout
- Do the following manual fixes in the created
CustomSw.klc
file:- Change the line:
to:
29 OEM_3 SGCap 003c 003e -1 -1 005c 2030 // LESS-THAN SIGN, GREATER-THAN SIGN, <none>, <none>, REVERSE SOLIDUS, PER MILLE SIGN
29 OEM_3 SGCap 00a7 00b0 -1 -1 2264 2265 // SECTION SIGN, DEGREE SIGN, <none>, <none>, LESS-THAN OR EQUAL TO, GREATER-THAN OR EQUAL TO
- Change the line:
to:
56 OEM_102 0 00a7 00b0 -1 -1 2264 2265 // SECTION SIGN, DEGREE SIGN, <none>, <none>, LESS-THAN OR EQUAL TO, GREATER-THAN OR EQUAL TO
56 OEM_102 0 003c 003e -1 -1 005c 2030 // LESS-THAN SIGN, GREATER-THAN SIGN, <none>, <none>, REVERSE SOLIDUS, PER MILLE SIGN
OEM_3
key (§
//
/°
) andOEM_102
key (<
//
/>
) seem to be swapped on macOS keyboards with respect to Windows keyboards. is - Change the line:
Note: keyboard layout file names on Windows can have at most 8 characters (excluding the extension). That's why the name of the output file is shortened to
CustomSw.klc
.