Jump to content

UniUntranslateKey: Difference between revisions

From EDM2
m typo
Ak120 (talk | contribs)
mNo edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== UniUntranslateKey ==
Translates a Unicode character and virtual/dead key to a scan code to create the effective shift state.
; UniUntranslateKey(keyHndl, uc, vdkey, pmscan, efshift) : Translates a Unicode character and virtual/dead key to a scan code to create the effective shift state.
 
=== Syntax ===
UniUntranslateKey(keyHndl, uc, vdkey, pmscan, efshift) ;


=== Parameters ===
=== Parameters ===
; keyHndl - [[OS2 API:DataType:KHAND|KHAND]] - input : The keyboard handle as created by [[OS2_API:UniCreateKeyboard|UniCreateKeyboard]].
;keyHndl - [[KHAND]] - input : The keyboard handle as created by [[UniCreateKeyboard]]
; uc - [[OS2 API:DataType:UniChar|UniChar]] - input : Unicode character to be untranslated.
;uc - [[UniChar]] - input : Unicode character to be untranslated
; vdkey - [[OS2 API:DataType:VDKEY|VDKEY]] - input : Virtual/dead key.
;vdkey - [[VDKEY]] - input : Virtual/dead key
; pmscan - [[OS2 API:DataType:VSCAN|VSCAN]] - output : The Presentation Manager scan code.
;pmscan - [[VSCAN]] - output : The Presentation Manager scan code
; efshift - [[OS2 API:DataType:ULONG|ULONG]] - output : Effective shift state to generate this character.
; efshift - [[ULONG]] - output : Effective shift state to generate this character


=== Constants ===
=== Constants ===
Line 14: Line 16:
=== 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_NOSCAN|ULS_NOSCAN]]
* [[Unicode Errors#ULS_NOSCAN|ULS_NOSCAN]]
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
* [[Unicode Errors#ULS_SUCCESS|ULS_SUCCESS]]


=== Module ===
=== Calling Convention ===
 
=== Define (C/C++) ===
 
=== Export name/Ordinal ===
 
=== Calling conversion ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:KHAND|KHAND]]   keyHndl;
  KHAND  keyHndl;
  [[OS2 API:DataType:UniChar|UniChar]] uc;
  UniChar uc;
  [[OS2 API:DataType:VDKEY|VDKEY]]   vdkey;
  VDKEY  vdkey;
  [[OS2 API:DataType:VSCAN|VSCAN]]   pmscan;
  VSCAN  pmscan;
  [[OS2 API:DataType:ULONG|ULONG]]   efshift;
  ULONG  efshift;
  integer rc;
  integer rc;
  ...
  ...
Line 39: Line 35:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:UniTranslateDeadKey|UniTranslateDeadKey]]
*[[UniTranslateDeadKey]]
[[OS2 API:UniTranslateKey|UniTranslateKey]]
*[[UniTranslateKey]]


=== Notes ===
=== Notes ===
[[OS2 API:UniUntranslateKey|UniUntranslateKey]] reverses the translation performed by [[OS2 API:UniTranslateKey|UniTranslateKey]]. This is used to create a complete keyboard packet when an already translated character is entered.  This is used when the input to the event is the translated character.
[[UniUntranslateKey]] reverses the translation performed by [[UniTranslateKey]]. This is used to create a complete keyboard packet when an already translated character is entered.  This is used when the input to the event is the translated character.


Typically, the Unicode character or virtual/dead key is given. If both are given, [[OS2 API:UniUntranslateKey|UniUntranslateKey]] processes the virtual/dead key before the Unicode character.
Typically, the Unicode character or virtual/dead key is given. If both are given, [[UniUntranslateKey]] processes the virtual/dead key before the Unicode character.


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

Latest revision as of 17:57, 4 December 2019

Translates a Unicode character and virtual/dead key to a scan code to create the effective shift state.

Syntax

UniUntranslateKey(keyHndl, uc, vdkey, pmscan, efshift) ;

Parameters

keyHndl - KHAND - input
The keyboard handle as created by UniCreateKeyboard
uc - UniChar - input
Unicode character to be untranslated
vdkey - VDKEY - input
Virtual/dead key
pmscan - VSCAN - output
The Presentation Manager scan code
efshift - ULONG - output
Effective shift state to generate this character

Constants

None

Returns

An integer with values of:

Calling Convention

Cdecl32

Example Code

KHAND   keyHndl;
UniChar uc;
VDKEY   vdkey;
VSCAN   pmscan;
ULONG   efshift;
integer rc;
...
rc = UniUntranslateKey(keyHndl, uc, vdkey, pmscan, efshift);
...

Related Functions

Notes

UniUntranslateKey reverses the translation performed by UniTranslateKey. This is used to create a complete keyboard packet when an already translated character is entered. This is used when the input to the event is the translated character.

Typically, the Unicode character or virtual/dead key is given. If both are given, UniUntranslateKey processes the virtual/dead key before the Unicode character.

OS Version Introduced

  • OS/2 Warp