I looked into AutoHotKey when I saw your article about turning any keyboard into an HHKB, but apparently it doesn't let you use scan codes, so for what I want to do, it would be necessary to modify the (supplied) source code.
What I want to do is:
1) Turn Scroll Lock into a "mode" key, to select from a number of possible key mappings.
2) Turn Caps Lock into Ctrl
3) Turn left Ctrl into a "Fn" key, to allow access to extra keys.
Then I can get the two "lost" keys back, and add many others.
Thus: Fn-J is Scroll Lock. Fn-K is Caps Lock. Fn-L could be the international key, and Fn-M the Windows Menu key.
Fn-F1 through Fn-F12 can be, in imitation 122 mode, PF13 through PF24. Fn-1 through Fn-0 can take the place of the keys on the side (that, confusingly, have the F1 - F10 scan codes) with F1 through F12 being, in that mode, remapped to PF1 - PF12.
Another mode would let the keyboard pretend to be a Japanese keyboard.
I could get more extreme, and use the Tab key as the Windows Shift key, lettng Fn-U perhaps be the tab key, so that a 101-key keyboard would no longer suffer the lack of Windows keys (since making a shift key Fn-something isn't workable). Of course, going that route, I could easily choose a key that is not ideal in terms of rollover.