5

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 named keyboard, usually /etc/default/keyboard. This is the single source. It can be edited with a text editor. The setxkbmap program is given these same XKB ...


3

If “num lock turned on by default” means “keys on the numpad by default” and you don’t want/don’t care about navigation on the keypad: setxkbmap -option numpad:mac <layout> So for the us layout: setxkbmap -option numpad:mac us Now the numpad always enters digits, no matter the num lock state. Reference: xkeyboard-config man-page


2

Instead of Shift + Spacebar, I used Alt Gr. Based on the accepted answer to this question, I created a keyboard layout based in the English (UK). If your keyboard is not English UK you might have to change the key codes in the file. This keyboard layout maps the arrow keys to alt gr + s = left alt gr + d = down alt gr + f = right alt gr + e = up alt gr + ...


2

If you run setxkbmap and then the keybinding works, you can execute the command when you start the session. This works for me in Openbox: i've included the command in ~/.config/openbox/autostart: setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:­scroll latam,ru You can change the keys combination of course. The full list: grep "grp:.*toggle" /usr/...


2

I set my keyboard layout with XKB (specifically … | xkbcomp - "$DISPLAY") when I log in. How can I prevent a keyboard hotplug from resetting the keyboard layout and the repeat rate? It's not that it resets it. If you already have a keyboard plugged in, and are adding a second one, the old keyboard will continue to use the same settings. The problem is ...


2

~/.bashrc will only be run when you open a terminal emulator. To have it run automatically at login you will want to have it elsewhere (depending on how you login). For me, this would be in ~/.xinitrc. Per the debian wiki: Graphical logins do not read a shell's startup files (/etc/profile and ~/.profile and so on) by default, but you as a user may choose ...


2

That's curious; it's the Right Alt which is AltGr and should generate such characters, but no file under /usr/share/X11/xkb seems to map AltGr+x to ø. I suspect that you're running emacs in a terminal emulator -- in which case you should let the terminal emulator map Alt to Esc instead; in xterm, you can do that with *.vt100.metaSendsEscape: true If you'...


2

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:


2

kbd -l reads from /dev/wskbd%d (for all available integers %d, 0 to 3 on my OpenBSD 6.4 system). These devices are readable only by root, so you would have to use doas kbd -l to get anything back as an ordinary user, provided you have configured doas, or by using kbd -l as root by other means. The Dvorak-related encodings I can see are fr.dvorak us....


2

Keyboard maps and the applications themselves As should be clear from the Q&A that you referenced, the recognition of the actual key chords comes down to what is programmed into keyboard maps. Furthermore, there are two different keyboard maps involved, as evidenced by the fact that there are two different sets of chords. The X11 server has its own ...


2

On Debian, to set up the keyboard (and font) on VTs not running X, you should run setupcon. To reconfigure the default keyboard, and set it up, you should run dpkg-reconfigure keyboard-configuration. setupcon can use multiple variants of its configuration files, which would allow you to quickly switch between keyboard layouts. The system’s keyboard ...


1

You can use xmodmap to swap Escape and Caps Lock on any DE. First create a file with the following contents: remove Lock = Caps_Lock keycode 0x42 = Escape keycode 0x9 = Caps_Lock add Lock = Caps_Lock Let's suppose it is saved as swapkeys. Run the following command to swap the keys: xmodmap swapkeys -display :0 assuming $DISPLAY is :0. You can add the ...


1

Nothing determines "how Fn keys are mapped to X sessions and TTY" Ctrl+Alt+F1 always maps to console terminal 1 (tty1) Ctrl+Alt+F2 always maps to console terminal 2 (tty2) and so on. Now what changes it what runs on those consoles. And that's very dependent on the OS, and the configuration, and how things are started. So, for example, on CentOS6 the /...


1

how to set it back to br using the Russian characters? why not add: alias вернуть-раскладку='setxkbmap -layout br' or any other alias typed with Russian characters to your liking to ~/.bashrc?


1

It might be built into the application (emacs itself, or a terminal if you're using "emacs -nw"). xterm does this, for instance (as documented originally in the eightBitInput resource, or later, in metaSendsEscape), and some other programs (such as st) copy it. The feature was implemented in xterm in 2003: modify handling of eightBitInput resource in ...


1

Put the following in your sway config: input <identifier> { xkb_options caps:ctrl_modifier } where <identifier> is the identifier for your keyboard input device, which can be obtained by running swaymsg -t get_inputs. Source: https://github.com/swaywm/sway/wiki#keyboard-layout UPDATE: the OP asks for "Caps lock is an Escape but is a ...


1

Make a directory tree under /home/<user>/ which has the same structure as /usr/share/X11/xkb/. In other words: $ tree -L 1 . ├── compat ├── geometry ├── keycodes ├── rules ├── symbols └── types So put the relevant files in compat, symbols, etc. You obviously don’t need to make empty directories, just the directories for the files that you need. ...


1

I and up writing my own compose file to mimic OSX, here it goes to help someone in need. Note that this is the main used speacial chars for Brazilian Portuguese, maybe you have other need but it's easy to add your own keys. Create a .XCompose file on your home with the following content: #this include all the default compose keys on the file include "%L" &...


1

To remap the keyboard in KDE Plasma, Open the start menu Search for "Keyboard" Open the application the icon titled "Keyboard" Switch to the "Advanced" tab Look for "Ctrl position" Open the drop down menu and select "Swap Left Win with Left Ctrl" Click Apply This might work. I don't use that keyboard but from what I can tell command is the windows key.


1

use xkblayout-state $ xkblayout-state print "Current layout: %s(%e)" Current layout: us(us)


1

I've tried without success: KeyboardLayout= Spanish It work's with capital letters: KeyboardLayout= SPANISH Thanks for @ferranm for you answer it guided me. Pd: tested on Linux raspberrypi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l GNU/Linux


1

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. It will switch between the languages ​​you have added


1

In my case I'm using Ubuntu 18.04. I was able to solve this problem by re-configuring my keyboard setting: $ sudo dpkg-reconfigure keyboard-configuration


1

For those who get access denied and could not simply prefix "sudo" use: sudo nano /sys/module/hid_apple/parameters/fnmode Change it to 2 or whatever and then Ctrl+X to save.


Only top voted, non community-wiki answers of a minimum length are eligible