Skip to main content

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

Install

Windows

  • download a keyboard layout installer:

    • either MSKLC — proprietary freeware, compatible with Windows XP, Vista, Seven, 8, 8.1,

    • or KbdEdit — proprietary shareware, compatible with Windows XP, Vista, Seven, 8, 8.1 and 10;

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kalamine-0.4.3.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

kalamine-0.4.3-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file kalamine-0.4.3.tar.gz.

File metadata

  • Download URL: kalamine-0.4.3.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for kalamine-0.4.3.tar.gz
Algorithm Hash digest
SHA256 dfa07fd19fabc33cae167c132bed2f8fe9058d78856d0ab9a3b2a82e2f02f163
MD5 4744b9b3256f107667e9a123dd2bf6e9
BLAKE2b-256 74a8032597ca1c8b53c331e0d8b33fad60c827ae1723f9fbba29e1de3edf57ec

See more details on using hashes here.

File details

Details for the file kalamine-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for kalamine-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 56bfab0a2d42910367184005880eb5076258034f5471941ac897d74db0008143
MD5 29ae95b52505d99c77fbbef8091ebaa8
BLAKE2b-256 f8283f4b43c538c9739dfc66af2fd39c9ce6e296941affd8877b4e634fb09814

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page