Labels

November 27, 2015

Direct your [Left Arrow Key] to [Shift]+[Right Arrow Key]

Just a few days ago, one of my friend faced a problem. [Left Arrow Key] of his Laptop Key Board stopped working. I helped him to solve this problem by redirecting that key to [Shift]+[Right Arrow Key].

This is the script to do so:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance,force
Menu, Tray, NoStandard
Menu, Tray, Add, Run at Startup, startup
Menu,Tray,Add,About,about
Menu,Tray,Add,exit,closescript
+Right::
Send {Left}
return

closescript:
ExitApp
return

about:
MsgBox,This script directs the Shift+Right Arrow Key to LeftArrow key`n{Shift}+{Right Arrow Key}={Left Arrow Key}
return

startup:
FileCreateShortcut,%A_ScriptFullPath%,%A_Startup%/mapping.lnk
IfExist,%A_Startup%/mapping.lnk
{
FileDelete,%A_Startup%/mapping.lnk
FileCreateShortcut,%A_ScriptFullPath%,%A_Startup%/mapping.lnk
}
 return

For Non-AhkScript users, just ask for the .exe file at my Google+ wall and I will send you the .exe file to run the script.

No comments: