Цитата(Derek @ Nov 14 2008, 18:22)

Привожу фрагмент аналога:
Products are scanned based on the KEY_SCAN register value. Each complete array scan starts with ROW 7 and then progresses to ROW0, 1 , and so on because of the pipelined nature of the key scan controller. Keys in this ROW have precedence and are considered first in the scan order because ROW7 is scanned first. When a key is pressed, it may mechanically bounce for a up to 20 msec. The key array scan circuit will count the nu,ber of consecutive scans that decode to the same 1 or 2 first keys encountered from the start of a scan.
В переводе на русский это значит, что в связи с особеностями аппаратной реализации наивысший приоритет имеет ROW7, затем 0, 1, т и т.д. По большому счету скан-коды можно в дальнейшем преобразовать как угодно, а приоритетность кнопок решать соответствующей разводкой матрицы на панели