VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: HowTo: Add additional keybord layout  (Read 6327 times)

budulay

  • Packager
  • Vectorian
  • ****
  • Posts: 568
  • NewComer
HowTo: Add additional keybord layout
« on: April 09, 2008, 03:12:50 pm »

It is realy simple. What you need to do is:
1) Login as root
2) Go to /etc/X11/
    and make a copy of xorg.conf file to some safe place, so in case if you get something wrong, you could place it back and regain what you already have.
3) double click on the xorg.conf file (the file in /etc/X11/, not the copy)
4) scroll down untill you will see (if you have only english layout)
Quote
Section "InputDevice"
Identifier  "Keyboard0"
Driver      "kbd"
Option  "XkbLayout"  "us"    ## KEYBOARD_MAP!
Option  "XkbModel"  ""    ## KEYBOARD_MODEL!
Option  "Xkbvariant"  ""    ## KEYBOARD_VARIANT!
EndSection

5) if you need to install aditional layout( russian, for example), you need to add:
Quote
Section "InputDevice"
Identifier  "Keyboard0"
Driver      "kbd"
Option  "XkbLayout"  "us,ru"    ## KEYBOARD_MAP!                   #additional layout
Option "XkbOptions" "grp:ctrl_shift_toggle,grp_led:scroll"          #Ctrl-Shift layout switching key combination
Option  "XkbModel"  ""    ## KEYBOARD_MODEL!
Option  "Xkbvariant"  ""    ## KEYBOARD_VARIANT!
EndSection

cursive - my coments, do not add them:-)
If you need to add not a russian layout, then instead of ru you need to put your layout code. I hope someone will help you to find out, for which language which code is needed.
6) reboot
7)(optional) add keyboard layout switcher(in XFCE) at your panel: right click at the panel, add new item, keyboard layout switcher.

Thats it.

Ps.
If someone knows any other language layout codes beside ru and us, please post them here:-)
« Last Edit: March 14, 2010, 11:37:20 pm by budulay »
Logged
VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!

fuelinux

  • Member
  • *
  • Posts: 52
Re: HowTo: Add additional keybord layout
« Reply #1 on: April 10, 2008, 12:10:51 am »

budulay
Nice how-to indeed.
as for additional languages

ge = Georgian

Quote
cursive - my coments, do not add them:-)
just start your remarks with # to be safe.
Logged
Vector Linux 5.8 Standard

kukibl

  • Guest
Re: HowTo: Add additional keybord layout
« Reply #2 on: April 10, 2008, 02:23:39 am »

Ps.
If someone, knews some language layout codes beside ru and us, please post them here:-)

cs for Serbian (cyrillic), hr for Croatian and es for Spanish. :)
Logged

boneygamba

  • Member
  • *
  • Posts: 22
Re: HowTo: Add additional keybord layout
« Reply #3 on: April 10, 2008, 02:53:05 am »


Ps.
If someone, knews some language layout codes beside ru and us, please post them here:-)

thanks for the howto.
there appears to be a complete list of the keyboard layout codes in the file:
/etc/X11/xkb/rules/xorg.lst

---snip---
  us              U.S. English
  ad              Andorra
  af              Afghanistan
  ara             Arabic
  al              Albania
  am              Armenia
  az              Azerbaijan
  by              Belarus
  be              Belgium
  bd              Bangladesh
  in              India
  ba              Bosnia and Herzegovina
  br              Brazil
  bg              Bulgaria
  mm              Myanmar
  ca              Canada
---snip---

and so on. The list is long so i won't post it all here.
edit: maybe someone could just delete this post and incorporate the info into the howto if appropriate. ::)
--paul
« Last Edit: April 10, 2008, 04:23:18 am by boneygamba »
Logged

budulay

  • Packager
  • Vectorian
  • ****
  • Posts: 568
  • NewComer
Re: HowTo: Add additional keybord layout
« Reply #4 on: April 10, 2008, 10:21:45 am »

Quote
just start your remarks with # to be safe.
Thanks, I added that.
Quote
there appears to be a complete list of the keyboard layout codes in the file:
/etc/X11/xkb/rules/xorg.lst
Thanks a lot:-)

Added:
Just saw somwhere on the forum:
If you want to make layout switching combination other than Ctrl-Shift, you could find the line you should add instead of
Quote
Option "XkbOptions" "grp:ctrl_shift_toggle,grp_led:scroll"
in your /etc/X11/xkb/rules/xorg.lst file.


Added:
This keyboard layout is better for my keyboard. Maybe it will be also useful to someone..
Code: [Select]
Option  "XkbLayout"  "us,ru(winkeys)"    ## KEYBOARD_MAP!                   #additional layout
« Last Edit: March 14, 2010, 11:39:21 pm by budulay »
Logged
VL6.0-Light@MSI MS-1652(AMD TurionX2 ZM-84 2300 MHZ, 4 GB RAM, 250 GB HDD, Nvidia GForce 9600M GT, GIGABYTE AirCruiser N300)
Registered Linux user #473602
SlackBuild Repository for VL7.Not much but it's a start. Join in!