summaryrefslogtreecommitdiff
path: root/gdk/gdkkeyuni.c
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2012-05-15 16:16:25 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2012-06-25 23:23:01 +0800
commitfd6ce9975e4cc9c090d07e7a6b0013d02b49ce26 (patch)
tree351f59be20cf51dbc12fc2ccac3395894ae552ba /gdk/gdkkeyuni.c
parent6c04296f03515b9bab0e735898ebc8ebfba0fb38 (diff)
downloadgtk+-fd6ce9975e4cc9c090d07e7a6b0013d02b49ce26.tar.gz
Bug 676077: Fix handling of Keyboard Input on Windows
Don't use ASCII control characters to denote the input of Esc, Tab, Return/Enter, Backspace and Delete, as it seems that it is not how Windows handle them, and they cause weird characters to appear in the input field on GTK+3 programs in non-English Windows. Instead, let these keys be handled as-is on Windows, like what is done in GTK+-2.x. Checked with mclasen on IRC, and thanks to the people who verified the patch to not break anything on English Windows.
Diffstat (limited to 'gdk/gdkkeyuni.c')
-rw-r--r--gdk/gdkkeyuni.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdk/gdkkeyuni.c b/gdk/gdkkeyuni.c
index 3a7cca15a7..c951ad8d82 100644
--- a/gdk/gdkkeyuni.c
+++ b/gdk/gdkkeyuni.c
@@ -830,13 +830,18 @@ static const 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 */
@@ -861,7 +866,9 @@ static const struct {
/* End numeric keypad */
+#ifndef GDK_WINDOWING_WIN32
{ 0xFFFF /* Delete */, '\177' }
+#endif
};
/**