Skip to main content
pshashipreetham
18-Opal
April 21, 2026
Solved

Text Field Focus shift on Enter Key Press

  • April 21, 2026
  • 2 replies
  • 29 views

Hi, 

I have a unique use case, where I need to shift the Focus of one Text Field to another Text Field when pressed on ‘Enter’ Key.

 

Is there a way around based on CSS. 


Thanks.

Best answer by Nathaniel_S

Hi ​@pshashipreetham,

I’ve looked into the functionality you described and am not seeing any straightforward out of the box method to accomplish that. CSS won’t provide the functionality you need, as that is only for styling and won’t be able to listen for events like keystrokes.

If your Text Fields (or other widgets) are next to each other or are appropriately configured with Tab Sequence you can simply use the Tab key to navigate to the next widget. While there is an event for pressing enter (EnterKeyPressed) there isn’t a way to directly translate that into a change of focus with other properties or with functions. If you need the user to navigate through a set of inputs sequentially, you may find the Progress Tracker widget useful.

As there can be quite a bit of difference in specific mashup functionality it would be helpful to know what version of ThingWorx you are using. Any additional context on your use case would be welcome too. I also suggest posting a new Product Idea for this kind of functionality.

2 replies

Community Manager
June 3, 2026

Hi ​@pshashipreetham,

I’ve looked into the functionality you described and am not seeing any straightforward out of the box method to accomplish that. CSS won’t provide the functionality you need, as that is only for styling and won’t be able to listen for events like keystrokes.

If your Text Fields (or other widgets) are next to each other or are appropriately configured with Tab Sequence you can simply use the Tab key to navigate to the next widget. While there is an event for pressing enter (EnterKeyPressed) there isn’t a way to directly translate that into a change of focus with other properties or with functions. If you need the user to navigate through a set of inputs sequentially, you may find the Progress Tracker widget useful.

As there can be quite a bit of difference in specific mashup functionality it would be helpful to know what version of ThingWorx you are using. Any additional context on your use case would be welcome too. I also suggest posting a new Product Idea for this kind of functionality.

Best regards, Nathaniel
13-Aquamarine
June 4, 2026

Hi ​@pshashipreetham ,

The only way to achieve such kind of functionality, is by creating custom widget extension in which you can define custom services that can

  1. target other text fields or
  2. simply trigger focus change to the given widget or
  3. triggering the ‘TAB’ key press upon hitting enter key which will then set the focus to the desired text fields based on the Order you defined in the mashup.

There is no OOTB solution so far in place.