Giter Club home page Giter Club logo

xkb's Introduction

My XKB config

My keyboard layout is basically Colemak with Mod-DHk, keeping most of the local Finnish symbols from the fi keymap in place.

I've moved many AltGr bindings to a more comfortable location, and added an "extend" layer (inspired by DreymaR's Big Bag of Keyboard Tricks), which is activated by pressing Caps Lock, left Alt, or both, and has e.g. arrows, Backspace, Delete and many Emacs specific keys. Caps Lock (locked) and Super (latched) have been moved to better locations as well.

This is the base layout. By pressing AltGr, you get the symbols in the lower right.

┌─────┐
│Caps │
│ Lock│
└─────┘
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
│ ~   │ !   │ "   │ #   │ $   │ %   │ &   │ /   │ (   │ )   │ =   │ ?   │ Å   ┃         ┃
│ `   │ 1   │ 2 @ │ 3 £ │ 4 € │ 5   | 6   │ 7   │ 8   │ 9   │ 0   │ + \ │ å   ┃    ⌫    ┃
┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
┃       ┃ Q   │ W   │ F   │ P   │ B   │ J   │ L   │ U   │ Y   │ Ö   │     │ ^   ┃       ┃
┃ Tab   ┃ q < │ w > │ f = │ p   │ b   │ j   │ l   │ u [ │ y ] │ ö   │ Esc │ ^   ┃ Enter ┃
┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓      ┃
┃        ┃ A   │ R   │ S   │ T   │ G   │ K   │ N   │ E   │ I   │ O   │ Ä   │ *   ┃      ┃
┃ Ctrl   ┃ a _ │ r - │ s / │ t ? │ g   │ k   │ n { │ e ( │ i ) │ o } │ ä   │ '   ┃      ┃
┣━━━━━━┳━┹───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┲━┷━━━━━┻━━━━━━┫
┃      ┃ Z   │ X   │ C   │ D   │ V   │     | M   │ H   │ ;   │ :   │ _   ┃              ┃
┃Shift ┃ z | │ x   │ c : │ d ; │ v   │Super│ m   │ h   │ ,   │ .   │ -   ┃     Shift    ┃
┣━━━━━━┻┳━━━━┷━━┳━━┷━━━━┱┴─────┴─────┴─────┴─────┴─────┴────┲┷━━━━━┷┳━━━━┻━━┳━━━━━━━┳━━━┛
┃       ┃       ┃       ┃                                   ┃       ┃       ┃       ┃
┃ Ctrl  ┃ Alt   ┃  Alt  ┃                Space              ┃ AltGr ┃       ┃ Ctrl  ┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛

Caps Lock acts mostly as Control, except for the following keys which have a different meaning when Caps Lock is pressed. You can still press left Control to get their original control key:

┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
│     │     │     │     │     │     │     │     │     │     │     │     │     ┃         ┃
│     │     │     │     │     │     │     │     │     │     │     │     │     ┃    ⌫    ┃
┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
┃       ┃     │     │     │     │     │     │     │     │     │     │     │     ┃       ┃
┃ Tab   ┃     │     │     │     │     │     │  ⌫  │  ↑  │  ⌦  │     │ Esc │     ┃ Enter ┃
┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓      ┃
┃Pressed!┃     │     │     │     │     │     │     │     │     │     │     │     ┃      ┃
┃ Ctrl!  ┃     │     │     │     │     │ C-x │  ←  │  ↓  │  →  │     │     │     ┃      ┃
┣━━━━━━┳━┹───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┲━┷━━━━━┻━━━━━━┫
┃      ┃     │     │     │     │     │     │Shift│     │     │     │     ┃              ┃
┃Shift ┃     │     │     │     │     │Super│ Ins │     │     │     │     ┃     Shift    ┃
┣━━━━━━┻┳━━━━┷━━┳━━┷━━━━┱┴─────┴─────┴─────┴─────┴─────┴────┲┷━━━━━┷┳━━━━┻━━┳━━━━━━━┳━━━┛
┃       ┃       ┃       ┃                                   ┃       ┃       ┃       ┃
┃ Ctrl  ┃ Alt   ┃  Alt  ┃                Space              ┃ AltGr ┃       ┃ Ctrl  ┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛

Left Alt acts mostly as Alt (Meta1), except for the following keys. The left Win key acts as an unmodified Alt (Meta1).

┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
│     │     │     │     │     │     │     │     │     │     │     │     │     ┃         ┃
│     │     │     │     │     │     │     │     │     │     │     │     │     ┃    ⌫    ┃
┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
┃       ┃     │     │     │     │     │     │     │     │     │     │     │     ┃       ┃
┃ Tab   ┃     │     │     │     │     │     │ C-⌫ │     │ C-⌦ │     │ Esc │     ┃ Enter ┃
┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓      ┃
┃        ┃     │     │     │     │     │     │     │     │     │     │     │     ┃      ┃
┃ Ctrl   ┃     │     │     │     │     │     │ C-← │     │ C-→ │     │     │     ┃      ┃
┣━━━━━━┳━┹───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┲━┷━━━━━┻━━━━━━┫
┃      ┃     │     │     │     │     │     │     │     │     │     │     ┃              ┃
┃Shift ┃     │     │     │     │     │Super│ M-y │     │     │     │     ┃     Shift    ┃
┣━━━━━━┻┳━━━━┷━━┳━━┷━━━━┱┴─────┴─────┴─────┴─────┴─────┴────┲┷━━━━━┷┳━━━━┻━━┳━━━━━━━┳━━━┛
┃       ┃       ┃Pressed┃                                   ┃       ┃       ┃       ┃
┃ Ctrl  ┃ Alt   ┃  Alt! ┃                Space              ┃ AltGr ┃       ┃ Ctrl  ┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛

When both Caps Lock and Left Alt are pressed:

┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
│     │     │     │     │     │     │     │     │     │     │     │     │     ┃         ┃
│     │     │     │     │     │     │     │     │     │     │     │     │     ┃    ⌫    ┃
┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
┃       ┃     │     │     │     │     │     │     │     │     │     │     │     ┃       ┃
┃ Tab   ┃     │     │     │     │     │     │     │ PgUp│ C-k │     │ Esc │     ┃ Enter ┃
┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓      ┃
┃Pressed ┃     │     │     │     │     │     │     │     │     │     │     │     ┃      ┃
┃ Ctrl!  ┃     │     │     │     │     │     │ Home│ PgDn│ End │     │     │     ┃      ┃
┣━━━━━━┳━┹───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┲━┷━━━━━┻━━━━━━┫
┃      ┃     │     │     │     │     │     │     │     │     │     │     ┃              ┃
┃Shift ┃     │     │     │     │     │Super│     │     │     │     │     ┃     Shift    ┃
┣━━━━━━┻┳━━━━┷━━┳━━┷━━━━┱┴─────┴─────┴─────┴─────┴─────┴────┲┷━━━━━┷┳━━━━┻━━┳━━━━━━━┳━━━┛
┃       ┃       ┃Pressed┃                                   ┃       ┃       ┃       ┃
┃ Ctrl  ┃ Meta  ┃  Alt! ┃                Space              ┃ AltGr ┃ Super ┃ Ctrl  ┃
┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛

Usage

Copy the file akheron to /usr/share/X11/xkb/symbols.

Activate the layout: setxkbmap -rules evdev -model pc105 -layout akheron -variant '' -option ''

To make the changes persistent, add the following to /etc/X11/xorg.conf, or /etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
    Identifier "akheron"
    MatchIsKeyboard "on"
    Option  "XkbRules"         "evdev"
    Option  "XkbModel"         "pc105"
    Option  "XkbLayout"        "akheron"
    Option  "XkbVariant"       ""
    Option  "XkbOptions"       ""
EndSection

Known issues

For some reason, key repeat stops working if the keymap is made persistent as described above. It can be fixed by running the following shell script after X has started, e.g. in ~/.xinitrc:

for keycode in $(seq 8 255); do
    xset r $keycode
done

xkb's People

Contributors

akheron avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.