Disable the ESC key in windows with Visual Basic or Delphi

Asked

Viewed 69 times

0

How to disable Esc on Windows via Visual Basic or Delphi?

When the user is open program Esc is unusable, will not do action in any open program.

Example: with the start menu open when I press Esc it will not close, nothing will happen.

I thought doing editing the Windows registry and restarting the machine will work?

procedure TForm3.Button1Click(Sender: TObject);
var
  Reg: Tregistry;
begin
  Reg:=Tregistry.create;
  with Reg do
  begin
  rootkey:=HKEY_LOCAL_MACHINE;
  OpenKey('SYSTEM\CurrentControlSet\Control\Keyboard Layout', false);
  writestring('00 00 00 00 00 00 00 00 02 00 00 00 5B E0 38 00 00 00 00 00', 'Scancode Map');
  closekey;
  end;
end;

But I can’t edit the record like this...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.