capture current input at beginning of frame so that game logic is separated from browser keyboard events