[Matplotlib-users] changing the cursor position with a key press
Does anyone have an example showing how to change the cursor position using the key pad instead of the mouse? -Mathew -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] changing the cursor position with a key press
On Wednesday, August 17, 2011, Mathew Yeates mat.yea...@gmail.com wrote: Does anyone have an example showing how to change the cursor position using the key pad instead of the mouse? -Mathew Are you talking about externally to mpl or within mpl? I have some code from a couple of months ago that automated graph interaction that allowed me to exactly reproduce various actions so I could profile the execution. It uses the Gtk accessibility framework to control the mouse. Ben Root -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] changing the cursor position with a key press
I'm looking for something like - display = gdk_display_get_default (); screen = gdk_display_get_default_screen (display); /* get cursor position */ gdk_display_get_pointer (display, NULL, x, y, NULL); /* set new cusor position */ x += xadd; y += yadd; gdk_display_warp_pointer (display, screen, x, y); On Wed, Aug 17, 2011 at 11:52 PM, Benjamin Root ben.r...@ou.edu wrote: On Wednesday, August 17, 2011, Mathew Yeates mat.yea...@gmail.com wrote: Does anyone have an example showing how to change the cursor position using the key pad instead of the mouse? -Mathew Are you talking about externally to mpl or within mpl? I have some code from a couple of months ago that automated graph interaction that allowed me to exactly reproduce various actions so I could profile the execution. It uses the Gtk accessibility framework to control the mouse. Ben Root -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] changing the cursor position with a key press
Here is how to do it display=mainwindow.get_display() screen = gtk.gdk.Display.get_default_screen(display) x,y=mainwindow.get_pointer() s,x,y,m = display.get_pointer() gtk.gdk.Display.warp_pointer(display, screen,x+1,y) On Wed, Aug 17, 2011 at 11:53 PM, Mathew Yeates mat.yea...@gmail.com wrote: I'm looking for something like - display = gdk_display_get_default (); screen = gdk_display_get_default_screen (display); /* get cursor position */ gdk_display_get_pointer (display, NULL, x, y, NULL); /* set new cusor position */ x += xadd; y += yadd; gdk_display_warp_pointer (display, screen, x, y); On Wed, Aug 17, 2011 at 11:52 PM, Benjamin Root ben.r...@ou.edu wrote: On Wednesday, August 17, 2011, Mathew Yeates mat.yea...@gmail.com wrote: Does anyone have an example showing how to change the cursor position using the key pad instead of the mouse? -Mathew Are you talking about externally to mpl or within mpl? I have some code from a couple of months ago that automated graph interaction that allowed me to exactly reproduce various actions so I could profile the execution. It uses the Gtk accessibility framework to control the mouse. Ben Root -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] changing the cursor position with a key press
On Wed, Aug 17, 2011 at 7:01 PM, Mathew Yeates mat.yea...@gmail.com wrote: Here is how to do it display=mainwindow.get_display() screen = gtk.gdk.Display.get_default_screen(display) x,y=mainwindow.get_pointer() s,x,y,m = display.get_pointer() gtk.gdk.Display.warp_pointer(display, screen,x+1,y) Ok, glad that works for you. For reference, the email I was referring to is here: http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg08321.html The toolkit offers a bunch of other tools for scripting out interaction, in case anybody cares about that sort of thing. (actually, might be a good idea to consider adding stuff like that to the testing suite...) Ben Root -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] changing the cursor position with a key press
cool, On Wed, Aug 17, 2011 at 5:15 PM, Benjamin Root ben.r...@ou.edu wrote: On Wed, Aug 17, 2011 at 7:01 PM, Mathew Yeates mat.yea...@gmail.com wrote: Here is how to do it display=mainwindow.get_display() screen = gtk.gdk.Display.get_default_screen(display) x,y=mainwindow.get_pointer() s,x,y,m = display.get_pointer() gtk.gdk.Display.warp_pointer(display, screen,x+1,y) Ok, glad that works for you. For reference, the email I was referring to is here: http://www.mail-archive.com/matplotlib-devel@lists.sourceforge.net/msg08321.html The toolkit offers a bunch of other tools for scripting out interaction, in case anybody cares about that sort of thing. (actually, might be a good idea to consider adding stuff like that to the testing suite...) Ben Root -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users