KKBSwitch – keyboard layout indicator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.docbook 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN"
  3. "dtd/kdex.dtd" [
  4. <!ENTITY kkbswitch '<application>KKBSwitch</application>'>
  5. <!ENTITY kapp "&kkbswitch;"><!-- replace KKBSwitch here -->
  6. <!ENTITY kkbswitchVersion '1.4.3'>
  7. <!ENTITY % addindex "IGNORE">
  8. <!ENTITY % English "INCLUDE"><!-- change language only here -->
  9. <!-- Do not define any other entities; instead, use the entities
  10. from kde-genent.entities and $LANG/user.entities. -->
  11. ]>
  12. <!-- kdoctemplate v0.8 October 1 1999
  13. Minor update to "Credits and Licenses" section on August 24, 2000
  14. Removed "Revision history" section on 22 January 2001 -->
  15. <book lang="&language;">
  16. <bookinfo>
  17. <title>The &kkbswitch; Handbook</title>
  18. <authorgroup>
  19. <author>
  20. <firstname>Leonid</firstname>
  21. <surname>Zeitlin</surname>
  22. <affiliation>
  23. <address><email>lz@europe.com</email></address>
  24. </affiliation>
  25. </author>
  26. </authorgroup>
  27. <!-- TRANS:ROLES_OF_TRANSLATORS -->
  28. <copyright>
  29. <year>2002, 2003, 2004, 2005</year>
  30. <holder>Leonid Zeitlin</holder>
  31. </copyright>
  32. <legalnotice>&FDLNotice;</legalnotice>
  33. <date>23/01/2005</date>
  34. <releaseinfo>&kkbswitchVersion;</releaseinfo>
  35. <!-- Abstract about this handbook -->
  36. <abstract>
  37. <para>
  38. &kkbswitch; is a keyboard layout indicator for &tde;.
  39. </para>
  40. </abstract>
  41. <keywordset>
  42. <keyword>KDE</keyword>
  43. <keyword>KKBSwitch</keyword>
  44. <keyword>keyboard</keyword>
  45. <keyword>layout</keyword>
  46. <keyword>indicator</keyword>
  47. <keyword>XKeyboard</keyword>
  48. </keywordset>
  49. </bookinfo>
  50. <chapter id="introduction">
  51. <title>Introduction</title>
  52. <para>
  53. &kkbswitch; is a keyboard layout indicator for &tde;. It is useful when
  54. you have configured the XKeyboard extension of your X Server to have more than
  55. one keyboard group (layout), for example US/ASCII and Russian. &kkbswitch;
  56. displays an icon in the system tray that indicates which layout is currently
  57. active. Note that &kkbswitch; does not help you configure XKeyboard, it merely
  58. serves as the indicator of the current layout. You still have to configure
  59. XKeyboard by editing the <filename>XF86Config</filename> file.
  60. </para>
  61. <para>
  62. Please report any problems or feature requests to the Trinity Desktop Environment project.
  63. </para>
  64. </chapter>
  65. <chapter id="using-kapp">
  66. <title>Using &kkbswitch;</title>
  67. <para>
  68. The most basic usage is simply to let it sit in the system tray and show you
  69. which keyboard layout is currently active. You can also click the KKBSwicth
  70. system tray icon to switch keyboard layouts. When right-clicked, the system
  71. tray icon displays a menu with the following entries:
  72. </para>
  73. <itemizedlist>
  74. <listitem><para>
  75. One or more entries corresponding to the configured keyboard layouts.
  76. Note that XKeyboard can have up to 4 layouts configured. The currently active
  77. layout will be checked. Selecting a menu entry corresponding to a layout will
  78. make that layout active.
  79. </para></listitem>
  80. <listitem><para>
  81. <guimenuitem>"Configure Keyboard Switch..."</guimenuitem>.
  82. This entry lets you configure &kkbswitch;
  83. </para></listitem>
  84. <listitem><para>
  85. <guimenuitem>"Help"</guimenuitem>. Brings up the online help (probably the
  86. document you are reading now).
  87. </para></listitem>
  88. <listitem><para>
  89. <guimenuitem>"About Keyboard Switch"</guimenuitem>.
  90. This entry displays a standard "About" dialog box.
  91. </para></listitem>
  92. <listitem><para>
  93. <guimenuitem>"Quit"</guimenuitem>.
  94. Quit &kkbswitch;.
  95. </para></listitem>
  96. </itemizedlist>
  97. <sect1 id="configure-kkbswitch">
  98. <title>Configuring &kkbswitch;</title>
  99. <para>
  100. In the &kkbswitch; configuration dialog (invoked by selecting
  101. <guimenuitem>"Configure Keyboard Switch..."</guimenuitem> from the tray icon's
  102. context menu) you will be able to configure various aspects of &kkbswitch;'s
  103. behavior. The configuration dialog consits of two pages, <guilabel>General</guilabel>
  104. and <guilabel>Shortcuts</guilabel>.
  105. </para>
  106. <sect2 id="general-page">
  107. <title>The <guilabel>General</guilabel> page</title>
  108. <sect3 id="specifying-icons">
  109. <title>Setting the icons corresponding to the available keyboard
  110. layouts</title>
  111. <para>
  112. The appearance of the system tray icons that represent keyboard layouts depends on the icon <emphasis>style</emphasis>. &kkbswitch; implements the following three styles:
  113. <variablelist>
  114. <varlistentry>
  115. <term>Country flag</term>
  116. <listitem><para>
  117. This style displays a country flag corresponding to the currently selected layout.
  118. Note that this was the only style in version of &kkbswitch; prior to 1.3.
  119. </para></listitem>
  120. </varlistentry>
  121. <varlistentry>
  122. <term>Language code</term>
  123. <listitem><para>
  124. This style displays the two-letter ISO language code corresponding to the currently selected layout. This style mimics &Windows; layout indicator.
  125. </para></listitem>
  126. </varlistentry>
  127. <varlistentry>
  128. <term>Flag and code</term>
  129. <listitem><para>
  130. This style displays the language code against the background of a country flag. This style mimics &tde;'s <application>kxkb</application> application.
  131. </para></listitem>
  132. </varlistentry>
  133. </variablelist>
  134. </para>
  135. <para>The following table illustrates the look of &kkbswitch; tray icon menu with different icon styles.
  136. <informaltable>
  137. <tgroup cols="3">
  138. <thead>
  139. <row>
  140. <entry>Country flag</entry>
  141. <entry>Language code</entry>
  142. <entry>Flag and code</entry>
  143. </row>
  144. </thead>
  145. <tbody>
  146. <row>
  147. <entry>
  148. <inlinemediaobject>
  149. <imageobject><imagedata fileref="flag_style.png"/></imageobject>
  150. </inlinemediaobject>
  151. </entry>
  152. <entry>
  153. <inlinemediaobject>
  154. <imageobject><imagedata fileref="code_style.png"/></imageobject>
  155. </inlinemediaobject>
  156. </entry>
  157. <entry>
  158. <inlinemediaobject>
  159. <imageobject><imagedata fileref="flag_code_style.png"/></imageobject>
  160. </inlinemediaobject>
  161. </entry>
  162. </row>
  163. </tbody>
  164. </tgroup>
  165. </informaltable>
  166. </para>
  167. <para>
  168. The desired style can be selected in the <guilabel>Layout icon style</guilabel> combo box.
  169. </para>
  170. <para>
  171. Note that &kkbswitch; will try hard to guess the correct flag and language code based on the name of the
  172. keyboard layout (the names are configured in XKeyboard). For example, it will
  173. display the US flag and/or "EN" language code for US/ASCII layout, German flag and/or "DE" language code for German layout,
  174. Russian flag and/or "RU" language code for Russian layout, etc. If it cannot guess
  175. an icon, it will display a "default" icon, which simply shows the layout's number.
  176. Use the configuration dialog to customize flag icons: select a layout in the
  177. <guilabel>"Available keyboard layouts"</guilabel> listbox and click
  178. <guibutton>"Change icon..."</guibutton> button. You will be presented with "Pick icon" dialog box. There you will be able to select from the list of country flag pixmaps that are shipped with &kde;. If you'd like to use a custom image, click the <guibutton>"Browse"</guibutton> button in the bottom of the dialog box and browse for the image file you'd like to use. Note that the preferred size for layout icons is 21 by 14 pixels. If your image has different dimensions, &kkbswitch; will scale it appropriately, but the result might look not very good.
  179. </para>
  180. <para>
  181. Note that changing the icon is not available for the Language Code style, which does not feature a flag.
  182. </para>
  183. <para>
  184. If you have specified a custom icon for a layout, you can always go back to the standard icon (the one the &kkbswitch; has guessed) by clicking <guibutton>"Use Default Icon"</guibutton> button. This button will be enabled only when the layout selected in the <guilabel>"Available keyboard layouts"</guilabel> listbox has a custom icon.
  185. </para>
  186. </sect3>
  187. <sect3 id="default-group">
  188. <title>Specifying default layout</title>
  189. <para>
  190. You can mark one of the configured keyboard layouts as the default. The default
  191. layout will be activated when &kkbswitch; starts up. To mark a layout as
  192. default, simply select the layout in the <guilabel>"Available keyboard
  193. layouts"</guilabel> listbox and click <guibutton>"Set as default"</guibutton>
  194. button. The default layout's name is shown in boldface in the
  195. <guilabel>"Available keyboard layouts"</guilabel> listbox.
  196. </para>
  197. </sect3>
  198. <sect3 id="group-scope">
  199. <title>Specifying layout scope</title>
  200. <para>
  201. &kkbswitch; supports three modes of operation with regards to the scope of the active keyboard layout. Possible settings are:
  202. <variablelist>
  203. <varlistentry>
  204. <term>All windows</term>
  205. <listitem>
  206. <para>
  207. In this mode the active layout applies to all windows on your desktop. In other words, at any given time all windows use the same layout.
  208. </para>
  209. </listitem>
  210. </varlistentry>
  211. <varlistentry>
  212. <term>Windows of one application</term>
  213. <listitem>
  214. <para>
  215. In this mode the active layout applies to windows one application<footnote><para>A technically inclined user familiar with &X-Window; API would be interested to know that &kkbswitch; considers windows that have the same Window Class (from WM_CLASS property) as belonging to the same application.</para></footnote>. In other words, each application has its own active layout. When a window gets focused, KKBSwitch automatically shows the active layout of this window's application in the system tray. When you change the active layout, either by pressing XKeyboard's group switch key, or by clicking KKBSwitch's tray icon, or by using its context menu, this change affects only the currently active application. Other applications retain their layouts.
  216. </para>
  217. </listitem>
  218. </varlistentry>
  219. <varlistentry>
  220. <term>One window</term>
  221. <listitem>
  222. <para>
  223. In this mode the active layout applies to the focused window only. In other words, each window has its own active layout. When a window gets focused, KKBSwitch automatically shows this window's active layout in the system tray. When you change the active layout, either by pressing XKeyboard's group switch key, or by clicking KKBSwitch's tray icon, or by using its context menu, this change affects only the currently focused window. Other windows retain their layouts.
  224. </para>
  225. </listitem>
  226. </varlistentry>
  227. </variablelist>
  228. </para>
  229. <para>
  230. Pick the mode that you prefer in the <guilabel>"Layout applies to"</guilabel> combo box. The author's opinion is that "Windows of one application" is the most reasonable choice, but opinions vary.
  231. </para>
  232. <para>
  233. Note that in "Windows of one application" and "One window" modes, all new windows start up with the default layout. In "All windows" mode new windows start with the active (global) layout.
  234. </para>
  235. </sect3>
  236. <sect3 id="toggle-mode">
  237. <title>Using "Toggle Mode"</title>
  238. <para>
  239. "Toggle mode" is a convenient feature of &kkbswitch;, which is useful if you
  240. have more than 2 layouts. When "Toggle mode" is on, pressing the XKeyboard's
  241. group switch key or clicking &kkbswitch;'s tray icon will toggle between the
  242. two most recently used layouts. To activate the third or the fourth (if
  243. available) layout
  244. you'll need to right-click &kkbswitch;'s tray icon and select the desired
  245. layout from the menu or use keyboard shortcuts (see <xref linkend="shortcuts"/>). For example, I have US/ASCII, Russian and Ukrainian
  246. layouts configured. Most of the time I use either US/ASCII or Russian layout and
  247. switch back and forth between them without activating the rarely needed
  248. Ukrainian layout. But sometimes I need to write something in Ukrainian, so I
  249. select this layout from the tray icon's menu.
  250. </para>
  251. <para>
  252. To turn the "Toggle mode" on and off use the <guilabel>Use "Toggle
  253. Mode"</guilabel> checkbox in the configuration dialog.
  254. </para>
  255. <para>
  256. When "Toggle mode" is on, the two most recently used layouts will be marked
  257. with an asterisk in the &kkbswitch; tray icon's menu.
  258. </para>
  259. </sect3>
  260. <sect3 id="autostart">
  261. <title>Starting &kkbswitch; automatically when you log in</title>
  262. <para>
  263. Use <guilabel>"Autostart"</guilabel> checkbox to enable &kkbswitch; autostart feature. When this checkbox is on, &kkbswitch; will start automatically each time you log in to &kde;. Note that this is independent of &kde;'s session restoration feature. If you configure &kde; to restore the previous session on login (under &kde; Components | Session Manager in &kcontrolcenter;), and &kkbswitch; was running in your previous session, &kde; will restore &kkbswitch;
  264. in the new session regardless of the autostart setting.
  265. </para>
  266. </sect3>
  267. </sect2>
  268. <sect2 id="shortcuts">
  269. <title>The <guilabel>Shortcuts</guilabel> page</title>
  270. <para>
  271. &kkbswitch; allows you to quickly activate particular layouts with keyboard shortcuts. This is configured at the <guilabel>Shortcuts</guilabel> page.
  272. The <guilabel>"Use shortcuts to activate keyboard layouts"</guilabel> checkbox allows to turns the shortcut feature on and off. Uncheck the checkbox if you don't want to use shortcuts at all. If the checkbox is checked, the shortcuts are enabled. You can configure what key combinations activate which layouts at the key chooser pane under the checkbox. This is a standard &kde; key chooser widget that should be familiar to you from other &kde; applications. The default shortcuts are: <keycombo action="simul"><keycap>Ctrl</keycap> <keycap>Alt</keycap> <keycap>1</keycap></keycombo> to activate the first layout, <keycombo action="simul"><keycap>Ctrl</keycap> <keycap>Alt</keycap> <keycap>2</keycap></keycombo> the activate the second one, etc.
  273. </para>
  274. </sect2>
  275. <sect2 id="group-names">
  276. <title>How &kkbswitch; guesses icons for keyboard layouts</title>
  277. <para>
  278. &kkbswitch; uses the name of the keyboard layout, as defined by XKeyboard, to
  279. guess the icon to represent it. The process is entirely automatic; this section
  280. is only for those who want to tweak how this guessing works or just are curious.
  281. The algorithm is very simple. The &kkbswitch; distribution contains a file named
  282. <filename>group_names</filename>, which resides in &kkbswitch;'s data directory
  283. (<filename
  284. class="directory">$<envar>TDEDIR</envar>/share/apps/kkbswitch</filename>).
  285. The file is a standard &kde; config file. It contains two sections. The secion named "Mapping" contains mappings from XKeyboard group names to country codes.
  286. It contains various key=value pairs, key being the name of the XKeyboard layout and
  287. value the two-letter country code of the flag to display. The second section, "Language" contains similar mappings from XKeyboard group names to language codes. Note that if a group name is not found in the "Language" section, it is looked up in "Mapping" section, thus only layouts where country code and language code do not coincide need to be listed in "Language" section (e.g. for US/ASCII group the country code would be "us", but the language code would be "en").
  288. </para>
  289. <para>
  290. Once the country-code
  291. has been determined, &kkbswitch; will look for an icon named
  292. <filename>flag.png</filename> in the directory <filename
  293. class="directory">$<envar>TDEDIR</envar>/share/locale/l10n/<replaceable>country code</replaceable></filename> for icons styles that feature a flag and use the language code for styles that feature the a language code.
  294. </para>
  295. <para>
  296. As I was told, in &RedHat; 9 systems, the &kde; default country flag icons are missing. To work around that, if &kkbswitch; cannot find country flag icons in the location specified above, it will look for <acronym>GNOME</acronym>'s <application>gkb</application> icons in <filename class="directory">/usr/share/pixmaps/gkb</filename>. Unfortunately, <application>gkb</application> icons have size 40x60, while &kde; ones are 21x14. Thus &kkbswitch; rescales <application>gkb</application> icons on the fly, and the quality of the resulting images leaves a lot to be desired. But still it's better than nothing.
  297. </para>
  298. <para>
  299. Of course, you can override the flag icon selection algorithm by specifying the icon you want to use, as described in <xref linkend="specifying-icons"/>.
  300. </para>
  301. </sect2>
  302. </sect1>
  303. </chapter>
  304. <chapter id="developers">
  305. <title>Developer's Guide to &kkbswitch;</title>
  306. <para>
  307. &kkbswitch; can be manipulated programmatically via DCOP. It exports an
  308. interface named <classname>KBSwitchIntf</classname>. The interface offers the
  309. following methods.
  310. </para>
  311. <funcsynopsis>
  312. <funcprototype>
  313. <funcdef>int <function>getNumKbdGroups</function></funcdef>
  314. <void/>
  315. </funcprototype>
  316. </funcsynopsis>
  317. <para>
  318. This method returns the number of configured keyboard groups (layouts).
  319. </para>
  320. <funcsynopsis>
  321. <funcprototype>
  322. <funcdef>ASYNC <function>selectNextGroup</function></funcdef>
  323. <void/>
  324. </funcprototype>
  325. </funcsynopsis>
  326. <para>
  327. This method does the same thing as clicking on the &kkbswitch;'s
  328. tray icon, i.e. makes the next keyboard layout active. If in "toggle mode",
  329. toggles between the two recently used ones, just like clicking on the tray icon
  330. does.
  331. </para>
  332. <funcsynopsis>
  333. <funcprototype>
  334. <funcdef>ASYNC <function>selectGroup</function></funcdef>
  335. <paramdef>int <parameter>groupno</parameter></paramdef>
  336. </funcprototype>
  337. </funcsynopsis>
  338. <para>
  339. This method makes the layout whose number is <parameter>groupno</parameter>
  340. active (like selecting a layout from the tray icon popup menu).
  341. </para>
  342. <funcsynopsis>
  343. <funcprototype>
  344. <funcdef>TQStringList <function>getGroupNames</function></funcdef>
  345. <void/>
  346. </funcprototype>
  347. </funcsynopsis>
  348. <para>
  349. This method returns the list of the keyboard layout names, as configured in
  350. XKeyboard.
  351. </para>
  352. <sect1 id="examples">
  353. <title>Examples</title>
  354. <para>
  355. The following examples illustrate how one can manipulate &kkbswitch; with the
  356. command line tool <command>dcop</command>.
  357. </para>
  358. <informalexample>
  359. <para>Select the next keyboard group (layout):</para>
  360. <para>
  361. <screen>
  362. <prompt>&percnt;</prompt> <userinput><command>dcop</command> kkbswitch KBSwitchIntf selectNextGroup</userinput>
  363. </screen>
  364. </para>
  365. </informalexample>
  366. <informalexample>
  367. <para>Select the group (layout) number 0:</para>
  368. <para>
  369. <screen>
  370. <prompt>&percnt;</prompt> <userinput><command>dcop</command> kkbswitch KBSwitchIntf selectGroup 0</userinput>
  371. </screen>
  372. </para>
  373. </informalexample>
  374. </sect1>
  375. </chapter>
  376. <chapter id="credits">
  377. <title>Credits and License</title>
  378. <para>
  379. &kkbswitch;
  380. </para>
  381. <para>
  382. Program copyright 2001-2004 Leonid Zeitlin <email>lz@europe.com</email>
  383. </para>
  384. <para>
  385. Contributors:
  386. <itemizedlist>
  387. <listitem><para>Mikhail Senin <email>m_senin@mail.ru</email> - implemented
  388. configuration for the default layout and per-window layouts
  389. </para>
  390. </listitem>
  391. <listitem>
  392. <para>
  393. Rashid N. Achilov <email>achilov@granch.ru</email> - made a FreeBSD port, suggested "Browse" button in "Pick icon" dialog box.
  394. </para>
  395. </listitem>
  396. <listitem>
  397. <para>
  398. Vadim Kriklivy <email>analitic@vinnitsa.com</email> - suggested "Language code" icon style (a la &Windows;) and shortcuts feature, made Ukrainian translation.
  399. </para>
  400. </listitem>
  401. <listitem>
  402. <para>
  403. Sergey V Turchin <email>zerg@altlinux.org</email> - implemented autostart feature.
  404. </para>
  405. </listitem>
  406. <listitem>
  407. <para>
  408. Stergios Dramis <email>sdramis@egnatia.ee.auth.gr</email> - contributed Greek translation.
  409. </para>
  410. </listitem>
  411. <listitem>
  412. <para>
  413. Michal &Scaron;ulek <email>reloadshot@atlas.sk</email> - contributed Slovak translation.
  414. </para>
  415. </listitem>
  416. <listitem>
  417. <para>
  418. Shlomi Loubaton <email>shlomister@gmail.com</email> - contributed manpage, Debian package
  419. maintainer.
  420. </para>
  421. </listitem>
  422. <listitem>
  423. <para>
  424. Igal aka "Koala" <email>igalfr@netvision.net.il</email> - contributed Hebrew translation, Gentoo ebuild maintainer.
  425. </para>
  426. </listitem>
  427. <listitem>
  428. <para>
  429. Petko Yotov <email>5ko@free.fr</email> - contributed Bulgarian translation.
  430. </para>
  431. </listitem>
  432. <listitem>
  433. <para>
  434. Michal Bukovsk&yacute; <email>michal@trilogic.cz</email> - contributed Czech translation.
  435. </para>
  436. </listitem>
  437. </itemizedlist>
  438. </para>
  439. <para>
  440. Documentation copyright 2001-2005 Leonid Zeitlin <email>lz@europe.com</email>
  441. </para>
  442. <!-- TRANS:CREDIT_FOR_TRANSLATORS -->
  443. &underFDL; <!-- FDL: do not remove. Commercial development should -->
  444. <!-- replace this with their copyright and either remove it or re-set this.-->
  445. <!-- Determine which license your application is licensed under,
  446. and delete all the remaining licenses below:
  447. (NOTE: All documentation are licensed under the FDL,
  448. regardless of what license the application uses) -->
  449. &underGPL; <!-- GPL License -->
  450. </chapter>
  451. <appendix id="installation">
  452. <title>Installation</title>
  453. <sect1 id="getting-KKBSwitch">
  454. <title>How to obtain &kkbswitch;</title>
  455. <para>
  456. &kkbswitch; is part of the Trinity Desktop Environment project:
  457. <ulink url="http://trinitydesktop.org/">http://trinitydesktop.org</ulink>. Check there for the latest news.
  458. </para>
  459. </sect1>
  460. <sect1 id="requirements">
  461. <title>Requirements</title>
  462. <para>
  463. &kkbswitch; doesn't require any special environment to compile and run besides
  464. the standard &tde; tdelibs and tdebase.
  465. </para>
  466. </sect1>
  467. <sect1 id="compilation">
  468. <title>Compilation and Installation</title>
  469. <para>
  470. &kkbswitch; relies on cmake to build, please read the INSTALL file.
  471. </para>
  472. <para>
  473. If you system uses <application>RPM</application> you may want to download
  474. &kkbswitch; source RPM package. To build a binary RPM out of source RPM run this
  475. command (as root):
  476. <screen>
  477. <prompt>&percnt;</prompt> <userinput><command>rpmbuild</command> <option>--rebuild</option> <filename>kkbswitch-&kkbswitchVersion;-1.src.rpm</filename></userinput>
  478. </screen>
  479. (You may add <option>--with ru_ua_layout</option> option if you need the Russian/Ukrainian layout file, see <xref linkend="ru_ua"/>).
  480. Then, still as root, go to your binary RPM directory (on &RedHat; Intel systems,
  481. <filename class="directory">/usr/src/redhat/RPMS/i386</filename>) and install
  482. the binary RPM you've just built with this command:
  483. </para>
  484. <screen>
  485. <prompt>&percnt;</prompt> <userinput><command>rpm</command> <option>-ihv</option> <filename>kkbswitch-&kkbswitchVersion;-1.i386.rpm</filename></userinput>
  486. </screen>
  487. <para>
  488. Note that with older versions of <application>RPM</application> you will need to use command <userinput><command>rpm</command> <option>--rebuild</option></userinput> instead of <userinput><command>rpmbuild</command> <option>--rebuild</option></userinput>
  489. </para>
  490. </sect1>
  491. </appendix>
  492. <appendix id="ru_ua">
  493. <title>The Russian/Ukrainian keyboard layout file</title>
  494. <para>
  495. For the benefit of Ukrainian users of &kkbswitch; and XFree86 versions before 4.3,
  496. a Russian/Ukrainian keyboard layout file is included with the distribution (users of XFree86 4.3 and later, including X.Org server, read the note in the end of this appendix). This file is experimental, so report any problems with it to the author of &kkbswitch;. The file is named
  497. <filename>ru_ua</filename> and by default gets installed to the directory
  498. <filename class="directory">/usr/X11R6/lib/X11/xkb/symbols</filename>, where
  499. this type of XKeyboard configuation file is supposed to go. The file defines a
  500. configuration with 3 keyboard groups (layouts): US/ASCII, Russian and Ukrainian.
  501. To use this layout, you can do one of the following.
  502. <orderedlist>
  503. <listitem>
  504. <para>
  505. If you feel comfortable editing your <filename>XF86Config</filename> file and
  506. know its structure you can simply edit the file (usually
  507. <filename>/etc/X11/XF86Config-4</filename> for XFree86 4.x), and in InputDevice
  508. section for keyboard set XkbLayout option to "ru_ua". It is recommented to set
  509. XkbVariant to "winkeys", since only this variant was tested.
  510. </para>
  511. </listitem>
  512. <listitem>
  513. <para>
  514. If you are using &RedHat; &Linux;, you may create a file named
  515. <filename>.Xkbmap</filename> in your home directory and write the text "ru_ua"
  516. (without quotes) in it. The default X session startup script will pick this file
  517. and activate the layout named in it.
  518. </para>
  519. </listitem>
  520. <listitem>
  521. <para>
  522. Run the command <userinput><command>setxkbmap</command> ru_ua</userinput> either
  523. manually from command prompt our in one of your X session startup script.
  524. </para>
  525. </listitem>
  526. </orderedlist>
  527. </para>
  528. <note>
  529. <para>Users of XFree86 4.3 and later versions, including X.Org server, don't need any additional files if they want a three-language layout. Just specify <userinput>XkbLayout "us,ru,ua"</userinput> in your <filename>XF86Config</filename> (<filename>xorg.conf</filename> for X.Org server) file.
  530. </para>
  531. </note>
  532. </appendix>
  533. &documentation.index;
  534. </book>
  535. <!--
  536. Local Variables:
  537. mode: sgml
  538. sgml-minimize-attributes:nil
  539. sgml-general-insert-case:lower
  540. sgml-indent-step:0
  541. sgml-indent-data:nil
  542. End:
  543. -->