const aliases = {
    k: "up",
    j: "down",
    h: "left",
    l: "right"
};
const keyActions = {
    up: "up",
    down: "down",
    left: "left",
    right: "right",
    space: "space",
    return: "enter",
    enter: "enter",
    escape: "cancel"
};
export function mapKey(name, char) {
    if (char === "\x03") {
        return "cancel";
    }
    if (char === " ") {
        return "space";
    }
    if (!name) {
        return undefined;
    }
    return keyActions[name] ?? aliases[name];
}
