/**
* AccessibleRole:
* @SPI_ROLE_INVALID: role is not legal, something is wrong with this object
- * @SPI_ROLE_ACCELERATOR_LABEL: object is a label indicating keyboard
+ * @SPI_ROLE_ACCEL_LABEL: object is a label indicating keyboard
* accelerators for the parent
* @SPI_ROLE_ALERT: Object is used to alert the user about something
* @SPI_ROLE_ANIMATION: Object contains a dynamic or moving image
* the application to do something.
* @SPI_ROLE_RADIO_BUTTON: A specialized check box that will cause other radio buttons in the
* same group to become uncghecked when this one is checked.
+ * @SPI_RADIO_MENU_ITEM: A specialized menu item that behaves like a
+ * radio button.
* @SPI_ROLE_ROOT_PANE: A specialized pane that has a glass pane and a layered pane as its
* children.
* @SPI_ROLE_ROW_HEADER: The header for a row of data
SPI_ROLE_CALENDAR,
SPI_ROLE_CANVAS,
SPI_ROLE_CHECK_BOX,
+ SPI_ROLE_CHECK_MENU_ITEM,
SPI_ROLE_COLOR_CHOOSER,
SPI_ROLE_COLUMN_HEADER,
SPI_ROLE_COMBO_BOX,
* SPI_generateKeyboardEvent:
* @keyval: a long integer indicating the keycode or keysym of the key event
* being synthesized.
+ * @keystring: an (optional) UTF-8 string which, if @keyval is NULL,
+ * indicates a 'composed' keyboard input string which is
+ * being synthesized; this type of keyboard event synthesis does
+ * not emulate hardware keypresses but injects the string
+ * as though a composing input method (such as XIM) were used.
* @synth_type: a #AccessibleKeySynthType flag indicating whether @keyval
* is to be interpreted as a keysym rather than a keycode
* (CSPI_KEYSYM), or whether to synthesize
static AccessibleEventListener *button_listener;
static AccessibleKeystrokeListener *command_key_listener;
static AccessibleKeystrokeListener *ordinary_key_listener;
-static AccessibleKeySet *spacebar_key_set;
int
main (int argc, char **argv)
SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL,
(unsigned long) ( SPI_KEY_PRESSED ),
SPI_KEYLISTENER_ALL_WINDOWS);
+
+ /* will listen only to CAPSLOCK-Alt-key combinations, and only to KeyPress events */
+ SPI_registerAccessibleKeystrokeListener(command_key_listener,
+ (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
+ SPI_KEYMASK_ALT | SPI_KEYMASK_SHIFTLOCK,
+ (unsigned long) ( SPI_KEY_PRESSED ),
+ SPI_KEYLISTENER_ALL_WINDOWS);
- /* will listen only to shifted key events, both press and release */
+ /* will listen only to CAPSLOCK key events, both press and release */
SPI_registerAccessibleKeystrokeListener(ordinary_key_listener,
(AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
- SPI_KEYMASK_SHIFT,
+ SPI_KEYMASK_SHIFTLOCK,
(unsigned long) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
SPI_KEYLISTENER_NOSYNC);
- spacebar_key_set = SPI_createAccessibleKeySet (1, " ", NULL, NULL);
-
- /* will listen only to shift-spacebar events, on release, globally */
- SPI_registerAccessibleKeystrokeListener(command_key_listener,
- spacebar_key_set,
- SPI_KEYMASK_SHIFT,
- (unsigned long) ( SPI_KEY_RELEASED ),
- SPI_KEYLISTENER_ALL_WINDOWS);
-
-
get_environment_vars ();
SPI_event_main ();
SPI_deregisterGlobalEventListenerAll (button_listener);
AccessibleEventListener_unref (button_listener);
- SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT);
+ SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL);
+ SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT | SPI_KEYMASK_SHIFTLOCK);
AccessibleKeystrokeListener_unref (command_key_listener);
SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_UNMODIFIED);
- SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_SHIFT);
+ SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_SHIFTLOCK);
AccessibleKeystrokeListener_unref (ordinary_key_listener);
- SPI_freeAccessibleKeySet (spacebar_key_set);
-
SPI_event_quit ();
}