[1.1.0] OS X 10.10: KeyModifier being sent to Sikuli, not to app

Bug #1466231 reported by Elaine F
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
RaiMan

Bug Description

Not yet attempted in Sikuli 1.0.1.

OS: Mac OSX Yosemite (10.10.3)

METHOD:
Script is as follows:
App.focus("NameOfApp");
type("r"); # just to confirm that the app has focus
type("o", KeyModifier.KEY_CMD); # Cmd-O to open a file

RESULT:
After the second line, the app reacts to the letter R correctly, proving that the app has focus. However, the Cmd-O opens Sikuli's File Open dialog, not my product's.

Revision history for this message
RaiMan (raimund-hocke) wrote :

tested with latest 1.1.0 build: works

1.0.1 does not work on Yosemite (see http://sikulix.com)

Revision history for this message
Elaine F (elchao) wrote :

Tested originally on 2015-06-17_01:00nightly. I'll try again with this morning's build.

Revision history for this message
Elaine F (elchao) wrote :

Tested again on 2015-06-18_01:00nightly. I have more details:

- This seems to work against released software (tested against Adobe Photoshop CC 2015). That app gets the Cmd-O just fine.

- However, I tested this against the built binary we're testing. Originally, I was running the software from XCode, but then I switched over to running the binary. In both cases, Sikuli gets the Cmd-O and not the binary I was testing. (Yes, Cmd-O works on the software I'm working on.)

Revision history for this message
RaiMan (raimund-hocke) wrote :

You should try again with the build from today (2015-06-19).

In any case you should move the generated SikuliX.app to /Applications.

If it does not work running the script from the IDE started as app (double clicking SikuliX.app or run from Launchpad), then you can try out running your script from command line.

Another option is to start the IDE using the provided scripts:
- doubleclick runsikulix
- in a Terminal use runsikulix (if you want to provide parameters)
- in a Terminal use /Applications/SikuliX.app/run (equivalent to runsikulix)

especially with OS X 10.10 there are some odd behaviours (partly known Mac issues) when using the IDE started as application.

summary: - KeyModifier being sent to Sikuli, not to app
+ [1.1.0] OS X 10.10: KeyModifier being sent to Sikuli, not to app
Revision history for this message
Elaine F (elchao) wrote :

Just tried with 2015-06-20.

1. I've been running SikuliX.app from /Applications this entire time. :)
2. Running the script from the command line, I once again get the confirmation that my app has focus (this is using the keyboard shortcut "R"), but no reaction from the app on using Cmd-O

my-prompt# /Applications/runsikulix -r file-open.sikuli/
running SikuliX: /Applications/SikuliX.app/Contents/Java/sikulix.jar -r file-open.sikuli/

[log] App.focus: [-1:MyApp]
[log] TYPE "r"
[log] ( ⌘ ) TYPE "o"

Again, this doesn't seem to be affecting all apps. I did use the binary version of both debug and release versions of my app, and it doesn't seem to matter. (I'll be out until Tuesday, so won't respond until the morning PDT/-7 GMT.)

Revision history for this message
RaiMan (raimund-hocke) wrote :

looks really odd.

So it has nothing to do wether you run the script from inside the IDE started as app or from command line (I suggested this test, since there are some other odd behaviours, when using the IDE as app on OS X 10.10).

The only thing I now can think of: your app loses focus after the R-shortcut (so you have to sort out, what really happens when your app reacts on the R-shortcut).

Changed in sikuli:
status: New → Opinion
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
Revision history for this message
Elaine F (elchao) wrote :

I think I figured it out. This seems to affect applications that have Mac's multi-window support. I was able to get this to repro on Microsoft Word and on Sketch.

Revision history for this message
Elaine F (elchao) wrote :

Wanted to circle back on this - can you reproduce this issue?

Revision history for this message
lmclister (lmcliste) wrote :

Hey, are you folks able to reproduce this one? Any chance of a fix or workaround for this one?

Revision history for this message
RaiMan (raimund-hocke) wrote :

@ Elaine
any free software, I could test the effect of Mac Multi-Window support?

Revision history for this message
Elaine F (elchao) wrote :

@raiman: I believe Sketch has a free 30 day trial. It seems like it's anything with multi-window support, so let me know if the trial doesn't work and you need another piece of software that reproduces the issue.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@Elaine
Thanks for the information.

Due to private reasons I will only start to debug this situation after mid August. Sorry for the delay.

Revision history for this message
Elaine F (elchao) wrote :

This no longer happens on the release version of 1.1.x. Recommend closing.

Changed in sikuli:
status: Opinion → Fix Released
Revision history for this message
RaiMan (raimund-hocke) wrote :

Thanks for feedback

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.