HOWTO:Lineakd

From PardusWiki
(Difference between revisions)
Jump to: navigation, search
(New page: You can use your keyboard's multimedia keys with '''''lineakd'''''. You can install lineakd with package manager from contrib repo. == Installing Your Keyboard == You can see the list of...)
 
 
(3 intermediate revisions by one user not shown)
Line 4: Line 4:
 
== Installing Your Keyboard ==
 
== Installing Your Keyboard ==
 
You can see the list of supported keyboards' list with this command:
 
You can see the list of supported keyboards' list with this command:
 +
 
{{command|lineakd -l}}
 
{{command|lineakd -l}}
  
Line 11: Line 12:
  
  
If you keyboard is not in the list, open the keyboard database file with this command:
+
If your keyboard is not in the list, open the keyboard database file with this command:
 +
 
 
{{command|sudo kwrite /etc/lineakkb.def}}
 
{{command|sudo kwrite /etc/lineakkb.def}}
  
Line 36: Line 38:
 
== How to see "key code" ==  
 
== How to see "key code" ==  
 
Type this command in the console to see the "key code":
 
Type this command in the console to see the "key code":
 +
 
{{command|xev}}
 
{{command|xev}}
 +
 
After this command push down the multimedia key and look at the console output.   
 
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:
 
For instance if you push the "left ctrl" key, you will get an output like this:
{{command||<pre>
+
 
 +
{{code||<pre>
 
KeyRelease event, serial 31, synthetic NO, window 0x3e00001,
 
KeyRelease event, serial 31, synthetic NO, window 0x3e00001,
 
   root 0x1a5, subw 0x0, time 3329605, (-46,394), root:(632,450),
 
   root 0x1a5, subw 0x0, time 3329605, (-46,394), root:(632,450),
Line 46: Line 51:
 
   XFilterEvent returns: False
 
   XFilterEvent returns: False
 
</pre>}}
 
</pre>}}
 +
 
The integer value is indicated with "keycode etc." (in this example: 37)
 
The integer value is indicated with "keycode etc." (in this example: 37)
  
Line 52: Line 58:
 
== Setting up the keys ==
 
== Setting up the keys ==
 
Set the keyboard model with this command:
 
Set the keyboard model with this command:
 +
 
{{command|lineakd -c HPdv6196}}
 
{{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:
 
Now you have a hidden file named ".lineak in your /home directory. Open the lineakd.conf file and assign the commands:
 +
 
{{code||<pre>
 
{{code||<pre>
 
Mute =  
 
Mute =  
Line 65: Line 73:
 
  PrintScreen = ksnapshot
 
  PrintScreen = ksnapshot
 
</pre>}}
 
</pre>}}
 +
 
You can define whatever you wish here (like juk, xmms, kaffeine, kmix)...
 
You can define whatever you wish here (like juk, xmms, kaffeine, kmix)...
  
Line 70: Line 79:
 
== Start Lineak ==
 
== Start Lineak ==
 
Give this command in console to start the lineak:
 
Give this command in console to start the lineak:
 +
 
  {{command|lineakd}}
 
  {{command|lineakd}}
  
Line 75: Line 85:
 
== Loading Lineak at Start up ==
 
== Loading Lineak at Start up ==
 
Give this command, as user, in console to start lineak automatically at start up:
 
Give this command, as user, in console to start lineak automatically at start up:
 +
 
{{command|ln -s /usr/bin/lineakd ~/.kde/Autostart/}}
 
{{command|ln -s /usr/bin/lineakd ~/.kde/Autostart/}}

Latest revision as of 20:08, 5 June 2008

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