Modified Shift Cadet

Hello,

I’m working on creating a macro similar to the Shift Cadet function. Here’s an example from the documentation where the macro is assigned to the f key:

holdKey leftShift
ifInterrupted break
ifPlaytime 200 break
tapKey f

In this configuration, f is triggered only if the key is not interrupted or if held for less than 200ms. However, I’ve noticed that this setup sometimes unintentionally triggers Shift when I quickly type another key right after pressing f.

I’d like to adjust this so that Shift is only activated if the f key is held for more than 500ms. Ideally, the macro would behave as follows:

  • If f is released within 500ms or less, it triggers f.
  • If f is held for 500ms or longer, it triggers Shift.

For optimal functionality, I’d like f to print immediately upon key release, without needing to wait 500ms to resolve the action. I’ve tried using combinations of delayUntilRelease, breaks, and other commands but haven’t been successful. Any advice or insights on how to implement this would be greatly appreciated!

Thank you!

I would try something like this (untested!), which I think does what you describe. Although frankly, I don’t see how that would be useful if you have to hold down shift for half a second until it actually behaves as shift.

delayUntilReleaseMax 500
ifPlaytime 499 final holdKey leftShift
tapKey f
1 Like

I just used 500 because it emphasized the behaviour i was trying to explain.
I will modify that number.

your suggestion works perfect! thanks.

well, I am having another problem…

when I quickly tap “f” and then “a”, it writes only “a” or “af” instead of “fa”
…not sure why…

For what you seem to be trying to achieve, I really think it would be better to just use the Secondary function built into the firmware. You can adjust many parameters for it in the “Typing behaviour” page:

To use the built-in secondary function, just assign the shift key in Agent as such:

Depending on how you set up the Typing behaviour, you should be able to achieve much of what you are trying to achieve.

2 Likes

Damn, watched a video of someone using Katana to do this and it is interesting to me. Useless for gaming, but for work I can see it being very useful when trained. The bottom four corner keys are not super convenient so this would help a lot.