Page 1 of 1

KeyDown Event Once only

PostPosted: Fri May 28, 2004 1:04 pm
by ingsan
Hello everyone !

Q : How can a KeyDown Event occur only ONCE ?
R : Well, actually after assigning your KeyDownEvent with an Action in Script, you add EVENTDISABLE to disable your actual Keydown Event.

:roll: Poor me !

PostPosted: Fri May 28, 2004 1:07 pm
by ingsan
Oh ! I forgot !
How can I point to "any letter" of the alphabet using one and only code ? That is, whenever I click on G, the letter G appears, or whenever I click on Z, then Z appears. Do I have to declare the KeyDown Event for EACH letter ?

PostPosted: Fri May 28, 2004 3:23 pm
by makslane
Use the getLastKey and getKeyText functions

To see how works, go to:

Help -> Get Newest Tutorials

After update, run:

Help -> Script -> Catch any pressed key

PostPosted: Fri May 28, 2004 4:07 pm
by ingsan
Wow that's really amazing ! Have you seen my tutorial concerning the False input text ? So, you've also seen that I've written each and every single letter of the alphabet :oops:
But one last thing. I see that when you click on "space", what is written is actaully SPACE. Is there a way to replace that with an Empty space instead of SPACE ? Remap or something ? :mrgreen:
Or can we limit the keys to only alphabetical letters ?

PostPosted: Fri May 28, 2004 5:15 pm
by ingsan
Oh I found a little solution for limiting the keys to specific ones only :idea: Instead of having a True Type Font, use an ASCII file with alphabetical Letters ! This limits the keys to ONLY alphabetical letters

However there is some problem with SPACE and RETURN keys :?
For Space, maybe should I put a space somewhere in my ASCII files.
But for ENTER ? Maybe add an Action on it to hide the bug :)

What do you think ?

PostPosted: Sat May 29, 2004 10:14 pm
by makslane
Use something like this:

if(getLastKey() == KEY_RETURN)
{
//Your action...
}

PostPosted: Mon May 31, 2004 9:28 pm
by ingsan
CooL 8)