summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-11-15 12:56:54 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-11-15 12:56:54 +0200
commit547a05ba9eceead51932a4d107edbf8af478154e (patch)
tree3078c4819cbc9d2961e26e59e9985ef13bf8d7b8 /src/corelib
parent8d41cc9c97cf4a708b0aecdd09e8e8cdc9549e68 (diff)
downloadfpGUI-547a05ba9eceead51932a4d107edbf8af478154e.tar.xz
A new compiler define for debuging GDI key input messages.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas5
-rw-r--r--src/corelib/gdi/fpg_keys_gdi.inc4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 6f95d8a8..e0d28521 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -23,8 +23,9 @@ unit fpg_gdi;
{$mode objfpc}{$H+}
-{.$Define Debug}
+{.$Define DEBUG}
{.$Define DND_DEBUG}
+{.$Define DEBUGKEYS}
interface
@@ -758,7 +759,7 @@ begin
WM_KEYDOWN,
WM_SYSKEYDOWN:
begin
- {$IFDEF DEBUG} SendDebug(w.ClassName + ': wm_char, wm_keyup, wm_keydown'); {$ENDIF}
+ {$IFDEF DEBUGKEYS} SendDebug(w.ClassName + ': wm_char, wm_keyup, wm_keydown'); {$ENDIF}
kwg := FindKeyboardFocus;
if kwg <> nil then
w := kwg;
diff --git a/src/corelib/gdi/fpg_keys_gdi.inc b/src/corelib/gdi/fpg_keys_gdi.inc
index 914dd5f7..1b6188c4 100644
--- a/src/corelib/gdi/fpg_keys_gdi.inc
+++ b/src/corelib/gdi/fpg_keys_gdi.inc
@@ -280,14 +280,14 @@ const
begin
if TranslTable[VirtKey] = -1 then
begin
-{$IFDEF Debug}
+{$IFDEF DebugKeys}
WriteLn('No mapping for virtual keycode $', IntToHex(VirtKey, 2));
{$ENDIF}
Result := keyNIL
end else
begin
Result := TranslTable[VirtKey];
-{$IFDEF Debug}
+{$IFDEF DebugKeys}
WriteLn('Key $', IntToHex(VirtKey, 2), ' mapped to $', IntToHex(Result, 4));
{$ENDIF}
end;