X11 Work Bench Toolkit  1.0
Keyboard event handling

Macros

#define WB_KEYEVENT_KEYSYM   8 /* bit flags for 'piAltCtrlShift' below */
 'AltCtrlShift' bit flag for 'VK_' keys for WBKeyEventProcessKey()
 
#define WB_KEYEVENT_ALT   4
 'AltCtrlShift' bit flag for ALT modifier for WBKeyEventProcessKey()
 
#define WB_KEYEVENT_CTRL   2
 'AltCtrlShift' bit flag for Control modifier for WBKeyEventProcessKey()
 
#define WB_KEYEVENT_SHIFT   1
 'AltCtrlShift' bit flag for Shift modifier for WBKeyEventProcessKey()
 
#define WB_KEYEVENT_ACSMASK   7
 'AltCtrlShift' bit mask for Alt+Ctrl+Shift bits for WBKeyEventProcessKey()
 

Functions

int WBKeyEventProcessKey (const XKeyEvent *pEvent, char *pBuf, int *pcbLen, int *piAltCtrlShift)
 Generic keyboard event translation utility. More...
 

Detailed Description

The X11workbench Toolkit API provides for mid-level keyboard event handling via WM_CHAR ClientMessage notification events.
See aWM_CHAR for more info.

Function Documentation

int WBKeyEventProcessKey ( const XKeyEvent *  pEvent,
char *  pBuf,
int *  pcbLen,
int *  piAltCtrlShift 
)

Generic keyboard event translation utility.

Parameters
pEventA const pointer to an XKeyEvent structure to process
pBufA buffer to receive translated keystroke information (may be NULL, see below)
pcbLenA pointer to an integer (pre-assigned to the length of pBuf) that receives the actual data length (see below) (may be NULL)
piAltCtrlShiftA pointer to an integer that receives bit flags associated with CTRL ALT and SHIFT states (may be NULL)
Returns
The first byte of the character string when 'pBuf' is NOT NULL, or a translated UTF character of 1, 2, or 4 bytes when pBuf is NULL

generic utility to process a keystroke. 'pcbLen' must be pre-assigned to size of 'pBuf' if 'pBuf' is to be written to. Any parameter other than 'pEvent' may be NULL. when pBuf is NULL, pcbLen (if not NULL) receives the required length in bytes when pcbLen is NULL and pBuf is not, length is assumed to be 1 byte return value is the first byte of the character string when 'pBuf' is NOT NULL, or a translated UTF character of 1, 2 or 4 bytes (when pBuf is NULL).

See Also
aWM_CHAR, aWM_POINTER

Header File: window_helper.h

Definition at line 6913 of file window_helper.c.