From ba70da20418bfb0b7f2d4f7029897acb089f213c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 8 Oct 2010 01:18:17 +0000 Subject: [PATCH] [GB.GTK] * BUG: Key.Code is not case sensitive for keys 'A' up to 'Z'. git-svn-id: svn://localhost/gambas/trunk@3261 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.gtk/src/gapplication.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gb.gtk/src/gapplication.cpp b/gb.gtk/src/gapplication.cpp index b46d87c74..25286f839 100644 --- a/gb.gtk/src/gapplication.cpp +++ b/gb.gtk/src/gapplication.cpp @@ -64,8 +64,13 @@ int gKey::code() { if (!_valid) return 0; - else - return _event.keyval; + + int code = _event.keyval; + + if (code >= GDK_a && code <= GDK_z) + code += GDK_A - GDK_a; + + return code; } int gKey::state()