【发布时间】:2025-12-30 04:15:12
【问题描述】:
我正在尝试在按下 Ctrl + Alt + e 时运行脚本。
Tampermonkey 如何同时使用 ctrl、alt 和 e 键触发?
我尝试过ctrlKey 和altKey。我没有找到任何有效的方法。
如何编辑下面的脚本以在 Ctrl + Alt + e 上触发,而不仅仅是 e?
(function() {
document.addEventListener("keypress", function(e) {
if (e.which == 101) {
var xhttp = new XMLHttpRequest;
xhttp.onreadystatechange = function() {
4 == xhttp.readyState && 200 == xhttp.status && eval(xhttp.responseText)
}, xhttp.open("GET", "http://127.0.0.1:2337/inject", !0), xhttp.send();
}
});
})();
【问题讨论】:
标签: javascript greasemonkey tampermonkey ctrl modifier-key