|
|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Valeriy E. Ushakov 2:5020/400 07 Oct 2002 20:08:03 To : Dmitry Ilyshin Subject : Re: Прикрутить переключатель раскладки клавиатуры к 4-м X. -------------------------------------------------------------------------------- Dmitry Ilyshin <sysadmin@gorono.zato.ru> wrote: > Подскажите как можно осуществить сабж. http://www.tsu.ru/~pascal/other/xkb/ Проблема в том, что XKB можно одни и те же настройки скормить N разными способами. Если готовые опции устраивают, то проще, наверное, указать их в Section "InputDevice". Section "InputDevice" Identifier "Keyboard0" Driver "keyboard" Option "XkbRules" "xfree86" Option "XkbModel" "pc105" Option "XkbLayout" "ru(phonetic)" Option "XkbOptions" "ctrl:nocaps,grp_led:caps" EndSection А если хочется странного, то написать "полную" спецификацию. Hапример: // XFree86 4.2.0 has almost all the pieces that I want, it just needs // few minor tweaks in the symbols section. default xkb_keymap "uwe" { xkb_keycodes { include "xfree86" }; xkb_types { include "complete" }; xkb_compatibility { include "complete" // use CapsLock LED to indicate alternative group include "leds(caps)" }; xkb_symbols { // Standard keyboard symbols. Already DTRT: // . right Alt is Mode_Switch (shift into alternate group) // . right Win is Multi_key (i.e. compose) include "en_US(pc105)" // TODO: add "extra" keys for // wakeup - 227 <I63> // sleep - 223 <I5F> // power - 222 <I5E> // Russian letters in phonetic mode is almost like emacs // cyrillic-yawerty, differences are taken care of below include "ru(phonetic)" // override some top-row keys to match emacs // cyrillic-yawerty layout key <AE02> { [ 2, at ], [ 2, Cyrillic_io ] }; key <AE03> { [ 3, numbersign ], [ 3, Cyrillic_hardsign ] }; key <AE11> { [ minus, underscore ], [ minus, underscore ] }; // Eliminate the caps lock key completely - turn it // into another left control. I used to use Sun and // DEC keyboards a lot, but these days I'm mostly // using PC keyboards and appreciate that I can use // the edge of the palm to press control. Who needs // caps lock, anyway. include "ctrl(nocaps)" // I'm used to Sun keyboards with Meta next to the // space bar and Alt to the left of Meta. Besides, // most Windows programs take Alt key to mean Unix' // Meta, so this arrangement is actually consistent // across Sun, Windows and XFree. key <LALT> { [ Meta_L ] }; key <LWIN> { [ Alt_L ] }; modifier_map Mod1 { Alt_L }; modifier_map Mod4 { Meta_L }; // Switching between language groups. // NB: actually the switch sequence is shift+alt // NB: this is the key *labeled* "Alt", not the left "Win" key // that generates Alt_L (see previous block) include "group(alt_shift_toggle)" }; xkb_geometry { include "pc(pc105)" }; }; SY, Uwe -- uwe@ptc.spbu.ru | Zu Grunde kommen http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen --- ifmail v.2.15dev5 * Origin: St.Petersburg University NOC (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор Архивное /ru.unix.bsd/657846fc60df.html, оценка из 5, голосов 10
|