Help! AutoHotKey script to swap Ctrl+V and Ctrl+Shift+V

Since Scrivener b23 does not allow the user to swap the shortcuts for Paste and Paste and Match the Style, I was advised to use AutoHotKey or something similar swap the functions for now. For more info about the problem see this thread.

I installed AutoHotKey, thinking it would be easy to use, but for me, it’s overwhelming. I don’t even know where to begin. What I want the script to do is to swap Ctrl+V and Ctrl+Shift+V but only in Scrivener latest beta.

I’ll be grateful if somebody can share a script that can do that, or point me to a place where I can find one.

Thank you,
M

Something like the following should work:

#IfWinActive, ahk_exe scrivener.exe ^v::^+v #IfWinActive, ahk_exe scrivener.exe ^+v::^v

I don’t like the inelegance of the multiple entries, but when I tried a block of code with send commands, it resulted in an infinite loop of key presses.

Note that I tested the above by swapping the A and B keys in Notepad and it worked without a problem. My beta version of Scrivener expired on the 15th, so I can’t actually test this on a working version of the application myself. (Oddly, nobody else has complained about this. Maybe the initial version of the beta I installed had an earlier expiry date for some reason.)

Are you actually on beta 23?

I could have sworn I was. I always install the version on the site on the first of each month. But the version I had installed on the first of September said “This Scrivener for Windows Beta expired after September 15, 2019.” So, I assumed it had been given a shorter expiry cycle for some reason.

The version of 23 I just installed now gives me the more expected message of it expiring after “September 30.”

Found this in AutoHotKey’s Help, under #MaxHotkeysPerInterval .

Rgds - Jerome

Tried that – caused another issue in Scrivener. Shouldn’t, I know, but it did. I’m working with double-spaced text, and when I used ^V to produce ^+V to paste and match style, I got single-spaced text in a double-spaced set of paragraphs. Not sure why, exactly.

However,

#IfWinActive, ahk_exe scrivener.exe ^v::Send ^+v #IfWinActive, ahk_exe scrivener.exe ^+v::Send ^v

seems to work just fine on my machine.

Thank you all. The code:

does exactly what I needed. I’m grateful for your help.

Regards,
M