set MachineState.keyboard according to key presses
clear bits in MachineState.keyboard according to key releases
Simplified a bit