REAL HOTKEYS?
We all know PQR is a fantastic program that has increased many player's quality of life while playing WoW. If you're like me however, you've been frustrated with the reality of only being allowed to manually cast abilities or use toggle functions with mod-keys. (Left Shift, Left Alt ect)
Not to mention with mod-keys we're realistically limited to only five convenient keys during play (that's including mouse side buttons!). After that, we're having to reach for the right side of our keyboard, doing confusing modkey combos, or pausing/disabling our rotations to use in-game hotkeys. All the while our old, beloved, easy-to-reach hotkeys such as Q, E, R, 1-6, ect. are collecting dust.
If you can relate to this, the following may be of great interest to you. I'm going to show you how we can use any key on the keyboard to do a toggle or manual cast when using PQR.
What You Need:
- AutoHotkey (AHK)
- PQR, Keyboard and Mouse (HAHA, It's funny because you already have those things!)
For those who don't know about AHK I'll give you a quick overview; AutoHotKey is a tool that allows you to manipulate any keystroke/mouse function into a wide variety of macros and functions. It's been popularly used by MMO gamers primarily for it's function of 'turbo'ing' a combination of keys (spamming a keystroke faster than humanly possible) so they don't have to do TAPA-TAPA-TAPA for hours on end. Here we'll be using it to turn ordinary keys like 1 into a modifier key, like left shift.
AHK
So once you've got AHK installed, open it and lets load the script we'll be using.
Windows Task Bar > Icon Tray > Green Sqaure /w H > Right Click > Edit This Script
Copy and paste this script over the default one:
Now save the text file, go back to the AHK icon and Right Click > Reload ScriptPHP Code:
SetTitleMatchMode 3
#IfWinActive, World of Warcraft
;----------------------------
;-- Left Shift (1)-- <-(refrence number for PQR script)
1:: ;<-- replace number with desired hotkey
SendInput {LShift down}
KeyWait, 1 ;<-- replace number with same hotkey
SendInput {LShift up}
; repeat process for all
return
;----------------------------
;-- Left Control (2)--
2::
SendInput {LCtrl down}
KeyWait, 2
SendInput {LCtrl up}
return
;----------------------------
;-- Left Alt (3)--
3::
SendInput {LAlt down}
KeyWait, 3
SendInput {LAlt up}
return
;----------------------------
;-- Right Shift (4)--
4::
SendInput {RShift down}
KeyWait, 4
SendInput {RShift up}
return
;----------------------------
;-- Right Control (5)--
5::
SendInput {RCtrl down}
KeyWait, 5
SendInput {RCtrl up}
return
;----------------------------
;-- Right Alt (6)--
6::
SendInput {RAlt down}
KeyWait, 6
SendInput {RAlt up}
return
;----------------------------
;-- RShift+RCtrl (7)--
7::
SendInput {RShift down}
SendInput {RCtrl down}
KeyWait, 7
SendInput {RShift up}
SendInput {RCtrl up}
return
;----------------------------
;-- RShift+RAlt (8)--
8::
SendInput {RShift down}
SendInput {RAlt down}
KeyWait, 8
SendInput {RShift up}
SendInput {RAlt up}
return
;----------------------------
;-- LShift+LCtrl (9)--
9::
SendInput {LShift down}
SendInput {LCtrl down}
KeyWait, 9
SendInput {LShift up}
SendInput {LCtrl up}
return
;----------------------------
;-- LShift+LAlt (10)-
0::
SendInput {LShift down}
SendInput {LAlt down}
KeyWait, 0
SendInput {LShift up}
SendInput {LAlt up}
return
;----------------------------
-- LShift+RShift (11)-
-::
SendInput {LShift down}
SendInput {RShift down}
KeyWait, -
SendInput {LShift up}
SendInput {RShift up}
return
;----------------------------
;-- LCtrl+RCtrl (12)-
=::
SendInput {LCtrl down}
SendInput {RCtrl down}
KeyWait, =
SendInput {LCtrl up}
SendInput {RCtrl up}
return
; Chat Functions
; These keys temporally disable the script so you may type messages ingame unhindered.
~Enter::
~NumpadEnter::
Suspend Permit
Suspend
return
/::
send /
Suspend Permit
Suspend
return
~Esc::Suspend,off
return
;-------------------------------------------------------------------------------------------;
;; Mod-Keys List for Reference:
;; SendInput {LShift down/up}
;; SendInput {LCtrl down/up}
;; SendInput {LAlt down/up}
;; SendInput {RShift down/up}
;; SendInput {RCtrl down/up}
;; SendInput {RAlt down/up}
;; SendInput {XButton1 down/up} (Mouse Side: Backward)
;; SendInput {XButton2 down/up} (Mosue Side: Forward)
Confirm everything is set by loading up a profile that uses a modifier key by trying out 1-6.
The default hotkeys for the modkeys are 1 through =, like your vanilla WoW, but you can change these to literally any key you desire by following the instructions located at the top of the AHK script.
PQR
Okay, at this point you could just use the AHK hotkeys for the mod-key your profile has available and leave it at that.
If you want to add more abilities though, here's a PQR ability that you can add to any profile so you can manually cast more things not offered by your current profile.
How to add this to a profile:
PQR Main Window > Ability Editor > Class Containing The Profile > Profile Name > Click Any Ability Name
Now !*rename*! the Ability Name (on the left panel under all the abilities) to --!Hotkeys (ensuring it'll be at the top of the list) and copy and paste this over the previous ability code:
The only thing you're requried to change here is spell to the name of the ability you wish to cast on hotkey. The reference number is the same in both the PQR and AHK code, making it easy to see what hotkey you're 'binding' your spell to.PHP Code:
local cast = CastSpellByName
local use = UseItemByName
----------------
--Modkeys list--
----------------
local fb = IsMouseButtonDown(5) --Mouse Side 'Foward' Button = fb
local bb = IsMouseButtonDown(4) --Mouse Sude 'Backward' Button = bb
local ls = IsLeftShiftKeyDown() --Left Shift = ls
local lc = IsLeftControlKeyDown() --Left Control = lc
local la = IsLeftAltKeyDown() --Left Alt = la
local rs = IsRightShiftKeyDown() --Right Shift = rs
local rc = IsRightControlKeyDown() --Right Control = rc
local ra = IsRightAltKeyDown() --Right Alt = ra
--Avoid Interference--
local ls_only = not lc and not la and not ra and not rc and not rs
local lc_only = not ls and not la and not ra and not rc and not rs
local la_only = not ls and not lc and not ra and not rc and not rs
local ra_only = not rc and not rs and not lc and not ls and not la
local rc_only = not rs and not ra and not lc and not ls and not la
local rs_only = not rc and not ra and not lc and not ls and not la
-----------------------------
--Hotkeys--------------------
-----------------------------
-- Left Shift (1)--
if ls and ls_only then
cast("spell")
end
-----------------------------
-- Left Control (2)--
if lc and lc_only then
cast("spell")
end
-----------------------------
-- Left Alt (3)--
if la and la_only then
cast("spell")
end
-----------------------------
-- Right Shift (4)--
if rs and rs_only then
cast("spell")
end
-----------------------------
-- Right Control (5)--
if rc and rc_only then
cast("spell")
end
-----------------------------
-- Right Alt (6)--
if ra and ra_only then
cast("spell")
end
-----------------------------
-- RShift+RCtrl (7)--
if rs and rc then
cast("spell")
end
-----------------------------
-- RShift+RAlt (8)--
if rs and ra then
cast("spell")
end
-----------------------------
-- LShift+LCtrl (9)--
if ls and lc then
cast("spell")
end
-----------------------------
-- LShift+LAlt (10)-
if ls and la then
cast("spell")
end
-----------------------------
-- LShift+RShift (11)-
if ls and rs then
cast("spell")
end
-----------------------------
-- LCtrl+RCtrl (12)-
if lc and rc then
cast("spell")
end
Now just go to the Rotation Editor via PQR Main Window, select the profile and put the ability you just created at the top of the ability list.
Final Note
Alright, so a few things to go over when you're using this PQR code with a profile that also uses mod keys for toggles/abilities.
Lets say your profile is using Left Shift for CDs toggle on/off and you don't want to change it/disable it, simply leave the cast("spell") for LShift unchanged and change the default AHK hotkey for LShift to the key you would like to toggle CDs with (or alternatively, change it to a key you would never use and continue using LShift for this toggle). Easy!
Now for the tricky part. If you're profile is using Left Shift (or any single mod-key) and you want to use one of the modkey combo hotkeys that contains Left Shift, like (9), anytime you hit that hotkey you're also causing that profile's Left Shift function to fire aswell. It does this because it doesn't consider the posibility of a player using a modkey combo.
The work-around for this is one of the following;
- Not using the modkey combo that contains a modkey single used by your profile (no edits required)
- Disabling the ability that uses that single modkey (done through Rotation Editor via PQR)
- Editing the profile ability that uses the modkey (profile edit required)
Editing isn't difficult though, just find where the modkey is handled (usually under the ability it causes to go off) and add this near that top:
Now lets say you're trying to unchoke Left Shift, look for the code that contains IsLeftShiftKeyDown() or some kind of simplfication like L_Shift / ls ect. and add "and ls_only" after it and save the ability.Code:---------------- --Modkeys list-- ---------------- local fb = IsMouseButtonDown(5) --Mouse Side 'Foward' Button = fb local bb = IsMouseButtonDown(4) --Mouse Sude 'Backward' Button = bb local ls = IsLeftShiftKeyDown() --Left Shift = ls local lc = IsLeftControlKeyDown() --Left Control = lc local la = IsLeftAltKeyDown() --Left Alt = la local rs = IsRightShiftKeyDown() --Right Shift = rs local rc = IsRightControlKeyDown() --Right Control = rc local ra = IsRightAltKeyDown() --Right Alt = ra --Avoid Interference-- local ls_only = not lc and not la and not ra and not rc and not rs local lc_only = not ls and not la and not ra and not rc and not rs local la_only = not ls and not lc and not ra and not rc and not rs local ra_only = not rc and not rs and not lc and not ls and not la local rc_only = not rs and not ra and not lc and not ls and not la local rs_only = not rc and not ra and not lc and not ls and not la
Example:
----------------------PHP Code:
##Lets say this is the code you have to change:
if IsLeftAltKeyDown() then
return true
end
##it would become this:
if IsLeftAltKeyDown() and la_only then
return true
end
##it might be more complicatied like this
if not ToggleTimer then ToggleTimer = GetTime() - 1.5 end
if IsLeftControlKeyDown() and GetTime() - ToggleTimer >= 1.5 then
ToggleTimer = GetTime()
if AoE then
AoE = false
print("AoE mode disabled!")
else
AoE = true
print("AoE mode enabled!")
end
end
##but it's just as easy; remember after you see where the modkey is declared just put the corresponding key initials after it
--and "corresponding key"_only--
if not ToggleTimer then ToggleTimer = GetTime() - 1.5 end
if IsLeftControlKeyDown() and lc_only
-:Done!----------------------"^^^^^^"
Ho-kay! That about wraps it up.
I hope everything was clear and you now have a new tool in your PQR kit!
Peace~