Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xtgetactioa(3) [hpux man page]

XtGetActionKeysym()													       XtGetActionKeysym()

Name
  XtGetActionKeysym - retrieve the keysym and modifiers that matched the final event specification in the translation table entry.

Synopsis
  KeySym XtGetActionKeysym(event, modifiers_return)
	   XEvent *event;
	   Modifiers *modifiers_return;

Inputs
  event  Specifies the event pointer passed to the action procedure by the Intrinsics.

Outputs
  modifiers_return
	 Returns  the modifier state actually used to generate the returned keysym.  You may pass NULL if you are not interested in the modi-
	 fiers.

Returns
  The keysym of the final event specification in the translation table entry that dispatched the current action, or NoSymbol.

Availability
  Release 4 and later.

Description
  XtGetActionKeysym() returns the keysym of the final event specification in the translation table entry that  invoked	the  current  action,
  provided that:

  o  XtGetActionKeysym() is called after an action procedure has been invoked by the Intrinsics and before that action procedure returns,

  o  the event pointer has the same value as the event pointer passed to that action routine, and

  o  the event is a KeyPress or a KeyRelease.

  XtGetActionKeysym() also returns the modifiers actually used to generate this keysym if modifiers_return is non-NULL.

  If  XtGetActionKeysym()  is  not  called from an action procedure, or if event does not match the event that invoked the action, but if the
  event is a KeyPress or KeyRelease, then XtGetActionKeysym() calls XtTranslateKeycode() and returns the results.

  If the event is not a KeyPress or KeyRelease, then XtGetActionKeysym() returns NoSymbol and does not examine modifiers_return.

  Note that if an action procedure which was invoked by the Intrinsics invokes a subsequent action procedure (and so  on)  via	XtCallAction-
  Proc(), the nested action procedure may also call XtGetActionKeysym() to retrieve the Intrinsics' keysym and modifiers.

Usage
  You  should only call XtGetActionKeysym() from within an action procedure.  When an action procedure is invoked on a KeyPress or KeyRelease
  event, it often has a need to retrieve the keysym and modifiers corresponding to the event that caused it to be invoked.  In order to avoid
  repeating  the processing that was just performed by the Intrinsics to match the translation entry, the keysym and modifiers are stored for
  the duration of the action procedure and can be obtained with this function.

Structures
  A KeySym is an X server resource:

     typedef XID KeySym;

  The Modifiers type and its possible values are as follows:

     typedef unsigned int Modifiers;

     #define ShiftMask		     (1<<0)
     #define LockMask		     (1<<1)
     #define ControlMask	     (1<<2)
     #define Mod1Mask		     (1<<3)
     #define Mod2Mask		     (1<<4)
     #define Mod3Mask		     (1<<5)
     #define Mod4Mask		     (1<<6)
     #define Mod5Mask		     (1<<7)

See Also
  XtActionProc(1), XtAppAddActions(1), XtTranslateKeycode(1).

Xt - Translations and Actions												       XtGetActionKeysym()

Check Out this Related Man Page

XtSetKeyTranslator(3Xt) 					   XT FUNCTIONS 					   XtSetKeyTranslator(3Xt)

NAME
XtSetKeyTranslator, XtTranslateKeycode, XtRegisterCaseConverter, XtConvertCase - convert KeySym to KeyCodes SYNTAX
void XtSetKeyTranslator(display, proc) Display *display; XtKeyProc proc; void XtTranslateKeycode(display, keycode, modifiers, modifiers_return, keysym_return) Display *display; KeyCode keycode; Modifiers modifiers; Modifiers *modifiers_return; KeySym *keysym_return; void XtRegisterCaseConverter(display, proc, start, stop) Display *display; XtCaseProc proc; KeySym start; KeySym stop; void XtConvertCase(display, keysym, lower_return, upper_return) Display *display; KeySym keysym; KeySym *lower_return; KeySym *upper_return; ARGUMENTS
display Specifies the display. keycode Specifies the KeyCode to translate. keysym Specifies the KeySym to convert. keysym_return Returns the resulting KeySym. lower_return Returns the lowercase equivalent of the KeySym. upper_return Returns the uppercase equivalent of the KeySym. modifiers Specifies the modifiers to the KeyCode. modifiers_return Returns a mask that indicates the modifiers actually used to generate the KeySym. proc Specifies the procedure that is to perform key translations or conversions. start Specifies the first KeySym for which this converter is valid. stop Specifies the last KeySym for which this converter is valid. DESCRIPTION
The XtSetKeyTranslator function sets the specified procedure as the current key translator. The default translator is XtTranslateKey, an XtKeyProc that uses Shift and Lock modifiers with the interpretations defined by the core protocol. It is provided so that new translators can call it to get default KeyCode-to-KeySym translations and so that the default translator can be reinstalled. The XtTranslateKeycode function passes the specified arguments directly to the currently registered KeyCode to KeySym translator. The XtRegisterCaseConverter registers the specified case converter. The start and stop arguments provide the inclusive range of KeySyms for which this converter is to be called. The new converter overrides any previous converters for KeySyms in that range. No interface exists to remove converters; you need to register an identity converter. When a new converter is registered, the Intrinsics refreshes the keyboard state if necessary. The default converter understands case conversion for all KeySyms defined in the core protocol. The XtConvertCase function calls the appropriate converter and returns the results. A user-supplied XtKeyProc may need to use this func- tion. SEE ALSO
X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 Release 6.6 XtSetKeyTranslator(3Xt)
Man Page