You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Bold Italic designates added modified values

After the framework changes as mentioned in [1], It is easier to add support for non-US keyboard for console proxy. To do so one has to just add the mappings for their locale keyboard in one designated file.

To add new keyboard for console proxy add the corresponding parameters in  file consoleKeyboardOptions.jsp

for example say file consoleKeyboardOptions.jsp is looking like below

 <option value="us"><fmt:message key="label.standard.us.keyboard" /></option>
 <option value="uk"><fmt:message key="label.uk.keyboard" /></option>
 <option value="jp"><fmt:message key="label.japanese.keyboard" /></option>
 <option value="fr">French AZERTY keyboard</option>

Then to add keyboard for simplified chinese add the line as follows

 <option value="us"><fmt:message key="label.standard.us.keyboard" /></option>
 <option value="uk"><fmt:message key="label.uk.keyboard" /></option>
 <option value="jp"><fmt:message key="label.japanese.keyboard" /></option>
 <option value="fr">French AZERTY keyboard</option>
<option value="sc"><fmt:message key="label.simplified.chinese.keyboard" /></option>

Add the keyboard in file ajaxkeys.js also. Where to add the keyboard option in ajaxkeys.js will depend upon your keyboard layout.

We divide the keyboard layout into cooked keyboard and raw keyboard.

Cooked keyboard is any keyboard which is very similar to US keyboard with some keys not matching. Example UK, FR, US

Raw keyboard is any keyboard which has very different layout than US keyboard for example Japanese JP.

Add information about the events considered for above type of keyboard layouts.

To add the cooked keyboard type in below section in ajakeys.js

var cookedKeyboardTypes = {"us":"Standard (US) keyboard",

                                                                 "uk":"UK keyboard",

                                              "fr":"French AZERTY keyboard"}

and to add the raw keyboard type add in section 

 var rawKeyboardTypes = {"jp":"Japanese keyboard"}

Make sure key is same as value in consoleKeyboardOptions.jsp

Say if you consider simplified Chinese of type raw keyboard then add it as follow

var rawKeyboardTypes = {"jp":"Japanese keyboard",

                                          "sc":"Simplified Chinese keyboard"}

 

Add the constant for your keyboard type in section.

KEYBOARD_TYPE_COOKED = "us";

KEYBOARD_TYPE_JP = "jp";

KEYBOARD_TYPE_UK = "uk";

KEYBOARD_TYPE_FR = "fr";

 

KEYBOARD_TYPE_SC = "sc";


The Keyboard mapping takes in parameters like : 
 

  • Browser
  • Guest OS
  •  BrowserVersion
  • Hypervisor
  • GuestOSDisplayName
  • Hypervisor Version

Main Files (Present in directory mentioned next to them)

[1] ajaxkeys.js : /usr/share/cloudstack-common/systemvm/js/

[2] ajaxkviewer.js : /usr/share/cloudstack-common/systemvm/js/

[3] consoleKeyboardOptions.jsp : /usr/share/cloudstack-management/webapps/client/

 

References

[1] Support for non-US keyboards in Console Proxy


  • No labels