Jump to content

KBDKEYINFO: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
== KBDKEYINFO ==
== KBDKEYINFO ==
Character data structure.
Character data structure.


=== Type ===  
=== Type ===  
 
  [[UCHAR]]  chChar
  [[OS2 API:DataType:UCHAR|UCHAR]]  chChar
  UCHAR  chScan
  [[OS2 API:DataType:UCHAR|UCHAR]]   chScan
  UCHAR  fbStatus
  [[OS2 API:DataType:UCHAR|UCHAR]]   fbStatus
  UCHAR  bNlsShift
  [[OS2 API:DataType:UCHAR|UCHAR]]   bNlsShift
  [[USHORT]]  fsState
  [[OS2 API:DataType:USHORT|USHORT]]  fsState
  USHORT  time
  [[OS2 API:DataType:USHORT|USHORT]] time


==== C Declaration Method ====
==== C Declaration Method ====
typedef struct
typedef struct


=== Fields ===
=== Fields ===
 
;chChar:ASCII Character code.
chChar   ASCII Character code.
:The scan code received from the keyboard is translated to the ASCII character code.
          The scan code received from the keyboard is translated to the ASCII
;chScan:Code received for the keyboard.
          character code.
:Scan code received from the keyboard is translated to the ASCII character code.
 
;fbStatus:State of the keystroke event flag.
chScan   Code received for the keyboard.
::Bits 7-6  Has the following values:
          Scan code received from the keyboard is translated to the ASCII
:::00  Undefined.  
          character code.
:::01  Final character; interim character flag is turned off.
 
:::10  Interim character.  
fbStatus State of the keystroke event flag.
:::11  Final character; interim character flag is turned on.
          Bits 7-6  Has the following values:
::Bit 5 - If set to 1, immediate conversion requested.
                00  Undefined.  
::Bits 4-2 - Reserved.  
                01  Final character; interim character flag is turned off.
::Bit 1 - Has the following values:
                10  Interim character.  
:::0  Scan code is a character  
                11  Final character; interim character flag is turned on.
:::1  Scan code is not a character; instead it is an extended key code from the keyboard.
          Bit 5     If set to 1, immediate conversion requested.
::Bit 0 - If set to 1, shift status returned without a character.
          Bits 4-2 Reserved.  
;bNlsShift:NLS shift status. Reserved, must be 0.
          Bit 1   Has the following values:
;fsState:Shift key status flag.
                  0  Scan code is a character  
:Values are:
                  1  Scan code is not a character; instead it is an extended key
::Bit 15    SysReq key down  
                    code from the keyboard.
::Bit 14    Caps Lock key down  
          Bit 0     If set to 1, shift status returned without a character.
::Bit 13    NumLock key down  
 
::Bit 12    Scroll Lock key down  
bNlsShift NLS shift status. Reserved, must be 0.
::Bit 11    Right Alt key down  
 
::Bit 10    Right Ctrl key down  
fsState   Shift key status flag.
::Bit  9    Left Alt key down  
          Values are:
::Bit  8    Left Ctrl key down  
          Bit 15    SysReq key down  
::Bit  7    Insert on  
          Bit 14    Caps Lock key down  
::Bit  6    Caps Lock on  
          Bit 13    NumLock key down  
::Bit  5    NumLock on.  
          Bit 12    Scroll Lock key down  
::Bit  4    Scroll Lock on  
          Bit 11    Right Alt key down  
::Bit  3    Either Alt key down  
          Bit 10    Right Ctrl key down  
::Bit  2    Either Ctrl key down  
          Bit  9    Left Alt key down  
::Bit  1    Left Shift key down  
          Bit  8    Left Ctrl key down  
::Bit  0    Right Shift key down
          Bit  7    Insert on  
;time:Time stamp in milliseconds.
          Bit  6    Caps Lock on  
:Time stamp indicating when a key was pressed. It is specified in milliseconds from the time the system was started.
          Bit  5    NumLock on.  
          Bit  4    Scroll Lock on  
          Bit  3    Either Alt key down  
          Bit  2    Either Ctrl key down  
          Bit  1    Left Shift key down  
          Bit  0    Right Shift key down
 
time     Time stamp in milliseconds.
          Time stamp indicating when a key was pressed. It is specified in
          milliseconds from the time the system was started.
 
 
 
 
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[Category:Data type]]

Revision as of 15:13, 11 November 2016

KBDKEYINFO

Character data structure.

Type

UCHAR   chChar
UCHAR   chScan
UCHAR   fbStatus
UCHAR   bNlsShift
USHORT  fsState
USHORT  time

C Declaration Method

typedef struct

Fields

chChar
ASCII Character code.
The scan code received from the keyboard is translated to the ASCII character code.
chScan
Code received for the keyboard.
Scan code received from the keyboard is translated to the ASCII character code.
fbStatus
State of the keystroke event flag.
Bits 7-6 Has the following values:
00 Undefined.
01 Final character; interim character flag is turned off.
10 Interim character.
11 Final character; interim character flag is turned on.
Bit 5 - If set to 1, immediate conversion requested.
Bits 4-2 - Reserved.
Bit 1 - Has the following values:
0 Scan code is a character
1 Scan code is not a character; instead it is an extended key code from the keyboard.
Bit 0 - If set to 1, shift status returned without a character.
bNlsShift
NLS shift status. Reserved, must be 0.
fsState
Shift key status flag.
Values are:
Bit 15 SysReq key down
Bit 14 Caps Lock key down
Bit 13 NumLock key down
Bit 12 Scroll Lock key down
Bit 11 Right Alt key down
Bit 10 Right Ctrl key down
Bit 9 Left Alt key down
Bit 8 Left Ctrl key down
Bit 7 Insert on
Bit 6 Caps Lock on
Bit 5 NumLock on.
Bit 4 Scroll Lock on
Bit 3 Either Alt key down
Bit 2 Either Ctrl key down
Bit 1 Left Shift key down
Bit 0 Right Shift key down
time
Time stamp in milliseconds.
Time stamp indicating when a key was pressed. It is specified in milliseconds from the time the system was started.