in reply to SendKeyCode using X11::SendEvent
and the debug out looked good#!/usr/bin/perl use warnings; use strict; use X11::SendEvent; $|++; my $win = X11::SendEvent->new( win => [ 'foo' ], debug => 1 ); $win->SendString( "testing", [ "Return" ] ); $win->SendString( "user", [ "Return" ], "joe", [ "9/1" ] ); $win->SendKeycode( 119 );
zentara@:zentara$ ./send-event1 > X11::SendEvent - FindWin() > X11::SendEvent - - 41943053 [0x280000d]
So I looked at xvkbd and followed their basic instructions. It worked, but I needed to use the "focus" button technique described in the man page. It has to do with the "focus follows mouse" setting of your Window Manager. So I believe that the problem is the window you are trying to send to, must take focus for the script to work. I havn't figured out how to send a WM control to programatically force focus on an arbitrary window, but I think that is what you need to do before sending the events.
|
|---|