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
47
votes
5answers
36k 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. ...
33
votes
2answers
2k 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 +...
30
votes
1answer
2k 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 ...
27
votes
5answers
16k 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 ...
25
votes
1answer
20k views

Mod, Meta, Super … keys?

In Window Managers circle there are some technical terms; couple of them are Mod keys and Meta keys. The questions here I am asking are What exactly are those and are they universal across ...
25
votes
1answer
3k 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 ...
21
votes
1answer
5k 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 ...
20
votes
1answer
3k 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 ...
17
votes
3answers
8k 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 ...
17
votes
2answers
14k 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 ...
17
votes
2answers
1k 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 ...
16
votes
2answers
15k 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 ...
16
votes
1answer
18k 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 ...
15
votes
3answers
3k 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 ...
14
votes
6answers
4k 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 ...
14
votes
1answer
4k 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/...
14
votes
1answer
18k 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 ...
14
votes
3answers
3k 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 ...
13
votes
2answers
9k 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 ...
13
votes
5answers
12k 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 ...
13
votes
5answers
8k 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 ...
12
votes
1answer
3k 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 ...
12
votes
4answers
20k 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 ...
12
votes
1answer
1k 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,...
12
votes
1answer
5k 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_ ...
11
votes
2answers
2k 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> = ℤ # ...
11
votes
2answers
2k 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 ...
11
votes
1answer
898 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 ...
10
votes
2answers
3k 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 ...
10
votes
4answers
7k 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 ...
10
votes
3answers
54k views

Does the Fn Lock (FnLk) on Thinkpad T440s work well with Linux?

I'm considering to buy a Lenovo Thinkpad T440s and to install Linux on it. According to the user guide and photos of T440s, to use F1-F12 you have to hold down the Fn key, or use Fn+Esc to enable "Fn ...
10
votes
2answers
3k 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.
10
votes
1answer
7k views

Using setkeycodes to map pressed and released to different “keys”

I have a keyboard that has a scroll wheel, but it doesn't work on Ubuntu and xev command doesn't show anything when moving it. But with the dmesg command I found this: When moving the scroll wheel up:...
10
votes
1answer
728 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 ...
9
votes
2answers
6k 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 ...
9
votes
3answers
6k 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, ...
9
votes
1answer
3k views

Create and set custom keyboard layout

I want to create and set a custom keyboard layout with setxkbmap. I created a file in ~/.xkb/prog with this content: partial default alphanumeric_keys xkb_symbols "basic" { include "latin(type4)" ...
9
votes
1answer
2k 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
9
votes
3answers
1k 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 ...
9
votes
3answers
845 views

How to allow chords of keyboard keys to change the keymap temporarily?

I have really gotten used to the "Simultaneous Vi Mode" functionality of KeyRemap4MacBook which lets you press and hold the s and d keys simultaneously and then use the h, j, k, and l keys as the ...
9
votes
2answers
4k 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 ...
9
votes
1answer
1k 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 ...
8
votes
5answers
866 views

Insert both characters if a dead key combination is not recognized (e.g. 'a → á, 'b → 'b)

When I use any variation of English, US international (with dead keys,altGr dead keys or alternative) on my Linux Mint machine I always encounter this behaviour. When I press one of these keys: ' " ...
8
votes
3answers
5k 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 ...
8
votes
2answers
4k 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 ...
8
votes
1answer
939 views

Why does showkey show a different keycode compared to xev?

Looking for an answer I came across this question. There's something like this: The keycode X uses and the keycode the kernel uses are OFF BY 8 for "historical reasons". So take 97 - 8 = 89 and use ...
8
votes
2answers
1k views

How to map a console keyboard layout to a X keyboard layout in Linux

In my distribution (Slackware 13.37), the console keyboard layout is chosen among some of those available in /usr/share/kbd/keymaps ' sub directories, coming from the kbd package. Under X instead ...
8
votes
1answer
3k views

How to set keyboard layout used to enter password on an encrypted filesystem?

After my upgrade to Debian 6 (Squeeze), the keyboard layout used to enter the password of encrypted filesystem has been changed. How can I revert it back to previous one? My understanding is that, ...
7
votes
2answers
37k 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?
7
votes
2answers
15k views

In Fedora, how do I select a proper Norwegian keyboard layout?

I just installed Fedora 19 in VirtualBox using an image from virtualboxes.org. However, I'm unable to select a proper Norwegian keyboard. When I open the keyboard layout, it shows an US layout. A ...