Page 1 of 1

PrtScn key and rawKeyDown

Posted: Wed May 11, 2011 5:12 pm
by deebee
Hey all,

rawKeyDown does not seem to capture the PrtScn key (65377) but rawKeyUp does.

Is this intentional or a bug?

Re: PrtScn key and rawKeyDown

Posted: Wed May 11, 2011 9:22 pm
by BvG
sounds like a bug to me.

Re: PrtScn key and rawKeyDown

Posted: Thu May 12, 2011 2:44 am
by deebee
Thanks!
E-mailed support.

Re: PrtScn key and rawKeyDown

Posted: Thu May 12, 2011 6:09 pm
by jacque
Not a bug. Windows doesn't send rawKeyDown for several key presses, and Print Screen is one of them.

Re: PrtScn key and rawKeyDown

Posted: Thu May 12, 2011 8:25 pm
by BvG
Still a bug, because if that is true, livecode should circumvent that by supplying it's own.

Re: PrtScn key and rawKeyDown

Posted: Thu May 12, 2011 9:03 pm
by jacque
I don't think it can. If the OS doesn't tell LiveCode there's been a keypress, it can't know the key went down. LiveCode doesn't monitor the keyboard directly, it relies on the OS to notify it.

Re: PrtScn key and rawKeyDown

Posted: Thu May 12, 2011 11:11 pm
by mwieder
...and it's not just Windows, much as I'd like to blame them for this. Same thing on linux - there are certain keypresses that the OS intercepts before any application gets to them. The OS uses them and in certain cases doesn't pass them on. There are sneaky ways to get into the OS message loop, and there are utilities that do this: fancy things with screen printing, for example, but they're very special purpose things and no general-purpose IDEs - they have to get their hooks deep into the OS in order to get there before the OS grabs the keystrokes.

Re: PrtScn key and rawKeyDown

Posted: Thu May 12, 2011 11:33 pm
by jacque
mwieder wrote:...and it's not just Windows
OS X too -- like all the Command key shortcuts that manage window switching, Spaces, app switching, etc. It's impossible to intercept anything that OS X has decided "belongs" to it. And unfortunately they've usurped almost all the keyboard characters now, so there are very few command key combinations left for our apps to use.

Grumble.