OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Debian => Topic started by: ZDevil 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 (http://ion0.com/iliad/Multi-Button/xserver-multibutton-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 (http://www.mobileread.com/forums/archive/index.php/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 (http://prdownload.berlios.de/tslib/tslib-1.0.tar.bz2)
-
Just a wild thought:
Perhaps it would be even better if the long press becomes Fn (Mode_Switch) + tap. But how?
-
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:
[ You are not allowed to view attachments ]
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....
-
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 (http://packages.debian.org/lenny/mouseemu)
Does anyone know how to play with mouseemu?
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
-
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.
-
Does any Zaurus keymap has a right click in it?
... now I seem to remember. Is it the setting in user.xmodmap (path)?
-
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.
-
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 (https://www.oesf.org/forum/index.php?showtopic=23773&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 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 (https://www.oesf.org/forum/index.php?showtopic=23773&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?
-
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?
-
You are right, dlj0! keylaunch works. Thank you!
Just install the keylaunch package and set up a ~/.keylaunchrc like this:
# 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.
-
keylaunch installed
hmmm... excuse my ignorance, but how do you do "F12" and "Mode_Switch" button ???
-
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.
-
well,
it seems this doesn't work for me : keylaunch seems not to "launch" the xmodmap commands...
any idea ?
-
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.
-
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.
you know what ? it works! it's just that i"ve to double check what I type before posting that it doesn't work i mean "Mode_Switch" is not "Mode_switch"
anyway thank you for this tip !
-
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?
I found this somewhere, but don't recall where. my ./.keylaunchrc file has:
key=.*.1:xmodmap -e "pointer = 1 2 3"
key=.*.2:xmodmap -e "pointer = 2 1 3"
key=.*.3:xmodmap -e "pointer = 3 1 2"
#special keys
key=...F9:orage
key=...F10:gpe-contacts
key=...F13:icedove
key=...F12:iceweasel
key=...F11:xfce4-popup-menu
# brightness adjusting
key=..*3:setfl -
key=..*4:setfl +
The first set remaps the "buttons" on the mouse, so that Ctrl-1 will have a tap be the left mouse button, Ctrl-2 maps a tap to Button 2, and Ctrl-3 to 3. It works, but not as fluidly as I'd like, of course.
The function-key mappings are for the keys along the bottom row of the keyboard, and the brightness stuff I think you told us about.
-
You are right, dlj0! keylaunch works. Thank you!
Just install the keylaunch package and set up a ~/.keylaunchrc like this:
And interestingly, after installing keylaunch the pointer jumping issue is alleviated.
yeah? Not for me.
-
keylaunch installed
hmmm... excuse my ignorance, but how do you do "F12" and "Mode_Switch" button ???
As far as F12 goes,
key=...F12:iceweasel
does what it should. I have no idea how to set up Mode_Switch. Is that the Fn-key?
-
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.
Can you get keylaunch to somehow give us back the keys like : \ * etc that are lost in iceweasel/icedove/firefox/etc? I couldn't get that since I couldn't see what to call those things, and the literal strings are misinterpreted. Maybe preceeding them with \??
-
Yes, the [Fn] key is commonly mapped to Mode_swtich (not Mode_Switch) in the Zaurus keymaps, or Mod4 in some other programs (such as xbindkeys).
I am still seeing less mouse ghost after running keylaunch in the background when loading IceWM, even though it only helps a bit when drawing in xournal (a harder press also make better registers).
-
+1
mouse is still jumping, even with keylaunch launched
anyway, i'm trying to bind "Fn+3" to brightness, as it should be, but it does not seem to work...
even with this howto : http://www.tyrannozaurus.com/files/oesfarc...php/t20538.html (http://www.tyrannozaurus.com/files/oesfarchive/recent/index.php/t20538.html)
is it impossible to have Mode_switch and 3 binded ???
-
I use xbindkeys-config (a frontend of xbindkeys) and the [Fn] is recognized as Mod4.
-
I use xbindkeys-config (a frontend of xbindkeys) and the [Fn] is recognized as Mod4.
did you just drop keylaunch to use xbindkeys or do you use both ?
-
I use both: keylaunch is for fixing mouse buttons, xbindkeys is for creating handy key combos for shell commands (like setfl).
The two work differently. For example, you cannot use keylaunch to set up a combo [Fn]+3 & 4 to adjust brightness, as the modifier keys are restricted to [Shift], [Ctrl] and [Alt] only. xbindkeys seems more powerful, but seems not being able to bind mouse buttons to keyboard (but correct me if i am wrong).
Of course i think you can do away with xbindkeys if you don't need to use the [Fn] to do fancy things.
I notice that keylaunch seems to have a bit overhead when looking at the CPU monitor in the IceWM taskbar. But I still need it to have a working solution to mouse right clicks, even though I find xmonobut lighter and more elegant. xmonobut falls short of not being able to trigger mouse 2 and 3 buttons simply by pressing the hotkeys (unlike what is said in the documentation); I can only do middle and right clicks by tapping the tiny little mouse icon in the taskbar.
-
http://www.gnomefiles.org/app.php/Gestikk_...ure_Recognition (http://www.gnomefiles.org/app.php/Gestikk_Mouse_Gesture_Recognition)
the above page talks about a pyhon apps to "simulate key presses". Could it be of use ?
-
I was trying something a bit weird on the xbindkeys yesterday. I have been thinking of a working solution for the mouse right click key. I compiled the snippet Capn Fish provided (https://www.oesf.org/forum/index.php?showtopic=25459) (which looks pretty much like this (http://www.mail-archive.com/oe@handhelds.org/msg02266.html)). But it seems to do nothing and I don't know how to get it working.
What I did is to bind both the Left and the Right click buttons to the same key (I use the japanese or the "grave" key since it's kinda useless), mapping right button first and then left. Pressing the key once activates right click. Pressing it again reverts back to left click. And so on. Kinda weird, but it seems to do trick.
Here is the relevant sections in my ~/.xkeybindrc
#Right click
"xmodmap -e "pointer = 3 1 2""
c:105
grave
#Left click
"xmodmap -e "pointer = 1 2 3""
c:105
grave
(You need to remove the code for the Control key if you use xbindkey-config because it automatically adds Control to the mapping even if you just press "grave")
-
My apology, Capn_Fish! Probably I did something wrong in my first run, but then I tried again and the binary works! And it is faster and lighter than xbindkeys which causes a slight delay.
I have also compiled one for middle mouse button and will upload them later if testing is ok.