• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1298
  • Last Modified:

Reassign or disable "Windows" Key on a laptop keyboard.

Hello,
I have toshiba satellite M30 laptop and run win XP home on it. It's keyboard has couple of keys that I never use such as "windows" key. Clicking this "Windows" key makes "Start" menu pop up. Now I use source code editor where I want to assign one of the editing functions to this key.
I successfully did that and when I press this key while in the editor - editor does it's operation nicely, but after that Windows "Start" menu keeps always popping up.
Can I disable this key for Windows somehow to avoid it popping the "Start" menu every time?

Thanks in advance
0
gesman
Asked:
gesman
  • 2
1 Solution
 
LeeTutorretiredCommented:
There is a free program you can download called AutoHotkey that you can use to automate many tasks in many different ways.  One of the things it does very easily is remap keys on the keyboard.  You download the program here:

http://www.autohotkey.com/

After you install the program, you can read the documentation built into it to learn how to "program" the remapping of keys.  The scripts you create can be "compiled" into .exe files which can then be run at system startup by creating a shortcut in the Startup folder on the Start Menu.

This is a quotation from the builtin help file about remapping keys:

The syntax for the built-in remapping feature is OriginKey::DestinationKey. For example, a script consisting only of the following line would make the "a" key behave like the "b" key:

a::b

The above example does not alter the "b" key itself. The "b" key would continue to send the "b" keystroke
0
 
xpsavyCommented:
To disable Windows key  at runtime you must hook keyboard.
Unfortunately to do this system wide it must be done in dll.

There is a source code and sample app in Pieter's Delphi Corner: http://home.hccnet.nl/p.zylstra/downloads.htm
Winhook v1.00 source download: http://home.hccnet.nl/p.zylstra/downloads/winhook.zip

Also I found a small, working and freeware app that do this very well (tested on Windows XP):
http://downloads.planetmirror.com/pub/majorgeeks/input/wkeykill17.zip
0
 
xpsavyCommented:
char c;
// disable key
SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 1, (void*) &c, 0);

char c;
// enable key
SystemParametersInfo ( SPI_SCREENSAVERRUNNING, 0, (void*) &c, 0);
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now