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 Tue 29 Jul 2014, 20:58
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Use Windows key to modify "mouseclick" type?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
greengeek

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

PostPosted: Fri 20 Jun 2014, 04:05    Post subject:  Use Windows key to modify "mouseclick" type?  

Is it possible to use the Windows key to modify a mouseclick?

eg: say my rightclick button is broken, could I hold the Windows key at the same time as doing a 'leftclick' and have it issue a rightclick? (using xdotool or similar?)

Or is the Windows key only able to be used to modify keyboard strokes?
Back to top
View user's profile Send private message 
greengeek

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

PostPosted: Fri 20 Jun 2014, 04:12    Post subject:  

Just to add some links as I stumble across them:

java seems able to do this:
http://www.leepoint.net/notes-java/GUI-lowlevel/mouse/20mousebuttons.html

Browser plugin?
https://developer.mozilla.org/en-US/docs/Web/API/event.initMouseEvent

This site includes a sample of how to do html detection of mouseclick+meta key:
http://www.w3schools.com/jsref/tryit.asp?filename=try_dom_event_metakey
(problem - it successfully detects the metakey of the attached keyboard on my tablet but not the metakey that is on the front of the tablet - even though xev almost sees them as the same event)
Back to top
View user's profile Send private message 
greengeek

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

PostPosted: Fri 20 Jun 2014, 06:31    Post subject:  

To be honest I think the easiest way to use the Windows key to change the click type is to forget the mouse completely and just use xdotool to generate the click directly when the Windows key is pressed. I tried it here

Seems to work, but I am still interested if anyone can suggest how to modify a mouseclick by superimposing the windows key, as it could then modify a leftclick, centerclick or rightclick, rather than just one.
Back to top
View user's profile Send private message 
ETP


Joined: 19 Oct 2010
Posts: 527
Location: UK

PostPosted: Fri 20 Jun 2014, 11:26    Post subject: Use Windows key to modify "mouseclick" type?  

Hi greengeek,

I think that you are on the right track using a script with xdotool to generate the click but you need 3 scripts in conjunction with masks. (Modifier keys. - Ctrl, Alt & Shift)

Something along the following lines should work:

Code:
<Key mask="C" key=Key keycode="115">exec:leftclick</Key>
<Key keycode="115">exec:middleclick</Key>
<Key mask="A" key=Key keycode="115">exec:rightclick</Key>

_________________
Regards ETP
Accessibility Pups: -- Magoo -- The Pup With No Name -- MouseCam -- Obedient
Back to top
View user's profile Send private message 
greengeek

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

PostPosted: Fri 20 Jun 2014, 16:52    Post subject:  

Thanks ETP.
The problem I am having is that I am using this method on a tablet device that has a Windows (meta) key on its front panel, but no other keyboard keys at all (except what I can get onscreen via xvkbd, but that is no use for this particular "control function" issue).

Without having ctrl or alt keys I am severely limited in what I can do. I could of course add a usb keyboard but that is bulky - I thought maybe I would add a small fingermouse - and then extend its ability to control the tablet by modifying each keyclick by superimposing the meta key, which would in theory give me a six button mouse...
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 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.0473s ][ Queries: 11 (0.0032s) ][ GZIP on ]