Start a new topic

Key Sequence only in Royal TSX

One of my connection is a website that redirects me to a different URL for login. The redirected URL is unique per login attempt.

I've successfully configured an automatic key sequence to log into the site instead of relying on AutoFill.

One problem I'm having is that if something else takes focus or if I switch away to a different app before Royal TSX has executed the key sequence, it "types" and submits the username/password in whatever app is currently active.

I can't seem to find a way to restrict a key sequence to stay within Royal TSX. Am I missing something somewhere?

1 person has this problem

Hi Jackson

I am glad you bring this topic up. I have also seen this behaviour recently. I was not switching to a different up but just made a different tab in Royal TSX active and the input went into the new tab (where I was using a terminal). 

So in short: key sequences should keep their submitted input in the window where it was triggered. 

Hi there,

key sequences in Royal TSX V3 and earlier are always simulated in a way that makes it impossible for us to target a specific window or view.

In Royal TSX V4 (currently in beta) however we introduced "Direct Mode" for key sequences which sends keyboard input directly to the targeted views/connections.

I think this feature is exactly what you're looking for and I suggest you give the beta a spin and let me know how it works for you!



Hi Felix

Thank you very much for your great support. I am currently running Royal TSX v4.0.0.27 and see this behaviour. The «Direct Mode» is the default mode and enabled (see attached Screenshot) and I am still seeing this issue. Of course it says «Use Direct Mode when supported» but what are the prerequisites for that support?

Best regards,


Hi Pascal,

direct mode requires each connection plugin to implement this mode so "when supported" means Royal TSX will use direct mode when the connection supports it and fall back to keyboard simulation if it doesn't.

Currently, all main connection types and plugins (RDP, VNC, Terminal, Web) support it. Which connection type are you trying this on? Also, please ensure you have the latest plugins installed and send us a short video that shows the behavior. Also, a document containing a sample connection and key sequence task would help us reproduce the issue.



Hi Felix

Just sent you a ticket. Thank you very much for your great work!

Best regards, Pascal

I am seeing the same behaviour Pascal is as well. I will attempt to filter out my company's information and submit some recording.

I am able to open a connection to a Web connection type with a Direct Input sequence task and then switch to another tab in Royal TSX. The key sequence will go through the motions in the new tab (in my case a terminal tab). I can also switch to an entirely new application and have Royal TSX type my key sequence in BBEdit.

Hi Jackson, Pascal,

I think there are two issues that play into this:

  1. Jackson: With the direct input mode key sequence should never, ever end up in a different application unless the plugin/connection doesn't support direct input mode. That's actually the case if you're running a web page connection with the "Legacy" engine. Direct input mode is only supported for the modern engine. Could you please verify if you're running in "Legacy" mode?
  2. Pascal: We can reproduce the problem where key sequence output actually ends up somewhere else in the application. Unfortunately, it appears that there's a major bug in Apple's WebKit control that sends keyboard events to whatever control currently has focus if the web view is inaccessible (which is the case when it's hidden because it's tab is not selected). We will evaluate if there's any private APIs or different ways to send keyboard input to the web view even when it's hidden but I can't promise anything.



1 person likes this

Hi Felix

Thanks for the feedback. I understand the issue and appreciate your work! Thank you.

Have Fun!

Hi guys,

I looked into this in more detail now and unfortunately it looks like there's no "clean" way to work around the limitation in WebKit.

I checked the WebKit source code and found that when WebKit "can't handle" a certain key press, it just falls back to sending it to the application which will then happily insert it into whatever view is currently active and accepts keyboard input.

Specifically, this is the link to the offending piece of code:

Now we could theoretically capture all NSEvent's sent to the application and ignore those that come from our keyboard simulation for key sequences which would prevent the characters from being entered into non-web fields. The problem with that approach is that it will greatly affect performance of Royal TSX since we need to inspect each and every NSEvent. So each time you move your mouse cursor, we have to inspect the event for that action and check if it's one of our own simulated events or a regular one. Unfortunately that's too much of a trade-off for us.

We will continue investigating other techniques to simulate keyboard input in WebKit but at the moment we don't have a viable solution unfortunately.



Thanks for spending the time to look into this.

Regarding my web connection, it is definitely running in Modern mode.

If this is a limitation with Webkit then I completely understand. My initial intention regarding this topic was to make sure I wasn't doing something wrong.


1 person likes this

Hi Felix

Thank you and your team for looking into this. To me this is not a major issue. I will just have to remember to not navigate away from the active tab/window as long as a key sequence is running. But if you find ways to improve the current behaviour, the better.

Thanks again!

Hi Jackson,

is your key sequence also set to run in direct mode?

If both, your key sequence is set to direct mode and your web connection is using the modern engine, no key strokes should end up in a different application.

If that's still the case, could you please record a short video that shows your web page connection configuration, your key sequence task configuration and exactly what happens when you execute the key sequence?



Yes, the key sequence is configured to use direct mode. I made sure to set this as initially I had the key sequence configured directly as part of the connection.

I will set up some demo credentials and record a video and include it here.

Attached is a screen recording showing:

A web connection with a key sequence task working

A second connection changing to another application

A third connection changing to a new tab in Royal TSX.

After that I run through the settings on the connection, credential and key sequence.

Please let me know if you need more information.

Login or Signup to post a comment