← Back to team overview

sikuli-driver team mailing list archive

[Question #194235]: Limitations of Env.addHotkey ?

 

New question #194235 on Sikuli:
https://answers.launchpad.net/sikuli/+question/194235

I won't go into too much detail yet, because although I have done A LOT of testing, i haven't been well documenting my tests.

But, two problems I have been having:

Registering an Env.addHotkey of the following CTRL+SHIFT+ALT+> will not work.  It will not respond to the event (in terms of not triggering a def) that say, the hotkey  CTRL+SHIFT+ALT+F will.  This was tested with some simple code that would just output a debug line on the the keypress.

In the console output it shows this global hotkey as "CTRL+SHIFT+ALT+."    This makes some sense because the "." key is the shifted equivalent of ">" on a standard keyboard, however that is not the character I typed in.  I tried to use simply CTRL+ALT+> instead but it still registers as ".".  It also appeared from my testing that numerical keys (or really any key but standard alphabet) had problems with modifiers.

The other issue I had (which may not really be a hotkey issue, but more a type issue) is that when I have to send the "SPACE" or "ENTER" key to a window it doesn't work.  Take the following code for instance:

click(getCenter())
type(Key.SPACE)

If I keep my application to send this command to directly behind the IDE and then launch the IDE, the IDE minimizes, and then moves to the center of the application and sends the key and the application behaves properly (in this case it is to pause the video playback).

However once I tag a hotkey to this action it no longer works.  I have tried various methods of ensuring the window is in focus and using keydown/keyup instead of type.  No matter what I try SPACE and ENTER sent to this window when called via a hotkey don't seem to work at all.

I took to handling hotkey operations that need to send a key  to a window (as opposed to triggering a graphical interaction with Sikuli) with AutoIt because I just couldn't make Sikuli send these keys reliably.  I would however like to incorporate them all to Sikuli for people who may want to use the script outside of Windows.

And, that's the last question...I saw some older threads saying no global hotkey handling was available for the Mac, I'd like to know the current state of what works/doesn't on different platforms.

Thanks

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.