Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 likecan be of two types

Type 1 (entry is numeric code)

{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.entry is numeric code. If entry doesn't match the conditions then default handling will be done. 

 

Type 2 (entry is of array type)

{keycode: 43, entry: [
{type: KEY_DOWN, code: X11_KEY_SHIFT, modifiers: 0, shift: false },
{type: KEY_DOWN, code: X11_KEY_ADD, modifiers: 0, shift: false },
{type: KEY_UP, code: X11_KEY_ADD, modifiers: 0, shift: false },
{type: KEY_UP, code: X11_KEY_SHIFT, modifiers: 0, shift: false },
{type: KEY_DOWN, code: X11_KEY_ADD, modifiers: 0, shift: true },
{type: KEY_UP, code: X11_KEY_ADD, modifiers: 0, shift: true },
]
}

Here entry is array of entries. Each entry states the conditions on which it will match and the code to which it will match. If one specifying entry in this format then he/she has to specify entry for all the possible combinations. By possible combiations it means that entries should be able to find mapping. If they are not able to identify mapping then no event will be sent. So If you are specifying browser in one condition then you have to specify entries for all browsers. 

 

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 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. 

Conditional mapping entries can be defined on the conditions which are mentioned in glossary conditional mapping entry.


We should normally be using only Type 1 entries but in some exceptional cases Type 2 entries can also be used. Type 2 entries can be used if one want different code KEY_DOWN and KEY_UP for keycode.

 

How to identify input keycode and output keycode (Taken from FS)

If you don't want to go into details then go directly to section Find the input_keycode and output_keycode for a particular keysection Key type events though it will be a good idea to get some understanding.

The journey of a key

When a key is pressed on the user keyboard, before it reaches its destination and displays a key output on the user VM, it passes through the browser the client uses, the client OS, the console proxy, the server side hypervisor, host OS, and displays a key on the VM. Even when console proxy does the key translation correctly according to the standard and keyboard layout, any component in this path can change the key translation, hence it can make the key output at the end user VM incorrect. 

...

 

{keycode: 59, entry: X11_KEY_COLON, browser: "Firefox"}, when the browser is Firefox, the rule will apply. Otherwise the rule will not apply. 

 

Browser, type and guestos all have string typeand guestos all have string type.

 

Where should key entry go

If key is printable (can be seen after typing in document like ascii characters) then it should go in keyPress map. For prinatble keys we are guaranteed of keyPress event. One can verify whether keyPress event is generated using sites available online. One such site is http://unixpapa.com/js/testkey.html. All other keys except printable should go in X11 keys.

 

Find the input_keycode and output_keycode for a particular key

...

To find out the Input_keycode, we can turn on the keyboard logger window which will show the keycode for every key pressed. “CTRL-ATL-SHIFT+SPACE” turns on the lodger or click on green circle icon on top-right corner. To have a fresh window to show the code for a new key, clear the window first, and then press a key. 

However, for the value of output_keycode, it is tricky. It is more of a trial and error process. We can search the keyboard standard key document, and try various values. We can try pressing different keys and see what input_keycode  generates what output on console. Using these trials we can get the output_code of the key. 

...

CentOS 4.5 (32-bit) 
CentOS 4.6 (32-bit)
CentOS 4.7 (32-bit)
CentOS 4.8 (32-bit)
CentOS 5.0 (32-bit)
CentOS 5.0 (64-bit)
CentOS 5.1 (32-bit)
CentOS 5.1 (64-bit)
CentOS 5.2 (32-bit)
CentOS 5.2 (64-bit)
CentOS 5.3 (32-bit)
CentOS 5.3 (64-bit)
CentOS 5.4 (32-bit)
CentOS 5.4 (64-bit)
Debian GNU/Linux 5.0 (64-bit)
Oracle Enterprise Linux 5.0 (32-bit)
Oracle Enterprise Linux 5.0 (64-bit)
Oracle Enterprise Linux 5.1 (32-bit)
Oracle Enterprise Linux 5.1 (64-bit)
Oracle Enterprise Linux 5.2 (32-bit)
Oracle Enterprise Linux 5.2 (64-bit)
Oracle Enterprise Linux 5.3 (32-bit)
Oracle Enterprise Linux 5.3 (64-bit)
Oracle Enterprise Linux 5.4 (32-bit)
Oracle Enterprise Linux 5.4 (64-bit)
Red Hat Enterprise Linux 4.5 (32-bit)
Red Hat Enterprise Linux 4.6 (32-bit)
Red Hat Enterprise Linux 4.7 (32-bit)
Red Hat Enterprise Linux 4.8 (32-bit)
Red Hat Enterprise Linux 5.0 (32-bit)
Red Hat Enterprise Linux 5.0 (64-bit)
Red Hat Enterprise Linux 5.1 (32-bit)
Red Hat Enterprise Linux 5.1 (64-bit)
Red Hat Enterprise Linux 5.2 (32-bit)
Red Hat Enterprise Linux 5.2 (64-bit)
Red Hat Enterprise Linux 5.3 (32-bit)
Red Hat Enterprise Linux 5.3 (64-bit)
Red Hat Enterprise Linux 5.4 (32-bit)
Red Hat Enterprise Linux 5.4 (64-bit)
SUSE Linux Enterprise Server 9 SP4 (32-bit)
SUSE Linux Enterprise Server 10 SP1 (32-bit)
SUSE Linux Enterprise Server 10 SP1 (64-bit)
SUSE Linux Enterprise Server 10 SP2 (32-bit)
SUSE Linux Enterprise Server 10 SP2 (64-bit)
SUSE Linux Enterprise Server 10 SP3 (64-bit)
SUSE Linux Enterprise Server 11 (32-bit)
SUSE Linux Enterprise Server 11 (64-bit)
Windows 7 (32-bit)
Windows 7 (64-bit)
Windows Server 2003 Enterprise Edition(32-bit)
Windows Server 2003 Enterprise Edition(64-bit)
Windows Server 2008 (32-bit)
Windows Server 2008 (64-bit)
Windows Server 2008 R2 (64-bit)
Windows 2000 Server SP4 (32-bit)
Windows Vista (32-bit)
Windows XP SP2 (32-bit)
Windows XP SP3 (32-bit)
Other Ubuntu (32-bit)
Other (32-bit)
Windows 2000 Server
Windows 98
Windows 95
Windows NT 4
Windows 3.1
Red Hat Enterprise Linux 3(32-bit)
Red Hat Enterprise Linux 3(64-bit)
Open Enterprise Server
Asianux 3(32-bit)
Asianux 3(64-bit)
Debian GNU/Linux 5(64-bit)
Debian GNU/Linux 4(32-bit)
Debian GNU/Linux 4(64-bit)
Other 2.6x Linux (32-bit)
Other 2.6x Linux (64-bit)
Novell Netware 6.x
Novell Netware 5.1
Sun Solaris 10(32-bit)
Sun Solaris 10(64-bit)
Sun Solaris 9(Experimental)
Sun Solaris 8(Experimental)
FreeBSD (32-bit)
FreeBSD (64-bit)
SCO OpenServer 5
SCO UnixWare 7
Windows Server 2003 DataCenter Edition(32-bit)
Windows Server 2003 DataCenter Edition(64-bit)
Windows Server 2003 Standard Edition(32-bit)
Windows Server 2003 Standard Edition(64-bit)
Windows Server 2003 Web Edition
Microsoft Small Bussiness Server 2003
Windows XP (32-bit)
Windows XP (64-bit)
Windows 2000 Advanced Server
SUSE Linux Enterprise 8(32-bit)
SUSE Linux Enterprise 8(64-bit)
Other Linux (32-bit)
Other Linux (64-bit)
Other Ubuntu (64-bit)
Windows Vista (64-bit)
DOS
Other (64-bit)
OS/2
Windows 2000 Professional
Red Hat Enterprise Linux 4(64-bi
SUSE Linux Enterprise 9(32-bit)
SUSE Linux Enterprise 9(64-bit)
SUSE Linux Enterprise 10(32-bit)
SUSE Linux Enterprise 10(64-bit)
CentOS 5.5 (32-bit)
CentOS 5.5 (64-bit)
Red Hat Enterprise Linux 5.5 (32-bit)
Red Hat Enterprise Linux 5.5 (64-bit)
Fedora 13
Fedora 12
Fedora 11
Fedora 10
Fedora 9
Fedora 8
Ubuntu 10.04 (32-bit)
Ubuntu 9.10 (32-bit)
Ubuntu 9.04 (32-bit)
Ubuntu 8.10 (32-bit)
Ubuntu 8.04 (32-bit)
Ubuntu 10.04 (64-bit)
Ubuntu 9.10 (64-bit)
Ubuntu 9.04 (64-bit)
Ubuntu 8.10 (64-bit)
Ubuntu 8.04 (64-bit)
Red Hat Enterprise Linux 2
Debian GNU/Linux 6(32-bit)
Debian GNU/Linux 6(64-bit)
Oracle Enterprise Linux 5.5 (32-bit)
Oracle Enterprise Linux 5.5 (64-bit)
Red Hat Enterprise Linux 6.0 (32-bit)
Red Hat Enterprise Linux 6.0 (64-bit)
None
Other PV (32-bit)
Other PV (64-bit)
CentOS 5.6 (32-bit)
CentOS 5.6 (64-bit)
CentOS 6.0 (32-bit)
CentOS 6.0 (64-bit)
Oracle Enterprise Linux 5.6 (32-bit)
Oracle Enterprise Linux 5.6 (64-bit)
Oracle Enterprise Linux 6.0 (32-bit)
Oracle Enterprise Linux 6.0 (64-bit)
Red Hat Enterprise Linux 5.6 (32-bit)
Red Hat Enterprise Linux 5.6 (64-bit)
SUSE Linux Enterprise Server 10 SP3 (32-bit)
SUSE Linux Enterprise Server 10 SP4 (64-bit)
SUSE Linux Enterprise Server 10 SP4 (32-bit)
SUSE Linux Enterprise Server 11 SP1 (64-bit)
SUSE Linux Enterprise Server 11 SP1 (32-bit)
Ubuntu 10.10 (32-bit)
Ubuntu 10.10 (64-bit)
Sun Solaris 11 (64-bit)
Sun Solaris 11 (32-bit)
Windows PV
CentOS 5.7 (32-bit)
CentOS 5.7 (64-bit)
Ubuntu 12.04 (32-bit)
Ubuntu 12.04 (64-bit)
Windows 8 (32-bit)
Windows 8 (64-bit)
Windows Server 2012 (64-bit)
Windows 8 Server 2012 R2 (64-bit)
Ubuntu 11.04 (32-bit)
Ubuntu 11.04 (64-bit)
CentOS 6.3 (32-bit)
WindowsCentOS 86.3 (64-bit)
Windows Server 2012CentOS 5.8 (6432-bit)
Windows Server 2012 R2CentOS 5.8 (64-bit)
UbuntuCentOS 115.049 (32-bit)
UbuntuCentOS 115.049 (64-bit)
CentOS 6.31 (32-bit)
CentOS 6.31 (64-bit)
CentOS 56.82 (32-bit)
CentOS 56.82 (64-bit)
CentOS 56.94 (32-bit)
CentOS 56.94 (64-bit)
CentOS 6.1 (32Debian GNU/Linux 7(32-bit)
Debian GNU/Linux 7(64-bit)
SUSE Linux Enterprise Server
CentOS 6.111 SP2 (64-bit)
SUSE
CentOS 6.2Linux Enterprise Server 11 SP2 (32-bit)
CentOS 6.2
SUSE Linux Enterprise Server 11 SP3 (64-bit)
SUSE Linux Enterprise Server
CentOS 6.411 SP3 (32-bit)
CentOS 6.4 (64
Red Hat Enterprise Linux 5.7 (32-bit)
Red Hat Enterprise
Debian GNU/Linux 5.7 (3264-bit)
Debian GNU/Linux 7(64
Red Hat Enterprise Linux 5.8 (32-bit)
SUSERed LinuxHat Enterprise Server 11 SP2Linux 5.8 (64-bit)
SUSERed LinuxHat Enterprise Server 11 SP2Linux 5.9 (32-bit)
SUSERed LinuxHat Enterprise Server 11 SP3Linux 5.9 (64-bit)
SUSERed LinuxHat Enterprise ServerLinux 116.1 SP3 (32-bit)
Red Hat Enterprise Linux 6.1 (64-bit)
Red Hat Enterprise Linux 56.72 (32-bit)
Red Hat Enterprise Linux 56.72 (64-bit)
Red Hat Enterprise Linux 5.86.3 (32-bit)
Other CentOS (32-bit)
Red Hat Enterprise Linux 5.8
Other CentOS (64-bit)
RedOther Hat EnterpriseSUSE Linux 5.9 (32-bit)
RedOther Hat EnterpriseSUSE Linux 5.9 (64-bit)
Red Hat Enterprise Linux 6.1 (32-bit)
Red Hat Enterprise Linux 6.1 (64-bit)
Red Hat Enterprise Linux
Oracle Enterprise Linux 5.76.2 (32-bit)
Red Hat
Oracle Enterprise Linux 65.27 (64-bit)
Red Hat
Oracle Enterprise Linux 6.3 (32-bit)
Other CentOS5.8 (32-bit)
Other CentOSOracle Enterprise Linux 5.8 (64-bit)
OtherOracle SUSEEnterprise Linux 5.9 (32-bit)
OtherOracle SUSEEnterprise Linux 5.9 (64-bit)
Red Hat
Oracle Enterprise Linux 6.1 (32-bit)
RedOracle Hat Enterprise Linux
Red Hat Enterprise Linux6.1 (64-bit)
Oracle Enterprise Linux 56.72 (32-bit)
Oracle Enterprise Linux 56.72 (64-bit)
Oracle Enterprise Linux 56.83 (32-bit)
Oracle Enterprise Linux 56.83 (64-bit)
Oracle Enterprise Linux 56.94 (32-bit)
Oracle Enterprise Linux 56.94 (64-bit)
OracleApple Mac EnterpriseOS LinuxX 10.6.1 (32-bit)
OracleApple Mac EnterpriseOS LinuxX 10.6.1 (64-bit)
OracleApple Mac EnterpriseOS LinuxX 610.27 (32-bit)
OracleApple Mac EnterpriseOS LinuxX 610.27 (64-bit)
Oracle Enterprise Linux 6.3FreeBSD 10 (32-bit)
OracleFreeBSD Enterprise Linux 6.3 10 (64-bit)
Oracle Enterprise LinuxCentOS 6.45 (32-bit)
Oracle Enterprise LinuxCentOS 6.45 (64-bit)
AppleWindows Mac OS X 10.68.1 (64-bit)
Windows 8.1 (32-bit)
CentOS 5 (32-bit)
Apple Mac OS X 10.6 CentOS 5 (64-bit)
AppleOracle MacEnterprise OS X 10.7Linux 5 (32-bit)
AppleOracle MacEnterprise OS X 10.7Linux 5 (64-bit)
Oracle Enterprise
FreeBSDLinux 106 (32-bit)
Oracle Enterprise Linux
FreeBSD 106 (64-bit)
Red Hat Enterprise
CentOSLinux 6.5 (32-bit)
CentOSRed 6.5 (64-bit)
Windows 8.1Hat Enterprise Linux 5 (64-bit)
Windows 8.1
Red Hat Enterprise Linux 6 (32-bit)
CentOS 5 (32-bit)
CentOS 5Red Hat Enterprise Linux 6 (64-bit)
Oracle Enterprise Linux
Ubuntu 14.045 (32-bit)
OracleSUSE Linux Enterprise LinuxServer 512 (64-bit)
Red Hat Enterprise Linux 7
CentOS 7
Oracle Linux Enterprise7 Linux
CentOS 6 (32-bit)
Oracle Enterprise LinuxCentOS 6 (64-bit)
Red HatOracle Enterprise Linux 6.5 (32-bit)
Red HatOracle Enterprise Linux 6.5 (64-bit)
Red Hat Enterprise Linux 6.5 (32-bit)
Red Hat Enterprise Linux 6.5 (64-bit)
Ubuntu 14.04 (3264-bit)
CoreOS

Possible Values of hypervisor and hypervisorVersion

These values are taken from hypervisor_type and hypervisor_version column of  hypervisor_capabilities table in cloud DB. Refer this table for latest possible values.

hypervisorhypervisorVersion
 XenServer
default
 XenServer
XCP 

...

1.0
 XenServer
5.6
XenServer
5.6 FP1
XenServer
5.6 SP2
XenServer
6.0
XenServer
6.0.2
XenServer
6.1.0
XenServer
6.2.0
XenServer
6.5.0

VMware

default 

VMware

4.0

VMware

4.1
VMware
5.0
VMware
5.1
VMware
5.5

KVM

default 

Ova

default
Ova
2.3
LXC
default

Hyperv

6.2

Ovm3

3.2

Ovm3

3.3