Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
right click on powerbook
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
potuz
Apprentice
Apprentice


Joined: 30 Jan 2010
Posts: 204

PostPosted: Sun Jul 04, 2010 9:19 pm    Post subject: right click on powerbook Reply with quote

Hi there, I am embarrassed to ask this, but anyway, I can't seem to remember how I managed to get right-click emulation working on a powerbook with trackpad. I did a quick google on this and couldn't find anything... thought that it will be faster to eat my pride and ask here :)

Thanks,

R.
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Sun Jul 04, 2010 9:58 pm    Post subject: Reply with quote

Since all the dbus/hal-ification of Xorg, I don't even know the proper place to put the options to enable 3 button emulation anymore, but you should be able to do this at runtime with the xinput command, like...

Code:
fujitsu ~ # xinput list
� Virtual core pointer                       id=2   [master pointer  (3)]
�   ��� Virtual core XTEST pointer                 id=4   [slave  pointer  (2)]
�   ��� LBPS/2 Fujitsu Lifebook TouchScreen        id=7   [slave  pointer  (2)]
�   ��� PS/2 Touchpad                              id=8   [slave  pointer  (2)]
�   ��� Fujitsu Serial Touchscreen                 id=6   [slave  pointer  (2)]
� Virtual core keyboard                      id=3   [master keyboard (2)]
    ��� Virtual core XTEST keyboard                id=5   [slave  keyboard (3)]
    ��� AT Translated Set 2 keyboard               id=9   [slave  keyboard (3)]
    ��� Fujitsu Application Panel buttons          id=10   [slave  keyboard (3)]
    ��� Power Button                               id=11   [slave  keyboard (3)]
    ��� Fujitsu FUJ02B1                            id=12   [slave  keyboard (3)]
    ��� Video Bus                                  id=13   [slave  keyboard (3)]
    ��� Power Button                               id=14   [slave  keyboard (3)]
fujitsu ~ # xinput list-props "PS/2 Touchpad"
Device 'PS/2 Touchpad':
   Device Enabled (125):   1
   Device Accel Profile (244):   0
   Device Accel Constant Deceleration (245):   1.000000
   Device Accel Adaptive Deceleration (247):   1.000000
   Device Accel Velocity Scaling (248):   10.000000
   Evdev Reopen Attempts (249):   10
   Evdev Axis Inversion (250):   0, 0
   Evdev Axes Swap (252):   0
   Axis Labels (253):   "Rel X" (133), "Rel Y" (134)
   Button Labels (254):   "Button Left" (126), "Button Unknown" (241), "Button Right" (128), "Button Wheel Up" (129), "Button Wheel Down" (130)
   Evdev Middle Button Emulation (255):   2
   Evdev Middle Button Timeout (256):   50
   Evdev Wheel Emulation (257):   0
   Evdev Wheel Emulation Axes (258):   0, 0, 4, 5
   Evdev Wheel Emulation Inertia (259):   10
   Evdev Wheel Emulation Timeout (260):   200
   Evdev Wheel Emulation Button (261):   4
   Evdev Drag Lock Buttons (262):   0
fujitsu ~ # xinput set-int-prop "PS/2 Touchpad" "Evdev Middle Button Emulation" 8 2


My 2 button emulation is already active and seems to work with the value 2 like that. If you put the command as a startup command in your desktop environment, this would probably be an ok workaround. It's strongly recommended to use both device names and parameter names instead of the numbers, as both numbers can change as I found out.

If your mouse gets removed and reinserted at runtime (possibly due to suspend/resume), then this turns into a mess. Since I needed to use xinput to set my touchscreen calibration (as well as the fact that serial pointers must be reattached manually), I ended up making a post-resume script that does this:
Code:
#!/bin/bash
killall inputattach
sleep .2
start-stop-daemon --start -b --exec /usr/local/bin/inputattach -- --fujitsu /dev/ttyS3
sleep .5
DISPLAY=:0 xinput set-int-prop "Fujitsu Serial Touchscreen" "Evdev Axis Calibration" 32 180 4000 190 3965


I also had to use xhost +local as a desktop startup command in order for the script to be able to interact with the X server. This is probably more info than you need but just in case...
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3705

PostPosted: Mon Jul 05, 2010 9:10 am    Post subject: Reply with quote

it is also mentioned in the ppc faq :

http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml#onebutton

cheers
Back to top
View user's profile Send private message
potuz
Apprentice
Apprentice


Joined: 30 Jan 2010
Posts: 204

PostPosted: Sun Aug 08, 2010 9:21 am    Post subject: Reply with quote

gringo wrote:
it is also mentioned in the ppc faq :

http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml#onebutton

cheers


Oops! thanks, should've gone through that again :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum