Intermec CN2B Manual do Utilizador Página 202

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 201
Chapter 7 — Programming
184 CN2B Mobile Computer User’s Manual
Alpha (Green) Plane
The alpha plane contains values from the keypad when the keypad has been
placed in alpha mode by pressing the green [Alpha] key, such as:
Press the Keys To Enter This
[Alpha] [1] Caps
[Alpha] [5] j
[Alpha] [9] w
Locating the Registry Settings for Your Key Values
Key values for each plane are stored in the registry. All units ship with a
default key mapping loaded in the registry. Applications that change the
default mapping need to read the appropriate key from the registry into an
array of words, modify the values required and then write the updated val
-
ues back into the registry. The registry access can be done with standard
Microsoft API calls, such as RegOpenKeyEx(), RegQueryValueEx(), and
RegSetValueEx(). These registry keys contain the plane mappings:
The unshifted plane mapping can be found in the registry at:
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD\Vkey
The orange plane mapping can be found in the registry at:
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD\VkeyGold
The alpha plane mapping can be found in the registry at:
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD\VkeyAlpha
How Key Values Are Stored in the Registry
To know which fields to update in the registry, you must know what Scan
Codes are assigned to each physical key (see page 185). The Scan Code is
used at the lowest level of the system to let the keypad driver know which
physical key is pressed. The keypad driver takes that scan code and looks it
up in a table (a copy of the table in the registry) to determine the values to
pass to the operating system.
Each registry key is just an array that describes to the keypad driver what
value needs to be passed for each physical key. The key values are indexed
by the scan code, this is a zero-based index. For example in the unshifted
plane, the [4] key has a scan code of 0x06. This means that the seventh
word under the “Vkey” registry key has the value for the [4] key. Taking a
sample of the “Vkey” registry key shows the following values:
00,00,0B,05,02,03,C1,07,04,03,BE,00,34,00,00,00,. . .
The value is 34,00. The values are in reverse byte order because that is the
way the processor handles data. When writing an application, nothing
needs to be done to swap the bytes, as this will happen automatically when
the data is read into a byte value. This is something you just need to be
Vista de página 201
1 2 ... 197 198 199 200 201 202 203 204 205 206 207 ... 263 264

Comentários a estes Manuais

Sem comentários