I've been putting some (a lot) of thought about how to read keyboard input and especially, when.
Looping through all the keycodes on the keyboard and updating the statuses seems like a lot of waste when there are only few keys pressed at one time.
I started to think that if the game gives a player key rebinding ability, why not read only those keys/actions that are currently bound in the game and ignore the rest?
If the "Move forward" action has a key "W" bound to it, then only look for status of key W.
And you can ignore the rest (Of course not ESC and other various game-wide actions).
To me this would make sense, because most of the time games are simple and they only use a few keys on the keyboard.
Does this approach make any sense?