Jump to content

KBDINFO: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== KBDINFO ==
Keyboard status data structure.
 
Keyboard status data structure.  


=== Type ===  
=== Type ===  
[[USHORT]]  cb
USHORT  fsMask
USHORT  chTurnAround
USHORT  fsInterim
USHORT  fsState


[[OS2 API:DataType:USHORT|USHORT]]  cb
[[OS2 API:DataType:USHORT|USHORT]]  fsMask
[[OS2 API:DataType:USHORT|USHORT]]  chTurnAround
[[OS2 API:DataType:USHORT|USHORT]]  fsInterim
[[OS2 API:DataType:USHORT|USHORT]]  fsState
==== C Declaration Method ====
==== C Declaration Method ====
typedef struct
typedef struct


=== Fields ===
=== Fields ===
 
;cb:Length, in bytes, of this data structure.
cb           Length, in bytes, of this data structure.
::10 - Only valid value.
              10             Only valid value.
;fsMask:State mask.
 
:The system state altered by this call. If bits 0 and 1 are off, the echo state of the system is not altered. If bits 2 and 3 are off, the binary and ASCII state of the system is not altered. If bits 0 and 1 are on, or if bits 2 and 3 are on, the function returns an error. If binary mode is set, echo is ignored.
fsMask       State mask.
::Bits 15-9 - Reserved.
              The system state altered by this call. If bits 0 and 1 are off,
::Bit 8 - Shift return is on.
              the echo state of the system is not altered. If bits 2 and 3 are
::Bit 7 - Length of the turn-around character (meaningful only if bit 6 is on).
              off, the binary and ASCII state of the system is not altered. If
::Bit 6 - Turn-around character is modified.
              bits 0 and 1 are on, or if bits 2 and 3 are on, the function
::Bit 5 - Interim character flags are modified.
              returns an error. If binary mode is set, echo is ignored.
::Bit 4 - Shift state is modified.
 
::Bit 3 - ASCII mode is on.
              Bits 15-9 Reserved.
::Bit 2 - Binary mode is on.
              Bit 8     Shift return is on.  
::Bit 1 - Echo off.
              Bit 7     Length of the turn-around character (meaningful only
::Bit 0 - Echo on.
                          if bit 6 is on).
;chTurnAround:Turnaround character.
              Bit 6     Turn-around character is modified.
:Definition of the turn-around character. In ASCII and extended ASCII format, the turn-around character is defined as the carriage return. In ASCII format only, the turn-around character is defined in the low-order byte.
              Bit 5     Interim character flags are modified.
;fsInterim:Interim character state and NLS shift state.
              Bit 4     Shift state is modified.
::Bits 15-8  NLS shift state.
              Bit 3     ASCII mode is on.  
::The meaning of the NLS shift varies by language. The following bits are defined to access this data:
              Bit 2     Binary mode is on.  
:::NLSS_NLS1 (0x01) - Fullwidth, National layer
              Bit 1     Echo off.  
:::NLSS_NLS2 (0x02) - Katakana, JAMO phonetic
              Bit 0     Echo on.
:::NLSS_NLS3 (0x04) - Hiragana, Hangeul, TsangJye
 
:::NLSS_APPL (0x10) - Application bit
chTurnAround Turnaround character.
:::NLSS_NLS4 (0x40) - Romanji, HanjaCsr
              Definition of the turn-around character. In ASCII and extended
:::NLSS_KANJI (0x80) - Kanji, Hanji
              ASCII format, the turn-around character is defined as the
::Bit 7 - Interim character flag is on.
              carriage return. In ASCII format only, the turn-around character
::Bit 6 - Reserved.
              is defined in the low-order byte.
::Bit 5 - Application requested immediate conversion.
 
::Bits 4-0 - Reserved.
fsInterim     Interim character state and NLS shift state.
;fsState:Current shift state.
   
::Bit 15 - SysReq key down.
              Bits 15-8  NLS shift state.
::Bit 14 - CapsLock key down.
                          The meaning of the NLS shift varies by language. The
