Adding right-click and a delete button with Boot Camp

| | | | | | |

Running Boot Camp on your MacBook or MacBook Pro? I am, and I was very frustrated by the fact there was no way to right-click in Windows XP. There wasn't even a Delete key on the Mac keyboard, so how are you supposed to do Ctrl+Alt+Delete? The solution is very simple. Read on.

Update: This tip is not quite as useful anymore, as the latest versions of Boot Camp allow delete functionality with Fn+Backspace.

How on Earth are you supposed to run Windows without right-clicking? I don't even know. Some programs force you to right-click in order to do certain tasks, like closing a program that only hides itself in the notification area when you “close” its window. And a Delete key is almost essential, especially for people typing a lot or programmars. (For Ctrl+Alt+Del, try Ctrl+Shift+Esc.)

Fortunately there is a solution! Keymapping can reassign a key to be a Delete key. There are a few programs to do this, but I found one that can also turn any key into a right-click button! It’s free, and it’s called AutoHotKey.

Intructions

  1. Download and install AutoHotKey from http://www.autohotkey.com/ (open in new window). (AutoHotKey is extremely powerful, but we'll keep it simple in this script.)
  2. Save the file below to C:\Documents and Settings\All Users\Start Menu\Programs\Startup. (Right-click the link and choose Save Target As... or something similar.)

    Download File: RightClickAndDelete.ahk

    ;
    ; AutoHotkey Version: 1.x
    ; Language:       English
    ; Platform:       Win9x/NT
    ; Author:         Alan J Hogan (alanjhogan.com)
    ; Copyright:      None (Public Domain: Share and modify freely)
    ;
    ; Script Function:
    ; Remaps left Windows key to be a right-click button!
    ; Useful on my MacBookPro.  (Of course, it's really a
    ; cmd/Apple key, but registers as Windows key.)
    ; Also turns the Enter key to the left of the arrow
    ; keys into right-click.
    ; Combine the right Apple/Windows key and that same
    ; Enter button to Middle-Click!
    
    #NoEnv ; Recommended for performance and compatibility 
    ; with future AutoHotkey releases.
    SendMode Input ; Recommended for new scripts due to 
    ; its superior speed and reliability.
    
    *NumpadEnter::Delete ; Reassigns "Numpad Enter" to Delete
    *RWin::RButton ; Reassigns the right Windows/Apple Cmd 
    ; button to simulate right-click
    RWin & NumpadEnter::Send {MButton} ; Holding the right 
    ; Windows/Apple Cmd button and then hitting the same 
    ; Enter key now simulates a middle click
    

    The third-to-last line reassigns the enter button right next to the arrow keys on a MacBook Pro to Delete.

    The second-to-last line effectively remaps your right Apple Command / Windows button into a right-click event! It's conveniently close enough to the trackpad that it's really not even a pain to use, and IMO even easier than Ctrl+Click in OS X.

    The last line uses both buttons to give you a middle-click functionality.

    Finally, if you’d rather remap other buttons (such as caps lock or a key combination), please check out this reference on AutoHotKey and their hotkey documentation.

  3. After you have saved your file, run it. You should now have right-click and delete functionality! Test it by right-clicking somewhere and deleting something. (No! Not that something! An unimportant something!)
  4. This script will run automatically every time you boot into Windows!

I want to thank the people at AutoHotKey! The programmers deserve credit for making it, as do the folks in the forum, who helped me get started.

If you run into any problems, please let me know.

(See also: Why I am disappointed by Boot Camp Beta. Update: AutoHotKey can also switch your left Ctrl and Alt keys as I demonstrate here!)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Shift+F10?

Does Shift+F10 simulate a right click?

alanhogan's picture

Not quite

I didn't know this, but apparently it's similar -- It brings up the context menu on the selected item. I believe it is the same as the application button found on many Windows keyboards: Similar, but not identical, functionality to right-clicking. For example, Shift+F10 does not work in the system tray.
Alan J. Hogan

You can use Shift + F10 for

You can use Shift + F10 for system tray, taskbar, etc, but it's a pain:

Open Apple / Windows Option
Tab to get Start Menu, Quick Launch, Taskbar or System Tray
Use to navigate to item
Press Shift + F10 on item

I avoid using a mouse as much as possible because it tends to make for better posture (at least in my case).

Cheers,
Steve

*you can use left arrow and

*you can use left arrow and right arrow to get the item
he he, chopped out my arrows.

Thanks

Thanks a lot man, this is exactly what i've been looking for :-)

How about a hardware change

As I don't own a mac but toying with the idea: Is it possible to connect a common 101 key standard PC keyboard to MacIntel Hardware?

alanhogan's picture

Yes (Re: Keyboard)

If the MacIntel hardware has the port you need, or you have an adapter, yes.
MacBook Pro, I know, has no PS/2 ports; you’ll need a PS/2-to-USB adapter if your keyboard uses PS/2.

Stick with USB and you’ll be golden.

Alan J. Hogan

Dead Link.

The above linked code, "RightClickAndDelete.ahk" required to utilize
the right clicking is dead.

Please fix the link. Thanks.

alanhogan's picture

Fixed.

Sorry about that. It used to work; I don't know what changed. The link should work now.

If it does not, you can select the code and save it as an .ahk file yourself.

Alan J. Hogan

Fixed in Bootcamp 1.1

Seems to be fixed in bootcamp 1.1 -- now holding down right right apple key and clicking gives you right-click, and fn+delete gives you delete. I'd still love to see a two-fingered scroll ability though...

This was such a huge help.

This was such a huge help. Thank you so much!!

Thanks a lot!!!!!!!! you

Thanks a lot!!!!!!!! you rock..:-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Page Outdated! Comments disabled!

As do many people using Drupal to power their website, I get a lot of comment spam, and Drupal's spam filter is horrible! So I have permanently disabled comments on old.alanhogan.com. Try the new version of this page (which may not exist, but should if this page actually has content besides a list of other articles).

Consider using my contact form to get in touch. And remember that AlanHogan.com is live and old.alanhogan.com is here as a backup only, and a stopgap measure because some AlanHogan.com functionality is not implemented yet.

Sponsored by

To advertise here, contact me.