Programming with Reflection
SetScanCodeName method
Syntax object.SetScanCodeName ScanType, ScanCode, ScanName
Assigns a name to a keys 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
Required
Specifies the type of scan code generated by the key. Use one of the following:
rcExtendedScanCode
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.
rcExtendedE1ScanCode
Like rcExtendedScanCode, except the scan code starts with E1 instead of E0.
rcNormalScanCode
If the scan code does not start with E0 or E1, use this value.
ScanCode Argument Type: Integer
Required
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
Required
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.