As I've explained, you cannot use BIOS interrupts in Windows because they are intercepted. As unfortunate as it is, it's just part of the way that the system works. You cannot use any of the truly low-level ASM that you're wanting to use because the CPU is running in 'protected' mode. If the system has started Windows, then the lower-level BIOS calls are inaccessible directly. If you load something before the CPU switches from 'real' mode to 'protected' mode then when it actually makes the switch, that software is no longer running and it's useless at that point. The lowest that you can get, within Windows, is via the kernel itself. Your best bet for a keylogger is to create a [virtual] device driver that interposes itself within the rest of the scheme to intercept keyboard I/O prior to handing it off to the normal driver for processing. You will still likely want some userland process, though at this driver level you can hide that process's existence. The userland process will be able to suss out other properties, like which website one visits & what input box someone clicked on, that would be important for information gathering.
Putting all of this together; you need to learn to build a rootkit. This also gets you closer to interfacing directly with the hardware and more options may open. I would suggest, personally, not trying to replace the keyboard driver altogether but ensure that you understand how it works. You'll be receiving messages quickly and you cannot afford to let the system wait on your code so trying to compress scancode logs at this level would be a poor idea. Separate & modularize your code. You can hand it off to other things to do the extra work for you. All you need running at ring0 is something that intercepts & forwards keyboard input and possibly something to hide & manage your processes. Designing the code for this is easy, getting it into ring0 is not as easy. Additional research on rootkits will help you.
Please be respectful of the knowledge that you are seeking and the minds that help you find it.