I'm so glad to hear that you have found a solution to this issue since it's been plaguing you for years now (as it seems).
I was thinking about this at dinner and I was about to come here and make another suggestion post that was going to point towards the drivers. I know, sounds like I just want credit for figuring something out that you just posted a solution to but seriously that's not the case. I was thinking along the lines of it being a software issue since everything we tried pointed towards such. The only logical software options would be Skyrim itself or a driver/programs used by some of your specific hardware. I was going to suggest that you remove all keyboard drivers and software and get the latest versions but alas that isn't necessary now.
Regardless of all that the problem has been fixed for you and now you're off to play the game like you should be. Hopefully the controlmap.txt and AHK (as well as everything else you might have learned about via this thread) can be put to use for you somehow. I can say that if you spend some time getting the controlmap.txt file to your liking you shouldn't have any more keyboard issues that seem to crop up with every patch. Also, if you use AHK for the UI bound keys you can keep them at their defaults so that the UI isn't made into a liar yet have the keys you specifically want for those actions set to however you wish.
At any rate, best of luck and enjoy the game with a properly working keyboard configuration
