View Full Version : [all variants] Change the settings of a specific key?

July 26th, 2009, 07:45 AM
I have a problem with my Acer Aspire Timeline 4810T, there is a small button to lock the touchpad and if I use it it will lock the touchpad but then I can't unlock it, I have to run the following line in a terminal to make it work again.

sudo modprobe -r psmouse && sudo modprobe psmouseI'm not an expert but I think it unmounts (is it the correct term ?) the touchpad module.:confused:
I tried to find a solution and managed to add a new key shortcut that runs this script:

str=$(synclient -l | grep TouchpadOff | awk '{ print $3 }')
if [ "$str" = '0' ]; then
synclient TouchpadOff=1 &&exec 3> >(zenity --notification --listen --window-icon="/usr/share/pixmaps/touchpad.png") && echo "message:Touchpad Off" >&3
elif [ "$str" = '2' ]; then
synclient TouchpadOff=0 &&exec 3> >(zenity --notification --listen --window-icon="/usr/share/pixmaps/touchpad.png") && echo "message:Touchpad On" >&3
elif [ "$str" = '1' ]; then
synclient TouchpadOff=0 &&exec 3> >(zenity --notification --listen --window-icon="/usr/share/pixmaps/touchpad.png") && echo "message:Touchpad On" >&3
zenity --info --title="Toggle TouchPad" --text="Couldn't get touchpad status from synclient\nLaunch \"synclient -l\" in terminal to check the error" && exit 1
exit 0It seems to work with the touchpad lock key as the notification displays correctly but I still cannot unlock the touchpad after... I think that the button still unmount the touchpad module (as I have to mount it again with modprobe) and at the same time execute the script...

So does somebody know how to change the settings of specific key ?

Hope you'll understand me, english is not my first language :)

Ps using xev, when I pree the key, I have this:

FocusOut event, serial 32, synthetic NO, window 0x6800001,
mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 32, synthetic NO, window 0x6800001,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

October 22nd, 2009, 05:44 PM
maybe try to remap the key combination. use xev in the terminal to get the keycode, then make your own mapping by modifying the ~/.xmodmap.myown file

xmodmap -pke > ~/.xmodmap.myown
make an entry for the xmodmap in autostart (gedit ~/.bashrc)
xmodmap ~/.xmodmap.myown

OR MAYBE associate to that shortcut a combination of you two scripts:

if test -e ~/lock; then
rm ~/lock
touch ~/lock

October 23rd, 2009, 11:49 AM
Thanks, but I heard that the problem is solved in Unbuntu 9.10. So I think I'll wait 5 more days and see how it works. If the problem is still there I'll use what you said.
Thanks again for the answer.

November 13th, 2009, 10:47 PM
So, just a little feedback. It still doesn't work out of the box with 9.10. I found a solution, just add i8042.nomux on your kernel boot options. I explained everything on the wiki page about Acer Timline laptops (https://help.ubuntu.com/community/AspireTimeline/Fixes)

February 18th, 2010, 05:40 PM
my solution on acer timeline 4810T
I create in keyboard shorcuts a new key F7
it run a script with sticky bit key to be as root

# Run as root, of course.
tty -s; if [ $? -ne 0 ]; then gnome-terminal -e "$0"; exit; fi
sudo modprobe -r psmouse && sudo modprobe psmouse

no password asked no more trouble just one more key
thanks OrnithO for solution !