Xtype/sendkeys - KEY_CMD for MAC?


#1

Hello,

Been looking at the docs but can’t seem to be find the syntax to emulate COMMAND key on OSX.

Does it exist? Or are there any workaround assuming the script from Windows uses KEY_CTRL?

Thank you.


#2

Sorry, no workaround that I know of, but the command is very high on our todo list.


#3

With today’s update, KEY_CMD is now available :slight_smile:


#4

@admin

I just uninstalled the old xmod and installed the new one and I’m getting the following error.

  • Failed to XType ‘${KEY_CMD}’

  • [info]

Macro failed (Runtime 0.47s)

  • [status]

Playing macro xxxx

  • [info]

Executing: | XType | ${KEY_META} | |

  • [error]

Failed to XType ‘${KEY_META}’

  • [info]

Macro failed (Runtime 0.46s)


#5

As a test, does the DemoXType macro work that ships with Kantu? It uses KEY_CMD+KEY_S to open the save page dialog.

If this macro also fails, please include a screenshots of the XModules tab in the settings, so we can check if the correct new versions are installed.


#6

The demo failed.

  • [status]

Playing macro DemoXType

  • [info]

Executing: | store | medium | !replayspeed |

  • [info]

Executing: | comment | Make sure the browser is in the foreground, so it receives the XTYPE keystrokes | |

  • [info]

Executing: | bringBrowserToForeground | | |

  • [info]

Executing: | open | https://a9t9.com/kantu/demo/xtype | |

  • [info]

Executing: | comment | To save the page, open the browser save dialog with a shortcut | |

  • [info]

Executing: | if | “${!os}”==“mac” | |

  • [info]

Executing: | comment | Save web page in macOS is CMD+S | |

  • [info]

Executing: | XType | ${KEY_CMD+KEY_S} | |

  • [error]

Failed to XType ‘${KEY_CMD+KEY_S}’

  • [info]

Macro failed (Runtime 4.88s)

The install I used states:

This installation includes:
(1) FileAccess XModule for macOS, V1.0.6
(2) RealUser Simulation XModule for macOS, V1.0.12
(3) ComputerVision XModule for macOS, V1.0.16

As you can see tho, it only as 1.0.0 installed. I just downloaded it last night from here:
http://download.a9t9.com/kantu/kantu-xmodules-mac.zip


#7

The installation looks good, the version numbers are ok. So I am not sure why it does not work.

Question:


#8

It’s Mojave 10.14.3 (18D109)

As you can see below, Chrome is authorized. It works with other commands except KEY_CMD and KEY_META. IE KEY_ENTER works or KEY_DOWN. This makes me thing it’s an issue with the version itself. Shouldn’t RealUser XModule show 1.0.12?


#9

I have the same problem, same setup save mac version, same Xtype (latest) version, Chrome has permissions to control OS.

{KEY_CMD+KEY_R} doesn't work for me. DemoXtype fails too with [error] Failed to XType '{KEY_CMD+KEY_S}’ all other typing actions work absolutely fine (as does ${KEY_BKSP} ) it’s just any KEY_CMD instructions that fail.


#10

Hmm… indeed that sounds like the XModule installer contains an older version. We will test this ASAP and then update the ticket.


#11

The Linux and Mac install scripts contained indeed an outdated version of the RealUser XModule. This has now been fixed and a new installer V201902 is available. The current RealUser XModule version number is V1.0.12 - and this version supports the KEY_CMD key :slight_smile:

Thanks for your patience while we fixed this issue.


Mac Shortcuts not working
#12

Using V1.0.12 on MAC but KEY_CMD not working and the DemoXType not working correctly because of KEY_CMD


#13

DemoXType and KEY_CMD work fine in my test on Mac. See this screencast: