X KeyBoard extension, or XKB, defines the way keyboards codes are handled in X, and provides access to internal translation tables.
Questions tagged [xkb]
202 questions
162
votes
14 answers
How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?)
I want to change the key bindings on some of the keys on my keyboard. I want some to run commands and others to activate different keys.
What applications can I use to do this?
Index:
Xbindkeys
Default keyboard and shortcut settings (from…
Seth
- 59,332
35
votes
2 answers
How to add a new keyboard layout (Custom keyboard layout definition)
I want to copy a keyboard layout in /usr/share/X11/xkb/symbols/ and change it and then produce a new layout from it.
How can I add a new keyboard layout (named e.g. "mylayout")?
Update #1:
Files I changed to add a new…
user69453
- 793
20
votes
3 answers
How can I reload my XKB configuration without restarting my computer or logging back in
I made a cool, little script that will edit my /usr/share/X11/xkb/symbols/pc file automatically. It is useful when I want to switch between a Mac or Windows keyboard.
The one problem I've encountered is that I have to log out and then log back in…
Doug Beney
- 561
19
votes
3 answers
Remap a key combination to another combination, e. g. Super+Ctrl+Shift+J -> Ctrl+Shift+Left
I want to implement an addition key layer, so that I can access non-alphanumeric keys without having to move my wrists.
I've been using Autokey for this purpose, but the experience was unsatisfactory: it had occasional lags and let original…
13
votes
1 answer
What file is the setxkbmap option -rules meant to take, and how can I add keyboard variants to that file?
I'm trying to install a custom keyboard layout without sudo access, as I described in Is it possible to use a custom keyboard layout without sudo access? If so, how?, and I have a specific question about the setxkbmap command that the current answer…
E.P.
- 467
- 5
- 19
13
votes
1 answer
Using setxkbmap for a simple remap (similar to xmodmap)
I've faced some issues after remapping keyboard with xmodmap: settings get reset randomly after 2-20 minutes after applying. Googled it but no help: something resets them, but all mentions apply to xfce, while I'm under usual 14.04 Ubuntu with…
Den Drobiazko
- 459
12
votes
2 answers
Why did 13.10 break my custom keyboard layout?
I was using a custom keyboard layout. Basically I modified the us-mac layout to fit my ideal of a math-heavy version of the regular us layout that also throws German umlauts into mix. It went well and worked marvelously for 6 consecutive versions of…
con-f-use
- 19,041
11
votes
2 answers
How to make Hyper and Super keys not do the same thing?
I have used xkb to remap the right windows key (RWIN) to Hyper_R because I want to use it with AutoKey for some special shortcuts. I did it by editing
/usr/share/X11/xkb/symbols/pc
modifying the RWIN line:
key { [ Hyper_R ] …
Alexander Rechsteiner
- 2,282
10
votes
2 answers
Remap Caps Lock to Ctrl-b
How can xkb or some other tool be used to permanently bind Caps Lock to ctrl+b while in terminal?
(This is to make Caps Lock the default prefix key for tmux. It could also be mapped to a specific key if that's too difficult, e.g. a function key,…
mahemoff
- 717
10
votes
1 answer
How to reset xkb?
I modified my /usr/share/X11/xkb/symbols/pc file. After doing so, my End and PgDn keys no longer work. I did not back up the file, but attempted to restore it manually with no results. Ctrl/Shift+End/PgDn still works, but End/PgDn doesn't register a…
SethWhite
- 201
9
votes
1 answer
Custom Keyboard Layout to use H J K L as ARROWS not working properly
I set up my keyboard layout in /usr/share/X11/xkb/symbols/ to use the keys H, J, K, L as arrows Left, Down, Up and Right as the third and fourth shift level. mostly I followed this post.
The R. Alt is my Alternative Characters Key.
While this…
avila
- 583
- 2
- 7
- 21
9
votes
3 answers
How to swap Command and Control keys with xkb step by step?
I want to use my Apple long aluminium keyboard with swapped Command and Ctrl keys. How is this done step by step on Trusty Tahr (14.04) using xkb?
Note: This solution doesn't work for me as xkb replaced xmodmap in 13.04 or even earlier.
8
votes
1 answer
How can I remap "special" keys in xkb?
I've been trying to migrate my keyboard mapping from xmodmap to xkb, but I'm having some trouble. I can see where to modify the "normal" keys, in /usr/share/X11/xkb/symbol/us for me, but this file seems devoid of "special" keys, including…
Sparhawk
- 6,969
8
votes
0 answers
Using xkb to map a key combination to another
How can I use xkb to map a key combination like Super + Shift + C to another combination like Ctrl + Shift + C?
The question is about doing so with xkb. I know about autokey or xmodmap but I want to do it with xkb as other options aren't as stable…
Sassan
- 161
7
votes
2 answers
Static ordering of keyboard layout switching in Ubuntu 17.10 and later with GNOME 3
Just installed Ubuntu 17.10 and it seems that the keyboard layout switching has changed its behavior.
In the previous version of Ubuntu (such as 16.04 Unity), if I have 3 different keyboard layouts (for example EN-TH-JA), hitting Super+Space would…