Jump to content

UniUpdateShiftState: Difference between revisions

From EDM2
m added one
Ak120 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== UniUpdateShiftState ==
Update the effective and actual shift state and LED status.
; UniUpdateShiftState(keyboardHndl, shiftState, vScan, makeBreak) : Update the effective and actual shift state and LED status.
 
=== Syntax ===
UniUpdateShiftState(keyboardHndl, shiftState, vScan, makeBreak);


=== Parameters ===
=== Parameters ===
; keyboardHndl - [[OS2 API:DataType:KHAND|KHAND]] - input : The key board handle received from [[OS2_API:UniCreateKeyboard|UniCreateKeyboard]].
; keyboardHndl - [[KHAND]] - input : The key board handle received from [[UniCreateKeyboard]].
; shiftState - [[OS2 API:DataType:USHIFTSTATE|USHIFTSTATE]] - input : The shift state consists of 3 32-bit values.  These bit definitions define the actual, effective, and LED shift states.
; shiftState - [[USHIFTSTATE]] - input : The shift state consists of 3 32-bit values.  These bit definitions define the actual, effective, and LED shift states.
; vScan - [[OS2 API:DataType:VSCAN|VSCAN]] - input : [[OS2 API:PMI|Presentation Manager]] scan code.
; vScan - [[VSCAN]] - input : Presentation Manager scan code.
; makeBreak - [[OS2 API:DataType:BYTE|BYTE]] - input : Key make, break, repeat indicator.
; makeBreak - [[BYTE]] - input : Key make, break, repeat indicator.


=== Constants ===
=== Constants ===
Line 13: Line 15:
=== Returns ===
=== Returns ===
An integer with values of:
An integer with values of:
* [[OS2 API:Unicode:error#ULS_BADHANDLE|ULS_BADHANDLE]]
* [[Unicode Errors#ULS_BADHANDLE|ULS_BADHANDLE]]
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
* [[Unicode Errors#ULS_SUCCESS|ULS_SUCCESS]]
 
=== Module ===
 
=== Define (C/C++) ===


=== Export name/Ordinal ===
=== Calling Convention ===
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
=== Bindings ===
  [[OS2 API:DataType:KHAND|KHAND]]       keyboardHndl;
  KHAND      keyboardHndl;
  [[OS2 API:DataType:USHIFTSTATE|USHIFTSTATE]] shiftState;
  USHIFTSTATE shiftState;
  [[OS2 API:DataType:VSCAN|VSCAN]]       vScan;
  VSCAN      vScan;
  [[OS2 API:DataType:BYTE|BYTE]]       makeBreak;
  BYTE        makeBreak;
  integer    rc;
  integer    rc;
  ...
  ...
Line 36: Line 32:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:UniResetShiftState|UniResetShiftState]]
*[[UniResetShiftState]]


=== Notes ===
=== Notes ===
[[OS2_API:UniUpdateShiftState|UniUpdateShiftState]] modifies the shift state as dictated by the scan code, using the specified keyboard translation tables. The shift state consists of these three parts:
'''UniUpdateShiftState''' modifies the shift state as dictated by the scan code, using the specified keyboard translation tables. The shift state consists of these three parts:
 
* The actual shift state
* The actual shift state
* The effective shift state
* The effective shift state
* The LED status
* The LED status
The effective shift is equal to the 16 lower bits of the actual shift, but when a lock state modifies an actual shift (such as caps lock affecting shift), the effective shift is modified. This means that the effective shift is only correct for the specified scan code.  
The effective shift is equal to the 16 lower bits of the actual shift, but when a lock state modifies an actual shift (such as caps lock affecting shift), the effective shift is modified. This means that the effective shift is only correct for the specified scan code.  


=== OS Version Introduced ===
=== OS Version Introduced ===
OS/2 Warp
OS/2 Warp
[[Category:Uni]]

Latest revision as of 16:07, 12 March 2018

Update the effective and actual shift state and LED status.

Syntax

UniUpdateShiftState(keyboardHndl, shiftState, vScan, makeBreak); 

Parameters

keyboardHndl - KHAND - input
The key board handle received from UniCreateKeyboard.
shiftState - USHIFTSTATE - input
The shift state consists of 3 32-bit values. These bit definitions define the actual, effective, and LED shift states.
vScan - VSCAN - input
Presentation Manager scan code.
makeBreak - BYTE - input
Key make, break, repeat indicator.

Constants

None

Returns

An integer with values of:

Calling Convention

Cdecl32

Bindings

KHAND       keyboardHndl;
USHIFTSTATE shiftState;
VSCAN       vScan;
BYTE        makeBreak;
integer     rc;
...
rc = UniUpdateShiftState(keyboardHndl, shiftState, vScan, makeBreak);
...

Related Functions

Notes

UniUpdateShiftState modifies the shift state as dictated by the scan code, using the specified keyboard translation tables. The shift state consists of these three parts:

  • The actual shift state
  • The effective shift state
  • The LED status

The effective shift is equal to the 16 lower bits of the actual shift, but when a lock state modifies an actual shift (such as caps lock affecting shift), the effective shift is modified. This means that the effective shift is only correct for the specified scan code.

OS Version Introduced

OS/2 Warp