::Bit 13 - NumLock key down.
                          following bits are defined to access this data:
::Bit 12 - ScrollLock key down.
 
::Bit 11 - Right Alt key down.
                          NLSS_NLS1   (0x01) - Fullwidth, National layer  
::Bit 10 - Right Ctrl key down.
                          NLSS_NLS2   (0x02) - Katakana, JAMO phonetic  
::Bit 9 - Left Alt key down.
                          NLSS_NLS3   (0x04) - Hiragana, Hangeul, TsangJye  
::Bit 8 - Left Ctrl key down.
                          NLSS_APPL   (0x10) - Application bit  
::Bit 7 - Insert on.
                          NLSS_NLS4   (0x40) - Romanji, HanjaCsr  
::Bit 6 - CapsLock on.
                          NLSS_KANJI (0x80) - Kanji, Hanji  
::Bit 5 - NumLock on.
 
::Bit 4 - ScrollLock on.
              Bit 7     Interim character flag is on.
::Bit 3 - Either Alt key down.
              Bit 6     Reserved.  
::Bit 2 - Either Ctrl key down.
              Bit 5     Application requested immediate conversion.  
::Bit 1 - Left Shift key down.
              Bits 4-0   Reserved.  
::Bit 0 - Right Shift key down.
 
fsState       Current shift state.
              Bit 15     SysReq key down.  
              Bit 14     CapsLock key down.  
              Bit 13     NumLock key down.  
              Bit 12     ScrollLock 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     CapsLock on.  
              Bit 5     NumLock on.  
              Bit 4     ScrollLock 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.
 
 
 
 
 
[[OS2_API | Back to OS/2 API]]
 


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

Latest revision as of 23:10, 14 March 2018

Keyboard status data structure.

Type

USHORT  cb
USHORT  fsMask
USHORT  chTurnAround
USHORT  fsInterim
USHORT  fsState

C Declaration Method

typedef struct

Fields

cb
Length, in bytes, of this data structure.
10 - Only valid value.
fsMask
State mask.
The system state altered by this call. If bits 0 and 1 are off, the echo state of the system is not altered. If bits 2 and 3 are off, the binary and ASCII state of the system is not altered. If bits 0 and 1 are on, or if bits 2 and 3 are on, the function returns an error. If binary mode is set, echo is ignored.
Bits 15-9 - Reserved.
Bit 8 - Shift return is on.
Bit 7 - Length of the turn-around character (meaningful only if bit 6 is on).
Bit 6 - Turn-around character is modified.
Bit 5 - Interim character flags are modified.
Bit 4 - Shift state is modified.
Bit 3 - ASCII mode is on.
Bit 2 - Binary mode is on.
Bit 1 - Echo off.
Bit 0 - Echo on.
chTurnAround
Turnaround character.
Definition of the turn-around character. In ASCII and extended ASCII format, the turn-around character is defined as the carriage return. In ASCII format only, the turn-around character is defined in the low-order byte.
fsInterim
Interim character state and NLS shift state.
Bits 15-8 NLS shift state.
The meaning of the NLS shift varies by language. The following bits are defined to access this data:
NLSS_NLS1 (0x01) - Fullwidth, National layer
NLSS_NLS2 (0x02) - Katakana, JAMO phonetic
NLSS_NLS3 (0x04) - Hiragana, Hangeul, TsangJye
NLSS_APPL (0x10) - Application bit
NLSS_NLS4 (0x40) - Romanji, HanjaCsr
NLSS_KANJI (0x80) - Kanji, Hanji
Bit 7 - Interim character flag is on.
Bit 6 - Reserved.
Bit 5 - Application requested immediate conversion.
Bits 4-0 - Reserved.
fsState
Current shift state.
Bit 15 - SysReq key down.
Bit 14 - CapsLock key down.
Bit 13 - NumLock key down.
Bit 12 - ScrollLock 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 - CapsLock on.
Bit 5 - NumLock on.
Bit 4 - ScrollLock 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.