Index: libke.c
===================================================================
RCS file: /cvs/gnome/gnopernicus/kbd_mouse/libke/libke.c,v
retrieving revision 1.54
diff -u -p -r1.54 libke.c
--- libke.c	3 Sep 2003 17:18:12 -0000	1.54
+++ libke.c	10 Dec 2003 09:42:42 -0000
@@ -1307,19 +1307,19 @@ ke_layer_register_events (AccessibleKeys
 #ifndef USE_ALL_WINDOWS
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_BUTTON1 | SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_BUTTON1 | SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B1|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_BUTTON2 | SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_BUTTON2 | SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B2|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_BUTTON3 | SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_BUTTON3 | SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 			    	      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B3|NUMLOCK)");
@@ -1327,7 +1327,7 @@ ke_layer_register_events (AccessibleKeys
 				      (AccessibleKeySet *) ke_layer_keyset,
 				      SPI_KEYMASK_BUTTON1 | 
 				      SPI_KEYMASK_BUTTON2 |
-				      SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B1|B2|NUMLOCK)");
@@ -1335,7 +1335,7 @@ ke_layer_register_events (AccessibleKeys
 				      (AccessibleKeySet *) ke_layer_keyset,
 				      SPI_KEYMASK_BUTTON1 | 
 				      SPI_KEYMASK_BUTTON3 |
-				      SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B1|B3|NUMLOCK)");
@@ -1343,7 +1343,7 @@ ke_layer_register_events (AccessibleKeys
 				      (AccessibleKeySet *) ke_layer_keyset,
 				      SPI_KEYMASK_BUTTON3 |
 				      SPI_KEYMASK_BUTTON2 |
-				      SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B2|B3|NUMLOCK)");
@@ -1352,7 +1352,7 @@ ke_layer_register_events (AccessibleKeys
 				      SPI_KEYMASK_BUTTON3 |
 				      SPI_KEYMASK_BUTTON2 |
 				      SPI_KEYMASK_BUTTON1 |
-				      SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(B1|B2|B3|NUMLOCK)");
@@ -1443,7 +1443,7 @@ ke_layer_register_events (AccessibleKeys
 
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1454,7 +1454,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_SHIFTLOCK|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_SHIFTLOCK|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1464,7 +1464,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(SL|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_SHIFT|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_SHIFT|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1474,7 +1474,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(S|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_ALT|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_ALT|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS				
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1484,7 +1484,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(S|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_CONTROL|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_CONTROL|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1494,7 +1494,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(C|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_ALT|SPI_KEYMASK_SHIFT|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_ALT|SPI_KEYMASK_SHIFT|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1504,7 +1504,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(A|S|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_CONTROL|SPI_KEYMASK_SHIFT|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_CONTROL|SPI_KEYMASK_SHIFT|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1514,7 +1514,7 @@ ke_layer_register_events (AccessibleKeys
     ke_print_register_return_value (retval, "(C|S|NUMLOCK)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_layer_listener,
 				      (AccessibleKeySet *) ke_layer_keyset,
-				      SPI_KEYMASK_CONTROL|SPI_KEYMASK_ALT|SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_CONTROL|SPI_KEYMASK_ALT|SPI_KEYMASK_NUMLOCK,
 				      (gulong) ( SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 #ifdef USE_ALL_WINDOWS
 				      SPI_KEYLISTENER_ALL_WINDOWS);
@@ -1561,7 +1561,7 @@ ke_keyecho_register_events (AccessibleKe
     ke_print_register_return_value (retval, "(U)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_key_listener,
 				      (AccessibleKeySet *) ke_key_keyset,
-				      SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_NUMLOCK,
 				      (gulong) (SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(U|NUMLOCK)");
@@ -1573,7 +1573,7 @@ ke_keyecho_register_events (AccessibleKe
     ke_print_register_return_value (retval, "(SL)");
     retval = SPI_registerAccessibleKeystrokeListener (ke_key_listener,
 				      (AccessibleKeySet *) ke_key_keyset,
-				      SPI_KEYMASK_SHIFTLOCK | SPI_KEYMASK_MOD2,
+				      SPI_KEYMASK_SHIFTLOCK | SPI_KEYMASK_NUMLOCK,
 				      (gulong) (SPI_KEY_PRESSED | SPI_KEY_RELEASED ),
 				      SPI_KEYLISTENER_NOSYNC | SPI_KEYLISTENER_CANCONSUME);
     ke_print_register_return_value (retval, "(SL|NUMLOCK)");
@@ -1892,56 +1892,56 @@ ke_layer_unregister_events (void)
 #ifndef USE_ALL_WINDOWS
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON1 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON2 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON3 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON1 |
 					    SPI_KEYMASK_BUTTON2 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON1 |
 					    SPI_KEYMASK_BUTTON3 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON2 |
 					    SPI_KEYMASK_BUTTON3 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
 					    SPI_KEYMASK_BUTTON1 |
 					    SPI_KEYMASK_BUTTON2 |
 					    SPI_KEYMASK_BUTTON3 |
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
 #endif
 
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2);
+					    SPI_KEYMASK_NUMLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2 | 
+					    SPI_KEYMASK_NUMLOCK | 
 					    SPI_KEYMASK_SHIFTLOCK);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2 | 
+					    SPI_KEYMASK_NUMLOCK | 
 					    SPI_KEYMASK_SHIFT);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2 | 
+					    SPI_KEYMASK_NUMLOCK | 
 					    SPI_KEYMASK_ALT);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2 | 
+					    SPI_KEYMASK_NUMLOCK | 
 					    SPI_KEYMASK_CONTROL);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2  | 
+					    SPI_KEYMASK_NUMLOCK  | 
 					    SPI_KEYMASK_SHIFT |
 					    SPI_KEYMASK_CONTROL);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2  | 
+					    SPI_KEYMASK_NUMLOCK  | 
 					    SPI_KEYMASK_ALT   |
 					    SPI_KEYMASK_CONTROL);
     SPI_deregisterAccessibleKeystrokeListener (ke_layer_listener, 
-					    SPI_KEYMASK_MOD2  | 
+					    SPI_KEYMASK_NUMLOCK  | 
 					    SPI_KEYMASK_SHIFT |
 					    SPI_KEYMASK_ALT);
 
@@ -1986,12 +1986,12 @@ ke_keyecho_unregister_events (void)
     SPI_deregisterAccessibleKeystrokeListener (ke_keyecho_listener, 
 					    SPI_KEYMASK_UNMODIFIED );
     SPI_deregisterAccessibleKeystrokeListener (ke_keyecho_listener, 
-					    SPI_KEYMASK_MOD2 );
+					    SPI_KEYMASK_NUMLOCK );
     SPI_deregisterAccessibleKeystrokeListener (ke_keyecho_listener, 
 					    SPI_KEYMASK_SHIFTLOCK );
     SPI_deregisterAccessibleKeystrokeListener (ke_keyecho_listener, 
 					    SPI_KEYMASK_SHIFTLOCK |
-					    SPI_KEYMASK_MOD2 );
+					    SPI_KEYMASK_NUMLOCK );
 }
 
 /**
