19
votes
How to change keyboard layout in gnome 3 from command line
Since gnome-shell exposes a JS eval interface on DBus which has access to all variables, the feat is possible with the following command:
gdbus call --session --dest org.gnome.Shell \
--object-path /...
19
votes
Accepted
Changing the keyboard layout/mapping on both the console (tty) and X in an X/console agnostic way?
Yes, there is a way, and this is indeed how Debian's console-setup package does it.
Keyboard layouts are specified in XKB terms (model, layout, variant, and options) by the administrator in a file ...
19
votes
Accepted
How can one create a custom keyboard layout for Linux?
You can edit keymaps with XKeyCaps. On the upside, XKeyCaps is a GUI and it's very mature. A downside of XKeyCaps is that it's only a front-end to the old-style X window keymap interface, xmodmap, and ...
19
votes
Accepted
What does "level" of a key mean in keyboard settings?
Level 1: no modifications (e.g. pure a)
Level 2: usually Shift (e.g. shift+a -> A, so the character A is level 2 of the a-key)
Level 3: usually AltGr (e.g. AltGr+a -> æ, so character æ is level ...
15
votes
On an Apple Keyboard under Linux, how do I make the Function keys work without the fn modifier key?
For anyone stumbling upon this thread using one of the newer MacBook Pros (2016 and later) which need the applespi driver to make the keyboard and touchpad work, here's how to make this work, as I ...
14
votes
How to add additional keyboard layouts in Manjaro?
Open System Settings, choose "Input Devices", click on "layouts", add any language you want, and see the "alternate shortcut" you can change as you want and when you click the shortcut keys you choose....
11
votes
Use setxkbmap to swap the Left Shift and Left Control
I ran into some issues mapping LALT to Control_L using Pablo's solution, it appears you need to set the modifier_map options as well.
I copied a template from /usr/share/X11/xkb/symbols/altwin - ...
10
votes
How to display the current keyboard layout?
Selecting the current layout with gkbd-keyboard-display is possible like so:
#! /usr/bin/env fish
set layout (setxkbmap -query | grep layout | tr -s ' ' | cut -d ' ' -f2)
set variant (setxkbmap -...
9
votes
Accepted
How To Reload xserver After a Change in Keyboard Layout?
From here:
To apply new [keyboard] settings, restarting the keyboard-setup service should suffice, otherwise you can try to restart kernel input system via udev:
udevadm trigger --subsystem-match=...
9
votes
How to change keyboard layout in gnome 3 from command line
If you are using IBus as your input method (which is a likely default), you can change your input using the ibus command:
# Set the layout to US English
ibus engine xkb:us::eng
# Set the input method ...
9
votes
Keyboard Layout with Sway on Fedora (Wayland)
In newer versions of sway you can simple put the following lines in your config file:
input * xkb_layout "de" # German keyboard layout
input * xkb_options "caps:escape" # Make Caps Lock an additional ...
9
votes
Accepted
How do I use MacOS keyboard layout on Ubuntu 20.04?
By far the easiest solution for this is installing Kinto that is made for exactly this: https://github.com/rbreaves/kinto#how-to-install-linux
It not only remaps the Ubuntu keyboard layout to match ...
8
votes
How to make a ISO_Level4_Shift and Lock in xkb?
It's possible but a bit hacky. No specific keysyms are already defined. ISO_Level3_{Shift,Latch,Lock} (and the same three for level5) are defined in X11 and libxkbcommon headers at compile time.
At ...
8
votes
How to change keyboard layout in gnome 3 from command line
You can set up and switch to an input method on the command line even if you have not previously set up that input method with the mouse:
gsettings set org.gnome.desktop.input-sources sources "[('xkb'...
8
votes
Caps Lock behavior under Sway / Wayland
Put the following in your sway config:
input "type:keyboard" {
xkb_options caps:ctrl_modifier
}
Source: https://github.com/swaywm/sway/wiki#keyboard-layout
UPDATE: the OP asks for "...
8
votes
KDE: how to get rid of IBus keyboard selector
There is an easier way to prevent irritations while also keeping Zoom and ibus installed: Just instruct ibus to use your XKB keyboard layout.
Right-click the ibus widget, go to Preferences -> ...
7
votes
How to display the current keyboard layout?
You can use xkbprint to print the current layout.
For example to print the current layout as PDF use
xkbprint -color "${DISPLAY}" - |\
ps2pdf - > current_keyboard_layout.pdf
which produces:
7
votes
Accepted
How to allow chords of keyboard keys to change the keymap temporarily?
So after four years, I finally have a rough draft of an answer to this question. The answer is to use Interception Tools which uses libevdev to grab keyboard input and do processing on it before re-...
7
votes
How to get the keybind on a keyboard's special FN key? Showkey and xev can't find it
This is not possible. The Fn key is handled by the keyboard, not by the operating system, which is not even aware of the existence of the Fn key. As far as the OS is concerned, End and Fn+End are two ...
7
votes
Accepted
Trying to add the Latin American Spanish keyboard layout on IBus for Debian Bulleye in MATE, but I only get Spaniard Spanish
UPDATE 2. This issue seems to be fixed in IBus 1.5.27.
As this commit shows, the offending line xkb:latam:*:* has been deleted from engines/denylist.txt, which now allows for Latin American layouts to ...
6
votes
Accepted
How do FOUR_LEVEL_SEMIALPHABETIC xkb keys work?
What's with this LevelThree business?
In the model expounded by ISO/IEC 9995, which is the international standard (set) that covers computer keyboards, keys can have one or more levels. What you may ...
6
votes
Typing dead key after base letter
One option is to use Compose mode
Revert to your standard keyboard, rather than the US keyboard with deadkeys
Enable compose mode. I happen to like Alt Gr as my compose key
To enter a letter with a ...
6
votes
Accepted
KDE: how to get rid of IBus keyboard selector
I had a similar issue, though possibly slightly different as I don't intend to keep using Gnome.
Removing ibus-gtk, ibus-gtk3, ibus-gtk3-32bit, ibus-lang, and ibus (all ibus-related packages on my ...
6
votes
Accepted
Keyboard mapping
@rastafile's answer sent me down the right track for finding the solution to this.
https://medium.com/@damko/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450
The above excellent ...
6
votes
Accepted
How to toggle keyboard layout in Sway from the shell?
Using sway version 1.5.1, I can provide next to xkb_switch_layout. So you no longer need to get the current index and number of total items.
swaymsg input "1:1:AT_Translated_Set_2_keyboard" ...
6
votes
Accepted
Why are names for Super, Meta and Hyper keys still in use?
The main reason the names persist is probably that they are preserved in the X11 protocol definitions:
#define XK_Meta_L 0xffe7 /* Left meta */
#define XK_Meta_R ...
5
votes
How to get current keyboard layout from the command line?
The reason you didn't find a solution is that there isn't one. There is no such thing as “the current keyboard layout”, if by this you mean something like “US QWERTY layout”. The keyboard layout doesn'...
5
votes
Modifying Keyboard Layout in Wayland
As I've stated in my question, there is already xkb which already has alot options for modifying the keyboard. It wasn't an option for me because the only option to modify the printscr key, replaced ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
keyboard-layout × 818keyboard × 193
xkb × 189
x11 × 170
keyboard-shortcuts × 150
linux × 75
xorg × 63
xmodmap × 63
arch-linux × 52
debian × 51
ubuntu × 47
gnome × 41
console × 35
linux-mint × 28
kde × 27
wayland × 27
fedora × 25
xfce × 23
setxkbmap × 18
input-method × 17
terminal × 16
manjaro × 15
cinnamon × 15
ibus × 15
i3 × 14