xkb is the abbreviation for the X Keyboard Extension used to describe and configure differ keyboard layouts, etc. under X11.

learn more… | top users | synonyms

4
votes
1answer
1k views

setxkbmap switches between 2 out of 3 layouts

Issuing that command: setxkbmap -layout "us,ua,ru" -variant ",winkeys" -option "grp:shift_caps_toggle,grp_led:scroll" -model pc105 -rules xorg When hitting Caps Lock+Shift I'm switching between ...
4
votes
1answer
1k views

xorg.conf XkbOption ignored for terminate:ctrl_alt_bksp to restart X

I want Ctrl+Alt+Bksp to restart X, so I created an xorg.conf rule: /usr/share/X11/xorg.conf.d/53-zap.conf: Section "ServerFlags" Option "DontZap" "false" EndSection Section "InputClass" ...
2
votes
1answer
34 views

How can I change an underutilized keyboard key into a modifier key

I have a Korean keyboard that looks like this: Hanja (한자), just to the left of space, is so little utilized even when typing in Korean, yet it's in prime real real estate for my left thumb as an i3 ...
1
vote
0answers
19 views

xbindkeys/xkb map ctrl shortcut

I have installed colemakwide(xkb) and would like to keep shortcut like ctrl+s etc. The goal is that all ctrl shortcut behave like QWERTY which I did in windows/klc by have the original vk for the keys....
7
votes
4answers
4k views

Swap alt and super

I have a Macbook Air that runs Linux. I want to swap the alt and super keys in both sides of the keyboard with each other. How do I do this with cli tools? Update Following Drav Sloan's answer I ...
3
votes
1answer
30 views

How can I autoload xkb customisations in GNOME?

Following up on my question about customising key mappings in Wayland I've found out that xmodmap is apparently deprecated, but xkb "should work" in Wayland. Unfortunately, xkb is much more ...
5
votes
4answers
3k views

How can I make Ctrl + Alt act like Alt gr in Ubuntu?

I recently switched to Ubuntu on my laptop and one thing that almost got me to switch back to windows is the fact that I can't make Ctrl + Alt to act like Alt gr. I have programmed in several years ...
0
votes
1answer
21 views

setxkbmap il and then setxkbmap us: How to switch back keyboad layout to English after changing keyboard layout to some other language

I do this setxkbmap il on my xterm and then do my stuff in my local language layout. When done, I want to switch back to English layout with setxkbmap us but I cannot type English in my xterm. What ...
3
votes
1answer
29 views

How can I list all layouts and corresponding variants that don't use 3rd level symbols?

I need to list all possible xkb layouts and their respective variants that do not use 3rd-level symbols. Manually review of all files in /usr/share/X11/xkb/symbols/ directory is crazy, there maybe an ...
3
votes
0answers
39 views

Xfce Keyboard Layout change Ctrl+Space

Ok, so I've been googling this for almost a week now...without any luck. When I open the Keyboard settings pane, the options are only limited to (ones that have "Space" in them) Alt+Space and Super+...
0
votes
1answer
27 views

How can I add an include line to an XKB configuration file?

I do which just add a ralt_switch to English(Dvorak-US) keyboard sudo sed -i "249i\ include 'level3(ralt_switch)'" \ /usr/share/X11/xkb/symbols/us sudo dpkg-reconfigure xkb-data ...
2
votes
2answers
353 views

How to bind super key to Ctrl+Shift using xmodmap? [duplicate]

I have read the xmodmap documentation. I could only find information on how to bind one key to another. How do I bind one modifier key to a combination of other modifier keys? Can I do this using ...
2
votes
0answers
16 views

How can I stop using setxkbmap groups from snagging modifier keys?

I have several different keyboard maps that I can switch between to my heart's content using: setxkbmap dvp Then when I want another one: setxkbmap ptf Etc. This works, but I'd rather use the ...
4
votes
3answers
393 views

How do I bind AltGr+key to a symbol?

I want to bind AltGr+W to æ, and some other combinations, how can I do this? I also need AltGr+Shift+W to Æ. I normally use setxkbmap to change the keymap.
9
votes
3answers
2k views

Remapping power key to delete

I have a macbook pro running Ubuntu 13.10 with FluxBox. Unfortunately, the power button is physically above the backspace where I would expect the delete key to be in. In OS X, the PowerKey program ...
1
vote
2answers
41 views

XKB: assign multiple keycodes to one behaviour (<ESC>)

I have a new bluetooth keyboard, and for some reason the keycode that the escape key returns is 172 instead of 1 (according to 'showkey'; the same codes have 8 added in xkb, so 180 instead of 9). By ...
2
votes
2answers
1k views

