Saturday, March 1, 2014

Temporary Solution for Extra buttons on Mouse

Program Needed : AutoHotKey : Location : http://www.autohotkey.com/
First ensure to install the said program to your system.
After Its Installed
Double click on AutoHotKey tray icon/right click -> Open
once the Window is active go to View -> "Key history and Script info" or press "Ctrl+K"

now you need to know the keys of your mouse (Mapping)
Create a file to store log of the buttons getting pressed and their outcome
Example: china-oem-made-gaming-mouse-button-map

your Gaming mouse and its Mapping is ready now.
assuming your mouse has following structure
---Input---       ----Output----
ExtraButton1    Browser_Home ( Opens default browser when you press this button)
ExtraButton2    Launch_Mail  (Opens default Mail client when you press this button)
------------------------------------------------------------------------------------------------
Create your own script to remap the said buttons as per your wish.
my Example:
1. create a AHK file : 
Goto My Documents create folder named "MyScripts" go in there and
            rightClick-> New-> AutoHotkey Script
            Name it as "KeyRemap"
2.Right Click on File -> Edit
            leave first three lines as is mentioned in the file start with 5th Line
            write as below: or the you require

Browser_Home::Send {Launch_Media} ; i have assigned to open Default Music Player
Launch_Mail::Send {Media_Play_Pause} ; i have assigned to Control Play/Pause
3.Save File
-----------------------------------------------------------------------------------------------
'now assign hot key
Open AutoHotKey
goto File menu and click edit Script or press 'Ctrl+E'
Note: this will modify your master file which runs on windows load.

Leave everything as it is and insert below line in middle of 19 or 22 line.
<Type below>
^!MButton:: Run C:\Users\<yourUserName>\Documents\MyScripts\KeyRemap.ahk

Save the file
Close it
----------------------------------------------------------------------------------------------
Activate AutoHotKey window/ open again if you closed
got to File Menu-> Reload Scripts  or press 'Ctrl+R'

with this you have assigned MiddleMouse button as HotKey to Swap the buttons as and when require
to activate you need to press 'Ctrl+Alt+Middle mouse button'
To DeActivate Simply RightClick on "KeyRemap.afk" at Tray and Click Exit
================================================================
You can be more creative than me... Try and Explore
Link to my Script: Key Swap
my Script works only when specific Window is Active

No comments:

Post a Comment