a cross-platform Keyboard Layout Maker
Project description
A cross-platform Keyboard Layout Maker, blatantly stolen from the qwerty-lafayette project.
Basic Usage
Draw your keyboard layout in ASCII-art and include it in a YAML document:
name: qwerty-ansi
name8: q-ansi
description: QWERTY-US layout.
version: 1.0.0
geometry: ANSI
base: |
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━━┓
│ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + ┃ ┃
│ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = ┃ ⌫ ┃
┢━━━━━┷━━┱──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┺━━┯━━━━━━━┩
┃ ┃ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ { │ } │ | │
┃ ↹ ┃ │ │ │ │ │ │ │ │ │ │ [ │ ] │ \ │
┣━━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┲━━━━┷━━━━━━━┪
┃ ┃ A │ S │ D │ F │ G │ H │ J │ K │ L │ : │ " ┃ ┃
┃ ⇬ ┃ │ │ │ │ │ │ │ │ │ ; │ ' ┃ ⏎ ┃
┣━━━━━━━━━┻━━┱──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┲━━┻━━━━━━━━━━━━┫
┃ ┃ Z │ X │ C │ V │ B │ N │ M │ < │ > │ ? ┃ ┃
┃ ⇧ ┃ │ │ │ │ │ │ │ , │ . │ / ┃ ⇧ ┃
┣━━━━━━━┳━━━━┻━━┳━━┷━━━━┱┴─────┴─────┴─────┴─────┴─────┴─┲━━━┷━━━┳━┷━━━━━╋━━━━━━━┳━━━━━━━┫
┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
┃ Ctrl ┃ super ┃ Alt ┃ ␣ ┃ Alt ┃ super ┃ menu ┃ Ctrl ┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┹────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┻━━━━━━━┛
Build it:
kalamine qwerty-ansi.yaml
Get all keyboard drivers:
dist/
├── q-ansi.klc # Windows
├── q-ansi.keylayout # MacOSX
├── q-ansi.xkb # Linux
└── q-ansi.json
Install
Windows
download a keyboard layout installer:
run this installer to generate a setup program;
run the setup program;
the keyboard layout appears in the language bar.
MacOSX
copy your *.keylayout file into:
either ~/Library/Keyboard Layouts for the current user only,
or /Library/Keyboard Layouts for all users;
restart your session;
the keyboard layout appears in the “Language and Text” preferences, “Input Methods” tab.
Linux
On Xorg, *.xkb keyboard descriptions can be applied with xkbcomp:
xkbcomp -w10 layout.xkb $DISPLAY
To get back to the standard us-qwerty layout:
setxkbmap us
XKalamine
xkalamine is a Linux-specific tool for managing keyboard layouts with xkb.
To apply a keyboard layout in user-space:
# equivalent to `xkbcomp -w10 layout.xkb $DISPLAY`
xkalamine apply layout.yaml
This has limitations: it doesn’t work on Wayland and the keyboard layout doesn’t show up in the Gnome keyboard manager. Besides, on some distros, media keys might stop working.
The proper way to install a keyboard layout on Linux is to modify directly the files in /usr/share/X11/xkb. This is where xkalamine comes in:
sudo xkalamine install layout.yaml
There’s also:
xkalamine list to enumerate all installed Kalamine layouts
xkalamine remove to uninstall a Kalamine layout
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kalamine-0.9.0.tar.gz
.
File metadata
- Download URL: kalamine-0.9.0.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a0f6c7ae51063a682b7be1e49611eb18a834e945c123f3eea9b82201f04a4b1 |
|
MD5 | c911d93b050cca782c96977e75521bd1 |
|
BLAKE2b-256 | 0aa5598789de06ecab1b5549cac5646e119186f424b4191f715a37fc40cb9998 |
File details
Details for the file kalamine-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: kalamine-0.9.0-py3-none-any.whl
- Upload date:
- Size: 34.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61347e3fb44522f3650fe07e5da7e70cff8537529c948d81a3f71c8ddf518ec1 |
|
MD5 | c604c8a5b7bcd13159cf181a0533711c |
|
BLAKE2b-256 | 97401ea1f6f7112e104f8d132f399b5ced336a8796e53e33fed8dc6217b1442a |