int bx_keyname_pressed ( bx_key  key,
char  keyname[] 
)

Checks if a key known by its keyname is pressed in a given keyboard snapshot.

Parameters:
key a snapshot of the keyboard returned by bx_read_key().
keyname the name of a given key of the keyboard.
Returns:
whether the key is pressed (= 1) or released (= 0).
Remarks:
  • see also bx_keynames() for a list of the names of all pressed keys.
  • if keys named "Shift" and "x" are pressed, then they are both reported as such individually, but keep in mind there is no such key named as "X" for example.
  • You use bx_keyname_pressed() instead of bx_keycode_pressed() when you want to know if the key named "a" is pressed whatever the keyboard mapping (AZERTY, QWERTY, etc...), that is, whatever the keycode is attributed for the key named "a".


Generated on Fri Oct 10 00:01:00 2008 for bx-lib : the Basic X11 Library tuned for C beginners by  doxygen 1.5.6