Thomas wrote: > I could need examples in two areas: > > 1. Why we need to learn the scan codes from a keydown event > (synchronuously, that is)
Well, I can imagine a game where you're not checking the keyboard on every frame, but instead want to react to key-down events as you would for typing; yet what matters is not the character generated, but the key position. For example, if you have a Nethack-style adventure game, where the avatar moves one cell for each keypress, you'd want to just use the KeyDown event. But you'd also want to react to keys by their position. You could sort-of do this by comparing the Key parameter to Keyboard.KeyName(knownKeyCode). But that won't work if the Option key is among the modifiers (e.g., to make your avatar move carefully or shoot in that direction or whatnot), since having the Option key down will change the character generated. So, it'd be useful to have a Keyboard.KeyDown method, just like AsyncKeyDown, but that reports the keyboard state at the time the event was generated. > 2. Why Keyboard.KeyName() is not sufficient (i.e. when do you need to > translate a scancode PLUS modifiers into their char codes?) Sorry, I can't think of any useful examples for that. -- Joe Strout [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
