Programming with Reflection

image\rwnprg32.gif SetScanCodeName method


Syntax object.SetScanCodeName ScanType, ScanCode, ScanName



Assigns a name to a key’s scan code. This name can then be used to map the key, with SetKeyMap.

You only need to use SetScanCodeName if you're mapping a key on a non-standard keyboard¾that is, a keyboard with key names that differ from those on a standard keyboard, or a keyboard whose keys generate scan codes that differ from those generated by a standard keyboard. If you have an IBM PC or XT keyboard, an IBM PC/AT keyboard, an IBM Enhanced 101/102 key keyboard, or a keyboard that matches the key layout of any of these keyboards, you shouldn't ever need to use SetScanCodeName.


ScanType Argument Type: Enumeration
Specifies the type of scan code generated by the key. Use one of the following:


 An extended scan code is one that starts with E0. When you run the KEYMON utility (supplied with Reflection) to determine your scan code, the first line of output (when you press a key) may look like this:

 Interrupt 9 scan code: E0h,224d

 If the first characters after the colon are E0, use rcExtendedScanCode.


 Like rcExtendedScanCode, except the scan code starts with E1 instead of E0.


 If the scan code does not start with E0 or E1, use this value.

ScanCode Argument Type: Integer
Specifies the decimal value of the scan code. When you run KEYMON and then press a key, it returns three or more lines of information about the key. Most keys return just three lines of data. For example, if you press the m key, this is KEYMON's response:

 Interrupt 9 scan code: 32h, 50d
Interrupt 16 returns: AH=32h, 60d AL=6Dh, 109d <m>
Interrupt 9 scan code: B2h,178d

 The number preceding the letter d on the first line (that is, 50) is the decimal value of the scan code.

ScanName Argument Type: String
This string is a name that you make up. The obvious name to use is the name of the key in question, but Reflection will accept any alphanumeric string. This name can then be used with SetKeyMap (as the Key string) to remap this key. This name is case-sensitve.


image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command