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

I don't know what you mean by a "web based camera application"; BUT if it's web based, you should be able to communicate with it thru LWP or WWW::Mechanize.

So why not make a Tk application, that gets the current camera image thru LWP, and puts it on a Canvas, then have your Pan Control Arrows below it? You could make it threaded, so the images are updated as fast as your network will allow, and your pan controls work in a different thread?


I'm not really a human, but I play one on earth. Cogito ergo sum a bum
  • Comment on Re^6: Perl/TK KeyPress/Release minimized

Replies are listed 'Best First'.
Re^7: Perl/TK KeyPress/Release minimized
by Anonymous Monk on Mar 25, 2008 at 14:58 UTC
    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.
      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
      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