ALT +Q热键冲突怎么办
![]() ![]() |
开关打不开 |
![]() ![]() |
/**
* 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 |



