Single line mode and receiving the Enter/Return key

SyntaxEditor for WPF Forum

Posted 7 years ago by Michael Collins
Version: 12.1.0571
Avatar

I am creating an interactive console where I am using the SyntaxEditor control in single line mode. The idea is that the user will enter commands into the single line SyntaxEditor control and the program will execute the command and will display the output in another control. I have a button that the user can press to execute the command, but I would like to be able to execute the command if the user hits the Enter/Return key. Is there any kind of event on the SyntaxEditor control that I can tap into that will let me detect with the Enter/Return key has been pressed?

Thanks.

Comments (1)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Michael,

Yes if you look in the documentation in the Language Creation Guide, there is a topic on Event Sink Services.  One of the event sinks you can register is one for key input.  You could add a class that implements that interface as a service to your language and watch for Enter from there.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.