[cp-patches] FYI: New 1.5 keysyms.

Sven de Marothy sven at physto.se
Sun Jun 18 03:46:51 UTC 2006


2006-06-18  Sven de Marothy  <sven at physto.se>

	* java/awt/event/KeyEvent.java:
	(VK_WINDOWS, VK_CONTEXT_MENU, VK_BEGIN): Add new keysym fields.
	*  natve/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:
	Implement WINDOWS, ALT_GR and CONTEXT_MENU keysyms.

-------------- next part --------------
Index: java/awt/event/KeyEvent.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/event/KeyEvent.java,v
retrieving revision 1.14
diff -U3 -r1.14 KeyEvent.java
--- java/awt/event/KeyEvent.java	12 Sep 2005 03:46:42 -0000	1.14
+++ java/awt/event/KeyEvent.java	18 Jun 2006 03:41:27 -0000
@@ -993,6 +993,27 @@
   public static final int VK_ALT_GRAPH = 65406;
 
   /**
+   * The 'begin' key VK_BEGIN
+   *
+   * @since 1.5
+   */
+  public static final int VK_BEGIN = 65368;
+
+  /**
+   * The context-menu key VK_CONTEXT_MENU
+   *
+   * @since 1.5
+   */
+  public static final int VK_CONTEXT_MENU = 525;
+
+  /**
+   * The 'Windows' key VK_WINDOWS
+   *
+   * @since 1.5
+   */
+  public static final int VK_WINDOWS = 524;
+
+  /**
    * The virtual key VK_UNDEFINED. This is used for key typed events, which
    * do not have a virtual key.
    */
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
===================================================================
RCS file: /sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c,v
retrieving revision 1.66
diff -U3 -r1.66 gnu_java_awt_peer_gtk_GtkWindowPeer.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c	8 Apr 2006 22:58:56 -0000	1.66
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c	18 Jun 2006 03:41:28 -0000
@@ -246,7 +246,11 @@
 #define VK_COMPOSE 65312
 #define VK_ALT_GRAPH 65406
 #define VK_UNDEFINED 0
+#define VK_BEGIN 65368
+#define VK_CONTEXT_MENU 525
+#define VK_WINDOWS 524
 
+ 
 #define AWT_KEY_CHAR_UNDEFINED 0
 
 #define AWT_FRAME_STATE_NORMAL 0
@@ -721,14 +725,28 @@
       return VK_CUT;
       return VK_COPY;
       return VK_PASTE;
+      */
+    case GDK_Undo:
       return VK_UNDO;
+    case GDK_Redo:
       return VK_AGAIN;
+      /*
       return VK_FIND;
       return VK_PROPS;
       return VK_STOP;
       return VK_COMPOSE;
+      */
+    case GDK_ISO_Level3_Shift:
       return VK_ALT_GRAPH;
+      /*
+	case VK_BEGIN:
       */
+    case GDK_Menu:
+      return VK_CONTEXT_MENU;
+    case GDK_Super_L:
+    case GDK_Super_R:
+      return VK_WINDOWS;
+
     default:
       return VK_UNDEFINED;
     }
@@ -2115,14 +2133,27 @@
     case VK_CUT:
     case VK_COPY:
     case VK_PASTE:
+      */
     case VK_UNDO:
+      return GDK_Undo;
     case VK_AGAIN:
+      return GDK_Redo;
+      /*
     case VK_FIND:
     case VK_PROPS:
     case VK_STOP:
     case VK_COMPOSE:
+      */
     case VK_ALT_GRAPH:
+      return GDK_ISO_Level3_Shift;
+      /*
+	case VK_BEGIN:
       */
+    case VK_CONTEXT_MENU:
+      return GDK_Menu;
+    case VK_WINDOWS:
+      return GDK_Super_R;
+
     default:
       return GDK_VoidSymbol;
     }


More information about the Classpath-patches mailing list