use switch statement to process a scan code