createMKS Options

Multiple options control the behavior of WMKS.

OptionDescriptionTypeNotes
audioEncodeTypeIndicates the type of audio encoding method being used. Possible values for WMKS.CONST.AudioEncodeType are: vorbis, opus, or aac.enum
changeResolutionIf true, WMKS sends a change resolution request to the connected VM. The requested resolution matches the container size. If the request fails, use the rescale and position operations to change the resolution manually.BooleanDefault is true.
enableUint8Utf8If true, enables the uint8utf8 protocol for projects that do not support the binary protocol.BooleanDefault is false.
fixANSIEquivalentKeysIf true, enables translation of non-ANSI US keyboard layouts to ANSI US keyboard layout equivalents. Tries to match keys on the international keyboard to keys in different locations or with different Shift status on the US keyboard. BooleanDefault is false.
ignoredRawKeyCodesIgnores the keycodes. Do not send keycodes to the server.arrayDefault is empty.
keyboardLayoutIdProvides different language keyboard setups for the Guest OS. Remote desktop and local desktop keyboard layouts must be the same. For international mapping, WMKS supports vScancode. This option does not support mobile devices. See keyBoardLayoutId DetailsstringDefault value is en-US.
positionIndicates where the remote screen should appear in the container. Values are either center or top left. enumDefault value is WMKS.CONST.Position.CENTER
rescaleIndicates whether to rescale the remote screen to fit the container size.BooleanDefault is true.
retryConnectionIntervalThe interval in milliseconds before attempting to reconnect the Web client and server after a failed attempt. If less than 0, WMKS does not attempt to create the connection again.integerDefault value is -1.
reverseScrollYIf true, sends the opposite value of the mouse when to the connected VM. This is for touch devices that scroll in the opposite direction.BooleanDefault is false.
sendProperMouseWheelDeltasIf true, actual mouse wheel event delta values are sent from the browser to the server. If unspecified, normalized event deltas values are either: -1, 0, or 1.BooleanDefault is false.
useNativePixelsEnables the use of native pixel sizes on the device. For example, on the iPhone 4+ or iPad 3+ devices, the true setting enables Retina mode, providing more screen space for the guest and making everything appear smaller.BooleanDefault is false.
useUnicodeKeyboardinputIf true, WMKS attempts to send Unicode messages from the user to the server. If unspecified, WMKS sends messages using either Unicode or keyboard scan codes.BooleanDefault is false.
useVNCHandshakeEnables a standard VNC handshake. Implement this option when the endpoint uses standard VNC authentication. Set to false if connecting to a proxy that uses authd for authentication and does not perform a VNC handshake.BooleanDefault is true.
VCDProxyHandshakeVmxPathThe string passed by the VNC protocol. If a connection request for a VMX path is received, the VNC protocol responds with the VCDProxyHandshakeVmxPath when connecting to vCloud Director. stringDefault value is null.

keyBoardLayoutId Details

The keyBoardLayoutId option supports the following browsers:
  • For Windows: Internet Explorer, Firefox, and Chrome.
  • For Mac OS X: Chrome and Safari.

To support different languages, both the local machine with browser and the remote virtual machine must have and be set to the correct locale. For example, when a user chooses German in the keyboard select list, both the local machine and the remote VM must be running a German input method editor (IME).

So users can select the language they prefer, you provide a selection list in HTML.

<select id="selectLanguage">    
   <option value="en-US">English</option>
   <option value="ja-JP_106/109">Japanese</option>
   <option value="de-DE">German</option>
   <option value="it-IT">Italian</option>
   <option value="es-ES">Spanish</option>
   <option value="pt-PT">Portuguese</option>
   <option value="fr-FR">French</option>
   <option value="fr-CH">Swiss-French</option>
   <option value="de-CH">Swiss-German</option>
</select> 

Then call the setOption API in a Javascript file as in the following example.

$('#selectLanguage').change(function(){    
    if(!wmks) return;    
    var keyboardLayoutId = $(this).find(":selected").val();
    wmks.setOption('keyboardLayoutId',keyboardLayoutId);
 });