You are not logged in.

#1 2015-04-02 08:30:29

Dowefu
Member
Registered: 2014-03-25
Posts: 68

Toggle layout in the virtual console

How can I set a keyboard shortcut to change a layout from one to another in the virtual console?

Offline

#2 2015-04-02 09:11:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Toggle layout in the virtual console

Keyboard layout? You can create an alias.
If there's a way of specifying multiple layouts and toggling between them, it should be in the man page.

Offline

#3 2015-04-02 11:21:11

Dowefu
Member
Registered: 2014-03-25
Posts: 68

Re: Toggle layout in the virtual console

1. Choose a keymap, which contains two desired layouts and specifies a shortcut to toggle them, from `/usr/share/kbd/keymaps/i386/qwerty/`;

2. Open `/etc/vconsole.conf`;

3. Set the `KEYMAP` directive equal to your choosen keymap;

4. If one of the choosen layouts contains non-latin characters, it needs to set the corresponding font in the `FONT` directive. Fonts are choosen from `/usr/share/kbd/consolefonts/`.

Example:

# /etc/vconsole.conf
KEYMAP=ruwin_alt_sh-UTF-8 # a keymap which supports typing latin and russian cyrillic characters;
                          # it also allows to toggle layouts by pressing ALT-SHIFT

FONT=UniCyr_8x16          # A font with cyrillic characters

Last edited by Dowefu (2015-04-02 11:27:45)

Offline

#4 2015-07-31 11:17:20

budkin
Member
Registered: 2015-01-24
Posts: 15

Re: Toggle layout in the virtual console

karol wrote:

Keyboard layout? You can create an alias.
If there's a way of specifying multiple layouts and toggling between them, it should be in the man page.

If it's possible on Debian why is it not possible on Arch?

Last edited by budkin (2015-07-31 11:37:16)

Offline

#5 2015-07-31 12:18:07

budkin
Member
Registered: 2015-01-24
Posts: 15

Re: Toggle layout in the virtual console

Ok, now I almost know how it's done. It has something to do with the ckbcomp program which makes different layouts, and then you just put the name of the compiled layout to vconsole.conf. I don't know how to compile two layouts into one file yet. Here is an example for Russian-US layout using caps lock as a switcher https://cloud.mail.ru/public/b5ad550890 … F-8.map.gz

This certainly needs to be on the wiki

UPDATE: Sorry, broken link, I didn't check it before posting. In order to set toggling between Russian and US layouts to caps lock, you need to issue "loadkeys ruwin_cplk-UTF-8" or set this option in vconsole.conf

Last edited by budkin (2015-07-31 12:34:18)

Offline

Board footer

Powered by FluxBB