You are not logged in.

#1 2006-06-23 20:26:13

fk
Member
From: Germany
Registered: 2006-04-29
Posts: 524

Thinkpad X60s:Get FN-Kys working

Hi

I would get the FN + X keys working, but how?

I fount these How To, but I don't understand what exactly I must do?
http://www.thinkwiki.org/wiki/How_to_ge … ys_to_work

Can anyon help?


Have you tried to turn it off and on again?

Offline

#2 2006-06-24 00:48:58

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: Thinkpad X60s:Get FN-Kys working

Here's the commandline way to do it. I don't know the alternatives, although there probably are.

Run 'xev' from the commandline and press your fn+? keys that you want to bind. In the KeyPress event that's generated, there will be a keycode value (i.e. 80).

You now want to map the keycode to a name. Look in /usr/share/X11/XKeysymDB for the listing of possibilities. I then put the following in my ~/.xinitrc:

xmodmap -e "keycode 174 = SunAudioLowerVolume" &
xmodmap -e "keycode 176 = SunAudioRaiseVolume" &

Now you should be able to use these in whatever window manager you use to execute whatever you want. For example, in fvwm, I do:

Key SunAudioLowerVolume A N     Exec amixer sset 'Master' 2-
Key SunAudioRaiseVolume A N     Exec amixer sset 'Master' 2+

This allows me to raise and lower the volume with the function keys.


I am a gated community.

Offline

#3 2006-06-24 09:04:44

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Thinkpad X60s:Get FN-Kys working

If you want you can also use xmodmap and xbindkeys to complete the task here's a small howto
- first keep in mind the xev method that stonecrest mentioned above
- Fill .Xmodmap with something like this

keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 153 = XF86AudioNext
keycode 144 = XF86AudioPrev
keycode 164 = XF86AudioStop
keycode 162 = XF86AudioPlay
keycode 223 = XF86Sleep
keycode 178 = XF86WWW
keycode 254 = XF86Music
keycode 255 = XF86Pictures

and .xbindkeysrc with

# Volume +1%
"/home/wael/bin/volume-control 'Master,0' 'raise' '1'"
    XF86AudioRaiseVolume

# Volume -1%
"/home/wael/bin/volume-control 'Master,0' 'lower' '1'"
    XF86AudioLowerVolume

# Volume Mute / Unmute
"/home/wael/bin/volume-control 'Master,0' 'switch'"
    XF86AudioMute

and .xinitrc with :

if [ -f ${HOME}/.Xmodmap -a -x /usr/bin/xmodmap ]; then
    xmodmap ${HOME}/.Xmodmap
fi

if [ -f ${HOME}/.xbindkeysrc -a -x /usr/bin/xbindkeys ]; then
    xbindkeys
fi

P.S: the if blocks is just to avoid errors when i format or sth...


- You can look at my all configs and scripts here

Hope that helps smile

Offline

#4 2006-06-24 10:41:32

fk
Member
From: Germany
Registered: 2006-04-29
Posts: 524

Re: Thinkpad X60s:Get FN-Kys working

Thanks, but I think you dont't understand what I will... or I say it false... With FN + F7 I can switch my display from Intern to Extern or both, and this wil I get working..


Have you tried to turn it off and on again?

Offline

Board footer

Powered by FluxBB