input: kbd_matrix: add actual-key-mask support
Add an optional actual-key-mask property to filter out key combinations that are not implemented in the actual keyboard matrix. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
ca72fff802
commit
808c0f1f78
4 changed files with 24 additions and 0 deletions
|
@ -94,6 +94,11 @@ static bool input_kbd_matrix_scan(const struct device *dev)
|
|||
k_busy_wait(cfg->settle_time_us);
|
||||
|
||||
row = api->read_row(dev);
|
||||
|
||||
if (cfg->actual_key_mask != NULL) {
|
||||
row &= cfg->actual_key_mask[col];
|
||||
}
|
||||
|
||||
cfg->matrix_new_state[col] = row;
|
||||
key_event |= row;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue