Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 scriptUI 面板上,我有一个按钮。如何检测用户shift单击按钮时是否按住键?
shift
您可以将 eventListener 添加到您的按钮。
var win = new Window ("dialog"); win.aButton = win.add ("button", undefined, "Button"); win.aButton.addEventListener ("click", function (k) { if (k.shiftKey) { alert("foo"); }else{ alert("bah"); } }); win.show ();