Thread: 'fn' Key
View Single Post
  #2 (permalink)  
Old 28-Oct-2007, 22:12
AndrewTheArt
Guest
 
Posts: n/a
Default

Basically two options -

* Download keyTouch-editor (http://packman.iu-bremen.de/suse/10.....pm.1.i586.rpm) - found that link here - http://benjiweber.co.uk:8080/webpin/index....ro=openSUSE_102

* Follow my little tutorial I made to do it manually (my unedited thoughts, might be hard to understand)

(1) Use xev on console to find keycode (open terminal, type in "xev", press a key on the keyboard, and look for the number in ther terminal output that is next to the word "Keycode"

(2) Create a file called "Xmodmap" anywhere in your computer (mine's in /home/andrew) and use this format

Code:
keycode 174 = SkeyVolDown
keycode 176 = SkeyVolUp
keycode 223 = Swhatever
keycode 115 = Sblablabla
...etc. Note, using the "S" is just a naming convention, that is, the naming scheme assigned to they keys is absolutely arbitrary.

(3) Open /usr/share/X11/XKeysymDB

Add to the bottom of this file...

Code:
SkeyVolDown****:1100000A
SkeyVolUp************:1100000B
Swhatever************:1100000C
Sblablabla************:1100000D
Note: the number assigned to the key name is compeltely arbritrary. Use whatver number you'd like.

(4) Open /etc/X11/xdm/Xsession in a text editor

After the shebang and commented out area, add

Code:
/usr/bin/xmodmap <location of your xmodmap file>
to tell Xsession where the Xmodmap file is located

For example... In my case,

Code:
/usr/bin/xmodmap /home/andrew/Xmodmap
From here, actually assigning functionality to your keys is largley dependent on your window manager.
In KDE, for example, you could open the KDE control center ("kcontrol" from a terminal), search for "Keyboard Shortcuts", select the "Command Shortcuts" tab, and select a menu item/program (you can add a shell script tot he menu beforehand if you want to run specific commands)

Another important note - to turn up/down the volume using ALSA, the command is

Code:
amixer set Master 2-% &
or

Code:
amixer set Master 2+% &