DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Mapping Capslock key to Middle Button Mouse Click  (Read 5,337 times)

jbullfrog

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 3
Mapping Capslock key to Middle Button Mouse Click
« on: October 24, 2010, 09:34 PM »
I was wondering if anybody could create a simple .exe file that could map the CapsLock button to the Middle Click Button on a mouse.

CapsLock could then be enabled with Shift + Capslock.

Thanks in advance.

I am using this for my laptop.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: Mapping Capslock key to Middle Button Mouse Click
« Reply #1 on: October 26, 2010, 11:11 PM »
Code
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

+CapsLock::CapsLock
CapsLock::MButton

The AutoHotKey download has a tool to compile the script to exe.  You can select a program icon other than the default green H if you like.

« Last Edit: October 27, 2010, 01:37 AM by MilesAhead »

Original address: https://www.donationcoder.com/forum/index.php?topic=24350.0