Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: catching ctrl+key combination

by samwyse (Scribe)
on Jul 30, 2013 at 18:19 UTC ( #1047086=note: print w/replies, xml ) Need Help??


in reply to catching ctrl+key combination

Skip Perl, use AutoHotKey instead. To quote their home page:

AutoHotkey is a free, open-source utility for Windows. With it, you can:
  • Automate almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or use the macro recorder.
  • Create hotkeys for keyboard, joystick, and mouse. Virtually any key, button, or combination can become a hotkey.
  • [and a lot more that isn't relevant to your needs]
The only "problem" is that it's syntax is like nothing you've ever seen. OTOH, (a) you can launch external programs, such as Perl scripts, without much effort, and (b) there's a forum that's always willing to help.

Replies are listed 'Best First'.
Re^2: catching ctrl+key combination
by SuicideJunkie (Vicar) on Jul 30, 2013 at 18:30 UTC

    I'll second that. AHK is specifically targeted for the OP use case. You can do the key monitoring, the selection grab and the pass-on-to-perl script in about one line each.

    The syntax and commands are certainly unique, so you'll want to have the AHK help file open at all times.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047086]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2020-11-24 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?