[Next] [Up/Previous] [Home] [Other]

Key Remapping

The Gateway 2000 AnyKey keyboard allowed you to press a special 'remap' key, then the key you were moving, and the key you were moving it to.

But after you do that, there's always one key, the one just remapped, that appears twice on the keyboard. So one key must be missing now!

That keyboard dealt with this problem by having two complete sets of function keys. One of those sets could be used as temporaries to facilitate remapping, and then assigned back to their original meanings from the other set. They could also be assigned multi-key macros with another special key. As well, remapping a key to itself restored its default meaning, so there was another way around the problem.

This keyboard,

though, doesn't have a lot of extra keys. How can remapping a key be made simple in such a circumstance? And how can remapping be made fully versatile on the keyboard, avoiding the limitations the AnyKey had that point-of-sale keyboards do not have?

  -------------------------------------------------------------------------
  |   |Std|Std|Std|Std|Std|Std|Std|Std|Std|Std|   |   |       |Rem|Rem|Rem|
  |   |1  |2  |3  |4  |5  |6  |7  |8  |9  |10 |   |   |       |1  |2  |3  |
  |-----------------------------------------------------------------------|
  |     |   |   |   |   |   |   |   |   |   |   |   |   |     |Usr|Usr|Usr|
  |     |   |   |   |   |   |   |   |   |   |   |   |   |     |7  |8  |9  |
  |-----------------------------------------------------------------------|
  |      |   |   |   |   |   |   |   |   |   |   |   |        |Usr|Usr|Usr|
  |      |   |   |   |   |   |   |   |   |   |   |   |        |4  |5  |6  |
--------------------------------------------------------------------------|
|***|      |   |   |   |   |   |   |   |   |   |   |      |   |Usr|Usr|Usr|
|***|      |   |   |   |   |   |   |   |   |   |   |      |   |1  |2  |3  |
--------------------------------------------------------------------------|
  |     |   |     |                           |     |   |     |Usr    |   |
  |     |   |     |                           |     |   |     |10     |   |
  -------------------------------------------------------------------------

Using the Green Key, we have seen how a switch to a standard or user layout can be selected. Also, with the Green Key, the three keys above the numeric keypad have three different remapping functions.

Remap 1 is the simplest remap. First, press that key (using the Green Key shift). Then, press the key with the function to be copied, and the key to which it is to be copied.

Remap 2 involves one extra step. Press the remap 2 key (requiring the Green Key shift). Then, press a key indicating a layout. (The Green Key is not pressed for that, even though those keys are struck with the Green Key held down to switch to the layout.) Press the key the function of which in that layout is to be remapped. Then, finally, press the key to which the function is to be remapped.

When the key indicating a layout is to be pressed, additional keys can be pressed first with special prefix functions:

  -------------------------------------------------------------------------
  |Cur|Std|Std|Std|Std|Std|Std|Std|Std|Std|Std|   |   |       |Rem|Rem|Rem|
  |Lyt|1  |2  |3  |4  |5  |6  |7  |8  |9  |10 |   |   |       |1  |2  |3  |
  |-----------------------------------------------------------------------|
  |     |Fn>|   |Fn>|   |   |   |   |   |   |   |   |   |     |Usr|Usr|Usr|
  |     |   |>Fn|Fn |   |   |   |   |   |   |   |   |   |     |7  |8  |9  |
  |-----------------------------------------------------------------------|
  |      |   |>  |   |   |   |   |   |   |   |   |   |        |Usr|Usr|Usr|
  |      |   |Num|   |   |   |   |   |   |   |   |   |        |4  |5  |6  |
--------------------------------------------------------------------------|
|***|      |Shf|Alt|Ctl|AGr|>  |>  |>  |>  |   |   |      |   |Usr|Usr|Usr|
|***|      |>  |>  |>  |>  |Shf|Alt|Ctl|AGr|   |   |      |   |1  |2  |3  |
--------------------------------------------------------------------------|
  |     |   |     |                           |     |   |     |Usr    |   |
  |     |   |     |                           |     |   |     |10     |   |
  -------------------------------------------------------------------------

Because of the small size of the keyboard, usually there is an Fn key present, and that changes the meaning of the keys. So it is possible to indicate that the meaning of a source key with Fn held down is to be remapped, or that the remapping is to the target key when Fn is held down, or both.

We saw one special partial arrangement where some keys worked differently in Num Lock mode; just as on laptop keyboards, letter keys become part of the numeric keypad, here in that mode, keys adjacent to the numbers on the numeric keypad can serve as the auxilliary keys the full keyboard has. So a key is present to indicate the mapping is to the Num Lock layer of the keyboard.

As well, it might be desired to change what a target key does when shifted, or change a key to act as another key when that key is shifted. So there are separate "from" and "to" keys for each of the three possible shifts, which allows them to be combined with each other and with the keys indicating the relationship of the mapping to the Fn layers.

With Fn, either the mapping is of the non-Fn function of the key, or of the Fn function, to either the non-Fn function or the Fn function of the target key. Normally, with shift states, Shift, Ctrl, or Alt, the mapping is to all shift states of the key. If a shift state is specified, then the mapping is confined to the state with that shift on. Thus, if it is desired to map four separate functions to the four possible combinations of Shift and Alt for a key, first one would map to the unshifted key (setting all four positions), then one would map to both singly shifted versions of the key in either order, and finally one maps to the key with both shifts applied.

Also, the key to the left of the !1 key is marked Cur Lyt. This allows the current layout, rather than a user layout or a standard layout, to be chosen as the source for the remapping. In this way, the Remap 2 button can be used to allow these prefix keys to be used for the Remap 1 function.


Remap 3 is the most complicated function.

This is understandable, as its purpose is to allow scan codes to be remapped to keys.

  -------------------------------------------------------------------------
  |   |   |   |   |   |   |   |   |   |   |   |   |   | E     | F |   |Rem|
  |   |   |   |   |   |   |   |   |   |   |   |   |   |       |   |   |3  |
  |-----------------------------------------------------------------------|
  |     |   |>  |   |   |SC1|SC2|SC3|>  |>  |>  |>  |   | D   | 7 | 8 | 9 |
  |     |   |Fn |   |   |>  |>  |>  |all|SC1|SC2|SC3|   |     |   |   |   |
  |-----------------------------------------------------------------------|
  |      |   |>  |   |E0+|Mul|Mul|101|102|109|122|   | C      | 4 | 5 | 6 |
  |      |   |Num|   |   |(  |)  |xlt|xlt|xlt|xlt|   |        |   |   |   |
--------------------------------------------------------------------------|
|   |      |   |   |   |   |>  |>  |>  |>  |   |   |      | B | 1 | 2 | 3 |
|   |      |   |   |   |   |Shf|Alt|Ctl|AGr|   |   |      |   |   |   |   |
--------------------------------------------------------------------------|
  |     |   |     |                           |     |   | A   | 0     |   |
  |     |   |     |                           |     |   |     |       |   |
  -------------------------------------------------------------------------

The normal sequence is to first press the Remap 3 key (with the Green Key held down), enter the two-digit scan code, and then press the key to which it is to be assigned.

As with remap function 2, a scan code may be assigned to a key when shifted by the Fn key, or for when the keyboard is in the Num Lock state.

Multi-code sequences can be assigned to a key, and in addition to the prefix Mul (, there is the Mul ) key which ends the sequence.

Normally, scan codes will be entered in Scan Code Set 1 form, since that is the form which is visible to the user within the Windows operating system. However, one can choose to enter scan codes in Set 2 or Set 3.

On normal keyboards, the relationship between Scan Code Set 1 and Scan Code Set 2 is universal. However, the relationship between those two codes and Scan Code Set 3 varies between keyboards.

In the case of the U.S. 101-key keyboard, the international 102-key keyboard, and the Japanese 109-key keyboard, the differences are minor, involving only a small number of keys. But the translation to and from the scan code sets can be chosen.

In the case of the 122-key keyboard, the translation is significantly different; Scan Code Set 3 and Scan Code Set 2 are effectively equivalent.

In addition to choosing which scan code set to use for entering values, one can choose which of the scan code set planes is to be modified. The default, of course, is all three.

If multiple remap function 3 operations are performed in succession, these settings are persistent, so a key is provided to return to the default mode of remapping to all three scan code planes.

Also note that if a remap is not completed, but 30 seconds elapses between keypresses, the remap is cancelled and the keyboard returns to normal function.

Copyright (c) 2009 John J. G. Savard


[Next] [Up/Previous] [Home] [Other]