Download xkb
Standard layouts for Polish and German are quite different, and switching between them while writing is very inconvenient. The differing position of Y and Z alone is enough to make the writer's life really hard. Writing any text where characters from both languages appear and having to switch between the two layouts is very inconvenient.
Our goal is to create a keyboard layout combining accented letters from both languages that fits well to the physical layout of a German keyboard. There are several subdirectories in that folder, but for the simple task of creating a new layout we are interested only in the symbols subdirectory. Root permissions are necessary for most tasks described below, as all configuration files in this directory are owned by root.
Note that some of the files we need to edit are read-only even for the superuser, so it may be necessary to change their access permissions before editing most text editors allow saving read-only files after confirming the operation, though. Files to describe the basic keyboard layouts are given the names of their language name abbreviations e.
Using this naming scheme is not mandatory — the layout would also work under another name — but recommended. Some applications, such as the KDE Control Center, also rely upon this naming scheme in order to assign icons national flags to keyboard layouts.
Let's make some modifications to our new layout. Special keys have their own names — e. Character names are usually self-explanatory and in most cases identical or very similar to Unicode names.
However, usually it is easiest to just copy some lines directly from other keyboard layouts in this case, from file pl , which defines the Polish layout. It is also possible to build from source with nix on any Linux distribution. This may be faster than using cabal since it can fetch binaries for many dependencies, skipping compiling them. To do that, first install nix. After you have nix installed, you can run nix-env -i -f.
That will build KLFC and link it your nix profile, then you can use it from a regular shell afterwards. If you'd like to get a shell with hoogle , cabal , niv , haskell-language-server and more for working on the project, run nix-shell.
From this shell, you can then use cabal build , cabal run , etc, as normal. The nix infrastructure in this project uses a pinned version of nixpkgs to ensure it will build consistently on any system. This needs updating occasionally. As in "keyboard LEDs".
Otherwise, they are irrelevant. Indicators not matched to any LED are called "virtual"; xkbvleds 1 package xorg-xkbutils can be used to check their state. Indicators always reflect specified part of XKB internal state. Two common modes is showing modifier state:. Types and modifiers are tightly connected, so it makes a lot of sense to start with the modifier bits first, before doing anything with the type descriptions. Decide which bits you will use. There are only eight of them, and of those, Shift, Control and Mod1 are widely used in applications, and Lock aka CapsLock has pre-defined meaning which also may be hard to override.
The remaining four, however, are fair play. They may work differently just because they are named this way.
Avoid deleting them. If some changes do not work as expected, try adding a new type instead. Remove them to avoid doing unnecessary work. Now, some standard types use virtual modifiers. If you decide to use them, check Virtual modifiers below and skip this section.
Otherwise, it is a good idea to get rid of them completely. Check the types you need, and either replace them with corresponding real ones, or remove relevant definitions. Basically all you need is a keysym with a relevant interpretation entry. SetMods makes a regular "on while pressed" modifier key. LatchMods means "on until next keypress" aka sticky modifier. XKB does not use modifier map in its original meaning.
Within XKB, its only function is to map virtual modifiers see below. However, the table is easily accessible by clients, and there is one counter-intuitive but well-known trick involving it: modifier map is used to tell which of ModX bits is Alt. Unless you have very good reasons to do otherwise, it should be Mod1. XKB allows setting keymap for a single connected physical keyboard only. This feature can be extremely useful for multi-keyboard setups when keyboards in question are different; consider a laptop with a full-size USB keyboard attached.
First of all, use xinput package xorg-xinput to get device IDs:. Note xkbcomp -i11 will not work and will not give a clear error message either. Make sure you have space after -i. When keys do not work as expected, the first thing to check is XKB internal state: modifiers, effective group and control bits. All three can be used to drive LEDs; use xkbvleds 1 to check them. Modifiers are also reported by xev 1.
In case interpretations section does not work well, make sure to check for duplicated "interpret" blocks. Better yet, try commenting out anything related to specific keysym. See section 9. One of the most troublesome parts of XKB, virtual modifiers appear prominently in all standard keymaps, despite being a relatively minor and mostly useless feature.
The term itself is grossly misleading, and most of the docs do not help much either. So, first of all: virtual modifiers are not modifiers in the same way real modifiers are. If anything, it is a way to name some of the real modifiers. They are not 16 more bits that can be used in level definitions. Admittedly, I only tested with a few different layouts that I used.
If you find any bugs let me know by submitting an issue or via grrwlf gmail. Skip to content. Star Switch your X keyboard layouts from the command line GPL Branches Tags. Could not load branches. Could not load tags. Latest commit.
0コメント