WwGetKey Function
Obtains the ASCII value of a pressed or released key passed as an event structure by a PV‑WAVE Widgets event handler.
Usage
key = WwGetKey(event)
Input Parameters
event — The event handle received by the event handler.
Returned Value
key — A string containing the ASCII character of the released key. If the function call fails, an empty string is returned.
Keywords
Keysym — Returns a value associated with the key pressed.
Note: |
For Motif, Keysym returns a long value (XKeysym) associated with the key pressed. Keysym is an integer value unique to a particular key on the keyboard. This value can be used to identify function key presses. For Windows, Keysym returns the long value of the virtual key associated with the key pressed (the result of the VkKeyScan procedure). For a list of virtual key codes and the keys to which they map, see Appendix E: Virtual Keys in the PV‑WAVE Application Developer’s Guide or refer to the Win32 Programmer’s Reference. |
State — If specified, returns a string array containing the state of all the modifier keys just before the event.
Discussion
The following are examples of modifier key names found in the State array: 'Shift', 'Control', 'Lock', 'Mod1', ..., (indicating which key was pressed); and 'Button1', 'Button2', ..., 'ButtonN' (key modifiers).
Keysym is used in situations where the pressed key must be identified. The include file <X11/keysymdef.h> contains a complete Keysym listing.
Example
For an example using WwGetKey, see the example for the WwGetPosition Function.