Commit 60fbf380 authored by Tor Lillqvist's avatar Tor Lillqvist

Fix a couple of bugs in the key event handling: Now AltGr chars work

	* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
	in the key event handling: Now AltGr chars work again. Also,
	now Alt-digits are passed up as well as Control-digits.
	Pass keypad plus and minus as normal plus and minus.
parent fa53582f
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
1999-08-13 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Fix a couple of bugs
in the key event handling: Now AltGr chars work again. Also,
now Alt-digits are passed up as well as Control-digits.
Pass keypad plus and minus as normal plus and minus.
Wed Aug 11 13:38:26 BST 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: FAQ Update
......
......@@ -1488,11 +1488,23 @@ gdk_event_translate (GdkEvent *event,
case VK_MULTIPLY:
event->key.keyval = GDK_KP_Multiply; break;
case VK_ADD:
#if 0
event->key.keyval = GDK_KP_Add; break;
#else
/* Pass it on as an ASCII plus in WM_CHAR. */
ignore_WM_CHAR = FALSE;
break;
#endif
case VK_SEPARATOR:
event->key.keyval = GDK_KP_Separator; break;
case VK_SUBTRACT:
#if 0
event->key.keyval = GDK_KP_Subtract; break;
#else
/* Pass it on as an ASCII minus in WM_CHAR. */
ignore_WM_CHAR = FALSE;
break;
#endif
case VK_DECIMAL:
#if 0
event->key.keyval = GDK_KP_Decimal; break;
......@@ -1548,8 +1560,9 @@ gdk_event_translate (GdkEvent *event,
case '7':
case '8':
case '9':
if (GetKeyState (VK_CONTROL) < 0)
/* Control-digits won't come in as a WM_CHAR */
if (!is_AltGr_key && (GetKeyState (VK_CONTROL) < 0
|| GetKeyState (VK_MENU) < 0))
/* Control- or Alt-digits won't come in as a WM_CHAR */
event->key.keyval = GDK_0 + (xevent->wParam - '0');
else
{
......@@ -1744,7 +1757,12 @@ gdk_event_translate (GdkEvent *event,
}
else
return_val = FALSE;
#if 0 /* Don't reset is_AltGr_key here. Othewise we can't type several
* AltGr-accessed chars while keeping the AltGr pressed down
* all the time.
*/
is_AltGr_key = FALSE;
#endif
break;
case WM_LBUTTONDOWN:
......
......@@ -1488,11 +1488,23 @@ gdk_event_translate (GdkEvent *event,
case VK_MULTIPLY:
event->key.keyval = GDK_KP_Multiply; break;
case VK_ADD:
#if 0
event->key.keyval = GDK_KP_Add; break;
#else
/* Pass it on as an ASCII plus in WM_CHAR. */
ignore_WM_CHAR = FALSE;
break;
#endif
case VK_SEPARATOR:
event->key.keyval = GDK_KP_Separator; break;
case VK_SUBTRACT:
#if 0
event->key.keyval = GDK_KP_Subtract; break;
#else
/* Pass it on as an ASCII minus in WM_CHAR. */
ignore_WM_CHAR = FALSE;
break;
#endif
case VK_DECIMAL:
#if 0
event->key.keyval = GDK_KP_Decimal; break;
......@@ -1548,8 +1560,9 @@ gdk_event_translate (GdkEvent *event,
case '7':
case '8':
case '9':
if (GetKeyState (VK_CONTROL) < 0)
/* Control-digits won't come in as a WM_CHAR */
if (!is_AltGr_key && (GetKeyState (VK_CONTROL) < 0
|| GetKeyState (VK_MENU) < 0))
/* Control- or Alt-digits won't come in as a WM_CHAR */
event->key.keyval = GDK_0 + (xevent->wParam - '0');
else
{
......@@ -1744,7 +1757,12 @@ gdk_event_translate (GdkEvent *event,
}
else
return_val = FALSE;
#if 0 /* Don't reset is_AltGr_key here. Othewise we can't type several
* AltGr-accessed chars while keeping the AltGr pressed down
* all the time.
*/
is_AltGr_key = FALSE;
#endif
break;
case WM_LBUTTONDOWN:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment