[Home] [Purchase] [Download] [Manual] [Acknowledgements] [Sitemap] [Release Notes] [FAQ]

Up ] Key popup menu ] High Level Clipboard ] High Level drag-drop ] Key Mapping Editor mini dialog ] Ligatures ] Caps Lock-related special settings ] KANALOK setting ] [ Numeric keypad ]

Numeric keypad

The numeric keypad block is found on the far right of most full-sized PC keyboards. The keys belonging to this block have few specifics that set them apart from other mappable keys.

The effect of NumLock

The main feature of the numpad keys is their dual function - depending on the state of the NumLock toggle key (VK_NUMLOCK virtual key code), they can behave either as regular mappable keys (NumLock ON), or cursor navigation keys Left / Right / Home / End / Delete / etc (NumLock OFF).

The reason for this is historical: early 83- and 84-key PC keyboards did not have a dedicated navigation key "island". The navigation functions were only available as an alternative function of the numpad block.

Note that this duality is only present in the digit keys 0-9 (VK_NUMPAD0 - VK_NUMPAD9), and the decimal point (VK_DECIMAL). The remaining numpad keys / , * , - , + and Enter are not affected by NumLock. The NumLock-dependent behavior is summarised in this table:

Affected by NumLock Not affected by NumLock
VK code Function VK code Function
NumLock ON NumLock OFF
VK_NUMPAD0 0 Insert VK_INSERT VK_DIVIDE /
VK_NUMPAD1 1 End VK_END VK_MULTIPLY *
VK_NUMPAD2 2 Arrow Down VK_DOWN VK_SUBTRACT -
VK_NUMPAD3 3 Page Down VK_NEXT VK_ADD +
VK_NUMPAD4 4 Arrow Left VK_LEFT VK_RETURN Return
VK_NUMPAD5 5 No function VK__none_  
VK_NUMPAD6 6 Arrow Right VK_RIGHT
VK_NUMPAD7 7 Home VK_HOME
VK_NUMPAD8 8 Arrow Up VK_UP
VK_NUMPAD9 9 Page Up VK_PRIOR
VK_DECIMAL Decimal point Delete VK_DELETE

The NumLock switching behaviour is specific to the VK_NUMPAD0 - VK_NUMPAD9 and VK_DECIMAL VK codes, regardless of the physical keys they are assigned to. It is thus possible to emulate the numpad functionality even on keyboards that are missing the dedicated numeric keypad, simply by assigning the numpad VK codes to the desired physical keys using the Low-level editor.

It is worth pointing out that, in the NumLock ON state, the VK_NUMPAD0 - VK_NUMPAD9 are not restricted to digits 0-9. They are still regular mappable keys, which can accept any arbitrary Unicode character, dead key or a ligature on any modifier position, with few restrictions related to the Shift modifier (see below).

The effect of Shift

Another unique feature of the numpad keys is their interaction with the Shift modifier key: instead of switching the SHIFT modifier bit on/off, the Shift key's effect is to temporarily invert the NumLock state.

Thus if NumLock is ON, SHIFT+VK_NUMPAD1 will produce the NumLock OFF function, ie the End navigation key.

Likewise, if NumLock is OFF, SHIFT+VK_NUMPAD1 will produce the NumLock ON function, ie digit 1.

Due to this, the SHIFT modifier positions of the numpad keys are generally not available for the high-level Unicode mappings. The High-level editor highlights this by making the numpad SHIFT positions read-only, and displaying further clarification in the tool tip:

The effect of Caps Lock

Numpad keys have another surprise in store - even though they don't accept the SHIFT key as a general-purpose modifier, some of their SHIFT positions can still produce Unicode mappings in combination with Caps Lock:

  • If the effect of Caps Lock is set to "Caps Lock same as Shfit", the SHIFT position mapping can be produced while Caps Lock is ON by pressing the numpad key alone, ie without any other modifiers.
  • If the CAPLOKALTGR bit is set, the mappings for any modifier positions containing the ALTGR and SHIFT bits can be produced while Caps Lock is ON by pressing the numpad key while holding down the same AltGR modifier combination, but without Shift.

In both special cases, the corresponding SHIFT position(s) are shown as editable in the High-level editor, with the tool tip indicating that the mapping is available in combination with CapsLock ON:

Manual index

Copyright © KbdSoft 2007-2024