Hi Dan,

The reason it is there, is that Flash's own GetKeyState doesn't function properly on instances playing with WMODE set "transparent" (which is the mode SWHX uses) on Windows and OSX.

With SWHX keyboard events travel from the message-loop directly into Flash (using NPAPI, NPP_HandleEvent - here: http://developer.mozilla.org/en/docs/NPEvent is says that on Linux, XWindow XEvents are expected btw.) hence SWHX doesn't register key states internally.

If it's simply impossible to get global keyboard modifier state on Linux than I'm afraid there's little we can do about that.

Cheers,
Edwin

daniel fischer wrote:
Edwin van Rijkom <[EMAIL PROTECTED]> (on Tue, 28 Nov 2006 17:25:17 +0100):

> Small commits are good imho. It's often also handy to update CHANGES.txt > just before committing, otherwise changes often get 'lost'.

k, i'll update CHANGES at the end of a session :)


a different issue- i'd like to dispute the getKeyState function, for the simple 
reasons that

 a) i cannot find a way to get the global keyboard modifier state on gtk (on 
straight X it might be possible, but it's much better to stick with gtk i 
think). there is gtk_get_current_event_state, but it gives us nada unless we 
run a gtk_main event loop and window. you might argue we'll do that anyhow in 
swhx but i'm not so sure.

 b) it seems flawed design anyhow: info about modifier state should travel with 
keyboard (and mouse) events, no? i could find no reference to getKeyState in 
swhx sources. where would this actually be used?

unless there's good use of it, i'm all in favor of deprecating (or removing) 
getKeyState.

-dan




--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to