Mobile API
Methods
The WMKS core
object uses mobile input methods to control the input and display on a mobile
device. The input device types are keyboard, extended keyboard, and trackpad.
enableInputDevice()
Enables and initializes the
input device type on a mobile device.
- Parameters
- Any constant value for WMKS.CONST.InputDeviceType. See WMKS Constants.
- Return Value
- None
- Example Call
- wmks.enableInputDevice(WMKS.CONST.InputDeviceType.KEYBOARD);
disableInputDevice()
Disables and terminates the
input device type on a mobile device.
- Parameters
- Any constant value for WMKS.CONST.InputDeviceType. See WMKS Constants.
- Return Value
- None
- Example Call
- wmks.disableInputDevice(WMKS.CONST.InputDeviceType.KEYBOARD);
showKeyboard()
Shows the keyboard on a mobile
device.
- Parameters
- None
- Return Value
- None
- Example Call
- wmks.showKeyboard();
hideKeyboard()
Hides the keyboard on a mobile
device.
- Parameters
- None
- Return Value
- None
- Example Call
- wmks.hideKeyboard();
toggleExtendedKeypad()
Depending on availability,
shows or hides the extended keyboard on a mobile device such as the iPhone 6s
or 6.
- Parameters
- A map such as minToggleTime(50) or {minToggleTime: 50}. If called frequently with the time between subsequent calls less than the minToggleTime in milliseconds, the call is not executed.
- Return Value
- None
- Example Call
- wmks.toggleExtendedKeypad({minToggleTime: 50});
toggleTrackpad()
Depending on current
visibility, shows or hides the trackpad on a mobile device.
- Parameters
- A map such as minToggleTime(50) or {minToggleTime: 50}. If called frequently with the time between subsequent calls less than the minToggleTime in milliseconds, the call is not executed.
- Return Value
- None
- Example Call
- wmks.toggleTrackpad({minToggleTime: 50});
toggleRelativePad()
Depending on current
visibility, shows or hides the relative trackpad on a mobile device.
WebMKS adds a
toggleRelativeMouse button in the UI and binds it to the toggleRelativePad()
API. If the button is clicked, the relative trackpad appears and sends relative
mouse events to the remote guest. Use this method when the remote guest OS does
not install VMware Tools and cannot accept an absolute mouse event.
To display the relative
trackpad, the SDK includes a wmks-all.css file provided in the css and img
folders.
- Parameters
- A map such as minToggleTime(50) or {minToggleTime: 50}. If called frequently with the time between subsequent calls less than the minToggleTime in milliseconds, the call is not executed.
- Return Value
- None
- Example Call
- wmks.toggleRelativePad({minToggleTime: 50});