Posted 20 years ago by Marianne
If adding the following code to the existing sample:

private void editor_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
if(e.KeyCode == Keys.Back)

It's purpose is clear, but when hitting 'Backspace' the event does not fire. If changing the key to a character or even an Fx function key, everything works as it should. It just seems that SyntaxEditor is eating the Backspace key. If adding a textbox control to the sample and setting the same event handler, everything works as expected.



------------------------------- Marianne

Comments (1)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA

Command keys are processed in the ProcessCmdKey method. If they match up with an action (Backspace matches the BackspaceAction), the action is executed and the key is flagged as handled. Thus the KeyDown never fires for that key.

But you could override the SyntaxEditor class's ProcessCmdKey method to see when it is pressed.

Actipro Software Support

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.