I found myself typing the same string over and over again and finally decided it was time to do something about it. This is for Windows (I mostly develop within WSL Ubuntu inside Windows 11), but I'm sure it's not hard to do something similar on Mac or Linux desktops.<p>Basically, you install AutoHotKey 2.0 from here:<p><a href="https://www.autohotkey.com/" rel="nofollow">https://www.autohotkey.com/</a><p>Then create a file somewhere called CtrlCapsLockPaste.ahk with the contents:<p><pre><code> #Requires AutoHotkey v2.0
^CapsLock::
{
Send "+{Enter}"
Send "I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!"
Send "+{Enter}"
}
</code></pre>
Then you can also copy this .ahk file to your Startup folder:<p><pre><code> C:\Users\<your_name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
</code></pre>
Then, whenever you ask something to Claude or ChatGPT about revising a function or method or something like that, you can quickly press Ctrl + CapsLock and it will add that message.<p>I find that when I don't use this sort of wording constantly, they give me annoyingly incomplete code with tons of placeholders, or simplify my existing code by focusing just on the part they are trying to revise. This can be super annoying because you might not realize at first that they simplified your code (I've started always checking the line count before and after). This command greatly reduces that tendency with Claude3.5 Sonnet and ChatGPT 4o, and if it takes half a second to add, you're more likely to just do it out of habit and avoid wasted time and wasted Claude inference requests, which are annoyingly limited per period of time.
On Linux this can be accomplished using a hot-string with Espanso (<a href="https://espanso.org/" rel="nofollow">https://espanso.org/</a>), install Espanso and then add the string to your match.yml file:
```
- trigger: reviseme
replace: "I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!"
```
Apparently it's pretty easy to do on those other platforms. For Mac:<p>Using BetterTouchTool:<p><pre><code> Install BetterTouchTool from bettertouchtool.net. Open BetterTouchTool and go to the “Keyboard” section. Add a new keyboard shortcut, for example, Ctrl + CapsLock. Set the action to "Insert/Paste Custom Text." Enter your custom message:
I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!
</code></pre>
For BetterTouchTool, there's an option in the app to start at login.<p>Using Hammerspoon:<p><pre><code> Install Hammerspoon from hammerspoon.org. Create a configuration file (~/.hammerspoon/init.lua) with this content:
</code></pre>
hs.hotkey.bind({"ctrl"}, "capslock", function()
hs.eventtap.keyStrokes("I need you to give me ABSOLUTELY COMPLETE revised code without ANY placeholders that preserves ALL existing functionality!")
end)<p>Reload Hammerspoon by clicking on its menu icon and choosing "Reload Config."<p>For Hammerspoon, you can add it to "Login Items" in System Preferences > Users & Groups > Login Items.