[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: International keyboard setup (xkb)



DP> I'm trying to make sense of the way X is handling the keyboard,
DP> via xkb.  I want to be able to setup something like xkbsel to
DP> switch between a latin and cyrillic keyboard.  (Cyrillic docs
DP> usually recommend using xruskb, but from what I understand, it is,
DP> as the russians might say, somewhat "otstoiniy".  Based on X11R5
DP> rather than X11R6 or something).

I assume you need russian cyrillic keybord.

Personal advice: don't use xruskb. It uses dirty hacks. xkb is a
better way.

Actually setup is very simple:

put in your XWindow config (/etc/X11/XF86Config or
/etc/X11/XF86Config-4 or simular - depends on your setup) for XFree86
3.xx:

	XkbLayout  "ru"
        XkbOptions "grp:caps_toggle"

or for XFree86 4.xx:

	Option "XkbLayout"  "ru"
        Option "XkbOptions"  "grp:caps_toggle"

It should in section for keyboard.

Also you should set locale. Set environment variable
LC_CTYPE=ru_RU.KOI8-R. Make sure that X clients get this variable. For
example on debian you can put it in /etc/environment

Thats all. You should be able to switch keyborads with CapsLock
now. If you want other variants of keyboard switches you can try use
instead "grp:caps_toggle" one of the next:

grp:toggle - switch with Alt_R
grp:shift_toggle - switch with Shift_L+Shift_R
grp:ctrl_shift_toggle - switch with Control_L+Shift_L or Control_R+Shift_R
grp:ctrl_alt_toggle - switch with Control_L+Alt_L or Control_R+Alt_R
grp:alt_shift_toggle - switch Shift_L+Alt_L or Shift_R+Alt_R
grp:menu_toggle - switch Shift+Menu (on windows keyboards)

Of course don't forget to restart X after config changes.

If you know russian I can send you link on really very good documentation
about xkb.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Reply to: