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 Jul 2015, 08:23
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 Posts_count  
Author Message

Joined: 20 Jul 2010
Posts: 3135
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:

Mousekeys wiki is here:

And this post refers to “accessx” as a means of controlling the bindings

Gnome seems to have a “universal access menu” for similar functions:

Back to top
View user's profile Send_private_message 

Joined: 20 Jul 2010
Posts: 3135
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 

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

PostPosted: Wed 21 Nov 2012, 04:08    Post_subject:  

I got an idea from another post here:

seaside suggested using the xdtool program which technosaurus made available here:

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:


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:

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:

<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 

Joined: 19 Oct 2010
Posts: 692
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

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

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

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

There is more on this subject in my thread here:

Regards ETP

Back to top
View user's profile Send_private_message 

Joined: 20 Jul 2010
Posts: 3135
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:

<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:

<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:

<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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1961s ][ Queries: 12 (0.0321s) ][ GZIP on ]