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

Posted on 2006-05-03
Last Modified: 2012-08-13
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
Question by:gesman
    LVL 59

    Accepted Solution

    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:

    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:


    The above example does not alter the "b" key itself. The "b" key would continue to send the "b" keystroke
    LVL 7

    Expert Comment

    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:
    Winhook v1.00 source download:

    Also I found a small, working and freeware app that do this very well (tested on Windows XP):
    LVL 7

    Expert Comment

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

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

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like, I've seen routers with default values of:,,, …
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now