IUP: Key Coding and Key Callbacks

IUP - Portable User Interface

Key Coding and Key Callbacks
[Control SDK]


Detailed Description

See iup_key.h


Functions

char * iupKeyCodeToName (int code)
int iupKeyNameToCode (const char *name)
int iupKeyCanCaps (int code)
void iupKeyForEach (void(*func)(const char *name, int code, void *user_data), void *user_data)
int iupKeyCallKeyCb (Ihandle *ih, int c)
int iupKeyCallKeyPressCb (Ihandle *ih, int code, int press)

Function Documentation

char* iupKeyCodeToName int  code  ) 
 

Returns the key name from its code. Returns NULL if code not found.

int iupKeyNameToCode const char *  name  ) 
 

Returns the key code from its name. Returns 0 if name not found.

int iupKeyCanCaps int  code  ) 
 

Returns true if the key code can be changed by CAPSLOCK.

void iupKeyForEach void(*)(const char *name, int code, void *user_data)  func,
void *  user_data
 

Calls a function for each defined key.

int iupKeyCallKeyCb Ihandle *  ih,
int  c
 

Calls the K_ANY or K_* callbacks. Should be called when a keyboard event occoured.

int iupKeyCallKeyPressCb Ihandle *  ih,
int  code,
int  press
 

Calls the KEYPRESS_CB callback. Should be called when a keyboard event occoured.