Jump to content

UniTranslateDeadKey: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 5: Line 5:
; kbHndl - [[OS2 API:DataType:KHAND|KHAND]] - input : The keyboard handle created from [[OS2_API:UniCreateKeyboard|UniCreateKeyboard]].
; kbHndl - [[OS2 API:DataType:KHAND|KHAND]] - input : The keyboard handle created from [[OS2_API:UniCreateKeyboard|UniCreateKeyboard]].
; vdKey - [[OS2 API:DataType:VDKEY|VDKEY]] - output : The virtual/dead key.
; vdKey - [[OS2 API:DataType:VDKEY|VDKEY]] - output : The virtual/dead key.
; ucInChar - [[OS2 API:DataType:UniChar|UniChar]] - input : The second character in the sequence.
; ucInChar - [[UniChar]] - input : The second character in the sequence.
; ucOutChar - [[OS2 API:DataType:UniChar|UniChar]] - output : The composite character.
; ucOutChar - [[UniChar]] - output : The composite character.
; newVDKey - [[OS2 API:DataType:VDKEY|VDKEY]] - output : The dead key value.  For a non-zero value, the dead key is chained.  OS/2 does not support chained dead keys.
; newVDKey - [[OS2 API:DataType:VDKEY|VDKEY]] - output : The dead key value.  For a non-zero value, the dead key is chained.  OS/2 does not support chained dead keys.


Line 17: Line 17:
* [[OS2 API:Unicode:error#ULS_NODEAD|ULS_NODEAD]]
* [[OS2 API:Unicode:error#ULS_NODEAD|ULS_NODEAD]]
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
=== Module ===
=== Define (C/C++) ===
=== Export name/Ordinal ===


=== Calling conversion ===
=== Calling conversion ===
Line 30: Line 24:
  [[OS2 API:DataType:KHAND|KHAND]]  kbHndl;
  [[OS2 API:DataType:KHAND|KHAND]]  kbHndl;
  [[OS2 API:DataType:VDKEY|VDKEY]]  vdKey;
  [[OS2 API:DataType:VDKEY|VDKEY]]  vdKey;
  [[OS2 API:DataType:UniChar|UniChar]] ucInChar;
  [[UniChar]] ucInChar;
  [[OS2 API:DataType:UniChar|UniChar]] ucOutChar;
  UniChar ucOutChar;
  [[OS2 API:DataType:VDKEY|VDKEY]]  newVDKey;
  [[OS2 API:DataType:VDKEY|VDKEY]]  newVDKey;
  integer rc;
  integer rc;
Line 39: Line 33:


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


=== Notes ===
=== Notes ===
Line 48: Line 42:


=== OS Version Introduced ===
=== OS Version Introduced ===
OS/2 Warp
*OS/2 Warp
 
 
[[OS2_API | Back to OS/2 API]]
 


[[Category:The OS/2 API Project]]
[[Category:Uni]]

Revision as of 20:15, 2 November 2016

UniTranslateDeadKey

UniTranslateDeadKey(kbHndl, vdKey, ucInChar, ucOutChar, newVDKey)
Translates a Unicode character and virtual/dead key into a composite character.

Parameters

kbHndl - KHAND - input
The keyboard handle created from UniCreateKeyboard.
vdKey - VDKEY - output
The virtual/dead key.
ucInChar - UniChar - input
The second character in the sequence.
ucOutChar - UniChar - output
The composite character.
newVDKey - VDKEY - output
The dead key value. For a non-zero value, the dead key is chained. OS/2 does not support chained dead keys.

Constants

None

Returns

An integer with values of:

Calling conversion

Cdecl32

Example Code

KHAND   kbHndl;
VDKEY   vdKey;
UniChar ucInChar;
UniChar  ucOutChar;
VDKEY   newVDKey;
integer rc;
...
rc = UniTranslateDeadKey(kbHndl, vdKey, ucInChar, ucOutChar, newVDKey);
...

Related Functions

Notes

The calling program is expected to maintain the dead key state so that when the next dead key is found to form the full character. After the dead key translate, the dead key state needs to be reset.

There is a provision in the table for chained dead keys, which is used in Japanese logic. It shouldn't be used as OS/2 doesn't support chained dead keys.

OS Version Introduced

  • OS/2 Warp