in reply to Re^6: Perl/TK KeyPress/Release minimized
in thread Perl/TK KeyPress/Release minimized

wow... that sounds complicated...lol I'm trying to use my basic Pan/Tilt/Zoom app along with flash based web camera applications. Many websites use flash to stream video back and forth from user to user and I want to be able to use my application to control my camera when I'm using their steaming application. As I've said, it all works very well at this point except the keyboard bindings that don't work when my application loses focus. I guess I'll set up a socket and run the key logging application actkbd.c to send events to my application, but I wanted a cleaner, strickly Perl way of doing it all.
  • Comment on Re^7: Perl/TK KeyPress/Release minimized

Replies are listed 'Best First'.
Re^8: Perl/TK KeyPress/Release minimized
by zentara (Cardinal) on Mar 25, 2008 at 19:34 UTC
    Yeah, I see; if you are stuck with Flash, you might ask some Flash gurus to help modify the flash app to add arrow-controls. That would be the wisest thing. But if I was to guess, I would say to investigate the /dev/kbd stuff.....to intercept the keys....but as joost warned, you tread on dangerous ground because you may just be creating a keystoke logger on yourself.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re^8: Perl/TK KeyPress/Release minimized
by zentara (Cardinal) on Mar 26, 2008 at 12:13 UTC
    The thought occurred to me last night, that you may be able to solve this in your Window Manager setup. In my ICEWM configuration, I have an option for determining how focus shifts..... you can select "mouse focus" or "click to focus". If you select "click to focus" it may maintain focus on your Tk app as you move the mouse around( of course you can't click on anything else :-) ).

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum