alon

alon

  • NA
  • 9
  • 0

timing how long key is down(pressed)

Mar 11 2009 11:58 AM

Hi everyone,

I need to build a morse code translator program using the keys on the keyboard.

I have already found out how to translate the morse code itself to text but I still have one major problem.

I need to find out how long I'm pressing a certain key to determined if this is a dash, a dot or a space (morse language). In order to do so I think I need to use the key_down function and the timer, but I don't really figured out how.

I also need to do this method a long duration of time (if I want to write a sentence) so the operation shouldn't run only once.

Can you help me or even give me some guidance? 


Answers (9)