...
Make a note "sc" key is same as value in file [3] consoleKeyboardOptions.jsp
After the adding keyboard in one of above categories its time to define the key mappings. Focus should be on those keys which are not working by default.
It will be good practice to add the constant for your keyboard. To do so add constant in below section. For example to add constant for simplified Chinese add it as shown below
...
KEYBOARD_TYPE_FR = "fr";
KEYBOARD_TYPE_SC = "sc";
After the adding keyboard in one of above categories its time to define the key mappings. Focus should be on those keys which are not working by default.
To do so create index for your keyboard as shown below
Say your ajaxkeys.js looks like as shown below,
var keyboardTables = [
{tindex: 0, keyboardType: KEYBOARD_TYPE_COOKED, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
},
{tindex: 1, keyboardType: KEYBOARD_TYPE_UK, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
},
{tindex: 2, keyboardType: KEYBOARD_TYPE_JP, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
}
]
Then after modification it will look like
var keyboardTables = [
{tindex: 0, keyboardType: KEYBOARD_TYPE_COOKED, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
},
{tindex: 1, keyboardType: KEYBOARD_TYPE_UK, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
},
{tindex: 2, keyboardType: KEYBOARD_TYPE_JP, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
},
{tindex: 3, keyboardType: KEYBOARD_TYPE_SC, mappingTable:
{X11: [ .............
],
keyPress: [ ...........
]
}
}
]
Here KEYBOARD_TYPE_SC is constant "sc" as defined above.
After creating index its time to add the conditional map entries into X11 and keyPress array. It will depend on your keyboard in which you want to put your conditional entries.
Conditional map entries looks like
{keycode: 34, entry: 0x40, guestos: "windows"},
{keycode: 160, entry : 0x5e, guestos: "windows", browser: "Firefox"},
Here keycode is input keycode and entry is output which will determine the key shown on VM console. This entry will only applied if it matches condition which are mentioned next to it.
Here in first entry condition is guestos: "windows" i.e. match only if guestos is windows while in second conditional map entry one more condition is added that match only if guestos is windows and browser is firefox.