HOWTO:Lineakd

From PardusWiki
Revision as of 20:08, 5 June 2008 by Cepkahg (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You can use your keyboard's multimedia keys with lineakd. You can install lineakd with package manager from contrib repo.


Contents

Installing Your Keyboard

You can see the list of supported keyboards' list with this command:

lineakd -l


If Your Keyboard is Not in the List

If you can't see your keyboard in the list, check the same brands' other keyboard models.Manufacturers use the same "key codes" generally.


If your keyboard is not in the list, open the keyboard database file with this command:

sudo kwrite /etc/lineakkb.def

Add your keyboards' data to the file and save:

Code:
[HPdv6196]
    brandname = "Hewlett-Packard"
    modelname = "Pavilion dv6196"
    [KEYS]
        Mute        = 160
        VolumeDown  = 174
        VolumeUp    = 176
        Play        = 162
        Previous    = 144
        Next        = 153
        Stop        = 164
    [END KEYS]
 [END HPdv6196]


How to see "key code"

Type this command in the console to see the "key code":

xev

After this command push down the multimedia key and look at the console output. For instance if you push the "left ctrl" key, you will get an output like this:

Code:
KeyRelease event, serial 31, synthetic NO, window 0x3e00001,
   root 0x1a5, subw 0x0, time 3329605, (-46,394), root:(632,450),
   state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
   XLookupString gives 0 bytes:
   XFilterEvent returns: False

The integer value is indicated with "keycode etc." (in this example: 37)


Setting up the keys

Set the keyboard model with this command:

lineakd -c HPdv6196

Now you have a hidden file named ".lineak in your /home directory. Open the lineakd.conf file and assign the commands:

Code:
Mute = 
 Next     = "amarok --next" 
 Play     = "amarok --play-pause" 
 Previous = "amarok --previous" 
 Stop     = "amarok --stop" 
 VolumeDown = 
 VolumeUp =
 PrintScreen = ksnapshot

You can define whatever you wish here (like juk, xmms, kaffeine, kmix)...


Start Lineak

Give this command in console to start the lineak:

lineakd


Loading Lineak at Start up

Give this command, as user, in console to start lineak automatically at start up:

ln -s /usr/bin/lineakd ~/.kde/Autostart/

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox