lk/hardware/keyboard/keyboard.md

55 lines
1.2 KiB
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "keyboard"
2022-10-22 01:16:18 +00:00
tags: [ "Documentation", "keyboard" ]
2022-01-16 18:20:39 +00:00
---
2022-10-22 01:16:18 +00:00
# Set Layout with X Display
2020-01-02 00:04:35 +00:00
Set layout to British English.
> setxkbmap -layout gb
2021-05-15 14:41:45 +00:00
Or Polish with:
> setxkbmap -layout pl
2020-01-02 00:04:35 +00:00
| Language | short |
|:--------|:------|
| Polish | pl |
| Serbian | rs |
Set 'alt + shift', as the command which cycles through the British English, Polish and Serbian keyboard layout.
> setxkbmap -layout gb,pl,rs -option grp:alt_shift_toggle
2022-06-05 09:14:48 +00:00
## Alt_GR
Remap, e.g., the right Windows key, to Alt_Gr.
```
key <RWIN> {[ ISO_Level3_Shift ]};
```
2022-11-06 13:28:09 +00:00
# Set TTY Keymap
2022-10-22 01:16:18 +00:00
Copy your keymap, e.g. if it's polish-1, then:
> cp /usr/share/kbd/keymaps/i386/qwerty/pl1.map.gz /usr/share/kbd/keymaps/*custom*.map.gz
Then change that map:
2022-12-10 07:02:21 +00:00
> sudo vim /usr/share/kbd/keymaps/custom.map.gz
---
You can switch Escape and Caps Lock with a single line:
> sudo sh -c "gunzip -c /usr/share/kbd/keymaps/i386/qwerty/pl1.map.gz | sed 's/ Escape/ PLACEHOLDER/ ; s/Caps_Lock/Escape/g ; s/PLACEHOLDER/Caps_Lock/' | gzip > /usr/share/kbd/keymaps/custom.map.gz"
---
2022-10-22 01:16:18 +00:00
Change the default keyboard mapping to the custom map:
2022-12-10 07:02:21 +00:00
> echo 'KEYMAP="/usr/share/kbd/keymaps/*custom*.map.gz"' | sudo tee /etc/vconsole.conf
2022-10-22 01:16:18 +00:00
Reboot to have changes take effect.