Function: keyAction()
ts
function keyAction(
layout,
from,
key,
accept,
canActivate
):
| {
move: Cell;
}
| {
activate: true;
}
| {
prevent: true;
}
| undefined;What a key does on a focused tile: move focus to another tile, activate it, or just stop the page scrolling (arrows at the edge). Undefined for keys that aren't ours.
Parameters
| Parameter | Type |
|---|---|
layout | Layout |
from | Cell |
key | string |
accept | (cell) => boolean |
canActivate | boolean |
Returns
| { move: Cell; } | { activate: true; } | { prevent: true; } | undefined