in reply to Creating keybinds GLOBALY!

You want to run a specific task when you press a specific key? I'd use AutoHotkey
Update: Fixed URL.

davis
Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.

Replies are listed 'Best First'.
Re^2: Creating keybinds GLOBALY!
by Ace128 (Hermit) on Aug 04, 2005 at 11:22 UTC
    That url gets me to microsoft.com...
    Anyway, I want it in perl... Say we got this simple thing:
    use Tk; my $main = new MainWindow(-title => "Global Testing"); $main->bind("<KeyPress>", sub {print "Hello there!"}); MainLoop;
    Now, the binding doesnt work when window is out of focus... (as someone said is impossible to make working in tk in some other thread here at PerlMonks...)
      Anyway, I want it in perl...
      I really have to ask... why?
      You can make AutoHotkey run any abitrary program. I've used it to launch perl scripts, .bat scripts, etc. And yes, you're correct, you can't use Tk to bind a keypress when the window's out of focus. (At least, not that I know of)

      davis
      Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.
        How about using Win32::API/Win32::GUI?
Re^2: Creating keybinds GLOBALY!
by 5mi11er (Deacon) on Aug 04, 2005 at 14:39 UTC
    Looks interesting... Fixed URL is here.

    Update: URL fixed in post by davis above

    -Scott