Overriding tab behavior conditionally

Having trouble installing Oxygen? Got a bug to report? Post it all here.
chrisclarke
Posts: 3
Joined: Fri Mar 18, 2011 10:37 pm

Overriding tab behavior conditionally

Post by chrisclarke »

Is there a way to, in code, fire oxygen's default action that happens when you hit Tab in Author (or shift-tab) (moving to the next/previous node).
I need to conditionally do something at the end of a node when the user hit's tab or the default behavior.
I was thinking I would be able to create 2 new operations (tied to tab and shift tab) and then based on where the cursor was in the document, do my custom action or the default tab behavior.
I looked in AuthorCommonActions, but didn't see what I was looking for and am unable to find anything else.
I know I probably could recreate the logic myself, but I figured it was cleaner to try to use the built in functionality.
mihaela
Posts: 515
Joined: Wed May 20, 2009 2:40 pm

Re: Overriding tab behavior conditionally

Post by mihaela »

Hi,

The only thing you can do to override the default Tab (or Shift+Tab) behavior in oXygen is to create a custom action for your document type and set the Tab (or Shift+Tab) shortcut for it.
Here you can see our online documentation to find how to add a custom action to an existing document type:
http://www.oxygenxml.com/doc/ug-editor/ ... HowTo.html

These actions will be called every time the user hits Tab or Shift+Tab.
Unfortunately, if you implement these actions, the default behavior of Tab and Shift+Tab actions cannot be obtained (as you already said, you have to recreate the logic).

Best regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply