Programming with Reflection

image\rwnprg32.gif GetScanCode method


Syntax KeyName = object.GetScanCode(ScanType, ScanCode)



Returns the keystroke to which the specified scan code is mapped.


ScanType Argument type: Enumeration
Specifies the type of scan code generated by the key. Use the KEYMON utility to determine scan codes and scan code types.

 This argument has three possible values:


 An extended scan code is one that starts with E0. When you run KEYMON 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 this value.


 Like rcExtended, 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 information about the key, usually three lines. 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.


KeyName Return type: String
Returns the name assigned to this scan code with the SetScanCodeName method.


image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command