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 20 Dec 2014, 19:55
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Hot key to move cursor to center of screen (Solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [35 Posts]   Goto page: 1, 2, 3 Next
Author Message
Flash
Official Dog Handler


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

PostPosted: Mon 25 Jun 2012, 00:44    Post subject:  Hot key to move cursor to center of screen (Solved)  

Is there a secret key, or combination of keys, which will move the cursor to the center of the screen? I'm forever running my mouse in circles to find the cursor. Maybe it would save time if I could move the cursor to a known location with a function key.

When Puppy boots, the cursor first shows up in the center of the screen. Could I tie a function key to that script or program?

Last edited by Flash on Wed 04 Jul 2012, 11:54; edited 2 times in total
Back to top
View user's profile Send private message 
ETP


Joined: 19 Oct 2010
Posts: 582
Location: UK

PostPosted: Mon 25 Jun 2012, 02:21    Post subject: Hot key to move cursor to center of screen  

Two possibilities pending a more sensible reply Laughing

http://www.youtube.com/watch?v=fQlKewo-kQY

http://www.murga-linux.com/puppy/viewtopic.php?t=37852

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

Joined: 26 Feb 2007
Posts: 2232
Location: The Blue Marble

PostPosted: Mon 25 Jun 2012, 03:00    Post subject:  

xdotool will help you to move the mouse http://www.semicomplete.com/projects/xdotool/xdotool.xhtml (see mousemove)
You need something to bind your keys to an app; for example xbindkeys or sven.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Tue 26 Jun 2012, 00:27    Post subject:  

Thanks, jamesbond, it sure looks like mousemove --polar 0 0 would do the trick, if I could only arrange somehow for the F12 key (for instance) to cause that command to execute. Any chance of an xdotool .pet for Racy Puppy (or any Puppy; I'm not particular Smile )? According to the project site, it requires xlib and xtst. I assume Puppy must have xlib. I don't know what else it might require. I can't tell how big it would be either.

Edit: I did a forum search for xdotool. I see that a .pet is available somewhere. It's past my bedtime now so I'll have to look for it tomorrow. Smile
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Tue 26 Jun 2012, 06:46    Post subject:  

Hi Flash,
Not Sure i it works in Racy or not? but here is a .pet for xdotool
http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=43168 (44 KB)

xdotool mousemove --polar 0 0
Works for me in Exprimo puppy.

For key bind in openbox at least just add to /root/.config/openbox/rc.xml
in the 'key binding for running applications' "W-c" is Windws/Super key plus c key.

<keybind key="W-c">
<action name="Execute">
<enabled>true</enabled>
<name>center cursor</name>
<command>xdotool mousemove --polar 0 0</command>
</action>
</keybind>

cheers.

Last edited by stu90 on Tue 26 Jun 2012, 06:54; edited 1 time in total
Back to top
View user's profile Send private message 
Jasper


Joined: 25 Apr 2010
Posts: 1204
Location: England

PostPosted: Tue 26 Jun 2012, 06:54    Post subject:  

Hi Flash,

Probably useless (but if I remember correctly you use a Kensington roller-ball mouse): if so then whilst reading this, move the ball diagonally left and upward and right-click. The cursor presumably is at the top left corner of the new window (or a least somewhere vertically on the left if there was insufficient upward movement).

Similarly, with a blank screen the cursor should ideally appear at the top left of the Menu window.

I use xdotool for some automated tasks (though not including locating or placing my cursor). I'm none too bright so it took me quite a while (about 3 hours) to get the hang of it and type all commands in appropriate upper/lower case. It works well, though it seems (for my use) to be more consistently reliable with "click" rather than "sloppy" window focus.

My regards
Back to top
View user's profile Send private message 
postfs1


Joined: 27 Mar 2010
Posts: 831

PostPosted: Tue 26 Jun 2012, 12:32    Post subject:  

[1]http://ubuntuforums.org/showthread.php?t=1452983

Information about web-page: vBulletin ©2000 - 2012, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry

[2]http://s481.codeinspot.com/q/427604
Information about web-page: Logo, design and layout © 2011 CodeInSpot HugAnswer


There is a combination of keyboard buttons to find the mouse pointer when the 'JWM' is an active window manager:
Alt+F1 ; arrow-'v'

Also:
Alt+Shift+NumLock ; 7 ; Alt+Shift+NumLock

_________________
  • I don't know why laboratories are named a hospitals.
  • The alive personage is like a tea bag with granules of unknown density inside, at that one the packet was made of organic material and was placed in the evaporated liquid or liquid.

Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Tue 26 Jun 2012, 23:54    Post subject:  

Stu90, the xdotool pet works in Racy too, or at least it correctly executes that command. Thanks, but where is the post it was attached to? I couldn't find it.

Racy doesn't have openbox so I'll have to find another way to make my F10 key (or my Windows key) execute that command.

I little GUI that consists of a field for the command that I want a keypress to execute, and another field where I'd click the key that I want to execute that command, to "teach" Puppy, would be nice right about now. Laughing

Jamesbond, I'm pretty sure I've seen xbindkeys mentioned in the forum. I'll look for it and sven.

Postfs1, none of those key combinations work, at least in my Racy, which I assume uses JWM.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Wed 27 Jun 2012, 00:52    Post subject:  

Okay, I found the xbindkeys 1.8.3 and xbindkeys-config 0.1.3.3 .pets attached to a post in the forum and installed them. Both .pets are about 44 KB. That small and useful, I don't know why Puppy doesn't come with them. Confused

After binding my F10 key to the command, for a while, when I pressed my F10 key the cursor magically appeared in the center of the screen. It quit working though while I was typing this. Ah well, easy come, easy go. Laughing At least I know it can be made to work. I first tried to bind it to the Windows key but that didn't work at all.

What I discovered is that the xbindkeys thing works until I click on something in the system tray. Sad Or maybe it's when I click on anything outside the desktop window.
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 4136
Location: World_Hub

PostPosted: Fri 29 Jun 2012, 06:55    Post subject:  

You have an .xbindkeysrc file in /root? No? Create it'n reset your bind- X'll probably need a restart..
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Fri 29 Jun 2012, 08:30    Post subject:  

Thank you, Semme. I should be able to try that by Sunday. Smile
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 4136
Location: World_Hub

PostPosted: Fri 29 Jun 2012, 08:54    Post subject:  

Almost forgot- you'll need an executable one-a-deez in your *Startup* folder.. the real reason the bind didn't stick..
xbindkeys.sh.gz
Description 
gz

 Download 
Filename  xbindkeys.sh.gz 
Filesize  53 Bytes 
Downloaded  156 Time(s) 
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Fri 29 Jun 2012, 10:07    Post subject:  

Okay Semme, there was already a xbindkeysrc file in /root when I looked. It's a hidden file if that makes any difference.

I copied your xbindkeys.sh to /root/startup and made it executable (using ROX's right-click menu.)

Then I ran Xbindkeys, installed the command, chose the F10 key, saved and exited Xbindkeys, then restarted X.

What I found is that the F10 key will move the cursor to the center of the screen twice for each time I run Xbindkeys and choose the F10 key. Each time, it quits working after pressing the F10 key twice (and moving the cursor off center after each press of the F10 key.) All I have to do to make it work again is run Xbindkeys and choose F10 again.

The xbindkeysrc file in /root is unchanged after it quits working. I can't find anything that changes. Confused
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 4136
Location: World_Hub

PostPosted: Fri 29 Jun 2012, 10:10    Post subject:  

Have you refired X since moving the script to Startup? Perhaps a reboot?

I'm guessing even xdotool needs a startup script..
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Fri 29 Jun 2012, 10:13    Post subject:  

Yes. Sorry, I went back and added that to my last post while you were writing yours.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [35 Posts]   Goto page: 1, 2, 3 Next
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.0864s ][ Queries: 12 (0.0046s) ][ GZIP on ]