Typing Macros seem to no-longer handle special keys properly

Typing Macros seem to no-longer handle special keys properly

avatar

G'Day Folks!

I have a simple typing macro setup to open an admin powershell and paste in my clipboard into it:

{TAB}{DELAY}(+{F10}){DELAY}a{DELAY}{DELAY}{DELAY}{LEFT}{ENTER}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}(+{INS})

However, instead of Shift+F10, it seems to just hit enter or something.
Similarly, instead of hitting Shift+INS at the end, it just pastes (+) into the textbox that is active.

From what I can tell, I *think* the other parts are working as expected?

I've used this exact same saved Macro in previous versions of RDM (on Win10) and it has worked as expected, but a move to Win11 and some RDM upgrades later and now they don't want to, and I don't use them *that* often to be able to know for sure at what point it stopped working.

Any ideas?

Cheers.

All Comments (14)

avatar

Oh I forgot to mention.
If I edit (+{INS}) to read +({INS})then it enters +() into the textbox.
If I change it to just plain old +{INS} then it enters +

The behaviour also doesn't appear to change with the 'Force Sendkeys' setting active or inactive.

avatar

Hello Sam,

Thank you for contacting us regarding this,

  • Could you please specify the version of RDM you are currently using?
  • What type of data source are you using?


With this information, I will be able to perform some tests on my end with a similar configuration and see if I can reproduce the issue.

Let me know,

Best regards,

Samuel Dery

avatar

Sure thing

RDM Version: 2023.2.32.0 64-bit
Data Source: Local

avatar

Hello Sam,

Thank you for your reply,

I see, I've opened a case with our development team so that we can investigate this,

I will keep you updated with any news I receive,

Best regards,

Samuel Dery

avatar

Hello,

We've been investigating this issue, and we have several layer of differences in how macros and sending keys can be handled.
To ensure that we pinpoint correctly your issue, could you share with us exactly how your macro/entries are setup?

The entry type used, how the macro is linked (is the macro another entry, or is it set in the Events of the original entry), etc.

Regards,

Jafran Majeau

avatar

Hello again,

After further investigation, I've found that there is a workaround to your specific issue that we've already implemented. To force certain actions regardless of context, you can you use the following: {SENDKEYS} {ENDSENDKEYS}

Your particular macro above would have the following syntax:

{TAB}{DELAY}{SENDKEYS}+{F10}{ENDSENDKEYS}{DELAY}a{DELAY}{DELAY}{DELAY}{LEFT}{ENTER}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{DELAY}{SENDKEYS}+{INS}{ENDSENDKEYS}


Let us know if this fixes the issue for you.

Regards,

Jafran Majeau

avatar

Hello,

That does seem to have fixed my issue, many thanks :)

Is there more documentation on SENDKEYS somewhere?
It'd be great to know more details about what kind of contexts it might or might not be necessary in, and in what ways it works differently to both the "Use Sendkeys API" checkbox, and to merely specifying the keys without the sendkeys wrapper.
I'd also love to see if I can use it to trigger either (or ideally both) the Windows key as a modifier (eg: Win+X), and the Windows key as a standalone keypress, as those don't seem to be supported 'meta' keys in the Macro language.

Cheers.

avatar

Hello,

These specific workarounds are not currently on our documentation, but as I send this message, I've already informed our documentation team on the required updates. We will update the documentation in the near future.

That said, the crux of the matter is the following:
We've implemented several additional features to handling scripts that sometimes enter conflict with the Windows SendKeys. And so we've added the SendKeys-EndSendKeys to provide a way for users to force the vanilla SendKeys.

Regards,

Jafran Majeau

avatar

Hello,

seems still not working. I'm trying to create a macro that should send CTRL+SHIFT+6 to an SSH Session. But + and ^ are ignored/ not translated to CTRL and SHIFT. So it just shows "+^6" in console.

Version is 2024.3.29

Regards

avatar

Hello Bitboy,

Have you tried using the {SENDKEYS} {ENDSENDKEYS} as I presented in one of my earlier examples (In your case, you would need to encapsulate both CTRL and SHIFT separately)? If that doesn't work for you, can you please share your exact macro, as well as exact setup for using the macro?
(Where the macro is set, either as part of another entry or inside the SSH Session's event, the type of entries used, etc)

Regards,

Jafran Majeau

avatar

Hello,

yes i have tried it, but {SENDKEYS} is not recognised at all.
It just prints "{SENDKEYS}^+6{ENDSENDKEYS}" to the console.

I have also tried +(^6), +(^(6))... and something like that.

Background: SHIFT + CTRL + 6 is the default escape sequence on cisco devices. It is used to stop a process like traceroute. To make it work in Remote Desktop Manager, you need to disable the key shortcut for "bookmark 6"

Regards

avatar

Hello,

Without your exact setup, I can't quite try to replicate (or troubleshoot) your issue. If you could tell me which entry you're using (Cisco ASDM, if I understand correctly?), and how you you're trying to implement the macro (whether using a linked macro, or if you've configured it in the event section, etc).

From my current testing (Cisco ASDM entry, after open event typing macro), the following macro executes the input CTRL+SHIFT+6 input without issues. (I did not need to use the SENDKEYS escape)

{CTRL}{SHIFT}6


If this doesn't work for you, please provide us with the necessary information to replicate your setup.

Regards,

Jafran Majeau

avatar

Hi,

i created a key sequence macro named "Escape Sequence".

Entry Type is SSH Terminal. I execute the macro with right click on the entry -> Macros / Scripts / Tools -> Escape Sequence

For testing, start a traceroute to an unreachable ip. It normaly takes a long time. The macro should abort the traceroute and return to the prompt.

Regards

avatar

Hello,

I've done some testing/investigation, and it seems to me like the issue might be with the macro itself.

The short version is: {CTRL}{SHIFT}6 is unreliable and not exactly what you're looking for.

However I tried the most common way to interrupt the terminal: {CTRL}C
And that worked well for me (whether used through a macro or not).

I recommend you try using this macro instead. If the {CTRL}{SHIFT}6 is something that you specifically needed for your setup, and {CTRL}C won't do, I'd appreciate more information on how to replicate a setup where {CTRL}C doesn't work.


The long version of what I've found:

{CTRL}{SHIFT}6 is not always supported, depending on keyboard types, and terminal emulators.
To be clear, Ctrl+Shift+6 is not technically the default escape sequence for Cisco devices. Cisco devices default escape sequence is the "break" terminal escape character.

That default "break" escape sequence essentially differs depending the used emulator, and the keyboard language. Cisco didn't "decide" to make that the shortcut.
https://community.cisco.com/t5/switching/why-does-pressing-ctrl-shift-6-interrupt-a-command-or-ios/m-p/4669228#M529160


Not only that, I've scoured some forums on terminal browsing and discovered you're not the first person to notice that Ctrl+Shift+6 is not always recognized, even on emulators that should support it. PuTTY for example has problems with it, but it's not the only instance of complaints I've found.

I've also found that in several cases, you'd need to input an additional character (usually x) after the Ctrl+Shift+6 for the escape sequence to complete. That you would have a short time-frame to do so, and must do so only when the previous input has already been released.

I've tested quite a few solution in our own SSH Terminal and directly forced the command, and it did not escape the traceroute. I'd recommend using the Ctrl+C macro instead, assuming it works for you.


Regards,

Jafran Majeau