
com.sun.xml.ws.commons.virtualbox.IKeyboard Maven / Gradle / Ivy
package com.sun.xml.ws.commons.virtualbox;
import javax.xml.ws.WebServiceException;
/**
* The IKeyboard interface represents the virtual machine's keyboard. Used
* in {@link IConsole#keyboard}.
*
* Through this interface, the virtual machine's virtual keyboard can be controlled. One
* can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
*
*/
public class IKeyboard {
public final VboxPortType port;
public final String _this;
public IKeyboard(String _this, VboxPortType port) {
this._this = _this;
this.port = port;
}
/**
* Sends a scancode to the keyboard.
*
* @param scancode
*
*/
public void putScancode(int scancode) {
try {
port.iKeyboardPutScancode(_this, scancode);
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
/**
* Sends an array of scancode to the keyboard.
*
* @param count
*
* @param scancodes
*
* @return
*
*/
public long putScancodes(int scancodes, long count) {
try {
long retVal = port.iKeyboardPutScancodes(_this, scancodes, count);
return retVal;
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
/**
* Sends the Ctrl-Alt-Del sequence to the keyboard.
*
*/
public void putCAD() {
try {
port.iKeyboardPutCAD(_this);
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy