Keybinds for a wpf Tetris game (And maybe Music?)?

I am currently stuck on trying to implement a function, so you can change your Keybinds. Also I'd like to add music, but don't know how, but since that is not as important as the keybinds since it has nothing to do with the gameplay, that can wait. I honestly have no Idea what files/information I should provide, since there are quite a few haha.
5 Replies
lelewithheart
lelewithheart5mo ago
GitHub
GitHub - lelewithheart/Tetris
Contribute to lelewithheart/Tetris development by creating an account on GitHub.
Pobiega
Pobiega5mo ago
You could add a "bind key" button for each keybind, and when pressed you listen for the next "OnKeyDown" event and register that key?
lelewithheart
lelewithheart5mo ago
how do I make EventListeners in C#? I'm only starting with C#, I usually use JS haha
Pobiega
Pobiega5mo ago
You already have some. What so you think MainWindow_OnKeyDown is?
lelewithheart
lelewithheart5mo ago
ohhh okay, that didn't really make sense to me haha i used tutorials for most of the xaml-related stuff, cuz that was really new to me haha