Keyboard Support

Contact and Search Homepage

Header bottom

On this page

Virtual Keys and Virtual Character Keys

Virtual keys provide a mechanism for recognising any key combination on the keyboard. Any key that does not normally generate a character, except for a few listed below, can bematched by this technique.

The key codes refer to the actual key at the given position on a standard US-English keyboard. Whenused with a non US-English keyboard driver (selected through Control Panel/Keyboards), differences can arise, and this use is not recommended.

The Right-Alt key has traditionally been used on European keyboards as an additional shift state, usually known as AltGr. The end user of Keyman keyboards can select an option to emulate Right-Alt withCtrl+Alt, as Right-Alt is not available on many notebook keyboards. Thus, it is wise to avoid using Ctrl+Altcombinations in the same keyboard as Right-Alt combinations.Additionally, it is useful to keep in mind that when this emulation is active, it is not possible to recognise the Ctrl+Right Alt combination, as this is overridden by Ctrl+Alt (producing Right-Alt). This can have ramifications in keyboards such as German, which makes use of the Ctrl+AltGr combination.

Virtual Keys vs Virtual Character Keys: Keyman 6.0 introduced a new feature known as mnemonic layouts. This feature requires that the "white"alphabet/numeric/punctuation keys in the primary section of the keyboard are referenced by the characteron the key cap rather than the key position (as with non-mnemonic layouts). However, all other keys on the keyboard should be referenced as normal.It is important to remember that you can choose any character that appears on a given keycap, not just theunshifted character. For instance, if you use ['A'], you will be matching the unshifted A key;you must still explicitly state the shift state for the key.


The general format for a virtual character key is:

[ shift-codes 'c' ]

where c is any character on the keyboard.

The general format for a virtual key is:

[ shift-codes K_key ]

The possible shift codes are:

A caveat for using RALT: When using many European keyboards, Windows internally translates the RALT (or AltGr) key toLCTRL+RALT. Keyman also includes an option to treat CTRL+ALT in the same manner as RALT (this is useful for notebook keyboards that do not have a RALT or AltGr key. Both of these 'features' mean that you should avoid using more than one of the following shift combinations in the same keyboard:

The following table lists all of the common virtual key codes:

The following table lists all of the less common virtual key codes:

The following table lists all of the reserved virtual key codes that will not be recognised even if theyare on your keyboard, although they are included in Keyman for completeness:

Some examples are:

Virtual keys also work in the output (sending keystrokes to an application), but they are not officially supported and may not work in all circumstances.