打造个性化的功能强大的Jquery虚拟键盘(VirtualKeyboard)

2020-05-17 06:26:37易采站长站整理

        if (X != iI) {
            B(iI);
            b();
        }
        i.preventDefault();
        i.stopPropagation();
    };

  修改为:


var d = function (i) {
        var e = DOM.getParent(i.srcElement || i.target, ‘a’);
        if (!e || e.parentNode.id.indexOf(Q) < 0) return;
        e = e.parentNode;
        var iI = X;
        var il = e.id.substring(Q.length);
        switch (il) {
            case “caps”:
                iI = iI ^ s;
                break;
            case “input_method”:
                if (document.getElementById(“kb_langselector”).value == ‘US US’) {
                    VirtualKeyboard.switchLayout(“CN Chinese Simpl. Pinyin”);

                }
                else {
                    VirtualKeyboard.switchLayout(“US US”);

                }
                break;
            case “shift_left”:
            case “shift_right”:
                if (i.shiftKey) break;
                iI = iI ^ Z;
                break;
            case “alt_left”:
            case “alt_right”: