SimpleTranslator v0.3

By silver_java Last update Sep 3, 2010 — Installed 674 times.

ALT +Q热键冲突怎么办

in
Subscribe to ALT +Q热键冲突怎么办 2 posts, 2 voices



LittleFan User
SeamonkeyWindows

开关打不开

 
silver_java Script's Author
MozillaX11

/**
 * key press event handler
 *
 * @param e event
 */
function keypressHandler(e) {
    // By pressing alt+q to control the state of translator.
    // If this setting bothers you, you can change the charCode to others, see http://www.asciitable.com/.
    if (e.charCode == 113 && e.altKey) {
        // Turn ON/OFF translator
        if (STATE) {
            STATE = OFF;
            document.removeEventListener('mouseup', lookupWordBySelecton, false);
            // If you need this notification, please comment out this line to enable it.
            // alert("Translator is OFF!");
        } else {
            STATE = ON;
            registerEventListener('mouseup', lookupWordBySelecton);
            // If you need this notification, please comment out this line to enable it.
            // alert('Translator is ON!');
        }
    } else if (e.charCode == 105 && e.altKey) { // By pressing alt+i to control whether to input word.
        initDisplayAreaForUserInput();
    }
}

可以修改这里:

if (e.charCode == 113 && e.altKey) {

q的ascii码是113,你可以修改成不冲突的值。注释里面有一个网址可以查询ascii

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel