diff --git a/Projects/SAMufasaGUI/project1.lpi b/Projects/SAMufasaGUI/project1.lpi
index 8890030..6c8f0e6 100644
--- a/Projects/SAMufasaGUI/project1.lpi
+++ b/Projects/SAMufasaGUI/project1.lpi
@@ -7,7 +7,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
@@ -219,9 +219,9 @@
-
+
-
+
@@ -273,11 +273,9 @@
-
-
-
+
+
-
@@ -306,8 +304,8 @@
-
-
+
+
@@ -1178,7 +1176,7 @@
-
+
@@ -1591,163 +1589,75 @@
-
+
-
-
-
+
-
-
-
-
-
+
+
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/Units/MMLCore/input.pas b/Units/MMLCore/input.pas
index dad1f22..ad26cd0 100644
--- a/Units/MMLCore/input.pas
+++ b/Units/MMLCore/input.pas
@@ -32,10 +32,11 @@ uses
mufasatypes, // for common mufasa types
windowutil, // for mufasa window utils
{$IFDEF LINUX}
- ctypes,x, xlib,xtest, MMLKeyInput, lclintf;// for X* stuff
+ ctypes,x, xlib,xtest,// for X* stuff
// do non silent keys/mouse with XTest / TKeyInput.
{Later on we should use xdotool, as it allows silent input}
{$ENDIF}
+ MMLKeyInput, lclintf;
type
TMInput = class(TObject)
@@ -67,9 +68,7 @@ type
private
// Not used yet.
Silent: Boolean;
- {$IFDEF LINUX}
KeyInput: TMMLKeyInput;
- {$ENDIF}
end;
@@ -130,39 +129,27 @@ constructor TMInput.Create(Client: TObject);
begin
inherited Create;
Self.Client := Client;
- {$IFDEF LINUX}
Self.KeyInput := TMMLKeyInput.Create;
- {$ENDIF}
end;
destructor TMInput.Destroy;
begin
- {$IFDEF LINUX}
Self.KeyInput.Free;
- {$ENDIF}
inherited;
end;
procedure TMInput.KeyUp(key: Word);
begin
- {$IFDEF MSWINDOWS}
- Raise Exception.CreateFMT('KeyUp not yet implemented',[]);
- {$ELSE}
Self.KeyInput.Up(Key);
- {$ENDIF}
end;
procedure TMInput.KeyDown(key: Word);
begin
- {$IFDEF MSWINDOWS}
- Raise Exception.CreateFMT('KeyDown not yet implemented',[]);
- {$ELSE}
Self.KeyInput.Down(Key);
- {$ENDIF}
end;
procedure TMInput.PressKey(key: Word);
diff --git a/Units/MMLCore/mmlkeyinput.pas b/Units/MMLCore/mmlkeyinput.pas
index e8a7865..b8f6832 100644
--- a/Units/MMLCore/mmlkeyinput.pas
+++ b/Units/MMLCore/mmlkeyinput.pas
@@ -1,58 +1,62 @@
-unit MMLKeyInput;
-
-{
- This file is part of the Mufasa Macro Library (MML)
- Copyright (c) 2009 by Raymond van Venetiƫ and Merlijn Wajer
-
- MML is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- MML 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with MML. If not, see .
-
- See the file COPYING, included in this distribution,
- for details about the copyright.
-
- MMLKeyInput class for Keyboard input in MML.
-}
-
-{$mode objfpc}{$H+}
-
-interface
-
-uses
- Classes, SysUtils, XKeyInput;
-
-type
- TMMLKeyInput = class(TXKeyInput)
- public
- { Override these two methods,
- as the original class calls ProcessMessages;
- }
- procedure Down(Key: Word);
- procedure Up(Key: Word);
-end;
-
-
-implementation
-uses LCLType;
-
-procedure TMMLKeyInput.Down(Key: Word);
-begin
- DoDown(Key);
-end;
-
-procedure TMMLKeyInput.Up(Key: Word);
-begin
- DoUp(Key);
-end;
-
-end.
-
+unit MMLKeyInput;
+
+{
+ This file is part of the Mufasa Macro Library (MML)
+ Copyright (c) 2009 by Raymond van Venetiƫ and Merlijn Wajer
+
+ MML is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ MML 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with MML. If not, see .
+
+ See the file COPYING, included in this distribution,
+ for details about the copyright.
+
+ MMLKeyInput class for Keyboard input in MML.
+}
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, {$IFDEF MSWINDOWS}WinKeyInput{$ELSE}XKeyInput{$ENDIF};
+
+type
+ {$IFDEF MSWINDOWS}
+ TMMLKeyInput = class(TWinKeyInput)
+ {$ELSE}
+ TMMLKeyInput = class(TXKeyInput)
+ {$ENDIF}
+ public
+ { Override these two methods,
+ as the original class calls ProcessMessages;
+ }
+ procedure Down(Key: Word);
+ procedure Up(Key: Word);
+end;
+
+
+implementation
+uses LCLType;
+
+procedure TMMLKeyInput.Down(Key: Word);
+begin
+ DoDown(Key);
+end;
+
+procedure TMMLKeyInput.Up(Key: Word);
+begin
+ DoUp(Key);
+end;
+
+end.
+