I have a both a T42p (that I don't use anymore) and a HHKB Pro 2.
T40 series keyboards' quality vary depending on the manufacturer (NMB, Chicony, Alps, etc). You need to remove the keyboard, get the part number on the underside label, and look it up to see what you have. I don't recall which manufacturer's keyboards were good... you should look up threads over at
forum.thinkpads.com. I wasn't able to get one of the better ThinkPad keyboards.
The HHKB Pro 2, is, well, the HHKB Pro 2. It's overpriced, yet still completely awesome.
My opinion is that the HHKB Pro 2 is a lot better than the ThinkPad keyboard. While the ThinkPad keyboard is good, and quite likely one of the best laptop keyboards, it's still a laptop keyboard.
The problem with the T40 series is that they're very old, and upgrade options are limited (DDR1 RAM is expensive, and it's difficult to find fast PATA drives). Since they're so old, manufacturing defects have been popping up that obviously aren't covered by long-expired warranties and can be expensive/risky to fix (i.e. discrete graphics soldering problems, motherboard cracking especially w.r.t USB, etc).
If I was in your position, I'd probably save the money for a newer, faster computer.