Setxkbmap turns off NumLock LED - but not NumLock

Whenever I use setxkbmap in a terminal (or my .bashrc), the next time I press any modifier keys (ctrl, shift, alt) the NumLock LED on my keyboard goes off, but NumLock itself is still active so it's ...
1
vote
1answer
137 views

Remapping space + ijkl to arrow keys

I want to set my keyboard so that pressing space and releasing will emit a "normal" space, but holding space and pressing one of i/j/k/l will emit an arrow key. Is it possible to do that? Thanks!
1
vote
1answer
93 views

convert .Xmodmap to custom.xkb file and load it from $HOME directory - customize x keyboard [duplicate]

I use the following .Xmodmap file to map a few symbols and German Umlaute öäü: keycode 108 = Mode_switch keycode 13 = 4 dollar EuroSign keycode 19 = ...
1
vote
0answers
15 views

some xkb option fails under Gnome

I'd like to ask a question about xkb settings. Consider the following scenario. I want two keyboard layouts and a way to easily switch between them. Let's consider US and US(dvorak). To switch I ...
2
votes
2answers
39 views

How to make xkb settings stick after restart [duplicate]

I'm running Ubuntu 15.10. I'm running the following command in the terminal to swap the left Alt and left Control keys: setxkbmap -option ctrl:swap_lalt_lctl. It works, but as soon as I reboot It's ...
0
votes
0answers
88 views

How to swap left Alt and left Control in Ubuntu 15.10

I'm trying to swap left alt for left control so that I can use the same keyboard commands at home on Ubuntu that I use at work on OS X. I found a great post on this site about how to switch left SHIFT ...
2
votes
0answers
36 views

Map ctrl+key different from typing key in xkb or xmodmap

Is it possible to map ctrl+key different from regular typing key in linux? I have done it in windows with MSKLC but can't figure out how to do it in linux. E.g. I want to type dvorak but have regular ...
4
votes
0answers
51 views

Multiple modifier layers with XKB (on a japanese keyboard)

I have the following keyboard (HHKB JP). I'm using Lubuntu 14.04, and I've edited /usr/share/X11/xkb/symbols/us to implement a custom layout. Now, I want to use the following keys as 5th, 6th, 7th,...
0
votes
0answers
30 views

Alternative to `xkbcomp`?

In Getting and setting XKB layout, section Using keymap (xkbcomp) is marked as deprecated. What is the alternative then? (example method in section Using rules is not sufficient).
1
vote
0answers
60 views

setxkbmap -option lv3:ralt_switch_multikey doesn't work with many layouts

My current xkb setup is as follows: $ setxkbmap -query rules: evdev model: pc104 layout: us,cz(qwerty) options: lv3:ralt_switch_multikey,grp:lalt_lshift_toggle When in the us ...
1
vote
0answers
15 views

Using overlay feature much like a shift

Using XKB, how could I make the keyboard send the keysym <RTRN> when I press Ctrl-J? The goal is to make sure that every program recognizes this key combination. I know there are overlays. But ...
2
votes
0answers
42 views

GTK_IM_MODULE=xim breaks dead keys in GTK and QT applications

I'm using XIM to have the compose key take into account my ~/.XCompose file (it's the only input method that takes it into account, all the others I tried use hard-coded tables). However, it is ...
2
votes
0answers
15 views

alt-shift toggles keymap when part of a shortcut

I have two xkb layouts, and use Alt+Shift to toggle between them: setxkbmap "fr,us" -option grp:alt_shift_toggle However, when I press a shorcut which contains Alt+Shift, the shortcut isn't taken ...
5
votes
1answer
52 views

Use xkb to make shift insert parenthesis

I'm trying to imitate the setup I had on OS X (via Karabiner): Pressing the left Shift on its own key inserts a left (, but holding it down and pressing another key acts as a normal Shift key (and ...
1
vote
1answer
39 views

How to change keyboard settings of the active user using udev and setxkbmap?

I have a usb keyboard that I plug in into my desktop at work. While using it tend to manually set the following setxkbmap option: setxkbmap -option compose:ralt setxkbmap -option ctrl:swap_rwin_rctl ...
5
votes
2answers
605 views

Fully Disable PrntScr Key

I recently came across a Linux feature I have never seen before, where pressing the PrntScr button on the keyboard prints a physical piece of paper with the contents of my console. I really need to ...
3
votes
2answers
256 views

How remap my CapsLock key to work as if it was a Return key using setxkbmap?

