扇贝快捷键映射

将快捷键 9(太简单按钮)映射到 3 上

// ==UserScript==
// @name         扇贝快捷键映射
// @namespace    https://skymkmk.com/
// @version      v1.0.0
// @description  将快捷键 9(太简单按钮)映射到 3 上
// @author       skymkmk
// @match        https://web.shanbay.com/wordsweb/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    document.addEventListener("keydown", (e) => {
        if(e.key === "3") {
            const event = new KeyboardEvent("keydown", {
                key: "9"
            });
            document.dispatchEvent(event);
        }
    });
})();