Do you by chance know of a way to capture special keys like "Print Screen"?
I have a small script to grab all they keycodes, but it doesn't seem to catch several keys on the keyboard. I've got a utility that I'd like to be able to automagically get a screenshot when something goes wrong so I dont have to hope the user can re-create the error. Universal support would be best, but WinXP is the main OS.

On 11/1/06, Andreas Kostyrka <[EMAIL PROTECTED]> wrote:
Am Mittwoch, den 01.11.2006, 10:14 +0000 schrieb Asrarahmed Kadri:
>
>
> Hi folks,
> How can I know that the user has pressed a particular key or c
> combination of keys.. for example 'q' or 'Ctrl-c' ....?

In practice that depends upon your environment. Unix/Linux, MacOS,
Windows, GUI vs. cmdline have all different ways to "read" from the
keyboard.

Ctrl-c OTOH, usually sends the interrupt signal to the process, and as
such can caught via the KeyboardInterrupt exception:

try:
    somework
except KeyboardInterrupt:
    ctrlc_caught

Andreas

>
> Thanks in anticipation.
>
> Regards,
>
> Asrarahmed
>
>
>
> --
> To HIM you shall return.
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor


_______________________________________________
Tutor maillist  -   Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor




_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to