simplify implementation of keyboard scan buffer
remove unused data structure
rename scan buffer functions