Gaming Config (Tips & Tricks?)

I’d like to start a thread for gaming config ideas…

Of course, I’ll start with @maexxx’s Snap-Tap macro added to the A & D (strafing) keys. BIG help, for sure.


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.:face_with_spiral_eyes:


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.:shortcake: 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?


Anyway, if anyone has any other tips/tricks, I’d love to hear 'em…

s 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.:shortcake: I’m thinking it would have a similar effect as the sniper/DPI changer button on some gaming mice.

Obviously not a direct one.

Sure you can trigger some shortcut, catch it in your window manager and alter system settings, but I cant tell whether it will work smoothly enough, or if it will work at all.

Dangit. I was afraid that would be your answer.:face_with_diagonal_mouth:
I imagine that would be pretty disruptive for most games.

So another question-
What exactly do Agent’s mouse buttons 6-20 do? They don’t seem to do anything when I assign them to a key in Agent, or when using them in macros. I have a few mice with a bunch of extra buttons, and I thought (naively) that using Agent’s extra mouse button bindings would trigger my non-UHK mouse buttons, or maybe the OS would handle them in some way. Do they have no effect in Windows?

I have no idea. I suppose it ahould be possible to bind them to whatever you like on OS/software side.

Agent’s extra mouse buttons should work like the extra buttons of mice, and applications, including games, should support them alike.

As a casual Doom player, I use a couple of such macros to access my weapon arsenal with half the number of keys than normally needed.

However, it doesn’t work perfectly. When I hold W to move forward in the game and tap the key assigned to the macro, Doomguy still moves forward for about a second even if I release W immediately after tapping the macro key.

1 Like

I tried mapping the mouse 6-20 buttons in a few games, but none of them were recognized. Only scroll, the three main buttons, and back/forward are recognized. So, I guess it’s either borked in the UHK80 FW (I’m on v14.1.0), or maybe Windows just doesn’t recognize more than five mouse buttons without a driver, or whatever?

That seems useful. :slightly_smiling_face: I guess it would be nice to set up quicker ways to select items.


I’d like to create a few macros for games that don’t offer remapping, or have missing common features.

Some examples:

  1. Make a key work normally when held, but toggle when tapped. (e.g., LShift to sprint, or LCtrl to crouch)

  2. Make an auto-walk/sprint macro:
    -When tapped, toggles holding W (forward movement) until either tapped again, and/or also releases when either the W or S key is pressed.

I’d really love to have the above two macro examples, but Idk what I’m doing. I’m macro language illiterate. :sweat_smile: I go cross-eyed trying to read the docs.:face_with_spiral_eyes: If anyone could help with those, I’d appreciate it…

Currently, all reports are cleared when macro exits, which means that you will have to use active waiting.

Something like:

ifHold final holdKey LS
if $running setVar running 0
else {
    pressKey LS
    setVar running 1
    while ($running) delayUntil 10
}

But admittedly this is a recurring usecase and the above is an absurdly hackish way to do it → will implement a better variant → Global macro report states · Issue #1264 · UltimateHackingKeyboard/firmware · GitHub .

1 Like

The only quick and reliable way I can think of to test whether the 6+ UHK mouse buttons are supposed to work is to use a MOBA mouse to compare.

Thanks! I suppose I should use different $running variables per macro, such as $running1, $running2, …, right?

1 Like

Yes.

ifHold final holdKey 1
if $running setVar running 0
else {
    pressKey 5  
    setVar running 1
    while ($running) delayUntil 10
}

Keeps outputting 5 forever upon tapping.

Do you want pressKey or tapKey here?

What are you trying to achieve?

Concratulations! You have found a bug!

2 Likes

Fixed in Fix update of last report when macro ends. by kareltucek · Pull Request #1269 · UltimateHackingKeyboard/firmware · GitHub

1 Like

AAAAAAAHHH!!!
Dangit guys, I just spent most of my night trying to wrap my head around this, and right before I was about to ask why I couldn’t get it working, you go and say there’s a bug! :rofl: :zany_face:

Oh well, I guess I’ll start again tomorrow. I gotta get some sleep now.:sleeping_face: I hope I don’t have Tetris-shaped macro nightmares… :face_with_peeking_eye:

Phil, you know the firmware is falling apart ever since the uhk80 / eventloop refactor :smiley:. Please shoot any questions about any suspicious behavior straight away ;-).

Also, you know, badly written docs, or non-intuitive features are bugs (of documentation or specification) too, and hard to uncover unless people actually complain :sweat_smile:.

2 Likes

I think you underestimate my lack of understanding. :sweat_smile: Just about everything is unintuitive when you’re as derpy as I am. :grimacing:

Well, here’s what I was going to post before I saw the stuff about bugs:

Ok, I had some time to try the new: https://github.com/UltimateHackingKeyboard/firmware/actions/runs/15537557961

I ended up going with a Double-tap to toggle LShift, as it’s less disruptive when trying to type normally. In addition to being a toggle for sprinting in games, it’s also an awesome substitute for combining Shift/CapsLock.:blush:

So here’s what I’m using now; does this look right?:

ifDoubletap toggleKey persistent LS
else holdKey LS

For some reason, that macro seems to be more responsive than the following couple of macros, which have a slight delay when using holdKey LS:

ifHold final holdKey LS
else toggleKey persistent LS

And the same delay with holdKey LS when using Karel’s macro above: Gaming Config (Tips & Tricks?) - #9 by kareltucek

ifHold final holdKey LS
if $runningLS setVar runningLS 0
else {
    pressKey LS
    setVar runningLS 1
    while ($runningLS) delayUntil 10
}

Any insights on what causes the delay on those two, vs the first?

A couple of quirks:
•If LShift is toggled on when performing a reboot, all the above macros have a stuck LShift afterwards (until tapping LShift again).
•All the above macros persist across keymap changes (expected?). Of course, adding setVar runningLS 0 to $onKeymapChange fixes it for Karel’s original macro, but is there a way to fix it for the new toggleKey macros as well?


Anyway, I really gotta go to bed now, but I’ll try to catch up later tonight/tomorrow. :yawning_face:

1 Like

I suspect ifHold.

To determine whether a key is held down, it has to wait for a key release to see how long it has been held. ifDoubleTap on the other hand only reacts on taps, so the presses are relevant, not the releases.

1 Like