← Back to team overview

sikuli-driver team mailing list archive

[Bug 1384317] Re: [RC3] Special keys don't go through VNC session

 

--- links in the sikuli original github are 404
thanks for the tip - changed

FYI:
-- https://github.com/sikuli/sikuli no longer supported
-- https://github.com/RaiMan/SikuliX-2014 actual repo for version 1.1.0
-- https://github.com/RaiMan/SikuliX-2015 prepared repo for version 1.2

--- to try the VNC solution
I am talking about version 1.1.0.
To understand how it works, you currently have to look into the sources (API::edu.unh.iol.dlc)
I do not have any experience with it.

This is the example from the contributor Michael Johnson:

public static void main(String[] args){

    Socket s = new Socket("192.168.1.17", 5900); //open a socket to vnc server on listening port
    s.setSoTimeout(1000);
    s.setKeepAlive(true); //some socket configuration

    ConnectionController cc = new ConnectionController(s);
    cc.openConnection(0); //opens the vnc connection for connection 0, multiple are supported

    cc.setPixelFormat(0, "Truecolor", 32, 0);  //for connection 0, set pixel data to Truecolor, 32 bits per pixel, little endian
    cc.start(0); //start thread that keeps BufferedImage updated by polling server for remote desktop changes
    
    Thread.sleep(2000); //wait for buffered image to be updated before we do sikuli stuff

    VNCScreen vnc = new VNCScreen();  //default constructor uses
ConnectionController index 0


    vnc.click(new Pattern("untitled.png"));

    //do other sikuli operations

    cc.closeConnection(0); //clean up socket, stop thread

}

--- some comments

Try and catch blocks for exceptions are omitted from example.  The VNC
protocol supports multiple pixel formats.  Currently, the VNC client
code only supports truecolor, 32 bits per pixel, little endian pixel
format.  Depending on which VNC server you are using, it may initialize
the connection with some other pixel format that is not currently
supported.  In this case, a message is printed to stderr saying "Error:
PixelFormat not supported, setPixelFormat required" to let the user
know.  After that, the setPixelFormat line changes the connection to the
format supported by the client.  That line could probably be better
integrated into Sikuli's logging system but I am less familiar with the
details of while level would be appropriate.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1384317

Title:
  [RC3] Special keys don't go through VNC session

Status in Sikuli:
  Won't Fix

Bug description:
  Special keys like Key.ENTER, Key.F1, Key.BACKSPACE, etc. do not go
  through VNC session.

  To reproduce the bug :
  * set up a Windows Seven VM where RealVNC is installed and up (https://www.realvnc.com/download/vnc/)
  * run a sikuli script from a host running Debian Wheezy. The script has to open something (firefox for example) and to vncscreen.type("test"+Key.ENTER)
  * you can check that firefox is correctly opening by the script, but only "test" is typed (no <ENTER>).

  Version used is the one from github (https://github.com/sikuli/sikuli)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1384317/+subscriptions


References