handling return/enter key actions
Posted: Thu Apr 09, 2020 7:45 am
Hi everyone,
I've got two fields on a stack and I want a user to enter field 2 either by directly clicking into, or by 'tabbing', to field 2 from field 1.
Because the return/enter key causes a carriage return within field 1, I didn't want the user to think they could use the enter key to move to the next field, ie field 2
I've set up some datavalidation for field 1, with number and character limitations, as below:
To handle the return/entry key issue I've tried the functions 'returnKey' and 'returnInField' but I can't get these to handle a desired effect of preventing the return/entry key passing into field 1, or indeed to move the focus to field 2!
Grateful for any help or advice.
Kind regards,
Glenn
I've got two fields on a stack and I want a user to enter field 2 either by directly clicking into, or by 'tabbing', to field 2 from field 1.
Because the return/enter key causes a carriage return within field 1, I didn't want the user to think they could use the enter key to move to the next field, ie field 2
I've set up some datavalidation for field 1, with number and character limitations, as below:
Code: Select all
on keydown pKey
if the length of me = 3 or pKey is not a number then
answer warning "Check entry!" titled"Error"
else
pass keyDown
end if
end keydown
Grateful for any help or advice.
Kind regards,
Glenn