I’d like to start a thread for gaming config ideas.
If anyone has any other tips/tricks, I’d love to hear 'em…
I’ll list & update anything I find useful here:
• MAX-TAP macro •
Of course, I’ll start with @maexxx’s version of the Snap-Tap (null movement) workaround; tweaked to use the A & D keys instead of J & L. BIG help, for sure:
First, add setVar snap_running 0
to your $onInit.
Then create a macro titled snap-leftright with the following, and place it on both the A & D (strafing) keys of your gaming keymap:
if ($thisKeyId == $keyId.a) setVar snap_mode 1
else if ($thisKeyId == $keyId.d) setVar snap_mode 2
else setVar snap_mode 0
if ($snap_running == 0) fork snap-leftright-worker
delayUntilRelease
ifKeyActive $keyId.a final setVar snap_mode 1
ifKeyActive $keyId.d final setVar snap_mode 2
setVar snap_mode 0
Then another macro titled snap-leftright-worker with the following:
setVar snap_running 1
setVar snap_state 0
setLedTxt 0 '<->'
loop:
if ($snap_state == 0) {
if ($snap_mode == 1) {
releaseKey d
pressKey a
}
else if ($snap_mode == 2) {
releaseKey a
pressKey d
}
}
else if ($snap_state == 1) {
if ($snap_mode == 0) {
releaseKey a
releaseKey d
}
else if ($snap_mode == 2) {
releaseKey a
pressKey d
}
}
else if ($snap_state == 2) {
if ($snap_mode == 0) {
releaseKey d
releaseKey a
}
else if ($snap_mode == 1) {
releaseKey d
pressKey a
}
}
setVar snap_state $snap_mode
if ($snap_mode != 0) goTo loop
ifNotPlaytime 5000 goTo loop
setVar snap_running 0
setLedTxt 1 '<->'
For more info on what the Snap-Tap (null movement) stuff is all about, as well as the evolution of Max’s macro, you can read through this thread here.
• Dual use keys •
Triggering two different actions with one key can be useful.
This is @mlac’s DOOM: Shotguns usecase.
The following will select the super shotgun upon single-tap, and* the combat shotgun when double-tapping:
ifDoubletap final tapKey 1 // combat shotgun
tapKey 5 // super shotgun
*Potential quirk with the above macro…
Double-tapping that macro outputs both a 5
and a 1
for every double-tap. That might not be the desired behavior if your usecase is to select an in-game item. It might be fine for switching shotguns in DOOM, but not so much if you’re trying to select instant-use items.
e.g., Imagine you have grenades mapped to the 5
key (single-tap), and health potions mapped to the 1
key (double-tap). If you need to replenish your health, it doesn’t help much if you dropped a grenade on your toe while reaching for a health potion…
• Double-Tap to sprint/crouch etc. •
For games that don't include toggle options for sprinting/crouching, etc., here's a macro that allows you to use LShift like normal when tapping/holding, but double-tapping toggles it on, and single-tapping it again toggles it back off:ifDoubletap final pressKey persistent LS
releaseKey persistent LS
holdKey LS
If you want to use the same actions on a different key, then replace the LS
with the key you want.
e.g., LCtrl
to crouch:
ifDoubletap final pressKey persistent LC
releaseKey persistent LC
holdKey LC
Here’s another example usecase for games with no option to toggle holding right-click.
Hold Right-click:
ifDoubletap final pressKey persistent mouseBtnRight
releaseKey persistent mouseBtnRight
holdKey mouseBtnRight
Potential quirk with the above macro…
•The double-tap to lock macro outputs the specified keys twice on double-tap, and again on single-tap to release. Since my current usecase is only for locking LShift
, LCtrl
, or mouseBtnRight
, it’s not really a big deal, but could be problematic if implemented differently.
• Auto-Walk •
Here’s a couple of methods for adding Auto-Walk to games that don’t have it baked-in…
•METHOD 1
One way would be to bind the following to a key (most games use backtick for auto-walk nowadays). This will just toggle a continuous w
(obviously):
toggleKey persistent w
You’ll also probably want to cancel auto-walk when you tap w
or s
, like most games would…
To do that, replace your w
& s
keys with the following macros (These will make the w
& s
keys work normally, but releases persistent w
when pressed.):
Auto-walk Release W
pressKey w
releaseKey persistent w
holdKey w
and
Auto-walk Release S
pressKey s
releaseKey persistent w
holdKey s
•METHOD 2
You can just place this on the actual w
key. It will make w
work normally when single-tapped/held, but double-tapping will make it persistent until pressed again (a little tricky to use in some games):
ifDoubletap final pressKey persistent w
releaseKey persistent w
holdKey w
Again, you’ll likely want to add the ability to cancel auto-walk when tapping s
by placing the “Auto-walk Release S” macro on your s
key.
The above examples can also be combined with the following to lock LShift
(sprint) while auto-walking:
ifDoubletap final pressKey persistent LS
releaseKey persistent LS
holdKey LS
Also, it’s probably a good idea to add releaseKey persistent w
and releaseKey persistent LS
to certain $onKeymapChange, $onLayerChange events, etc..
• Keystroke Delay auto-disable •
For anyone who uses a keystroke delay, it's probably a good idea to set it to 0ms (off) when gaming. In Windows OS, I set a keystroke delay of 10ms by default because some apps can't handle the UHK's output speed. (e.g., Notepad will have scrambled/missing output when pasting text via macros.)I added set keystrokeDelay 0
to a macro titled $onKeymapChange GAM (my gaming keymap) That automatically disables the keystroke delay when switching to my gaming keymap. Then I added set keystrokeDelay 10
to $onKeymapChange any. That turns it back on (10ms) for all other keymaps.
• Mouse Left/Right click on keyboard •
The other day I decided to add mouse left & right click keys to the left thumb buttons on the base layer of my gaming keymap (Fn2 = right-click and Fn = left-click). This makes ADS (aim down sights) a dream. It’s so much more comfortable to hold down right-click to ADS with the left hand. Using your keyboard to shoot (left-click) will also improve your accuracy because you don’t have micro-jumps on your real mouse. It’s gonna take a bit of practice before it feels natural, but I can already tell it’s helping me a lot. Right now, it kinda feels like I’m trying to play the guitar left-handed.😵💫Question for the devs:
Is there ANY WAY to control an external mouse with the UHK’s mouse acceleration/deceleration keys? That would be the icing on the cake for me. I’m thinking it would have a similar effect as the sniper/DPI changer button on some gaming mice.
If that’s not possible, does anyone know of another way to control mouse speed on-the-fly with a keyboard? Preferably not with AutoHotkey, or anything that would trip anti-cheat stuff. I’m not looking for anything to be super sneaky here; just looking for solutions. I despise being trolled by cheaters just as much as the next guy…