Questions tagged [keyboard-layout]

National keyboard layouts, relocating control keys, etc., generally at the operating system level. See /keyboard-shortcuts for key mappings in applications.

Filter by
Sorted by
Tagged with
90 votes
6 answers
112k views

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. ...
giuspen's user avatar
  • 1,295
76 votes
7 answers
56k views

On an Apple Keyboard under Linux, how do I make the Function keys work without the fn modifier key?

I use an Apple wired keyboard on Linux. By default the function keys (F1, F2, F3, etc) require the fn key to be pressed for them to work. Without the fn key, these keys control the features like ...
ryanlerch's user avatar
  • 925
46 votes
1 answer
45k views

Understanding window manager terminology: Mod Keys, Meta Keys, and key naming conventions

In window managers' circles, there are some technical terms; a couple of them are "Mod keys" and "Meta keys." The questions I am asking are: What exactly are those, and are they ...
r004's user avatar
  • 3,459
40 votes
7 answers
33k 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 ...
user avatar
40 votes
10 answers
37k views

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 ...
landroni's user avatar
  • 10.9k
38 votes
2 answers
14k views

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 ...
knezi's user avatar
  • 835
35 votes
2 answers
4k 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 +...
moonwalker's user avatar
34 votes
2 answers
4k views

Multiple Keyboard Layouts and Shortcuts

I configured KDE to switch easily from a bépo (french-dvorak) to an azerty layout. I configured it with the KDE interface (systemsettings), but I guess it just call setxkbmap be and setxkbmap fr. The ...
Clément's user avatar
  • 358
29 votes
2 answers
27k views

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 ...
day's user avatar
  • 465
29 votes
1 answer
5k views

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 ...
serxio's user avatar
  • 293
28 votes
3 answers
17k views

Gnome 3.22: disable alt+shift keyboard layout switching

After the latest upgrade on Debian stretch, hitting alt+shift on my keyboard make it change layout, which breaks all my alt+shift+<anything> xbindkeys shortcuts. I have disabled all shortcuts ...
iago-lito's user avatar
  • 2,751
28 votes
6 answers
17k views

KDE: how to get rid of IBus keyboard selector

Please, how to get rid of IBus service/IBus panel when running KDE? This Gnome(?) keyboard layout manager (?) can get into conflict with the layout set natively in KDE Settings. I need to switch ...
Espinosa's user avatar
  • 555
26 votes
1 answer
42k views

Save setxkbmap settings?

I'm having trouble setting my keyboard settings to swedish, running Raspbian on a raspberry pi. I've tried everything and the only thing that worked was the command setxkbmap se. But this doesn't ...
justanotherhobbyist's user avatar
25 votes
7 answers
21k views

How to change keyboard layout in gnome 3 from command line

