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 Sat 30 Aug 2014, 04:38
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Doubleclick function performed by keyboard key [SOLVED]
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: 2502
Location: New Zealand

PostPosted: Mon 19 Nov 2012, 12:16    Post subject:  Doubleclick function performed by keyboard key [SOLVED]  

My elderly father has trouble with using a double click function. I have puppy set up so that most functions are single click, but unfortunately it seems that it is not possible to convert all double click functions to single click (due to gtk restraints etc) so I would like to find a way to make one key on the keyboard function as a double click button.

The most important requirement for doubleclick seems to be when he is trying to view his emails. The webmail client provided by his ISP requires a doubleclick to open each email.

I have found various posts which refer to the “mousekeys” function built in to Xorg, however it appears that accessing those functions requires use of “SHIFT + NUMLOCK” and the numlock key is unfortunately not present on my laptops or netbook.

Also, I really only want one single button to have a special function like this - rather than a whole cluster of buttons which would confuse matters.

Does anyone have any suggestions about how to enable such a function?

I am planning to disable the button click functions on the mouse as my father keeps moving icons each time he tries to move the mouse. I may rewire the mouseclick buttons so that he can access them on a separate button panel (or I may use a trackball for motion and a separate mouse for button clicks) - but solving the doubleclick issue will be quite important. If I can't do it programatically I will need to invent a two-pulse-generator circuit that grafts into the singleclick button circuit. Probably not a good idea as most of my attempts at electronic wizardry end up looking like a Sherman tank with an extension cord hanging out the side.

Other “mousekeys" posts here:
http://www.murga-linux.com/puppy/viewtopic.php?t=62051
http://murga-linux.com/puppy/viewtopic.php?p=665626
http://murga-linux.com/puppy/viewtopic.php?p=611532
http://www.murga-linux.com/puppy/viewtopic.php?t=23386
http://www.murga-linux.com/puppy/viewtopic.php?p=468265

Mousekeys wiki is here:
http://en.wikipedia.org/wiki/Mouse_keys

And this post refers to “accessx” as a means of controlling the bindings
http://www.murga-linux.com/puppy/viewtopic.php?t=2162&start=16

Gnome seems to have a “universal access menu” for similar functions:
http://library.gnome.org/users/gnome-help/stable/mouse-mousekeys.html.en

Last edited by greengeek on Wed 21 Nov 2012, 04:17; edited 3 times in total
Back to top
View user's profile Send private message 
greengeek

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

PostPosted: Tue 20 Nov 2012, 04:53    Post subject:  

OK, just for the record, it seems that I can use this function if I add a full size keyboard and do the following:

Press SHIFT and NUMLOCK togther (should hear "beep"),
Place cursor over the item I want to doubleclick,
Press the "+" key on the numeric keypad.

This works on Slacko5.3 without any other software changes or additions.

If I can find a way to change from the "+" key to say, the F9 key I will be happy. Then if I can find a way to trigger the mousekeys function on without needing the NUMLOCK key I will be ecstatic.
Back to top
View user's profile Send private message 
greengeek

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

PostPosted: Wed 21 Nov 2012, 04:08    Post subject:  

I got an idea from another post here:
http://www.murga-linux.com/puppy/viewtopic.php?t=76708

seaside suggested using the xdtool program which technosaurus made available here:
http://www.murga-linux.com/puppy/viewtopic.php?t=79573

I tinkered with it and it is quite easy to set up what I was looking for - when I press the F9 key it now behaves like a "doubleclick" function.

Here's how:

1) First I downloaded the xdotool program from the post above and put it into /usr/bin.

2) Then 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)

3) 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 to all the contributors on the listed posts. Very helpful.
Back to top
View user's profile Send private message 
ETP


Joined: 19 Oct 2010
Posts: 535
Location: UK

PostPosted: Wed 21 Nov 2012, 05:07    Post subject: Doubleclick function performed by keyboard key [SOLVED]  

Hi greengeek,

You don’t now actually need the script. Change

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

To:
Code:
<Key keycode="75">exec:xdotool click 1 click 1</Key>


Mapping to one key (F9) may cause problems if an application re-maps it and makes use of it. (Use a key-mask instead such as CTRL+F9 if you encounter this issue)
OR
If using a full sized keyboard with two windows (super) keys use the right hand one as follows. (Keep your paws off the left hand one as I have it bagged Wink )

Code:
<Key keycode="116">exec:xdotool click 1 click 1</Key>

There is more on this subject in my thread here:
www.murga-linux.com/puppy/viewtopic.php?t=81413

_________________
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: 2502
Location: New Zealand

PostPosted: Wed 21 Nov 2012, 14:08    Post subject:  

.
Awesome, thanks ETP. That simplifies it even further.

I decided not to use a keymask as it introduces an extra difficulty for my father - he would have to concentrate on two keys at once which is asking too much at the moment.

I will have to be cautious about what other apps might do with that key.

EDIT 1: I wonder if "SHIFT F9" has any meaning? He will probably have to master the shift key eventually. If it works that might be a suitable keymask if required.

EDIT 2:I have successfully activated the F9 as a doubleclick function and in order to test it I place the mousepointer over the trash folder and press the F9 key. The trash folder opens and is empty. Then, as ETP has suggested, I decided to try using a keymask so that instead of just pressing the F9 key, you have to press ALT and F9 together.

I opened the hidden file jwmrc etc as text and saw the keybindings like this:
Code:

<Key mask="A" key="#">desktop#</Key>
<Key mask="A" key="F1">root:3</Key>
<Key mask="A" key="F2">window</Key>


so I added one in for “ALT F9“ by following those examples with a slight modification as follows:
Code:

<Key mask="A" key="F9">exec:doubleclick_xdotool</Key>


(Then restarted the jwm)

That worked fine, so I thought I would try another modification by trying to use SHIFT F9 instead of ALT.

so I added one in for “SHIFT F9“ by following those examples with a slight modification as follows:
Code:

<Key mask="S" key="F9">exec:doubleclick_xdotool</Key>


It DOES activate the SHIFT F9, but I don’t get the result I expect.

Now when I put the mousepointer over the trash folder and press the Shift F9 key I get the trash folder opening, but it’s not empty as it normally is - it seems to contain a cluster of items as follows:
Help directory
template directory
AppInfo.xml file
AppRun bash file
systemmsh.wav symlink


Then I tried “C” (for CTRL) instead of “A” and the function stopped working - pressing CTRL F9 had no visible effect at all.

I need to do a bit more research about keybindings.

At least the method works for F9 or ALT F9.
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.0680s ][ Queries: 11 (0.0035s) ][ GZIP on ]