You don't need scan codes for normal ASCII or Unicode keystrokes. If you want to get extended keystrokes (beyond the predefined ones like the F1-F12 keys), you're on your own. And whatever you come up with probably won't work on anybody else's system -- or on another one of your own systems. Or on the same system when you change your keyboard ...