Hi Daniel
Thanks for your suggestions.
I tried the a and b swapping (the same example was given on ahk’s website). Plain a and b work, but f1 and sc05b or sc06b (f20) did not work.
In the meantime I have been working on a time format.
EG
::ttt::
FormatTime, Time,, yyyy-MM-dd
SendInput, %Time%
Return
Works fine when I use ttt (or b, or [, or anything that doesn’t belong to the function keys)
Doesn’t work when I try to use a function key, including sc05b, sc06b, etc in place of ttt.
My intention was to see if I can use a function key as a hotkey for inserting the date, but it doesn’t work also.
I’m thinking there are special things about the function keys that require different rules or something, but I don’t know autohotkey well enough to use them well.
Let me stress again that the f13-24 row work fine if I am simply mapping their scancodes to other keys. I've also checked with autohotkey's key logger which can recognize that these non-104key ANSI keys are being pressed.
eg sc06b::a returns a when that key is pressed.
Couple of things to try, as a test:
1) Use a and b instead of F1 and Sc05b
2) Use a bog standard keyboard
I'm a bit tired, but alaricljs's code appears to work fine for me with a and b. The above test should rule out any oddities with scancodes and keyboard compatibility.
Also, be aware that key swapping in AutoHotkey is (or at least, was) broken in XP. The problems I had in XP didn't occur in Windows 7, and the above a/b swap works fine for me in Windows 8.