a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 commodities.library
  ActivateCxObj
  AddIEvents
  AttachCxObj
  ClearCxObjError
  CreateCxObj
  CxBroker
  CxMsgData
  CxMsgID
  CxMsgType
  CxObjError
  CxObjType
  DeleteCxObj
  DeleteCxObjAll
  DisposeCxMsg
  DivertCxMsg
  EnqueueCxObj
  InsertCxObj
  InvertKeyMap
  MatchIX
  ParseIX
  RemoveCxObj
  RouteCxMsg
  SetCxObjPri
  SetFilter
  SetFilterIX
  SetTranslate
Include
GuruMeditation
Docs » Autodocs » commodities.library » InvertKeyMap

NAME

	InvertKeyMap -- generate an input event from an ANSI code. (V36)

SYNOPSIS

	success = InvertKeyMap(ansiCode,event,km)
D0 D0 A0 A1
BOOL InvertKeyMap(ULONG,struct InputEvent *,struct KeyMap *);

FUNCTION

	This function uses the system call MapANSI() to figure out what
InputEvent translates to an ANSI character code 'ansiCode'. The
InputEvent pointed to by 'event' is filled in with that information.
The KeyMap 'km' is used for the translation, unless it is NULL, in
which case the current system default keymap is used.

INPUTS

	ansiCode - the ANSI code to convert to an input event
event - the InputEvent to fill-in
km - the keymap to use for the translation, or NULL to use the
current system default keymap.

RESULT

	success - TRUE if the translation worked, FALSE otherwise.

BUGS

	This function currently handles one-deep dead keys (such as
<alt f>o ). It does not look up the high key map (keystrokes
with scan codes greater than 0x40).
Prior to V40, this function was not initializing the ie_SubClass
and ie_TimeStamp fields of the InputEvent structure. A simple work
around to the problem is to clear these values to 0 before making
a call to this function:
struct InputEvent ie;
ie.ie_SubClass = 0;
ie.ie_TimeStamp.tv_secs = 0;
ie.ie_TimeStamp.tv_micro = 0;
if (InvertKeyMap(ansiCode,&ie,NULL))
...

SEE ALSO

cx_lib/InvertString

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Spaceballs

TBL
TRSI
SPB
ANA

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se