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 26KB

  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>
  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 &kde;.
  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 &kde; 2 or 3. 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 author, Leonid
  63. Zeitlin, at the address <email>lz@europe.com</email>.
  64. </para>
  65. </chapter>
  66. <chapter id="using-kapp">
  67. <title>Using &kkbswitch;</title>
  68. <para>
  69. The most basic usage is simply to let it sit in the system tray and show you
  70. which keyboard layout is currently active. You can also click the KKBSwicth
  71. system tray icon to switch keyboard layouts. When right-clicked, the system
  72. tray icon displays a menu with the following entries:
  73. </para>
  74. <itemizedlist>
  75. <listitem><para>
  76. One or more entries corresponding to the configured keyboard layouts.
  77. Note that XKeyboard can have up to 4 layouts configured. The currently active
  78. layout will be checked. Selecting a menu entry corresponding to a layout will
  79. make that layout active.
  80. </para></listitem>
  81. <listitem><para>
  82. <guimenuitem>"Configure Keyboard Switch..."</guimenuitem>.
  83. This entry lets you configure &kkbswitch;
  84. </para></listitem>
  85. <listitem><para>
  86. <guimenuitem>"Help"</guimenuitem>. Brings up the online help (probably the
  87. document you are reading now).
  88. </para></listitem>
  89. <listitem><para>
  90. <guimenuitem>"About Keyboard Switch"</guimenuitem>.
  91. This entry displays a standard "About" dialog box.
  92. </para></listitem>
  93. <listitem><para>
  94. <guimenuitem>"Quit"</guimenuitem>.
  95. Quit &kkbswitch;.
  96. </para></listitem>
  97. </itemizedlist>
  98. <sect1 id="configure-kkbswitch">
  99. <title>Configuring &kkbswitch;</title>
  100. <para>
  101. In the &kkbswitch; configuration dialog (invoked by selecting
  102. <guimenuitem>"Configure Keyboard Switch..."</guimenuitem> from the tray icon's
  103. context menu) you will be able to configure various aspects of &kkbswitch;'s
  104. behavior. The configuration dialog consits of two pages, <guilabel>General</guilabel>
  105. and <guilabel>Shortcuts</guilabel>.
  106. </para>
  107. <sect2 id="general-page">
  108. <title>The <guilabel>General</guilabel> page</title>
  109. <sect3 id="specifying-icons">
  110. <title>Setting the icons corresponding to the available keyboard
  111. layouts</title>
  112. <para>
  113. The appearance of the system tray icons that represent keyboard layouts depends on the icon <emphasis>style</emphasis>. &kkbswitch; implements the following three styles:
  114. <variablelist>
  115. <varlistentry>
  116. <term>Country flag</term>
  117. <listitem><para>
  118. This style displays a country flag corresponding to the currently selected layout.
  119. Note that this was the only style in version of &kkbswitch; prior to 1.3.
  120. </para></listitem>
  121. </varlistentry>
  122. <varlistentry>
  123. <term>Language code</term>
  124. <listitem><para>
  125. This style displays the two-letter ISO language code corresponding to the currently selected layout. This style mimics &Windows; layout indicator.
  126. </para></listitem>
  127. </varlistentry>
  128. <varlistentry>
  129. <term>Flag and code</term>
  130. <listitem><para>
  131. This style displays the language code against the background of a country flag. This style mimics &kde;'s <application>kxkb</application> application.
  132. </para></listitem>
  133. </varlistentry>
  134. </variablelist>
  135. </para>
  136. <para>The following table illustrates the look of &kkbswitch; tray icon menu with different icon styles.
  137. <informaltable>
  138. <tgroup cols="3">
  139. <thead>
  140. <row>
  141. <entry>Country flag</entry>
  142. <entry>Language code</entry>
  143. <entry>Flag and code</entry>
  144. </row>
  145. </thead>
  146. <tbody>
  147. <row>
  148. <entry>
  149. <inlinemediaobject>
  150. <imageobject><imagedata fileref="flag_style.png"/></imageobject>
  151. </inlinemediaobject>
  152. </entry>
  153. <entry>
  154. <inlinemediaobject>
  155. <imageobject><imagedata fileref="code_style.png"/></imageobject>
  156. </inlinemediaobject>
  157. </entry>
  158. <entry>
  159. <inlinemediaobject>
  160. <imageobject><imagedata fileref="flag_code_style.png"/></imageobject>
  161. </inlinemediaobject>
  162. </entry>
  163. </row>
  164. </tbody>
  165. </tgroup>
  166. </informaltable>
  167. </para>
  168. <para>
  169. The desired style can be selected in the <guilabel>Layout icon style</guilabel> combo box.
  170. </para>
  171. <para>
  172. Note that &kkbswitch; will try hard to guess the correct flag and language code based on the name of the
  173. keyboard layout (the names are configured in XKeyboard). For example, it will
  174. display the US flag and/or "EN" language code for US/ASCII layout, German flag and/or "DE" language code for German layout,
  175. Russian flag and/or "RU" language code for Russian layout, etc. If it cannot guess
  176. an icon, it will display a "default" icon, which simply shows the layout's number.
  177. Use the configuration dialog to customize flag icons: select a layout in the
  178. <guilabel>"Available keyboard layouts"</guilabel> listbox and click
  179. <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.
  180. </para>
  181. <para>
  182. Note that changing the icon is not available for the Language Code style, which does not feature a flag.
  183. </para>
  184. <para>
  185. 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.
  186. </para>
  187. </sect3>
  188. <sect3 id="default-group">
  189. <title>Specifying default layout</title>
  190. <para>
  191. You can mark one of the configured keyboard layouts as the default. The default
  192. layout will be activated when &kkbswitch; starts up. To mark a layout as
  193. default, simply select the layout in the <guilabel>"Available keyboard
  194. layouts"</guilabel> listbox and click <guibutton>"Set as default"</guibutton>
  195. button. The default layout's name is shown in boldface in the
  196. <guilabel>"Available keyboard layouts"</guilabel> listbox.
  197. </para>
  198. </sect3>
  199. <sect3 id="group-scope">
  200. <title>Specifying layout scope</title>
  201. <para>
  202. &kkbswitch; supports three modes of operation with regards to the scope of the active keyboard layout. Possible settings are:
  203. <variablelist>
  204. <varlistentry>
  205. <term>All windows</term>
  206. <listitem>
  207. <para>
  208. 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.
  209. </para>
  210. </listitem>
  211. </varlistentry>
  212. <varlistentry>
  213. <term>Windows of one application</term>
  214. <listitem>
  215. <para>
  216. 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.
  217. </para>
  218. </listitem>
  219. </varlistentry>
  220. <varlistentry>
  221. <term>One window</term>
  222. <listitem>
  223. <para>
  224. 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.
  225. </para>
  226. </listitem>
  227. </varlistentry>
  228. </variablelist>
  229. </para>
  230. <para>
  231. 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.
  232. </para>
  233. <para>
  234. 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.
  235. </para>
  236. </sect3>
  237. <sect3 id="toggle-mode">
  238. <title>Using "Toggle Mode"</title>
  239. <para>
  240. "Toggle mode" is a convenient feature of &kkbswitch;, which is useful if you
  241. have more than 2 layouts. When "Toggle mode" is on, pressing the XKeyboard's
  242. group switch key or clicking &kkbswitch;'s tray icon will toggle between the
  243. two most recently used layouts. To activate the third or the fourth (if
  244. available) layout
  245. you'll need to right-click &kkbswitch;'s tray icon and select the desired
  246. layout from the menu or use keyboard shortcuts (see <xref linkend="shortcuts"/>). For example, I have US/ASCII, Russian and Ukrainian
  247. layouts configured. Most of the time I use either US/ASCII or Russian layout and
  248. switch back and forth between them without activating the rarely needed
  249. Ukrainian layout. But sometimes I need to write something in Ukrainian, so I
  250. select this layout from the tray icon's menu.
  251. </para>
  252. <para>
  253. To turn the "Toggle mode" on and off use the <guilabel>Use "Toggle
  254. Mode"</guilabel> checkbox in the configuration dialog.
  255. </para>
  256. <para>
  257. When "Toggle mode" is on, the two most recently used layouts will be marked
  258. with an asterisk in the &kkbswitch; tray icon's menu.
  259. </para>
  260. </sect3>
  261. <sect3 id="autostart">
  262. <title>Starting &kkbswitch; automatically when you log in</title>
  263. <para>
  264. 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;
  265. in the new session regardless of the autostart setting.
  266. </para>
  267. </sect3>
  268. </sect2>
  269. <sect2 id="shortcuts">
  270. <title>The <guilabel>Shortcuts</guilabel> page</title>
  271. <para>
  272. &kkbswitch; allows you to quickly activate particular layouts with keyboard shortcuts. This is configured at the <guilabel>Shortcuts</guilabel> page.
  273. 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.
  274. </para>
  275. </sect2>
  276. <sect2 id="group-names">
  277. <title>How &kkbswitch; guesses icons for keyboard layouts</title>
  278. <para>
  279. &kkbswitch; uses the name of the keyboard layout, as defined by XKeyboard, to
  280. guess the icon to represent it. The process is entirely automatic; this section
  281. is only for those who want to tweak how this guessing works or just are curious.
  282. The algorithm is very simple. The &kkbswitch; distribution contains a file named
  283. <filename>group_names</filename>, which resides in &kkbswitch;'s data directory
  284. (<filename
  285. class="directory">$<envar>KDEDIR</envar>/share/apps/kkbswitch</filename>).
  286. 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.
  287. It contains various key=value pairs, key being the name of the XKeyboard layout and
  288. 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").
  289. </para>
  290. <para>
  291. Once the country-code
  292. has been determined, &kkbswitch; will look for an icon named
  293. <filename>flag.png</filename> in the directory <filename
  294. class="directory">$<envar>KDEDIR</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.
  295. </para>
  296. <para>
  297. 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.
  298. </para>
  299. <para>
  300. 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"/>.
  301. </para>
  302. </sect2>
  303. </sect1>
  304. </chapter>
  305. <chapter id="developers">
  306. <title>Developer's Guide to &kkbswitch;</title>
  307. <para>
  308. &kkbswitch; can be manipulated programmatically via DCOP. It exports an
  309. interface named <classname>KBSwitchIntf</classname>. The interface offers the
  310. following methods.
  311. </para>
  312. <funcsynopsis>
  313. <funcprototype>
  314. <funcdef>int <function>getNumKbdGroups</function></funcdef>
  315. <void/>
  316. </funcprototype>
  317. </funcsynopsis>
  318. <para>
  319. This method returns the number of configured keyboard groups (layouts).
  320. </para>
  321. <funcsynopsis>
  322. <funcprototype>
  323. <funcdef>ASYNC <function>selectNextGroup</function></funcdef>
  324. <void/>
  325. </funcprototype>
  326. </funcsynopsis>
  327. <para>
  328. This method does the same thing as clicking on the &kkbswitch;'s
  329. tray icon, i.e. makes the next keyboard layout active. If in "toggle mode",
  330. toggles between the two recently used ones, just like clicking on the tray icon
  331. does.
  332. </para>
  333. <funcsynopsis>
  334. <funcprototype>
  335. <funcdef>ASYNC <function>selectGroup</function></funcdef>
  336. <paramdef>int <parameter>groupno</parameter></paramdef>
  337. </funcprototype>
  338. </funcsynopsis>
  339. <para>
  340. This method makes the layout whose number is <parameter>groupno</parameter>
  341. active (like selecting a layout from the tray icon popup menu).
  342. </para>
  343. <funcsynopsis>
  344. <funcprototype>
  345. <funcdef>QStringList <function>getGroupNames</function></funcdef>
  346. <void/>
  347. </funcprototype>
  348. </funcsynopsis>
  349. <para>
  350. This method returns the list of the keyboard layout names, as configured in
  351. XKeyboard.
  352. </para>
  353. <sect1 id="examples">
  354. <title>Examples</title>
  355. <para>
  356. The following examples illustrate how one can manipulate &kkbswitch; with the
  357. command line tool <command>dcop</command>.
  358. </para>
  359. <informalexample>
  360. <para>Select the next keyboard group (layout):</para>
  361. <para>
  362. <screen>
  363. <prompt>&percnt;</prompt> <userinput><command>dcop</command> kkbswitch KBSwitchIntf selectNextGroup</userinput>
  364. </screen>
  365. </para>
  366. </informalexample>
  367. <informalexample>
  368. <para>Select the group (layout) number 0:</para>
  369. <para>
  370. <screen>
  371. <prompt>&percnt;</prompt> <userinput><command>dcop</command> kkbswitch KBSwitchIntf selectGroup 0</userinput>
  372. </screen>
  373. </para>
  374. </informalexample>
  375. </sect1>
  376. </chapter>
  377. <chapter id="credits">
  378. <title>Credits and License</title>
  379. <para>
  380. &kkbswitch;
  381. </para>
  382. <para>
  383. Program copyright 2001-2004 Leonid Zeitlin <email>lz@europe.com</email>
  384. </para>
  385. <para>
  386. Contributors:
  387. <itemizedlist>
  388. <listitem><para>Mikhail Senin <email>m_senin@mail.ru</email> - implemented
  389. configuration for the default layout and per-window layouts
  390. </para>
  391. </listitem>
  392. <listitem>
  393. <para>
  394. Rashid N. Achilov <email>achilov@granch.ru</email> - made a FreeBSD port, suggested "Browse" button in "Pick icon" dialog box.
  395. </para>
  396. </listitem>
  397. <listitem>
  398. <para>
  399. Vadim Kriklivy <email>analitic@vinnitsa.com</email> - suggested "Language code" icon style (a la &Windows;) and shortcuts feature, made Ukrainian translation.
  400. </para>
  401. </listitem>
  402. <listitem>
  403. <para>
  404. Sergey V Turchin <email>zerg@altlinux.org</email> - implemented autostart feature.
  405. </para>
  406. </listitem>
  407. <listitem>
  408. <para>
  409. Stergios Dramis <email>sdramis@egnatia.ee.auth.gr</email> - contributed Greek translation.
  410. </para>
  411. </listitem>
  412. <listitem>
  413. <para>
  414. Michal &Scaron;ulek <email>reloadshot@atlas.sk</email> - contributed Slovak translation.
  415. </para>
  416. </listitem>
  417. <listitem>
  418. <para>
  419. Shlomi Loubaton <email>shlomister@gmail.com</email> - contributed manpage, Debian package
  420. maintainer.
  421. </para>
  422. </listitem>
  423. <listitem>
  424. <para>
  425. Igal aka "Koala" <email>igalfr@netvision.net.il</email> - contributed Hebrew translation, Gentoo ebuild maintainer.
  426. </para>
  427. </listitem>
  428. <listitem>
  429. <para>
  430. Petko Yotov <email>5ko@free.fr</email> - contributed Bulgarian translation.
  431. </para>
  432. </listitem>
  433. <listitem>
  434. <para>
  435. Michal Bukovsk&yacute; <email>michal@trilogic.cz</email> - contributed Czech translation.
  436. </para>
  437. </listitem>
  438. </itemizedlist>
  439. </para>
  440. <para>
  441. Documentation copyright 2001-2005 Leonid Zeitlin <email>lz@europe.com</email>
  442. </para>
  444. &underFDL; <!-- FDL: do not remove. Commercial development should -->
  445. <!-- replace this with their copyright and either remove it or re-set this.-->
  446. <!-- Determine which license your application is licensed under,
  447. and delete all the remaining licenses below:
  448. (NOTE: All documentation are licensed under the FDL,
  449. regardless of what license the application uses) -->
  450. &underGPL; <!-- GPL License -->
  451. </chapter>
  452. <appendix id="installation">
  453. <title>Installation</title>
  454. <sect1 id="getting-KKBSwitch">
  455. <title>How to obtain &kkbswitch;</title>
  456. <para>
  457. &kkbswitch; has a home page at SourceForge:
  458. <ulink url="http://kkbswitch.sourceforge.net">
  459. http://kkbswitch.sourceforge.net</ulink>. Check there for the latest news. The latest version is available for download from the project page: <ulink url="http://sourceforge.net/projects/kkbswitch">
  460. http://sourceforge.net/projects/kkbswitch</ulink>.
  461. </para>
  462. <!-- <para>
  463. &kkbswitch; can be found in the at the <ulink
  464. url="http://apps.kde.com/">apps.kde.com</ulink> site at <ulink
  465. url="http://ftp.kde.com/Desktop/Utilities/KKBSwitch/">
  466. http://ftp.kde.com/Desktop/Utilities/KKBSwitch/</ulink>
  467. </para>
  468. <para>
  469. &kkbswitch; doesn't have a homepage yet. For the latest version check <ulink
  470. url="http://apps.kde.com/">apps.kde.com</ulink>
  471. </para> -->
  472. </sect1>
  473. <sect1 id="requirements">
  474. <title>Requirements</title>
  475. <para>
  476. &kkbswitch; doesn't require any special environment to compile and run besides
  477. the standard &kde; 2 or 3 kdelibs and kdebase.
  478. </para>
  479. </sect1>
  480. <sect1 id="compilation">
  481. <title>Compilation and Installation</title>
  482. <para>
  483. In order to compile and install &kkbswitch; on your system, type the following
  484. in the base directory of the &kkbswitch; distribution:
  485. <screen width="40">
  486. <prompt>&percnt;</prompt> <userinput>./configure</userinput>
  487. <prompt>&percnt;</prompt> <userinput>make</userinput>
  488. <prompt>&percnt;</prompt> <userinput>make install</userinput>
  489. </screen>
  490. </para>
  491. <para>
  492. Options you may want or need to give to the <command>configure</command> command are:
  493. </para>
  494. <simplelist>
  495. <member>
  496. <option>--prefix</option>=<replaceable>dir</replaceable> - set the prefix where your &kde; installation is located. Alternatively, you can set $<envar>KDEDIR</envar> environment variable to the &kde; directory. Under regular circumstances, the configuration script will find the &kde; location automatically; use this option only if you are having problems without it.
  497. </member>
  498. <member>
  499. <option>--enable-ru-ua-layout</option> - install the Russian/Ukrainian layout file (described in <xref linkend="ru_ua"/>). This option is useful for users of XFree86 prior to version 4.3, who want to use Russian/Ukrainian layout file. Note that with this option it is not possible to install &kkbswitch; without root privileges, because the layout file <emphasis>must</emphasis> go to the system XKB layout directory where ordinary users don't have write access.
  500. </member>
  501. <member>
  502. <option>--without-arts</option> - do not check for &arts; development headers. &arts; is &kde;'s multimedia framework, which &kkbswitch; does not use. However, since &kkbswitch; uses standard &kde; configuration macros, the configuration script will check for &arts; headers and complain if they are not found. If this happens to you, specify this option to compile &kkbswitch;. Alternatively, install &arts; development headers, you'll need them one day.
  503. </member>
  504. </simplelist>
  505. <para>
  506. Since &kkbswitch; uses autoconf and automake you should have not trouble
  507. compiling it. &kkbswitch; was tested under several versions of &Linux; and FreeBSD,
  508. and a FreeBSD port is available.
  509. </para>
  510. <para>
  511. If you system uses <application>RPM</application> you may want to download
  512. &kkbswitch; source RPM package. To build a binary RPM out of source RPM run this
  513. command (as root):
  514. <screen>
  515. <prompt>&percnt;</prompt> <userinput><command>rpmbuild</command> <option>--rebuild</option> <filename>kkbswitch-&kkbswitchVersion;-1.src.rpm</filename></userinput>
  516. </screen>
  517. (You may add <option>--with ru_ua_layout</option> option if you need the Russian/Ukrainian layout file, see <xref linkend="ru_ua"/>).
  518. Then, still as root, go to your binary RPM directory (on &RedHat; Intel systems,
  519. <filename class="directory">/usr/src/redhat/RPMS/i386</filename>) and install
  520. the binary RPM you've just built with this command:
  521. </para>
  522. <screen>
  523. <prompt>&percnt;</prompt> <userinput><command>rpm</command> <option>-ihv</option> <filename>kkbswitch-&kkbswitchVersion;-1.i386.rpm</filename></userinput>
  524. </screen>
  525. <para>
  526. 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>
  527. </para>
  528. </sect1>
  529. </appendix>
  530. <appendix id="ru_ua">
  531. <title>The Russian/Ukrainian keyboard layout file</title>
  532. <para>
  533. For the benefit of Ukrainian users of &kkbswitch; and XFree86 versions before 4.3,
  534. 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
  535. <filename>ru_ua</filename> and by default gets installed to the directory
  536. <filename class="directory">/usr/X11R6/lib/X11/xkb/symbols</filename>, where
  537. this type of XKeyboard configuation file is supposed to go. The file defines a
  538. configuration with 3 keyboard groups (layouts): US/ASCII, Russian and Ukrainian.
  539. To use this layout, you can do one of the following.
  540. <orderedlist>
  541. <listitem>
  542. <para>
  543. If you feel comfortable editing your <filename>XF86Config</filename> file and
  544. know its structure you can simply edit the file (usually
  545. <filename>/etc/X11/XF86Config-4</filename> for XFree86 4.x), and in InputDevice
  546. section for keyboard set XkbLayout option to "ru_ua". It is recommented to set
  547. XkbVariant to "winkeys", since only this variant was tested.
  548. </para>
  549. </listitem>
  550. <listitem>
  551. <para>
  552. If you are using &RedHat; &Linux;, you may create a file named
  553. <filename>.Xkbmap</filename> in your home directory and write the text "ru_ua"
  554. (without quotes) in it. The default X session startup script will pick this file
  555. and activate the layout named in it.
  556. </para>
  557. </listitem>
  558. <listitem>
  559. <para>
  560. Run the command <userinput><command>setxkbmap</command> ru_ua</userinput> either
  561. manually from command prompt our in one of your X session startup script.
  562. </para>
  563. </listitem>
  564. </orderedlist>
  565. </para>
  566. <note>
  567. <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.
  568. </para>
  569. </note>
  570. </appendix>
  571. &documentation.index;
  572. </book>
  573. <!--
  574. Local Variables:
  575. mode: sgml
  576. sgml-minimize-attributes:nil
  577. sgml-general-insert-case:lower
  578. sgml-indent-step:0
  579. sgml-indent-data:nil
  580. End:
  581. -->