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?
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.
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!
Thank you very much for your great support. I am currently running Royal TSX v188.8.131.52 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?
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.
Just sent you a ticket. Thank you very much for your great work!
Best regards, Pascal
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:
Thanks for the feedback. I understand the issue and appreciate your work! Thank you.
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: https://github.com/WebKit/webkit/blob/9029c43e695bf886fffb15eec951f0605e34509b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm#L4462
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.
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.
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.