Author Topic: Mouse Right Click Solutions Found!  (Read 9897 times)

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« on: October 15, 2007, 06:44:18 am »
I came across this patch of tslib to enable a pressure tap (i.e. tap & hold) to act as the mouse right click (or mouse button 3). Looks like also applicable to titchy debian.

http://ion0.com/iliad/Multi-Button/xserver...tslib-patch.txt
(the originial discussion is about X support for iRex iLiad here: http://www.mobileread.com/forums/archive/i...hp/t-11285.html )

Anyone wants to have a go?
[EDIT] I found the source of tslib. Will do my little experiment today.  
http://prdownload.berlios.de/tslib/tslib-1.0.tar.bz2
« Last Edit: October 16, 2007, 05:19:15 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #1 on: October 15, 2007, 06:53:59 am »
Just a wild thought:
Perhaps it would be even better if the long press becomes Fn (Mode_Switch) + tap. But how?  

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #2 on: October 15, 2007, 11:46:38 am »
I've incorporated the changes in the patch to xc/programs/xserver/hw/tinyx/linux/tslib.c in the XFree86-4.7.0 source , which is supposed to enable emulation of right click as long press:

 [ Invalid Attachment ]

But I am not sure what to do next. Anyone skilful enough to get it compiled?  

And now I begin to suspect that right click actually only works in the taskbar of xfce4....
« Last Edit: October 15, 2007, 11:46:52 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #3 on: October 15, 2007, 12:23:24 pm »
Wait, zdevil ...

Perhaps you shouldn't go overboard to tamper with the mighty xserver...    

Perhaps this one is an easier solution: http://packages.debian.org/lenny/mouseemu

Does anyone know how to play with mouseemu?

Quote
mouseemu - Emulate mouse buttons and mouse wheel
Mouseemu is a daemon to emulate mouse buttons on trackpads with only one button. It lets you:
  - emulate middle and right click
  - emulate mouse wheel
  - block trackpad while typing
« Last Edit: October 15, 2007, 12:23:42 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Mouse Right Click Solutions Found!
« Reply #4 on: October 15, 2007, 03:07:17 pm »
Has this brought you anywhere yet ?

I was thinking : can't we use a keymap file from debian-eabi or pdaX or whatever that has the right click in it ?

Chero.
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #5 on: October 15, 2007, 03:08:24 pm »
Does any Zaurus keymap has a right click in it?  

... now I seem to remember. Is it the setting in user.xmodmap (path)?
« Last Edit: October 15, 2007, 03:24:34 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Mouse Right Click Solutions Found!
« Reply #6 on: October 15, 2007, 03:46:36 pm »
Quote from: ZDevil
Does any Zaurus keymap has a right click in it?  

... now I seem to remember. Is it the setting in user.xmodmap (path)?

I don't know.
All I know is I once lost my right-click after messing with kernel.map and spitz.xmodmap in pdaX.

Chero.
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #7 on: October 15, 2007, 05:53:40 pm »
I got a solution!

Searching the old posts here a bit, I found this useful post: https://www.oesf.org/forum/index.php?showto...3773&st=165

Just compiled xmonobut, which is also used in OZ/Angstrom GPE.  It works in Debian too.  

Uploaded to the Contrib & Packages Thread...

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

dlj0

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Mouse Right Click Solutions Found!
« Reply #8 on: October 15, 2007, 09:15:27 pm »
Quote from: ZDevil
I got a solution!

Searching the old posts here a bit, I found this useful post: https://www.oesf.org/forum/index.php?showto...3773&st=165

Just compiled xmonobut, which is also used in OZ/Angstrom GPE.  It works in Debian too.  

Uploaded to the Contrib & Packages Thread...

I remember xmonobut from pdaXrom.  It was real, real tiny, and controlling it was more trouble than it was worth.  What is wrong with using keylaunch to remap the button order through xmodmap?
Zaurus:  SL C3100
ROM:  eabi debian/sid

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #9 on: October 16, 2007, 02:44:28 am »
Quote from: dlj0
I remember xmonobut from pdaXrom.  It was real, real tiny, and controlling it was more trouble than it was worth.  What is wrong with using keylaunch to remap the button order through xmodmap?
Sorry, i don't get it. How to remap the mouse buttons to keyboard keys using keylaunch?  

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #10 on: October 16, 2007, 05:18:30 am »
You are right, dlj0!  keylaunch works.  Thank you!  

Just install the keylaunch package and set up a ~/.keylaunchrc like this:

Code: [Select]
# Format: key=...KeyName: Command
# ... = No modifier
# *.. = Shift
# .*. = Ctrl
# ..* = Alt

key=...F12:xmodmap -e "pointer = 1 2 3"  ## Press [Home] key to return to default setting (tap = left click)
key=*..Mode_switch:xmodmap -e "pointer = 2 3 1"  ## Press [Shift]+[Mode_switch] and tap to make a middle click
key=.*.Mode_switch:xmodmap -e "pointer = 3 1 2" ## Press [Ctrl]+[Mode_switch] and tap to make a right click

Remember to make this run when loading WM (such as by adding keylaunch & to /usr/bin/startx or ~/.xinitrc)

And interestingly, after installing keylaunch the pointer jumping issue is alleviated.
« Last Edit: October 16, 2007, 08:48:45 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Mouse Right Click Solutions Found!
« Reply #11 on: October 16, 2007, 07:57:26 am »
keylaunch installed
hmmm... excuse my ignorance, but how do you do "F12" and "Mode_Switch" button ???
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #12 on: October 16, 2007, 08:51:35 am »
F12 = Home key
Mode_switch = Fn key
(as you can see in xev ...)

So now the Home key does two (or even three in applications using F12) job: 1) power on; 2) restore mouse left click  

At first I tried to use Mode_switch only, but then I had trouble entering the special purple characters above the keys.  

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Mouse Right Click Solutions Found!
« Reply #13 on: October 16, 2007, 10:48:32 am »
well,
it seems this doesn't work for me : keylaunch seems not to "launch" the xmodmap commands...
any idea ?
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Mouse Right Click Solutions Found!
« Reply #14 on: October 16, 2007, 11:38:50 am »
The keylaunch command should launch if:
1) you set up the right keys in ~/.keylaunch;
2) keylaunch is already running;
3) you press the right key sequence (it seems you have to first press the modifier key and then the other key, e.g. if [Ctrl]-[1] is right click then you have to press [ctrl] first and then [1].

See if this helps.

I am thinking of disabling the Right Ctrl key as it feels redundant and changing it into a sort meta key (like Ctrl-Alt-Shift), so as to be a dedicated right mouse key trigger button.

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]