use binary search to find the label for a scan code