Example - Using NLS functions to make Caps Lock and Alt Gr share the
You can use the installer package to deploy this keyboard layout without
any restrictions. Free Demo
version can be used to make changes and test them. To deploy a modified version,
a Premium, Personal or
Lite edition is needed.
This example demonstrates the use of the
VK code NLS function to assign two
modifier functions - non-togglable
Kana and Caps Lock - to a single key.
It continues where another example -
Replacing AltGR with Kana -
has left off, by moving Kana to the location of the Caps Lock key, and
producing Caps Lock via the Ctrl + Kana combination.
The right Alt key is liberated from the AltGr function, and is
available for use either as a "plain" Alt key, or another special or
letter-producing key. This is especially useful for laptops purchased
outside of Germany, which often lack the right Alt key.
A nice side benefit of this arrangement is that Caps Lock is far less
likely to be toggled accidentally, as it requires pressing two
The example also supports the ẞ letter ("capital Sharp S",
1E9E), which has since become part of the standard German keyboard.
Step by step instructions
Following are the steps required to produce the example.
|We'll start by enabling the dual VK_OEM_8 (ie
and Caps Lock function on the former Caps Lock key:
- Open the standard German
keyboard layout (00000407, KBDGR.DLL)
- Switch to the low-level
- Click on the Caps Lock key to activate it (just
above the left Shift, scan code 0x3A).
- Assign the
VK_OEM_8 VK code to the key, either from the
right-click popup menu, or by choosing VK_OEM_8 from the
Assigned virtual code drop-down.
- In the Special NLS functions drop-down, choose
Alternative VK code.
- This changes the UI to reveal a new dropdown labeled Alternative
virtual code and a check-list box For modifier combinations.
- In the Alternative virtual code dropdown, choose VK_CAPITAL
(VK code for the Caps Lock function).
- In the For modifier combinations check-list box, tick Ctrl.
The Caps Lock key is now set up to produce the VK_OEM_8 code
(non-togglable Kana) by default, while still retaining the Caps
Lock function when Ctrl is down.
|Remaining are the generic tasks needed to replace AltGr with
KANA. As there is a large overlap with the above mentioned
Replacing AltGR with Kana
example, consult the latter for details that are glossed over
- Make sure you're in the
- Click the KANA checkbox to activate the
- Choose VK_OEM_8 (normal) from the combo-box next
to the KANA checkbox.
This activates the
non-togglable KANA function for the VK_OEM_8 VK we have
already mapped to the Caps Lock key.
- Activate the KANA and SHIFT+KANA modifier
combinations, by moving them from "unused" to "active"
- Switch to the high-level
- Move all AltGr character mappings to the Kana
positions of the same keys, as described in the
high-level drag-drop instructions.
Reminder: you don't have to move the AltGr mappings
one-by-one, they can be all moved in one go by choosing
all keys in the "drop" pop-up menu.
- Repeat the same step for the Shift+AltGr mappings
- they should all be moved to Shift+Kana.
In the standard German keyboard, there is actually only one
such mapping - ẞ (capital sharp S, 1E9E) mapped
- Switch back to the low-level
- Disable the ALTGR and SHIFT+ALTGR
combinations, ie move them from the "active" to "unsued
modifier combinations" list.
- Untick the Uses AltGR checkbox, as the special
is no longer needed.
This makes the right Alt key behave again as a "plain" Alt,
ie it no longer generates a Ctrl+Alt combination.
It is only fair to mention that this layout has a couple of minor drawbacks
over the standard German layout:
- The capital ẞ letter (1E9E) can only be produced by
In other words, it cannot be produced by Kana+VK_OEM_4 when Caps Lock
This is because there is no
CAPLOKALTGR equivalent for Kana.
- If you press the Ctrl and Kana keys in the wrong order (Kana followed by
Ctrl, instead of the other way around), Kana key can get
stuck in the down position. Fortunately, it can be easily "unstuck" by
pressing/releasing it alone, ie without Ctrl.