XP has a bug, that is, when the language setting changes the input method's default turn off/Open input method of the hotkey Ctrl+space, can not be set back to the original state, is that you must be in Ctrl+shift+space and alt+shift+ Space in the selection of a new hot key to replace the original ctrl+space, which caused a lot of inconvenience to people. With Delphi can quickly solve this problem, I on the XP SP2 test through. The method is to first in the language settings, remove the Enable key sequence. Then compile and run the following program, click the Btn1 button on the OK.
The following is a code fragment:
Unit Unit1;
Interface
Uses
Windows, Messages, sysutils, variants, Classes, Graphics, Controls, Forms,
Dialogs, Stdctrls,registry;
Type
TForm1 = Class (Tform)
Btn1:tbutton;
Procedure Btn1click (Sender:tobject);
Private
{Private declarations}
Public
{Public declarations}
End
Var
Form1:tform1;
Implementation
{$R *.DFM}
Procedure Tform1.btn1click (Sender:tobject);
Var
Reg:tregistry;
BUFFER:ARRAY[0..3] of Byte;
Begin
SetLength (buffer,3);
Buffer[0]:= $02;
buffer[1]:= $c 0;
buffer[2]:=$00;
buffer[3]:=$00;
Reg:=tregistry.create;
Reg. Rootkey:=hkey_current_user;
if (Reg. Openkey (' Control panelinput methodhot Keys0000010 ', false)) then
Begin
Reg. Writebinarydata (' Key modifiers ', buffer,4);
ShowMessage (' OK ');
End
Reg. Free;
End
End.