Multiple Input From Keyboard C# WPF
        Posted  
        
            by Alex
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Alex
        
        
        
        Published on 2010-04-06T15:14:25Z
        Indexed on 
            2010/04/06
            15:23 UTC
        
        
        Read the original article
        Hit count: 314
        
I am writing a Tetris clone in WPF. If I hold down the right arrow key, the current piece shifts right. For playability, I want to allow the user to press another key (i.e. F-key) and rotate the moving piece without having to let go of the right arrow key first. Currently when I do this, the piece stops shifting.
My first basic attempt at this was hooking into
Window_PreviewKeyDown(object sender, KeyEventArgs e)
and then sending a message to the controller layer.
How do I structure my input-listening code to allow this?
My current code Here
© Stack Overflow or respective owner