drop volatile qualifier when accessing scan code buffer
remove unnecessary variable
move shift key labels into key data structure
simplify lookup function