X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=test%2Fkeysynth-demo.c;h=20d2a884242a0556dea00d0b0bb11ff42a656920;hb=b2a5db4cbac6002da97f26deac58339c7a6eb537;hp=e43b71013ee41f32789e0ceffdb0f9496603dea3;hpb=cf7dfe5a250bd3ff44a357e7136cbf5a09ac7fdb;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/test/keysynth-demo.c b/test/keysynth-demo.c index e43b710..20d2a88 100644 --- a/test/keysynth-demo.c +++ b/test/keysynth-demo.c @@ -359,6 +359,7 @@ synth_keycode (GtkButton *button, KeyCode *keycode) static KeyCode shift_keycode = 0; if (!shift_keycode) shift_keycode = XKeysymToKeycode(GDK_DISPLAY(), (KeySym) 0xFFE1); /* Note: in a real onscreen keyboard shift keycode should not be hard-coded! */ + if (*keycode) { if (*keycode == CAPSLOCK_KEYCODE) @@ -367,13 +368,14 @@ synth_keycode (GtkButton *button, KeyCode *keycode) label_buttons (caps_lock || shift_latched); } if (shift_latched) - SPI_generateKeyEvent (shift_keycode, SPI_KEY_PRESS); - - SPI_generateKeyEvent ((long) *keycode, SPI_KEY_PRESSRELEASE); + SPI_generateKeyboardEvent (shift_keycode, NULL, SPI_KEY_PRESS); + + g_print ("generating key %d\n", (int) *keycode); + SPI_generateKeyboardEvent ((long) *keycode, NULL, SPI_KEY_PRESSRELEASE); if (shift_latched) { - SPI_generateKeyEvent (shift_keycode, SPI_KEY_RELEASE); + SPI_generateKeyboardEvent (shift_keycode, NULL, SPI_KEY_RELEASE); toggle_shift_latch (button); } } @@ -501,7 +503,7 @@ main (int argc, char **argv) &switch_set, SPI_KEYMASK_UNMODIFIED, (unsigned long) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ), - SPI_KEYLISTENER_CANCONSUME); + SPI_KEYLISTENER_NOSYNC); SPI_event_main ();