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?
Perfect, thx for letting me know!
Yup, I did a quick test and the key sequence stayed in Royal TSX despite another app having focus. I also tried switching to a shell connection and the input still stayed within the web connection tab
Hehe, yeah, definitely the worse scenario.
Did you already check if the issue is solved for you?
Thanks for getting that fixed so quickly. I'm more concerned about another app stealing focus than me being dumb and opening another TSX connection.
many thx for providing that video.
We found a pretty embarrassing bug that basically caused web connection to always execute key sequences in the old "Keyboard Input Simulation" mode. So direct mode was actually never used and that's why you saw the issue of text being typed into other application.
We just released an update for the plugin which fixes that issue. After installing the update you should not be able to reproduce the issue of text being entered in another application. The problem that text ends up in another part of Royal TSX will still be present though and is unfortunately related to how WebKit handles key presses.
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.
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.
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?
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 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.
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 the feedback. I understand the issue and appreciate your work! Thank you.
Hi Jackson, Pascal,
I think there are two issues that play into this:
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.
Just sent you a ticket. Thank you very much for your great work!
Best regards, Pascal