problem sending ALT + F7 (Android, VNC)

Asked by isildur5

--- environment:
System - windows 7 pro, SP1
Application - Android, accessed via vnc
application does have focus before I send the required keystroke.
-------------------------------------------

I want to send ALT(left side of keyboard)+ F7 using sikuli. Based upon other examples mentioned on the forum I use following 2 pieces of code (separetely) to simulate this keystroke. But It doesnt work for me.

1) type(Key.F7, KEY_ALT)

2) keyDown(Key.ALT)
    keyDown(Key.F7)
    keyUp()

can you please tell me if something is wrong with this code or if there is any other way I can achieve this.

thank you!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

System?

Application?

Has application/window the focus at the time of type?

Revision history for this message
isildur5 (ashish-abrol) said :
#2

System - windows 7 pro, SP1
Application - Android, accessed via vnc

application does have focus before I send the required keystroke.

thanks RaiMan

Revision history for this message
RaiMan (raimund-hocke) said :
#3

type(Key.F7, KEY_ALT) (no need to use keyDown/keyUp in this case) is correct and should work, if it is possible manually.

If it does not work with Sikuli, than your application might block (or ignore) the Java Robot, which is used internally to simulate the keystrokes. Then you currently have no chance to get it running.

Revision history for this message
isildur5 (ashish-abrol) said :
#4

I can send this key stroke manually which works fine.

is there a way to be sure that ALT, from left side of keyboard, is sent by sikuli. Because if sikuli is using the ALT from the right side then this combination does not work for my AUT.

Revision history for this message
RaiMan (raimund-hocke) said :
#5

ok, then I think we have an internal Java keystroke handling problem.

As far as I understand, both ALT keys have the same keycode 18.

To understand it, this might be helpful: http://www.java-forums.org/awt-swing/35240-key-binding-vk_alt-vk_shift-not-working.html

I think, you should post a request bug: want to press left ALT key.

Revision history for this message
Ben (forums-qt) said :
#6

After researching here, I found doing a CTRL+TAB is written in Sikuli as:

type(Key.TAB,KEY_CTRL) and works perfectly.

Can you help with this problem?

Provide an answer of your own, or ask isildur5 for more information if necessary.

To post a message you must log in.