Function: sanitiseCombo()
sanitiseCombo(
input):KeyCombo|undefined
Defined in: src/lib/utils/shortcuts/index.ts:243
Keep a valid key combination from an untrusted value (e.g. stored or imported). Undefined if it isn't one.
Parameters
input
unknown
Returns
KeyCombo | undefined
Example
sanitiseCombo({ key: "s", cmd: true, extra: 1 }); // { key: "s", cmd: true }
sanitiseCombo({ key: "" }); // undefined