Auto swap order of finding key to generate scan codes
AssigneeLenovo (Singapore) Pte. Ltd.
InventorKE MA
Life of this patent
Estimating the term…
Abstract
A keyboard system includes a keyboard matrix; and an embedded controller in communication with the keyboard matrix, wherein the embedded controller is configured to: determine whether, in a single scan cycle of the keyboard matrix, multiple keys have been pressed or only a single key has been pressed; if only a single key has been pressed, learn an order of pressed keys in a plurality of scan cycles; and if multiple keys have been pressed, generate an order of the pressed multiple keys based on the learned order of pressed keys.
Claims19
A keyboard system, comprising:
- a keyboard matrix;
- and
- an embedded controller in communication with the keyboard matrix, wherein the embedded controller is configured to:
- determine whether, in a single scan cycle of the keyboard matrix, multiple keys have been pressed or only a single key has been pressed;
- if only a single key has been pressed, learn an order of single pressed keys in a plurality of scan cycles;
- and
- if multiple keys have been pressed, generate an order of the pressed multiple keys based on the learned order of single pressed keys.
An embedded controller in a keyboard system having a keyboard matrix, wherein the embedded controller is configured to:
- for each of a plurality of scan cycles of the keyboard matrix, determine whether only a single key is pressed;
- for each determined single key pressed, create a respective array in a two-dimensional array, wherein each respective array is created according to:
- [Latest_key][1 . . . n];
- [1 . . . n][Latest_key];
- [Latest_key][Latest_key];
- wherein Latest-Key is the single key pressed in a given scan cycle and n is a number of columns and a number of rows in the two-dimensional array;
- for each of the plurality of scan cycles of the keyboard matrix, determine whether M number of multiple keys is pressed during one of the scan cycles;
- for each key_m pressed of the multiple keys, calculate a sum of an array [key_m][1 . . . M] according to:
- SUM key_m=Σi=1n,Array[keym][i];
- arrange all SUM key_m in a sum numerical order;
- and
- send scan codes for each of the key_m pressed during the single scan code in a sending order according to the sum numerical order.
A method of sending scan codes in a keyboard system having a keyboard matrix, comprising:
- when only a single key is pressed during each of a plurality of scan cycles of the keyboard matrix, then for each single key pressed:
- set a first array of [Latest_key][1 . . . n] to a first numerical value;
- set a second array of [1 . . . n][Latest_key] to a second numerical value;
- and
- set a third array of [Latest_key][Latest_key] to a third numerical value;
- wherein the Latest_key is the single key pressed in a given scan cycle;
- wherein n is a number of columns in a created array;
- and
- when multiple keys are pressed in a single scan cycle, then for each key_m pressed, wherein M is a total number of key_m pressed:
- calculate a sum of an array [key_m][1 . . . M];
- arrange the sums of the arrays in a numerical descending order;
- send scan codes for each key_m in the numerical descending order.
Dependencies are inferred from the claim text.