Ctrl+Space无法关闭/打开输入法怎么办

来源:天下网吧时间:2011-08-05 17:05:03

  xp有一个bug,就是在语言设置更改输入法的默认关闭/打开输入法的热键CTRL+SPACE后,无法设置恢复到原来的状态,就是说你必须在CTRL+SHIFT+SPACE和ALT+SHIFT+SPACE中选择一个新的热键来替换原来的CTRL+SPACE,这给人们带来了很多不便。用delphi可以快速解决此问题,本人在XP SP2上试验通过。。方法是先在语言设置里,去掉启用按键顺序。然后编译运行下面的程序,点btn1那个按钮就OK了。!

Ctrl+Space无法关闭/打开输入法怎么办

word-WRAP: break-word" bgColor=#fdfddf>

以下是代码片段:

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]:=$c0;

  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.

文章内容来源于网络,不代表本站立场,若侵犯到您的权益,可联系我们删除。(本站为非盈利性质网站) 联系邮箱:9145908@qq.com