Multiple Input From Keyboard C# WPF
- by Alex
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