I tried several things: setxkbmap -option caps: return setxkbmap -option caps: enter I also tried to modify the file /usr/share/X11/xkb/symbols/pc by: "Key <CAPS> {[Enter]};" But nothing ...
22
votes
0answers
893 views

Remapping keys that generate multiple scan codes

I have a ThinkPad W540. On its keyboard there are four multimedia keys above the numpad. Two of those keys generate keycodes (and, apparently, scancodes) that correspond to combination of keys, Win_L +...
1
vote
0answers
155 views

Adding a custom keyboard layout (and setting it as the default)

I'm on Arch Linux with i3, and I'm trying to create a personalized layout with IPA (International Phonetic Alphabet) symbols for use in linguistic research. I'm also using iBus for Chinese language ...
1
vote
1answer
48 views

Map F2 to replace the 2 key – also with Shift and Alt combination – in Lubuntu 14.04.3

I run a Danish keyboard layout in Lubuntu 14.04.3. The 2 key is malfunctioning (hardware problem). I wish to replace its use by the key F2. The F2 key value (i.e., the F2 key-press event) will then ...
7
votes
1answer
69 views

XKB multi-layout layout specific Capslock behaviour oddity

I have two custom keyboard layouts, one a modified version of the us (which I have called vi,) one a modified version of the dk (which I have called da.) Both are registered properly, and work. After ...
1
vote
1answer
87 views

Unable to add a keyboard layout on Cinnamon

I'd like to try the Polish Colemak layout. It's built into xkb: /usr/share/X11/xkb/rules $ grep -ri 'Polish (Colemak)' * base.extras.xml: <description>Polish (Colemak)</...
2
votes
1answer
19 views

How to set the keymap for keyboards that are plugged in later?

I have configured my keyboard layout by adding a call to setxkbmap to my .xinitrc. This works for my laptop's internal keyboard and for any external keyboard that is plugged in when the X server ...
5
votes
6answers
5k views

Map Caps Lock to Control in Linux Mint

I am running the latest version of Linux Mint with Cinnamon. I'm trying to map CapsLock to Ctrl, but I cannot figure out how to do it. All web searches i've done has lead me to older versions of Linux ...
1
vote
0answers
64 views

How do I emulate a virtual keyboard with an arbitrary character set?

I am writing a couple applications that change how your keyboard works. (One that allows key-chording, and another that allows you to say syllables out loud to type individual characters.) The "...
1
vote
0answers
41 views

How do I get a list of keys currently loaded with XKB?

I am writing an evdev-reliant daemon that needs to know the complete keyboard layout currently in use. Getting the properties of the current XKB layout is easy. You just use setxkbmap -query or ...
1
vote
1answer
31 views

Where do I edit the keyboard “system settings” these days?

The last time I manually edited keyboard settings was sometime last decade. There days it looks like things have have changed. Now, when I use the Keyboard layouts dialog in XFCE or LXDE, I can either ...
4
votes
1answer
44 views

xkb: how toggle keyboard layout with win + capslock?

I want to set custom shortcut to change keyboard layout using setxkbmap. For example win_caps (Win+CapsLock). This option is not listed in /usr/share/X11/xkb/rules/base.lst How can I achieve this?
2
votes
1answer
43 views

Using xkb to remap quote and Right Control

On a standard US keyboard, I've swapped Caps Lock and Left Control, which is almost essential for proper Emacs usage. For symmetry, I'd like to swap ' (the quote key) to Right Control. xkb seems like ...
6
votes
3answers
5k views

How to permanently swap esc and caps lock in xfce / xubuntu?

I followed some post a while ago, and it said to make an ~/.xmodmap file like so: ! Swap caps lock and escape remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape add Lock = ...
12
votes
2answers
4k views

How to remap the Context Menu key to the Super key

This keyboard has only one super key, so I want to remap the menu key to make up for that.
5
votes
1answer
593 views

xkb: make ctrl+backspace behave as delete

How can I map Ctrl+Backspace to behave as Delete key with xkb? I can remap a single key on /usr/share/X11/xkb/symbols/pc but can't figure out how to do the combination. My OS is Ubuntu 15.04
2
votes
1answer
450 views

Remap altgr key to AC10 in XKB

I'd like to remap the altgr key to AC10 key. So far, I edited /usr/share/X11/xkb/symbols/us as follows: // key <AC10> { [ semicolon, colon ] }; key <AC10> { [ Alt_R ]} After $ ...
2
votes
2answers
1k views

How do you configure numpad keys using XKB?

I haven't figured out how you configure XKB to use the numpad yet. I found the following in the "us" file. partial alphanumeric_keys modifier_keys xkb_symbols "basic" { name[Group1]= "USA"; ...