- switch_listener = createAccessibleKeystrokeListener (switch_callback);
- registerAccessibleKeystrokeListener (switch_listener,
- &switch_set,
- SPI_KEYMASK_UNMODIFIED,
- (unsigned long) ( KeyPress | KeyRelease),
- SPI_KEYLISTENER_CANCONSUME);
+ switch_set.keystrings[0] = "";
+ switch_listener = SPI_createAccessibleKeystrokeListener (switch_callback, NULL);
+ SPI_registerAccessibleKeystrokeListener (switch_listener,
+ &switch_set,
+ SPI_KEYMASK_UNMODIFIED,
+ (unsigned long) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
+ SPI_KEYLISTENER_NOSYNC);