]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkkeyuni.c
xsettings: Remove XSettingsList type
[~andy/gtk] / gdk / gdkkeyuni.c
index aa07c9734f0c6c7a34ea9ddd5fa6b406a62f2d1d..a8c1c3472b7067b64f5863899784db2d5ab8c415 100644 (file)
@@ -1,4 +1,32 @@
-#include "gdk.h"
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ */
+
+#include "config.h"
+
+#include "gdkkeys.h"
+#include "gdktypes.h"
+
 
 /* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode
  * mapping functions, from the xterm sources.
@@ -8,7 +36,7 @@
  * is smallish. It would save about ~1000 bytes total.
  */
 
-static struct {
+static const struct {
   unsigned short keysym;
   unsigned short ucs;
 } gdk_keysym_to_unicode_tab[] = {
@@ -802,15 +830,29 @@ static struct {
 
   /* Following items added to GTK, not in the xterm table */
 
+  /* A few ASCII control characters */
+#ifndef GDK_WINDOWING_WIN32
+  { 0xFF08 /* Backspace */, '\b' },
+  { 0xFF09 /* Tab       */, '\t'  },
+#endif
+
+  { 0xFF0A /* Linefeed  */, '\n' },
+  { 0xFF0B /* Vert. Tab */, '\v' },
+
+#ifndef GDK_WINDOWING_WIN32
+  { 0xFF0D /* Return    */, '\r' },
+  { 0xFF1B /* Escape    */, '\033' },
+#endif
+
   /* Numeric keypad */
-  
-  { 0xFF80 /* Space */, ' ' },
-  { 0xFFAA /* Multiply */, '*' },
-  { 0xFFAB /* Add */, '+' },
+
+  { 0xFF80 /* Space     */, ' ' },
+  { 0xFFAA /* Multiply  */, '*' },
+  { 0xFFAB /* Add       */, '+' },
   { 0xFFAC /* Separator */, ',' },
-  { 0xFFAD /* Subtract */, '-' },
-  { 0xFFAE /* Decimal */, '.' },
-  { 0xFFAF /* Divide */, '/' },
+  { 0xFFAD /* Subtract  */, '-' },
+  { 0xFFAE /* Decimal   */, '.' },
+  { 0xFFAF /* Divide    */, '/' },
   { 0xFFB0 /* 0 */, '0' },
   { 0xFFB1 /* 1 */, '1' },
   { 0xFFB2 /* 2 */, '2' },
@@ -824,6 +866,10 @@ static struct {
   { 0xFFBD /* Equal */, '=' },  
 
   /* End numeric keypad */
+
+#ifndef GDK_WINDOWING_WIN32
+  { 0xFFFF /* Delete */, '\177' }
+#endif
 };
 
 /**
@@ -870,7 +916,7 @@ gdk_keyval_to_unicode (guint keyval)
   return 0;
 }
 
-static struct {
+static const struct {
   unsigned short keysym;
   unsigned short ucs;
 } gdk_unicode_to_keysym_tab[] = {