Questions tagged [xkb]

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

383 questions
116
votes
6 answers

How to get keycodes for xmodmap?

I'm trying to use xmodmap to remap Alt / Super keys on Dell L100 keyboard, and have trouble getting the keycodes. For instance, using xev doesn't give me keycode for Alt FocusOut event, serial 36, synthetic NO, window 0x4a00001, mode…
Yaroslav Bulatov
  • 1,261
  • 2
  • 9
  • 5
94
votes
15 answers

How do I get current keyboard layout?

I'm wondering if there is any command line tool that returns the current keyboard layout. I have XkbLayout set to us, ru. Update: setxkbmap returns layout settings, not selected layout. E.g.: $ setxkbmap -print | grep xkb_symbols xkb_symbols {…
Andrew
  • 1,392
  • 2
  • 10
  • 14
90
votes
6 answers

List all valid kbd layouts, variants and toggle options (to use with setxkbmap)

Is there a way from command line to retrieve the list of all available keyboard layouts and relative variants? I need to list all the valid layout/variants choices to be used then from setxkbmap. Also about the layout toggle options, is there a way…
giuspen
  • 1,295
  • 2
  • 12
  • 14
50
votes
2 answers

Other than Alt + Shift to switch keyboard layout, any other Xorg key combinations?

All I can find about XkbOptions was: Option "XKbOptions" "grp:alt_shift_toggle" Seems I can only use alt+shift combination to switch keyboard layout, any other keys that I can use ?
daisy
  • 53,527
  • 78
  • 236
  • 383
40
votes
7 answers

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 used the following: keycode 64 = Alt_L keycode 133 =…
user24483
36
votes
1 answer

Does Wayland use XKB for keyboard layouts?

As XKB is part of X window, is it XKB used in Wayland as well? If so, is there any utility planed to replace XKB at some point? In weston, setxkbmap does not work obviously. What is the currently recommended way to change keyboard layout?
knezi
  • 815
  • 1
  • 8
  • 11
36
votes
9 answers

How to display the current keyboard layout?

Is there a utility that allows to graphically display the current keyboard layout? This can be useful, for example, when writing in a foreign language and having the physical keyboard only indicating the local language (positioning of symbols,…
landroni
  • 10,288
  • 12
  • 30
  • 48
35
votes
2 answers

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 + L and Win_L + E. In other words, for the key…
moonwalker
  • 458
  • 4
  • 4
33
votes
4 answers

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.
MiffTheFox
  • 537
  • 1
  • 7
  • 9
29
votes
2 answers

Use setxkbmap to swap the Left Shift and Left Control

Is it possible to swap the Left Shift and the Left CTRL keys using setxkbmap instead of xmodmap? EDIT I have switched to Fcitx, which works way much better with my keyboard layout and customized keymap than IBus in every respect. I highly recommend…
day
  • 465
  • 1
  • 4
  • 8
28
votes
1 answer

Shortcut keys that are independent to keyboard layout

Is there a way to define an association of a particular physical key of the keyboard to some action, independently of the letter that this key is associated to in any layout? Example: In most default Gnome shortcut key associations, pressing Alt +…
serxio
  • 283
  • 3
  • 6
26
votes
4 answers

How to prevent the caps-lock toggle effect, without remapping or disabling it?

I have an X11 program that grabs caps-lock, and uses it. The problem is, I want to disable the regular caps-lock toggling, but doing so seems to disable the key. So whatever X11 gets for a caps-lock keypress, it must still get (no disabling the key,…
Chris2048
  • 601
  • 2
  • 6
  • 11
22
votes
8 answers

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 = Caps_Lock I did, and it now I can swap esc and caps…
Dan Ross
  • 595
  • 2
  • 5
  • 14
22
votes
1 answer

Switch between numbers and symbols on caps lock

Is it possible to set caps lock to switch between inserting numbers and the symbols they normally trigger when one holds shift? e.g. when you normally press the 9 key, you get a ( unless caps lock is on. I tried adding this line to my layout file,…
deprecated
  • 2,841
  • 4
  • 24
  • 22
21
votes
3 answers

Custom xkb layout in which one key creates two unicode code points

I am writing a new custom keyboard layout for Xorg, but there is one particular glyph which does not exist in Unicode. It is, however, easy to create it by using a standard letter plus a combining diacritic mark. For example, if I want the letter v…
SigueSigueBen
  • 1,290
  • 12
  • 14
1
2 3
25 26