[ Up ] [ Editing VK Mappings ] [ Modifiers ] [ Special NLS functions ] [ Special NLS Functions Editor ] [ Mouse keys ] [ List of Virtual Key Codes ]
The "Special NLS Functions" editor is accessed from the Low-level editor through the "Edit" button, which shows up when the "Special NLS Functions" dropdown is set to "Advanced". It is also accessible from the context menu through the "NLS functions" option.
The dialog enables a detailed setting of NLS functions for the chosen virtual key. The functions are set separately for each of the 8 possible combinations of the Shift, Ctrl and Alt modifiers. Optionally, separate functions can be set for the "key up" events:
KbdEdit Special NLS function editor dialog
NLS functions can be assigned independently to each modifier combination via the combination's drop-down:
KbdEdit Special NLS function editor dialog function types dropdown
Current Windows versions support 15 NLS function types:
| Function type | Description |
|---|---|
| No Event | Do nothing - the keypress is ignored |
| Send Base VK | Keep the original key's function, as defined by its VK code |
| Send Param VK | Emulate keypress of an alternative VK code, defined through the supplied parameter |
| Kana Lock | Functions specific to FE
languages and their Input Method Editors (IMEs). At the time of writing, their exact functioning is not known yet. More information will be provided as it becomes available. |
| Alpha Num | |
| Hiragana | |
| Katakana | |
| Sbcs-Dbcs | |
| Roman | |
| Code Input | |
| Help or End | |
| Home or Clear | |
| Numpad | |
| Kana Event | |
| Conv or Non-conv |
The "Send Param VK" and "Kana Event" functions require an additional VK code parameter. This is provided through a separate drop down, which shows up when either of the functions is active:
KbdEdit Special NLS function editor dialog param VK dropdown
Normally, the same NLS function is active for both the "down" and "up" keypresses of the same VK code. However, if a "Keydown switches to alternative keyup functions" checkbox is checked for any of the modifier combinations, a separate set of "key up" functions becomes available for all combinations, as shown in the above screenshot taken from the standard KBDJPN.dll Japanese keyboard layout.
The alternative key-up functions are quite convoluted and counter-intuitive, so here is an attempt to explain and summarise them to the best of author's ability:
The rationale behind the alternative key-up functions is unclear - they may have been necessary to support specific interactions between the keyboard and its associated IME editor.
In certain FE layouts, they also seem to be used to minimise the occurrence of a NLS function getting stuck in the "key down" state. This can happen if the user depresses/releases some of the Shift/Ctrl/Alt modifiers while a key with special NLS functions is still down, ie before it is released. In these scenarios, it helps to define the original "key down" NLS function on additional modifier combinations, but for the "key up" event only, so that releasing the key cleanly turns off the same NLS function, instead of sending a "key up" event for a different NLS function that may be defined for the (now different) active modfiier combination.
This example shows how alternative key-up functions can be used to simulate "togglability" of the Roya/Loya modifier keys.
The "Special NLS functions" dialog can help de-mystify the Alternative VK code NLS functions. As an example, we'll look at the alternative VK code function mapped to Ctlr+VK_OEM_2 (from this example layout). Opening up the dialog for this VK code reveals "alternative VK code" inner workings:
KbdEdit Special NLS function editor dialog Alternative VK code
The last two points are important for the (relatively) smooth co-existence of the key's original and alternative VK codes. They ensure that the "alternative" VK is always cleanly returned to "up" state when the user releases the physical key, instead of getting stuck in the "down" position if the modifier combination has changed. Without them, the user would have to be very careful not to alter the current Shift/Ctrl/Alt combination before releasing the key.
The "anti-stick" protection is not perfect though - it does not prevent the original VK code from getting stuck in certain edge scenarios, as described in Limitations of Alternative VK code customisations.
Copyright ゥ KbdSoft 2007-2025