Questions tagged [xkb]
xkb is the abbreviation for the X Keyboard Extension used to describe and configure differ keyboard layouts, etc. under X11.
384
questions
0
votes
1
answer
20
views
How to lock modifiers other than Shift
I have a custom keyboard layout which heavily uses modifiers for navigation and commands. It works great when I have both of my hands on the keyboard, but now I'm trying to configure my keypad to be a ...
0
votes
0
answers
31
views
Mapping upper left esc key to fn
Is it possible to map the upper left esc key to fn? How?
Apparently xmodmap is deprecated and you should use something like setxkbmap instead.
I tried something like:
xmodmap -e "keycode 1 = 464&...
0
votes
2
answers
100
views
Set individual auto-repeat rate for each key
On X11, doing something like
xset r rate 120 240
it's possible to set the repeat rate for the entire keyboard.
But I wonder if it's possible to do the same thing for each individual key? (Ie. to have ...
2
votes
2
answers
87
views
How to remap a regular key into a modifier key (Shift...) in Linux
On my new laptop keyboard, there's a strange key next to my shift key. Frankly it's useless to me and having a shorter shift key doesn't let me reach some of the combinations that I was used to. I'd ...
0
votes
0
answers
22
views
How to create new kayboard layout in xorg?
I use polish layout, but when I use AltGr(in my case it is right Alt)+b in terminal it is print ” and same situation with AltGrgr+f -- æ.
I use:
Fedora workstation 37
Xorg
Bspwm
Thinkpad A485
I ...
1
vote
0
answers
65
views
Custom Umlaut mappings for Gnome/Wayland (xmodmap alternative)
Under X11 I used the following .Xmodmap to easily type Umlauts on a US keyboard layout:
keycode 108 = Mode_switch Alt_R
keycode 39 = s S ssharp
keycode 38 = a A adiaeresis Adiaeresis
keycode 30 = u U ...
0
votes
1
answer
29
views
Swap with setxkbmap pageUp and pageDown
On Debian, I try to swap with setxkbmap pageDown with pageUp (and also Home and End), but I didn’t find options to do it in the -option option.
I try someting like setxkbmap -layout fr -variant bepo -...
0
votes
0
answers
6
views
Using includes for layouts in xkb config
I created a new layout, it's for a new set of glyphs and keycodes that do not exist in Unicode yet, I was able to create a working layout, but I was asked not to merge it upstream, as since it's not ...
1
vote
2
answers
54
views
Is there a way to get the keyboard layout (which letter is where)?
I have a very rarely used keyboard layout and there are a lot of things that are quite obviously not optimized for my very specific layout.
I would like to change hotkeys for a program but I would ...
0
votes
1
answer
62
views
Xkb names of brightness, volume control and standby functions
I've written a custom keyboard layout in xkb and I would like to incorporate volume and brightness control as well as the standby and maybe shutoff function into it so I don't have to reach for the ...
0
votes
2
answers
48
views
Map Caps Lock to AltGr and Escape - why does setxkbmap silence xcape daemon?
I'm on a 20.04 Ubuntu machine.
I've been trying to use a combination of setxkmap and xcape to map AltGr and escape onto my caps-lock key, where a quick key press acts as escape and a longer key press ...
0
votes
0
answers
124
views
Why does my custom xkb layout not recognize the level switches?
I'm using a custom layout that is basically a heavily modified variant of the German PUQ layout that I initially just wrote over the AdNW layout, and to keep it from being overwritten by updates I now ...
1
vote
2
answers
867
views
How to use custom keyboard layout in Windows and Ubuntu (WSL)?
I created a custom keyboard layout with Microsoft Keyboard Layout Creator (MSKLC) for my Windows 10 machine. The custom keyboard layout is based on the Swiss German Layout and the numbers are swapped ...
0
votes
0
answers
113
views
Phonetic keyboard using python-evdev and xkb
I am working on a phonetic transliteration scheme for Indic scripts using a 'us' keyboard on Kubuntu 22.04 (Xorg). IBus or other input methods are not an option because I want the keycode -> ...
0
votes
0
answers
60
views
SetGroup xkb action not working on Xwayland - workaround
I am planning to switch to wayland for years now but only thing keeping me from finally switching is this bug.
this is the issue:
For some reason, using a switch option to switch between layouts (...
0
votes
0
answers
50
views
Xorg labeling devices as keyboards
I have an inputclass section in /etc/X11/xorg.conf.d/10-keyboard.conf as follows:
Section "InputClass"
Identifier "kinesis keyboard"
MatchIsKeyboard "on"
...
0
votes
0
answers
126
views
Why XKB shift levels are 1 (none), 2 (Shift), 3 (AltGr), 5, and not 0, 1, 2, 4?
XKB uses the following scheme for shift levels (as can be seen in various /usr/share/X11/xkb/ files):
level_name[Level1] = "Base";
level_name[Level2] = "Shift";
level_name[Level3] ...
0
votes
1
answer
424
views
How to set xkb variant in sway for one of multiple layouts
I want to set the German layout with nodeadkeys as default, and the other layouts with default variant.
It works when I set just the German layout and its variant, but not with multiple layouts:
input ...
0
votes
0
answers
61
views
xkb swap backslash and return: how to deal with shift?
I'm trying to swap Enter and Backslash key. I figured out how to swap them when Shift is not involved:
key < RTRN > {[ backslash ]};
key < BKSL > {[ Return ]};
However, when shift is down, ...
0
votes
1
answer
49
views
Key mapping: printable char key (like a/s/d/f) mapped to control?
Is it possible to use xmodmap or xkb to turn a key that usually inserts characters (like a/s/d/f) into a modifier key?
I try xmodmap with what I thought would work, e.g., add Control = a,
but this ...
1
vote
0
answers
113
views
In xkb, what is the difference between caps:internal, caps:shift and caps:capslock
If I type cat /usr/share/X11/xkb/rules/evdev.lst | grep caps: in a terminal I get
caps:internal Caps Lock uses internal capitalization; Shift "pauses" Caps Lock
caps:...
0
votes
1
answer
291
views
How to (permently) set keyboard mappings using setxkbmap? It gives an error
I am diving into custom keyboard mappings. Basically, I just want to switch the Alt_L with Ctrl_L and Alt_R with Ctrl_R (kind of like Command on MacBooks). In the file /usr/share/X11/xkb/symbols/ctrl ...
0
votes
0
answers
59
views
setxkbmap not updating without -print | xkbcomp
I have 2 different RDP tools (not-VNC) running the same window manager on the same server. With one of them, I can use setxkbmap to update the keyboard settings. With the other I have to use -print | ...
0
votes
0
answers
64
views
Programmable keyboard layout
I want to define a keyboard layout programmatically so I can replicate the Emacs mode god-mode globally. In summary, I want to have a key that changes the mode to "sticky Ctrl mode" where ...
0
votes
0
answers
60
views
Xorg InputClass to swap capslock and escape for a single device in a persistent, system-wide manner
I am trying to understand why this InputClass is not working as expected:
Section "InputClass"
Identifier "internal keyboard configurator"
MatchDevicePath "/dev/input/...
1
vote
0
answers
102
views
Adding a single keycode to the existing XKB configuration
I have a MECHREV laptop, /sys/class/dmi/id/product_name "Jiaolong Series GM5ZG0O". Its keyboard has a button for toggling trackpad on/off. However this key emits keycode 93 which is not ...
0
votes
0
answers
49
views
XKB: reset layout for new windows to default
I've been using Ubuntu for a while and enjoyed little tweak for changing keyboard layout only for current window.
E.G.: I used two layouts (default en, second in) and just toggled in when needed for ...
2
votes
0
answers
83
views
Key combination AltGr+Alt+h is not detected in xev
I recently added the following customization to /usr/share/X11/xkb/symbols as an include file:
partial alphanumeric_keys xkb_symbols "vim" {
key <AC06> { [ h, ...
1
vote
0
answers
199
views
Remap LeftAlt + hjkl to arrow keys
I'm trying to remap LeftAlt + hjkl to my arrow keys using an XKB layout.
Here's my current config (non-functional):
key <AC06> { [ h, H, Left ] };
key <...
0
votes
0
answers
54
views
Auto load kbd file on keyboard connect
I have created a keyboard layout file (my_keyboard.kbd) specific for my keyboard. I load it manually using xkbcomp my_keyboard.kbd $DISPLAY which works fine.
Currently, some other (the default/...
0
votes
1
answer
444
views
Installing Colemak on Fedora
I am struggling with installing colemak on my Fedora 36 instance.
I am using the following procedure:
wget https://colemak.com/pub/unix/colemak-1.0.tar.gz
tar -xzf colemak-1.0.tar.gz
cd colemak-1.0
...
1
vote
1
answer
283
views
How to add a compose character to a xkb keyboard layout
I created a custom Ukrainian ISO 9 layout successfully (by redacting /usr/share/X11/xkb/symbols/ua and several other files), it works and all but it lacks one letter, namely G with a grave i.e. 'G̀' (...
2
votes
0
answers
411
views
How to set Caps Lock as Hyper (and change modifiers) using xkb?
This is currently my .xsessionrc file:
xmodmap -e "remove Mod4 = Hyper_L" -e "add Mod3 = Hyper_L" -e "lock = Hyper_L" -e "keysym Caps_Lock = Hyper_L" &
...
0
votes
0
answers
140
views
How to assign dot symbol for the numpad del key in the KDE (X11) permanently?
I use the KDE Plasma with X11 on my laptop. And I set up two keyboard layouts in the KDE settings: US English and Russian. I'd like to assign the dot symbol for the numpad Del key. I found the ...
1
vote
1
answer
33
views
implicit types in xkb
The keymap source (in .xkb format) of the current XKB configuration can be obtained by running xkbcomp $DISPLAY -. Mapping to keysyms is done in the xkb_symbols section of this file. Some of the ...
0
votes
1
answer
130
views
xkb: Why is the compose key set to NoSymbol after a system update (OpenSuSE 15.2 → 15.3)?
After upgrading my OpenSuSE Leap from 15.2 to 15.3, I found out that the Compose key (keycode: 135) was no longer working. In fact, xev no longer recognised it as Multi_key, but as NoSymbol:
KeyPress ...
0
votes
2
answers
3k
views
Setting an X11 keymap on Arch Linux
I am running Arch Linux and I would like two input languages on my system.
English, UK
Kurmancî (Northern Kurdish)
In my .xinitrc I have the following:
# keyboard layout
setxkbmap -layout gb &
...
1
vote
0
answers
70
views
How to unmap a modifier?
I'm trying to swap Caps Lock with Backspace for group 1. I have this in xkb_symbols:
replace key <BKSP>
{
symbols[Group1] = [ Caps_Lock ],
symbols[Group2] = [ ...
1
vote
0
answers
187
views
Make xkb produce two symbols on one key press (e.g. make `ctrl`+`+` & `ctrl`+`=` produce same (combined) effect to get rid of `Shift` for zooming in)
Some apps use ctrl++ and some ctrl+= to zoom in. Only some allow to customize. If all used same, I would just remap the keyboard not to use Shift. Can I make apps receive signals that both ...
2
votes
1
answer
1k
views
How to create a new keyboard layout in the /usr/share/X11/xkb directory in Ubuntu?
In the /usr/share/X11/xkb/symbols directory there are various keyboard layouts listed. I made a copy of the /usr/share/X11/xkb/symbols/us file under the name /usr/share/X11/xkb/symbols/new_test_layout....
0
votes
1
answer
112
views
RALT doesn't send Alt_R
I've tried remapping left Control key to left Alt key. in /usr/share/X11/xkb/keycodes/evdev by doing this:
// <LALT> = 64;
// <RCTL> = 105;
// <LCTL> = 37;
// <...
1
vote
0
answers
302
views
Setting ALT + ARROWS LEFT,RIGHT to HOME,END in xkb
I'm trying for days to set the (left) ALT + arrows keys (left/right) keybindings in xkb.
ALT + LEFT to HOME
ALT + RIGHT to END
These keybindings should work together with SHIFT as well.
I just ...
1
vote
0
answers
160
views
Emulating SOCD cleaner functionality with xkb
I'm trying to emulate the functionality of standard hitbox SOCD cleaners with normal keyboard input. Specifically, I need it to:
Space only: KeyPress Space
s only: KeyPress s
Holding s and Pressing ...
2
votes
0
answers
37
views
Changed keyboard map reverts back after short time
I use:
xkbcomp "$DISPLAY" - |
# Menu key = mouse button
...
2
votes
2
answers
324
views
Sun Type 7 Keyboard + KDE shortcuts: Why does the control center ignore most of the function keys on the left edge?
I've recently equipped my OpenSuSE 15.2 with KDE 5 with a Sun Type 7 keyboard and now would like to use the function keys on its left edge for a variety of system-wide shortcuts. The only issue is ...
0
votes
1
answer
466
views
How do I reset the caps lock key after remapping it to ctrl while caps lock was enabled?
I used the following command to remap my caps lock key:
setxkbmap -layout us -option ctrl:nocaps
How do I reset my keyboard to the default settings?
1
vote
0
answers
380
views
How to swap the XF86MonBrightnessUp and F2 key using a custom XKB layout?
I want to swap "two" keys, the XF86MonBrightnessUp ("brightness up") and the F2 keys, using an xkb layout. The keys are both under the same button, "F2". If the keyboard ...
3
votes
1
answer
484
views
Setting CAPS_LOCK + arrows to Home, PgUp, PgDown, End in xkb
I'm trying to set some CapsLock + arrows keybindings in xkb
Using ArchLinux, KDE, Xorg
What I'm trying to achieve (wishful thinking)
Ultimately, the perfect solution would be
No modifier
CapsLock as ...
1
vote
0
answers
126
views
XKB: modifier when hold, dead key when tapped?
I discovered that one can use Compose files to output a keycode when a modifier is pressed and released "alone", which is handy (I though before that one had to compose at least two keys ...
0
votes
1
answer
162
views
Custom XKB layout before login
I have made a custom keyboard layout with XKB, but when I type my password on the login screen, the system still uses a QWERTY layout, only after the login my customized layout is applied. Is it ...