-
Increase/Decrease Value with Keys
Hello Friends,
i have in my Ui some editText-field to input some values.
I would like to increase / decrease the value with the up and down key.
So far so good, it actually works but the value in the field gets increase by the double value.
What’s wrong? Thanks for your help!
myTextfield.addEventListener('keydown', keyFunc);
function keyFunc(){
var myKeyState = ScriptUI.environment.keyboardState;
if(myKeyState.keyName=="Up"){
this.text = parseInt(this.text)+1;
};