Was you code inside the event checking loop?
My current code passes a function to the window loop which checks the movement of the player eg.:
if(Keyboard.IsKeyPressed(Keyboard.Key.W)) {
y -= speed;
}
if(Keyboard.IsKeyPressed(Keyboard.Key.S)) {
y += speed;
}
You kind of get the point, well it was similar except it used the window.KeyPressed += EventHandler<KeyEventArgs>(myfunctionhere);
And the code was similar, don't have the original code anymore
if(e.Code == Keyboard.Key.W) {
...
}
Difference is the code wasn't much different in body, but the way it interacted was completed different. I could hold down WASD and it would stay going in the direction I wanted my sprite to go until I let go of the key. Using the event handler thing only executed once until i let go and pressed it again. So basically spamming the button to move the sprite anywhere. Like I said in previous posts, I had
win.SetKeyRepeatEnabled(true); set and it gave the same effect. It just didn't work as I intended it to. I needed my sprite to move by frame, funny how much different the C# binding is from C++