Playing a sound on keyDown when livecode is not in front
Posted: Tue Mar 22, 2016 5:48 pm
I'm looking to trigger sounds (players--as I have several "channels") on keyDown. But the thing is, I want to do it "in the background"--that is to say when Livecode (my standalone) is up and running but not the front window application. Not possible?--seems it might be.
Let's say for simplicity's sake that I want to make a "typewriter" add-on for fun (
) word processing. So I want Livecode to play a sound (yeah, I know latency is an issue) whenever a key is pressed, to reproduce the sonic experience of writing via a typewriter. Presumably the user would want to type in his or her own word processor and run the typewriter sounds standalone simultaneously but just for effect.
I've read some posts on here about "keylogging" and "listening for keys" by setting up "a timer that listens to the keysDown" and then using some kind of window switching to add the keys to an object in the livecode window. I don't even want to do anything as complicated as record the keys--just play a sound. This must be possible through a similar method to http://forums.livecode.com/viewtopic.php?f=9&t=4421 but some of the links on that thread are broken and I don't quite understand. Thanks for any help you can offer!
Let's say for simplicity's sake that I want to make a "typewriter" add-on for fun (

I've read some posts on here about "keylogging" and "listening for keys" by setting up "a timer that listens to the keysDown" and then using some kind of window switching to add the keys to an object in the livecode window. I don't even want to do anything as complicated as record the keys--just play a sound. This must be possible through a similar method to http://forums.livecode.com/viewtopic.php?f=9&t=4421 but some of the links on that thread are broken and I don't quite understand. Thanks for any help you can offer!