CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Get key pressed if it is TAB or ENTER

by zsleo » 22 Jul 2015 00:39

I want OnKeyPress to trigger when the TAB or ENTER is pressed.

When OnKeyPress Condition is set to '(e.keyCode==13) || (e.which==13) || (e.keyCode==09) || (e.which==09) ' then ENTER works perfectly but TAB never triggers the event.

What am I doing wrong?

TIA
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 22 Jul 2015 09:35

Hi zsleo,

You should use OnKeyDown event, because OnKeyPress doesn't capture non-character keys, exept a few like enter (13).

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by zsleo » 22 Jul 2015 23:49

Thanks Alexander,

That was the answer to my problem.

For information, the OnKeyPress did work for detecting TAB or ENTER but not both at the same time

Regards
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33


Return to JQEdit

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.