"keydown" and "keyup" events not recognised in AI CS6
"keydown" and "keyup" events do not seem to be recognised in AI CS6. The snippet below works fine in AI CS4. It is just me or is this across the board? What's the case in CC? Is there a way around this? Thanks in advance.
var window1 = new Window("dialog");
var ed1 = window1.add("edittext", undefined, "0");
var change = function (e) {
if (e.keyName == "Up") {ed1.text = Number(ed1.text)+1};
if (e.keyName == "Down") {ed1.text = Number(ed1.text)-1};
}
ed1.addEventListener("keydown", function (e) {change(e)});
window1.show();
