// Code Snippet for simulating SoftKeys (LSK, RSK) by using Ctrl+ArrowKey
function softkey(e) {
const { target, key, bubbles, cancelable, repeat, type } = e;
if (!/Left|Right/.test(key) || !key.startsWith("Arrow") || !e.ctrlKey) return;
e.stopImmediatePropagation();
e.stopPropagation();
e.preventDefault();
target.dispatchEvent(new KeyboardEvent(type, { key: "Soft" + key.slice(5), bubbles, cancelable, repeat }));
}
document.addEventListener("keyup", softkey, true);
document.addEventListener("keydown", softkey, true);