Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 08:43
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Using keys instead of mouse buttons, possible?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
mini-jaguar

Joined: 13 Nov 2008
Posts: 462

PostPosted: Mon 12 Mar 2012, 07:20    Post subject:  Using keys instead of mouse buttons, possible?  

I would be interested if there is a way to use keyboard shortcuts, for example alt-Z, X and C to emulate left, center and right mouse buttons.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11081
Location: Arizona USA

PostPosted: Mon 12 Mar 2012, 08:42    Post subject:  

For what it's worth, the Tab key usually cycles through the hot links and other active buttons on a browser page.
Back to top
View user's profile Send private message 
Burunduk

Joined: 21 Aug 2011
Posts: 62

PostPosted: Mon 12 Mar 2012, 14:40    Post subject:  

Maybe MouseKeys — numeric keypad as a mouse replacement is what you need. Alt+Shift+NumLock and Shift+NumLock both can be used to (de)activate this feature on Lupu 525 (I didn't test it on other Puppies). It works but something is wrong with acceleration.
Back to top
View user's profile Send private message 
mini-jaguar

Joined: 13 Nov 2008
Posts: 462

PostPosted: Wed 14 Mar 2012, 12:29    Post subject:  

Actually I found Sven, which theoretically does what I am looking for, unfortunately in practice it can't do all what the mouse buttons do.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2559
Location: New Zealand

PostPosted: Mon 19 Nov 2012, 12:06    Post subject:  

Hi mini-jaguar, do you have any further info about SVEN? I am interested to see if it will help me to emulate a mouse doubleclick via a keyboard key.
Back to top
View user's profile Send private message 
mini-jaguar

Joined: 13 Nov 2008
Posts: 462

PostPosted: Mon 19 Nov 2012, 14:52    Post subject:  

I don't remember that well because it was a while ago, but I do remember that it didn't do the job that well, at most it let you select between a couple of buttons on a menu. If it would have worked well I would have used it.

It comes already installed in some Puppies, and there are packages for others.

May I ask what to you need it for? I originally wanted it because most Puppies have poor support for Macbook touchpads, then I found FatDog64 600, which works very well on Macs, and lost interest in trying to emulate the buttons.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2559
Location: New Zealand

PostPosted: Mon 19 Nov 2012, 16:31    Post subject:  

mini-jaguar wrote:
May I ask what to you need it for? I originally wanted it because most Puppies have poor support for Macbook touchpads, then I found FatDog64 600, which works very well on Macs
My 86 year old father is struggling with doubleclicking so I am looking for an alternative. I've just posted here:
http://murga-linux.com/puppy/viewtopic.php?t=82328.

That's interesting about fatdog - I have been looking at some of the external touchpads designed for MAC (they are beautiful..) and I think they would be a great alternative to a mouse. And with the tap-to-click function turned off it would be a good way to separate the "pointer motion" from the "clicking" if I added a second mouse modified to only have the click button function on it. That way I could reduce the chance of my dad dragging icons and folders where they should not be.
Back to top
View user's profile Send private message 
mini-jaguar

Joined: 13 Nov 2008
Posts: 462

PostPosted: Tue 20 Nov 2012, 12:45    Post subject:  

Actually I used FatDog64 on a Macbook with a button, to activate the other button you hold two fingers on the touchpad while you click, I think you could even get the third button with three fingers (Ubuntu works the same way).

But FatDog64 is the only Puppy version that works with the Mac touchpad and doesn't have the tap on, all the other versions the touchpad either doesn't work at all or the tap is always on because flsynclient doesn't work properly with macs on them, which can really drive you up the wall.


Although I don't know if you're going to have much luck with this. You can set Puppy to use single clicks only on its own o.s., but you're talking internet stuff (in the other thread). I'm not sure though.
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 20 Nov 2012, 13:08    Post subject:  

mini-jaguar and greengeek,

Perhaps you could make it work by using Xdotool.

Assign a hotkey to a script using xdotool to simulate mouse-clicks. Then place cursor where you want the click and then hit the script hotkey.

I haven't tried it, but it should work.

Cheers,
s
(You can find xdotool here
http://208.109.22.214/puppy/viewtopic.php?t=79573&sid=d93918b08642a55f75b2d965aadf5f61 )
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2559
Location: New Zealand

PostPosted: Tue 20 Nov 2012, 14:00    Post subject:  

seaside wrote:
Perhaps you could make it work by using Xdotool.

Thanks seaside. Xdotool looks very interesting. My scripting ability is in it's infancy (actually pre-embryonic is a better word...) but I will dig up some xdotool tutorials and see what is possible.

EDIT: I think what I would need to do is:
1) Assign F9 key (which is the key I want to use as my "doubleclick" function) as a hotkey to run xdotool script.
2) Execute xdotool script that emulates the key sequence which activates Mousekeys function of xorg (ie: "shift numlock"), delays x milliseconds, then emulates depression of "+" key.

- one issue for me to figure out is how I differentiate between "+" on the numeric keypad and "+" on the "=" key. I shall look into this more closely.

EDIT AGAIN: mini-jaguar: these links look like they might be helpful for both your original requirements and mine too:
http://tuxradar.com/content/xdotool-script-your-mouse
http://www.semicomplete.com/projects/xdotool/xdotool.xhtml
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 20 Nov 2012, 14:33    Post subject:  

greengeek,

It looks like you have a good start and perhaps the program "xev" can give you the keycodes for below.

Quote:
- one issue for me to figure out is how I differentiate between "+" on the numeric keypad and "+" on the "=" key. I shall look into this more closely.


Cheers,
s
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2559
Location: New Zealand

PostPosted: Tue 20 Nov 2012, 15:01    Post subject:  

Actually, it turns out I don't even need to activate the "ShiftNumlock". It works as required if I do the following:

1) Place cursor over the email I want to open.
2) Type "xdotool click 1 click 1" in a previously opened terminal.

(xdotool has the ability to simulate mouse clicks directly)

All I need to do now is write that into a script and attach it to the F9 key.

Notes:
click 1 = single left click
click 2 = single middle click
click 3 = single right click

click 1 click 1 = two left clicks separated by 12millisecond delay (= doubleclick)

Thanks seaside - this feels like powerful stuff!
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2559
Location: New Zealand

PostPosted: Wed 21 Nov 2012, 03:55    Post subject:  

Ive got the doubleclick function working as I want it to now. I have assigned it to the F9 key.

1) First I made a script called doubleclick_xdotool as follows:

Code:

#!/bin/sh
xdotool click 1 click 1


I placed this script in /usr/bin and made it executable (by rightclicking and selecting permissions)

2) Then I assigned a hotkey function to the F9 key. This was harder than I expected (haven’t done this before) but I got some tips from here:
http://www.murga-linux.com/puppy/viewtopic.php?t=57085

What I did was to make a backup of /root/.jwm/jwmrc-personal then edit it to add the following line to the list of other Key lines:

Code:
<Key keycode="75">exec:doubleclick_xdotool</Key>


(keycode 75 is the code for the F9 key)

Then I restarted the jwm and now I can press F9 any time I want the doubleclick function. Just have to make sure the mouse pointer is sitting where I want it before I press the F9 key.

Thanks all for the suggestions.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0859s ][ Queries: 11 (0.0136s) ][ GZIP on ]