*** empty log message ***
[platform/core/uifw/at-spi2-atk.git] / test / keysynth-demo.c
index e3713eb..9e7bb6a 100644 (file)
@@ -2,7 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -25,7 +26,7 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
-#include "spi.h"
+#include <cspi/spi.h>
 
 #define LABELMAXLEN 20
 #define MIN_KEYCODE 9
@@ -170,7 +171,6 @@ increment_scan (gpointer data)
       case SCAN_LINES_DONE:
       case SCAN_KEYS_DONE:
          return FALSE;
-      default:
     }
   return TRUE;
 }
@@ -243,7 +243,7 @@ label_buttons(SPIBoolean shifted)
           /* Note: these routines are not i18n-savvy,  we need to use XIM, other methods here */
          if (keysym && g_ascii_isprint((int)keysym))
            {
-             snprintf (label, 2, "%c", (int) keysym); 
+             g_snprintf (label, 2, "%c", (int) keysym); 
            }
          else
            {
@@ -480,7 +480,7 @@ main (int argc, char **argv)
   /* will listen only to Alt-key combinations */
   SPI_registerAccessibleKeystrokeListener (key_listener,
                                           (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
-                                          SPI_KEYMASK_ALT,
+                                          SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL,
                                           (unsigned long) ( KeyPress | KeyRelease),
                                           SPI_KEYLISTENER_CANCONSUME | SPI_KEYLISTENER_ALL_WINDOWS);
   create_vkbd ();