use named functions to identify special scan codes
rename scan code variable
use a data structure to track sets of scan codes
simplify lookup function signature