PrtScn key and rawKeyDown

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am
Location: Illinois, USA

PrtScn key and rawKeyDown

Post by deebee » Wed May 11, 2011 5:12 pm

Hey all,

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

Is this intentional or a bug?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: PrtScn key and rawKeyDown

Post by BvG » Wed May 11, 2011 9:22 pm

sounds like a bug to me.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am
Location: Illinois, USA

Re: PrtScn key and rawKeyDown

Post by deebee » Thu May 12, 2011 2:44 am

Thanks!
E-mailed support.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7266
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: PrtScn key and rawKeyDown

Post by jacque » Thu May 12, 2011 6:09 pm

Not a bug. Windows doesn't send rawKeyDown for several key presses, and Print Screen is one of them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: PrtScn key and rawKeyDown

Post by BvG » Thu May 12, 2011 8:25 pm

Still a bug, because if that is true, livecode should circumvent that by supplying it's own.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7266
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: PrtScn key and rawKeyDown

Post by jacque » Thu May 12, 2011 9:03 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: PrtScn key and rawKeyDown

Post by mwieder » Thu May 12, 2011 11:11 pm

...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.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7266
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: PrtScn key and rawKeyDown

Post by jacque » Thu May 12, 2011 11:33 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”