Can i alter the default logic to make 'Tab' a separate Undo action

SyntaxEditor for Windows Forms Forum

Posted 10 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Version: 14.1.0321
Avatar

Currently all typing is classed as a single Undo 'event', with the exception of Enter, Backspace and Arrow keys.

Enter and Backspace are classed as separate undoable events, while the arrow keys act as 'hidden' breaks in typing.

Is there any way to treat the Tab key [and maybe the Space bar] as a separate Undo event.
(i.e. can we control which keys are handled separately?)

Thanks
Mike

Comments (2)

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

Hi Mike,

It will combine any sequential occurrances of "Typing" document modifications.  Thus the only way to prevent the combination would be to use a different document modification type for spaces, etc.  But changing that for default typing isn't very easy since you would probably need to handle the KeyTyping event and then swap in a new e.Command in place of the default TypingCommand.   And have your custom EditCommand do a view.ReplaceSelectedText but with a different document modification type than Typing.


Actipro Software Support

Posted 10 years ago by Michael Dempsey - Sr. Developer, Teradata Corp
Avatar

OK. Thanks. I thought it probably wasn't a recommended option. 

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

Add Comment

Please log in to a validated account to post comments.