Skip to main content
13-Aquamarine
December 18, 2019
Solved

How to detect when the Enter Key Pressed with Arbortext Command Language

  • December 18, 2019
  • 1 reply
  • 2359 views

Hello,

With Arbortext Command Language, on a customized window, how to detect when the Enter Key is pressed.

Kind regards

David

 

 

Best answer by ClayHelberg

It depends what you mean by "detect". If you want to execute a specific action when Enter is pressed, you can use the map command to do so, e.g. 

map Enter { response("You pressed enter!"); }

Of course, if it's an edit window, doing this will bork your quick tags feature (the menu of valid tags that can be inserted at the caret location).

 

If you want to know when Enter is pressed, but still have it carry out its usual effect (like quick tags), you might need to use a Java or Javascript event listener instead.

1 reply

18-Opal
February 6, 2020

It depends what you mean by "detect". If you want to execute a specific action when Enter is pressed, you can use the map command to do so, e.g. 

map Enter { response("You pressed enter!"); }

Of course, if it's an edit window, doing this will bork your quick tags feature (the menu of valid tags that can be inserted at the caret location).

 

If you want to know when Enter is pressed, but still have it carry out its usual effect (like quick tags), you might need to use a Java or Javascript event listener instead.

dgopois13-AquamarineAuthor
13-Aquamarine
February 7, 2020

Hello Clay,

Thank you for your help.

David