1LINEAKD(1) General Commands Manual LINEAKD(1)
2
3
4
6 lineakd - GUI configurable support for multimedia keyboards
7
9 lineakd [options...]
10
11
13 LinEAK, Linux support for Easy Access and Internet Keyboards, features
14 X11 support, windowmanager independence, ability to configure all keys
15 through GUI or .conf file, volume control and sound controls.
16
17 lineakd is the daemon that runs in the background of an X session and
18 listens to incoming events from multimedia buttons.
19
20
22 The programs follow the usual GNU command line syntax, with long
23 options starting with two dashes (`-'). A summary of options are
24 included below.
25
26 -l, --kbd-list
27 Show all supported keyboard types.
28
29 -L, --plugin-list
30 Show all plugins and macros.
31
32 -D, --directives-list
33 Show all of the default, implicit configuration directives.
34
35 -f FILE, --conffile=FILE
36 Specify the .conf file.
37
38 -e FILE, --deffile=FILE
39 Specify the .def file.
40
41 -d DEVICE, --cdrom-dev=DEVICE
42 Specify the CDROM device.
43
44 -m DEVICE, --mixer-dev=DEVICE
45 Specify the mixer device.
46
47 -c TYPE, --config=TYPE
48 Create a new lineakd.conf file for keyboard TYPE (warning: old
49 one will be overwritten!).
50
51 -x, --exit
52 Tell the daemon to exit.
53
54 -r, --reload
55 Reload the configuration files.
56
57 -z, --sleep
58 Stop the daemon from processing keyboard events.
59
60 -k, --awaken
61 Resume processing of keyboard events.
62
63 -v, --verbose
64 Print verbose messages.
65
66 -vv, --very-verbose
67 Print very verbose messages. Mostly for debugging purposes.
68
69 -h, --help
70 Show summary of options.
71
73 if -f, -e, -d, or -m parameters are used in conjunction with -c, please
74 make sure you specify those BEFORE -c !
75
76
78 For those who want to setup their configuration quickly, here are the
79 steps:
80
81 run 'lineakd -l' to see a list of available keyboards.
82
83 run 'lineakd -c TYPE' to create a standard configuration file for the
84 keyboard with an identifier of TYPE that you found by running lineakd
85 -l
86
87 The configuration file will be $HOME/.lineak/lineakd.conf
88
89 Edit the config file to specify commands for the keys. The commands
90 will initially be empty. This file can be modified to suit your needs.
91 Do NOT, however, add extra keys or keynames! You can only change the
92 values of the keys that are already present! If you have a key on your
93 keyboard that is not in the file, please post it on the mailing list
94 lineak-devel@lists.sourceforge.net
95
96
98 Lineak uses two types of configuration files: lineakkb.def files and
99 lineakd.conf files.
100
101
102 lineakkb.def
103
104 lineakkb.def files contain keyboard descriptions that map key
105 and button names, to keycodes and button codes respectively. A
106 lineakkb.def file can be placed either in a system directory, or
107 in a users home directory (in the .lineak/ subdirectory). The
108 lineakd daemon will first read the system lineakkb.def file,
109 usually at /etc/lineakkb.def and then read the ~/.lineak/lin‐
110 eakkb.def file. It will attempt to reconcile the entries, using
111 the local entries to override the system entries.
112
113 Here is an example of a keyboard definition from a lineakkb.def
114
115 [LTCDP]
116 brandname = "Logitech"
117 modelname = "Cordless Desktop Pro"
118
119 [KEYS]
120 Sleep = 223
121 Internet = 178
122 Mail = 236
123 [END KEYS]
124
125 [BUTTONS]
126 Thumb = 2
127 [END BUTTONS]
128
129 [END LTCDP]
130
131 The structure is important. Adding a new keyboard is as easy as
132 determining the special keys that you keyboard has, using some‐
133 thing like xev, and writing your own definition file. Note that
134 the daemon will only register keys that you also have defined in
135 your lineakd.conf file.
136
137
138
140 lineakd.conf files can live either in a system directory, or in the
141 users home directory under the .lineak subdirectory. lineakd will
142 attempt to load a users config file before looking for a system wide
143 configuration file.
144
145
147 Lineakd supports various configuration file directives. Plugins also
148 can specify their own directives. The standard directives that are sup‐
149 ported follow with their defaults:
150
151 KeyboardType =
152
153 CdromDevice = /dev/cdrom
154
155 MixerDevice = /dev/mixer
156
157 Display_plugin = internal
158
159 Display_font = -adobe-helvetica-bold-r-normal-*-*-240-*-*-p-*-*-*
160
161 Display_color = 0aff00
162
163 Display_timeout = 3
164
165 Display_pos = bottom
166
167 Display_align = center
168
169 Display_hoffset = 0
170
171 Display_voffset = 50
172
173 Display_soffset = 1
174
175 keystate_capslock =
176
177 keystate_numlock =
178
179 keystate_scrolllock =
180
181 KeyboardType is the only mandatory defintion. If KeyboardType is not
182 defined, the daemon will not function properly.
183
184 The CdromDevice and MixerDevice settings specify the device files to
185 use. These are only useful when used in conjunction with a plugin that
186 requires them. One such plugin is the defaultplugin.
187
188 The Display_* directives control the functioning of the on screen dis‐
189 play.
190 Display_plugin specifies with of the installed display plugins to
191 use. Currently the only OSD plugin is the xosd plugin.
192
193 Display_font specifies which font name to use for the on screen
194 display. Currently the xosd plugin requires font names in X format.
195
196 Display_color specifies the color of the font. As xosd currently
197 requires the color in a numeric format, that is the default. You can
198 use something like kcolorchooser or the gimp to get color values for
199 you.
200
201 Display_timeout specifies the amount of time the display should
202 remain on screen. After this number of seconds the display will be
203 removed.
204
205 Display_pos specifies the vertical position for the OSD. Possible
206 values are bottom, middle and top.
207
208 Display_align specifies the horizontal position for the OSD. Possi‐
209 ble values are left, center and right.
210
211 The keystate_* directives control modifiers. By default, lineakd does
212 not pay attention to the modifiers NumLock, CapsLock and ScrollLock.
213 Set these directives to "enable" to use modifiers. (Note: as of beta3,
214 these options do nothing. We automatically use modifiers if they are
215 defined on a per command basis.)
216
217
219 lineakd supports toggle keys. A toggleable key is one that can have a
220 various number of states for each push of the key. For example, on many
221 keyboards the Play and Pause keys are the same. When you push the key
222 once it plays, the next time it pauses. The same thing goes for the
223 Mute key. You must define a toggle key as key1|key2 in the definition
224 (lineakkb.def) file. We can define a single action for this key in the
225 config file by specifying the keyname in the form key1|key2 - this
226 effectively treats the toggleable key as a normal key. It tells lineakd
227 that we don't want to use this a a toggleable key, maybe because the
228 command we are going to bind to it supports the notion of toggling. We
229 can also specify seperate actions for the Play and Pause states by
230 assigning actions to key1 and key2. eg.
231
232 On the LTCDP there is the key 'Play|Pause' In my
233 config file I can specify either:
234
235 Play|Pause = /usr/bin/xmms -t
236
237 To treat this as a normal key, or, if I want seperate functions
238 for the play and pause states:
239
240 Play = /usr/bin/xmms -p
241
242 Pause = /usr/bin/xmms -u
243
244 Note that there can be more than two states for a toggleable key. For
245 example key1|key2|key3 could be defined.
246
248 lineakd now supports a variable number of modifiers to a key. However,
249 this only applies to non-toggleable keys so a key such as Play|Pause
250 will not work with modifiers if you use it as a toggleable key by
251 putting entries like this:
252
253 Play = something
254
255 Pause = something else
256
257 In your config file. However, if you use the key as a non-toggleable
258 key, i.e. like this:
259
260 Play|Pause = something
261
262 Then it becomes possible to use modifiers.
263
264 Currently we support the following modifiers:
265 control
266 alt
267 shift
268 mod2
269 mod3
270 mod4
271 mod5 To use a modifier, we do something like this in the config
272 Sleep+control = something
273 Sleep+alt = something different
274 Sleep+shift = something more different
275 Sleep = sleepiness
276 etc.
277
278 Modifiers to buttons, if they are defined in the lineakkb.def file,
279 work the same way.
280
281
283 lineakd supports custom on screen display messages through the configu‐
284 ration file. However, some plugins may choose to disregard custom on
285 screen display messages if they feel it does not apply. Currently you
286 specify the on screen display message for a command by placing it
287 within square brackets at the beginning of the line. E.g.
288 [On Screen Message] Go = some command
289 [Another Message] Home+alt = some command
290 [Boring Message] Home = some command
291
292
294 The lineakd daemon does not contain any internal macros or actual on
295 screen display functionality. This functionality is implemented in
296 plugins that are loaded when the lineakd daemon is first run. NOTE:
297 Restarts of the daemon with lineakd -r will not reload plugins, or load
298 new plugins.
299
300 The previous functionality that existed in versions of lineakd up uptin
301 0.8 has been moved into two plugins: lineak_defaultplugin, which con‐
302 tains all of the EAK_* macros and lineak_xosdplugin which contains all
303 of the XOSD on screen display functionality. There is now also a lin‐
304 eak_kdeplugin plugin that brings with it a total of 23 macros or more
305 for handling KDE funtionality via dcop. Some of these macros themselves
306 take arguments which expands their functionality. See the respective
307 plugin packages for more information on MACRO usage.
308
309
311 The lineakd package now installs two helper applications, send_to_key‐
312 board and evtest.
313
314 evtest: Allows you to see the event layer events your keyboard is gen‐
315 erating. This is for debugging to help you determine if indeed your
316 keyboard is sending events, and which events it is sending. It uses the
317 new event layer.
318
319 send_to_keyboard (only for arm, x86 and x86_64): This is a simple pro‐
320 gram which, for now is just for the IBM keyboards. It allows you to
321 send actual control codes to the keyboard device to enable or disable
322 certain functions. For example, some of the IBM keyboards require:
323 send_to_keyboard ea 17
324
325 in order to enable the extra keys. This helper application is actually
326 used from lineakd. Within your lineakkb.def file you can specify a con‐
327 figuration option after the keyboard and model name to initialize the
328 keyboard with. As requirements for this sort of thing increases I'll
329 enable the handling of different options. So far we only look for INI‐
330 TIALIZE.
331
332 e.g.
333
334 [IBMRA7993]
335 brandname = "IBM"
336 modelname = "Rapid Access Keyboard"
337 RAWCOMMAND[INITIALIZE] = "ea 71" # <--- lineakd will at this point
338 fork and execute: `send_to_keyboard ea 17`
339 [KEYS]
340 WWW = 178
341 WorldBook = 151
342 Option = 176
343 Help = 166
344 Standby = 165
345 AudioMute = 146
346 AudioStop = 164
347 AudioPlay|Pause = 153
348 Back = 163
349 Forward = 161
350 AudioLowerVolume = 158
351 AudioRaiseVolume = 160
352 Custom1 = 174
353 [END KEYS]
354
355 [END IBMRA7993]
356
358 Linux 2.6 can cause changes in how the keycodes are interpreted from
359 the 2.4 version of the kernel. In some cases, keys that use to work, no
360 longer work at all. If this happens to you try the following:
361
362 1) Run xev and see if X reports any keycodes for the keys that are not
363 working. If there are keycodes being produced, you'll have to update
364 the lineakkb.def file (usually in /etc) with the correct keycodes for
365 your keyboard.
366
367 2) If xev does not report any keycodes for one or more of your keys,
368 then try looking in /var/log/messages. If you have error messages in
369 that file from atkbd.c about unknown scancodes then try binding those
370 scancodes to keycodes with the setkeycodes command as root. If you are
371 in doubt over which keycode to bind it to just use the keycode from
372 your /etc/lineakkb.def file. If X then produces keycodes for that key
373 then put those setkeycodes commands somewhere in your startup scripts
374 (at the end of /etc/rc.sysinit for example) so that they run at boot
375 time. You'll notice that X produces a different keycode for the key
376 that what you set it as. Follow the steps under the procedure 1 above
377 to get lineak to recognize the new keycodes.
378
379 3) If you see nothing in your /var/log/messages, and xev produces no
380 keycodes, you can try running showkey -s as root and see if the key‐
381 presses show any scancodes. If they do, follow the setkeycodes part of
382 procedure 2 above. If not, see 4.
383
384 4) If still nothing happens, try the evtest command included in the
385 package. You'll have to run it as root, but it can tell you if it sees
386 any events at all. If not, it is likely that your keys may require a
387 low level command to be sent to the keyboard (like in the example of
388 the IBM Rapid Access Keyboard above.) You can check this website:
389 http://www.win.tue.nl/~aeb/linux/kbd/scancodes-5.html to see if there
390 is any further information.
391
392 5) If none of the above work, send an email to the linux-usb mailing
393 list (if your keyboard is USB) or to the atkbd.c maintainer and pray
394 they do something about it. Otherwise your screwed. Take your POS key‐
395 board back to the store and get a supported one. :(
396
397 The EAK_SLEEP action has no functionality yet.
398
399 Due to the fact that not all IDE CD-ROM drives provide status info on
400 the tray position, the following can occur:
401
402 If lineakd is started with the cdrom tray in open position, the
403 eject button has to be pressed twice the first time to close it.
404
405 If you opened the cdrom tray with the eject button and let the tray
406 close automatically after a while (hardware timer), the eject button
407 has to be pressed twice to open it again.
408
409
411 /etc/lineakkb.def
412 Keyboard definitions file.
413
414 $HOME/.lineak/lineakd.conf
415 Personal configuration file.
416
417 $HOME/.lineak/lineakkb.conf
418 Personal keyboard configuration file.
419
421 lineakconfig(1), klineakconfig(1), lineak_defaultplugin(1), lineak_xos‐
422 dplugin(1), lineak_kdeplugins(1).
423
425 lineakd was written by Sheldon Lee-Wen <leewsb@hotmail.com> and Mark
426 Smulders <Mark@PIRnet.nl>.
427
428
429
430 July 27, 2003 LINEAKD(1)