| Author |
Message |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: 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
|
|
 |
ETP

Joined: 19 Oct 2010 Posts: 311 Location: UK
|
Posted: Mon 25 Jun 2012, 02:21 Post subject:
Hot key to move cursor to center of screen |
|
Two possibilities pending a more sensible reply
http://www.youtube.com/watch?v=fQlKewo-kQY
http://www.murga-linux.com/puppy/viewtopic.php?t=37852
_________________ Regards ETP
Currently running Slacko 5.3.3 k-3.1.10
(demo with audio--play flash full screen & press F11)
http://megaswf.com/s/2484946 1080p version Oct 2012
|
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 1540 Location: The Blue Marble
|
Posted: 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
|
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: 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 )? 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.
|
|
Back to top
|
|
 |
stu90

Joined: 25 Feb 2010 Posts: 1401 Location: England. Dell Inspiron 1501. Dpup
|
Posted: 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
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 870 Location: England
|
Posted: 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
|
|
 |
postfs1

Joined: 27 Mar 2010 Posts: 831
|
Posted: 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
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: 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.
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
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: 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.
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. 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. Or maybe it's when I click on anything outside the desktop window.
|
|
Back to top
|
|
 |
Semme
Joined: 07 Aug 2011 Posts: 2053 Location: World_Hub
|
Posted: 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
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: Fri 29 Jun 2012, 08:30 Post subject:
|
|
Thank you, Semme. I should be able to try that by Sunday.
|
|
Back to top
|
|
 |
Semme
Joined: 07 Aug 2011 Posts: 2053 Location: World_Hub
|
Posted: 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..
| Description |
|

Download |
| Filename |
xbindkeys.sh.gz |
| Filesize |
53 Bytes |
| Downloaded |
97 Time(s) |
|
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: 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.
|
|
Back to top
|
|
 |
Semme
Joined: 07 Aug 2011 Posts: 2053 Location: World_Hub
|
Posted: 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
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: 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
|
|
 |
|