Questions tagged [setxkbmap]
The setxkbmap tag has no usage guidance.
38 questions
0
votes
1
answer
20
views
How do I create a per user xkb keymap?
It is possible to create your own custom xkb maps by adding files to /usr/share/X11/xkb/symbols. However, this directory is managed my dpkg and requires root access. Is there a way of placing a keymap ...
0
votes
0
answers
32
views
Prevent keyboard layout from being changed
For some reason my keyboard layout occasionally switches to another language.
Is there a way to prevent other software from changing my keyboard layout?
I can run...
setxkbmap de
...to fix it, but it ...
0
votes
1
answer
49
views
Remap Right Alt to Backspace
As the title says how can I remap Right Alt to Backspace?
I am on X11
I am aware that something can be done using setxkbmap but I not aware of the command for my particular case.
0
votes
0
answers
20
views
xkb utf8 symbols but no syms
Fedora 39 here, but this should apply in general for any linux.
My ~/.xkb/symbols/my has this (part):
replace key <FK01> {
[ F1, F1, {H,e,l,l,o}, {W,o,r,l,d}, XF86_Switch_VT_1 ]
};
...
1
vote
1
answer
138
views
`setxkbmap kr` not doing anything?
I'm trying to add a configuration to my multilingual setup on my ArchLinux desktop, but Korean doesn't seem to do anything, despite it being listed under setxkbmap.
How do I set it up similarly to ...
1
vote
1
answer
65
views
XKB spec says 63 levels max per type. For me it's 8. What am I doing wrong?
X.org version: 1.21.1.7
Distribution: Kubuntu 23.04
I duplicated the included EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK type, inserted an additional level as Level1, and shifted all existing levels by +1....
1
vote
0
answers
75
views
xkb: how can `modifier_map` be completely replaced
When defining a custom keyboard layout with xkb, how can I completely override a modifier? E.g. when I have
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types ...
0
votes
1
answer
214
views
How to translate setxkbmap to xinitrc config
I am setting my keyboard layout using this command on every startup:
setxkbmap us,cz -variant ,ucw -option grp:caps_switch
How can I write this configuration in to xinitrc file so xserver loads it ...
1
vote
1
answer
88
views
setxkbmap and xmodmap often stop working
I have a script to:
Set the keyboard layout to include accents
Set capslock as mod when held
Set capslock as escape when pressed
It looks like this:
setxkbmap -rules evdev -model evdev -layout us -...
0
votes
1
answer
493
views
Map <C-S-A-hjkl> to Arrow Keys with XKB Map
I'm trying to also have access to my arrow keys from the default Vim hjkl.
Since CtrlShiftAlt seems to be a rare key combo, I was thinking about using that.
How would I do that using setxkbmap (or ...
0
votes
1
answer
5k
views
WARNING: Running setxkbmap against an XWayland server
I'm using Fedora 37, tilix terminal emulator with fish shell.
Whenever I open a terminal, I get the warning
WARNING: Running setxkbmap against an XWayland server
How come? How to avoid it?
0
votes
2
answers
257
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 ...
1
vote
0
answers
460
views
How to set keyboard layout and keep configuration?
I changed from gnome to i3wm and now everytime I log in to my computer the keyboard layout is set to english (my keyboard is spanish).
I was able to change it with this command but just for the ...
0
votes
0
answers
175
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, ...
5
votes
1
answer
4k
views
How to use setxkbmap to map keys permanently?
I'm currently using xmodmap to remap some keys, keeping my configuration in a .Xmodmap file, but every time I boot my laptop, or my screen locks, the customization is lost and I have to run xmodmap ~/....
0
votes
1
answer
924
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 ...
1
vote
0
answers
79
views
Is there an API to query setxkbmap's current layout?
A bit related to this previous question of mine, I wonder if there's a way to query what is the current layout.
Say I have run
setxkbmap -layout it,ru -variant ,phonetic -option 'grp:caps_toggle'
and ...
1
vote
0
answers
178
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 ...
1
vote
0
answers
184
views
How to keep keyboard mapping after reboot?
In order to remap my keyboard I use the following commands:
$ setxkbmap -layout fr -variant latin9 -option ''
$ setxkbmap -option ctrl:nocaps
$ printf "keycode 127 = Caps_Lock NoSymbol Caps_Lock&...
1
vote
1
answer
255
views
Use left-ctrl to swap keyboard layout?
If I want to switch between two keyboard layouts (gb and apl) by holding down the right ctrl key, I can run:
setxkbmap -layout gb,apl -variant ,dyalog -option grp:rctrl_switch
Is there anything ...
2
votes
1
answer
330
views
How to remap Caps Lock to a specific key?
By default I have the following key mapping:
$ xmodmap -pke
...
keycode 49 = oe OE oe OE leftdoublequotemark rightdoublequotemark leftdoublequotemark
...
keycode 66 = Caps_Lock NoSymbol Caps_Lock
......
1
vote
1
answer
309
views
Using setxkbmap to disable the menu key
On my Debian for Raspberry Pi, the win key pops open the desktop's main menu. This blocks all other keyboard input, so I constantly trip over it. How can I disable the menu behavior using setxkbmap so ...
3
votes
0
answers
834
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
349
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
86
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
217
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 ...
1
vote
1
answer
179
views
Remap Caps Lock generate Left and Right
I'm trying to get Caps Lock to generate Left and Shift+Caps Lock to generate Right. I would like other modifiers (not Shift) to be passed through unchanged.
I have a new laptop with tiny arrow keys ...
3
votes
1
answer
680
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 ...
0
votes
1
answer
232
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 ...
2
votes
3
answers
802
views
XKB not recognizing my custom layout
I created a custom keyboard layout (the file is called “brc”) based on Colemak for my Lubuntu 18.04, and copied it to /usr/share/X11/xkb/symbols:
default partial
xkb_symbols "basic" {
...
5
votes
2
answers
1k
views
Wrong keyboard layout even though everything in the OS seem to report correct/wanted layout - e.g. åäö becomes [';
I installed Manjaro 21.x (don't remember exact version) a few months back and I chose the Gnome flavor. As per usual I set up my OS to have two keyboard layouts (US and SE) and life was great. Then ...
0
votes
1
answer
424
views
Reassigning Right_Control from control modifier key to mod3 without using xmodmap
I am doing a task that is taking me longer than expected as xmodmap cannot be combined with other commands such as setxkbmap and so on.
My goal is to change Right_Control key from been assigned on ...
5
votes
0
answers
863
views
How to map a sequence of keys to <dead_greek>?
I have mapped Insert to Multi_key (also known as Compose) so I can input ä or µ. I've used xmodmap -e 'keycode 118 = Multi_key' in my wm init script.
Now, checking /usr/share/X11/locale/en_US.UTF-8/...
1
vote
1
answer
4k
views
How to map compose key to insert via setxkbmap?
I'm using US (non-international) layout. One way of typing üäöß is setting a compose key via:
setxkbmap -layout us -option compose:ralt
Unfortunately, this removes the normal "alt" ...
1
vote
0
answers
174
views
Keyboard conf at `/etc/profile` does not work
This is a script that I can source or run to setup my keyboard layout:
#!/bin/bash
# Testing to only apply the layout to Kinesis keyboard.
# Get Device ID with: `xinput -list | grep -i key
debug_out=/...
0
votes
1
answer
18k
views
How do I fix exit code 1 for a systemd service running inputplug?
I want to set up a systemd service to set my custom keymap when my bluetooth keyboard is plugged. I am using inputplug, as suggested here.
Since I need to have an executable command containing no ...
1
vote
0
answers
257
views
Why does setxkbmap on a single device also change other devices?
I am running Ubuntu on a Thinkpad laptop with an external keyboard linked up. The laptop keyboard has a GB layout and the external has a US layout.
First, I output a list of the connected devices (I'...
6
votes
0
answers
2k
views
Map right Alt to Ctrl key
I use Linux Mint Mate 17, which is based on Ubuntu 14.04,
and I want to map my right Alt to act as a Ctrl key
(since I can reach it with my right thumb, which is more comfortable).
How can I do that?
...