I am using gnome 3.22.1 but problem exists since 3.18. Before that (don't remember the exact version) I was able to switch keyboard layout using xkb-witch, simple application that uses X.org bindings ...
RGBD's user avatar
  • 351
25 votes
2 answers
4k views

Select characters by holding down a key in Linux (like in OSX)

I've been wondering if there's any add on available that does something like Mac OS X. My mother tongue is Spanish, and now I live in a Francophone environment, I also do English a lot, so I'm in need ...
ximbal's user avatar
  • 1,972
22 votes
2 answers
21k views

How to define a Compose Key in terminal (no desktop environment)?

I would like to define a compose key on my system (Debian Sid "Wheezy"). I have no Xorg (and don't want any desktop environment). Only in terminal. I would like to set it up on my Alt-Gr key (right ...
cedbeu's user avatar
  • 622
22 votes
1 answer
5k views

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 ...
deprecated's user avatar
  • 2,361
21 votes
1 answer
11k views

Where do find information about xkb_symbols (i.e. dead_acute, KP_1, Delete, Down) [closed]

Where can I find a list of the xkb_symbols and their meaning? To clarify let me give some examples for xkb_symbols: dead_acute dollar Down Delete adiaeresis Adiaeresis dead_circumflex KP_0 (KP_ being ...
humanityANDpeace's user avatar
20 votes
1 answer
33k views

How to get all my keys to send keycodes

I'm using Gentoo with XFCE. I have a logitech K350 keyboard, all but a few of the keys work as expected but there is one specific key that I want to use but when I run showkey no key codes are being ...
Andrew Redd's user avatar
  • 1,289
18 votes
3 answers
20k views

How to allow for caps-lock keyboard layout change

I am using a freshly installed Ubuntu-Gnome 16.04, and I want to set caps-lock to change keyboard layout (single key, not key combination). I used to have this Linux-mint, and I grew used to it. I ...
Yotam's user avatar
  • 2,694
18 votes
6 answers
10k views

How to create lowercase pi (“π”) with compose key?

I'm pretty sure I used to be able to create lowercase pi characters using Composepi (as described on for example fsymbols.com), but it no longer works. My compose key works for other characters (like ...
l0b0's user avatar
  • 51.4k
18 votes
2 answers
15k views

How to make SysRq working on laptop?

My /proc/sys/kernel/sysrq contains the number 502, but Alt+SysRq+... seems not to work on my HP Pavilion laptop. How can I fix that? Update 1: By the way: neither my print-screen-key nor any other ...
Al Klimov's user avatar
  • 557
18 votes
2 answers
5k views

Adding custom Compose key sequences

How can one add custom Compose-key sequences? I have googled quite a bit, but could not find an explanation. In particular, I would like to have: <Compose> + <Z> + <Z> = ℤ # ...
jmc's user avatar
  • 458
18 votes
2 answers
3k views

Numpad emulation

My new laptop (Dell Inspiron 5578) has no numeric pad. Many laptops without dedicated numpad keys have numpad accessible through Fn, but not this one. When I run xev and try to use traditional Fn ...
v6ak's user avatar
  • 375
17 votes
4 answers
5k views

How to make Compose work in GTK and Qt apps?

I used Gnome for a long time, but preferred vanilla X input method (xim) over the default GTK behaviour. I just set GTK_IM_MODULE and QT_IM_MODULE environment variables to xim, and didn't have any ...
sastanin's user avatar
  • 401
16 votes
1 answer
7k views

Remapping both Caps Lock and Shift+Caps Lock in xkb

I am trying to configure xkb such that Caps Lock is mapped to the Compose key and Shift+Caps Lock functions as the traditional Caps Lock. I put the following in a new file called /usr/share/X11/xkb/...
Grant Watson's user avatar
16 votes
1 answer
7k views

How to list all currently available compose key combinations?

Is there some way to inspect the state of X to get exactly and only a list of compose key shortcuts and what they map to, either as literal keys, for example: aa å 88 ∞ or as glyph names, for example:...
l0b0's user avatar
  • 51.4k
15 votes
3 answers
5k 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 ...
nathan's user avatar
  • 271
14 votes
4 answers
29k views

How do I change currently selected keyboard layout from command line?

I have my keyboard layouts (two of them) and switching between them configured via the following command: setxkbmap -layout us,ru -option -option "grp:lctrl_lshift_toggle,ctrl:nocaps" Now I want to ...
Rogach's user avatar
  • 6,313
14 votes
3 answers
9k views

How to re-enable the caps lock key?

I am currently setting up my default keyboard layout like this: setxkbmap -layout us -variant dvorak -option ctrl:nocaps,[...] It disables the caps lock key and makes it an additional ctrl key, ...
hhaamu's user avatar
  • 2,045
14 votes
1 answer
2k views

Get the keycode of a key, from a custom made keyboard

I'm trying to transform a Minitel to a computer with a Raspberry Pi. This is a minitel: So I soldered the matrix of the minitel keyboard to a usb keyboard pcb, like this: Everything is working ok,...
xavier.seignard's user avatar
13 votes
1 answer
5k views

Relationship of keyboard layout and xmodmap

I'm using Xubuntu. Before login I can choose a keyboard layout. I'm using xmodmap for remapping some keys. I'm interested in two things: How the state of keyboard mapping changes (a) when I turn the ...
xralf's user avatar
  • 15.4k
13 votes
1 answer
9k views

How to permanently disable the Insert key on Linux?

The Insert is located right next to Backspace. So when I am using Leafpad, Gedit, etc., I hit Insert by accident often, which causes the cursor to turn into a bold box which over-writes text as I type....
User3432423423's user avatar
13 votes
4 answers
10k views

Script to toggle setxkbmap

I would like a bash script that toggles between: setxkbmap se and setxkbmap us. Then my intentions are to map that script to CtrlEsc through the Keyboard > custom shortcuts. The point is that I ...
Fredrik's user avatar
  • 133
13 votes
2 answers
4k views

Prevent keyboard layout reset when USB keyboard is plugged in

Whenever I plug in a USB keyboard, the layout of all keyboards is reset to some system default (a US layout which doesn't have modifiers and other keys the way I want them). I've observed this on many ...
Gilles 'SO- stop being evil''s user avatar
13 votes
2 answers
4k views

UTF8 math symbols & keyboard layout / input

I'd like to use UTF8 math symbols, when typing one list, another list. I've found something called ComposeKey. Unfortunately it's not covering omega, theta, right arrow etc. I am using KDE, I've ...
Grzegorz Wierzowiecki's user avatar
13 votes
3 answers
4k views

How to remap keyboard keys based on how long you hold the key

I would like to remap the keys on my number pad so that they behave differently depending on how long the key is pressed. Here's an example: If I hold the Numpad 9 key down for less than 300ms it ...
kanoko's user avatar
  • 133
13 votes
2 answers
6k views

Custom keyboard layout is reset to default after standby or reboot

I designed a keyboard layout for myself, after I run xmodmap it works OK, but after standby or reboot, the layout turn back to qwerty. How can I set it as default? My OS is Debian Wheezy with XFCE4.
Vincent Zhang's user avatar
13 votes
2 answers
8k views

how to bind AltGr to <Ctrl> + <Alt>

I am trying to create a linux equivalent of Ergonomic Telugu Keyboard layout called Sarala (Hard la). I have been able to map all the keys so far. The layout uses the following key combinations for ...
ShaggyInjun's user avatar
13 votes
1 answer
3k views

Xmodmap configuration get resetted after some time?

I wrote a simple layout changing configuration for xmodmap (Caps/Ctrl swap, and such) and stored the config to $HOME/.Xmodmap. When I run xmodmap ~/.Xmodmap everything works fine, the layout is ...
Mr_B's user avatar
  • 131
13 votes
2 answers
1k views

Using new (2019) Microsoft Ergonomic Keyboard - how to map emoji and office keys into something usable?

I bought a „Microsoft Ergonomic” keyboard to replace my used up Microsoft Natural. They moved „Win” key to the left and placed new „Office” and „Emoji” keys on the right instead: By default, those ...
Mekk's user avatar
  • 251
12 votes
3 answers
73k views

How to set default console keyboard layout in Arch Linux?

Whenever I reboot my computer, I have to set the keyboard layout in a console again with loadkeys. Is there a way to change the default keyboard layout that is loaded every time the computer boots?
starcorn's user avatar
  • 457
12 votes
2 answers
7k views

Override a few keycodes with XKB

I want to shuffle a few keys around with XKB. (Why? On a laptop where some keys are inconveniently located.) I currently use xmodmap: keycode 110 = Prior keycode 115 = Delete keycode 112 = Next ...
Gilles 'SO- stop being evil''s user avatar
12 votes
1 answer
6k views

Map Super+[Left|Right] to Home/End

How do I map key "Super" so, when combined with Left/Right, it produces keycode Home/End? My current setxkbmap: setxkbmap \ -model pc105 \ -layout 'us(dvorak-intl),us(alt-intl)' \ -option \ -...
iokevins's user avatar
  • 672
12 votes
2 answers
7k views

Tuning keyboard (dead key) functionality in X

My preferred keyboard configuration is US-International. When I use it on MS-Windows and type certain special characters (i.e., ~ ' ") followed by a, o n I get á ó or ñ as I wish. However when I type ...
camilo.forero's user avatar
12 votes
1 answer
4k 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
Caballero's user avatar
  • 438
11 votes
1 answer
5k views

Changing the keyboard layout/mapping on both the console (tty) and X in an X/console agnostic way?

I've been able to change the keyboard layout/mapping when the X Window System is running using ~/.Xmodmap (and I suppose you could also do it through the X protocol directly, eg. using libxcb as a ...
étale-cohomology's user avatar
11 votes
2 answers
12k views

Where to put `setxkbmap` command in Xfce?

What is the proper place for setxkbmap command in Xfce? What is the proper place for it in general - other DEs and bare WMs? I have the following command: setxkbmap -layout "us(colemak), ru(...
Mirzhan Irkegulov's user avatar
11 votes
1 answer
2k views

How to change the keyboard layout for a single application in Awesome WM?

I've added keyboard shortcuts to set the global keyboard layout, but how do I set it for a single application? The reason I'd like to do this is that I'm used to QWERTY for gaming, and I'd rather not ...
l0b0's user avatar
  • 51.4k
11 votes
2 answers
4k views

Mac-style option/alt key special characters on Linux

I'm on a Mac keyboard and I would prefer to have special characters available similar or the same to how they are accessed in OS X/macOS. Here is a similar question for Windows. E.g., alt+e+e → é and ...
Wolf's user avatar
  • 1,567

1
2 3 4 5
16