Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: kbhit() - up/down key events ?

From: dness:home at: 24-Jun-2001 12:02

Anton wrote:
> It should be possible to poll the keyboard to see > which keys are currently down. If this is done > regularly enough, then we could get the functionality > I want above. > How could action games like half-life work without > such functionality? > > Anton.
There is surely no problem in principle, as piano keyboards prove, in detecting key movement. Indeed, some music keyboards even arrange to output `velocity' information so that you can detect how hard the keys were pressed. Of course, such keyboards often cost thousands of dollars. However, I don't know of _any_ PC keyboard that has a key-depress/strobe interface anymore. All of the ones I know of use a serial port, PS2 port or USB port to connect, and these interfaces generally deliver the decoded key, _not_ the pre-decode information. Some PC keyboards _do_ have an `autorepeat' feature that will cause the keyboard to send repeated copies of a character at some frequency when the key is held down, though. I don't play games on computers, so I can't answer the part of your question that refers to them.