Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
iProgramInCpp wrote:How would I go about moving the PS/2 keyboard handler to common PS/2 controller and separate devices?
That's really up to you. In a monolithic kernel, for example, your PS/2 controller driver would be a single module in charge of initializing the controller and generic functions for sending and receiving data on each port. Your PS/2 device drivers would each be their own modules, attached to the controller driver via function pointers, and responsible for translating between the data the device understands and the data your OS understands. Switch out the function pointers depending on what device you've detected on each port. (Of course, this is only an example. You don't have to do it exactly like this in your OS.)
iProgramInCpp wrote:Oh and I'm talking about initialization not interrupt handling.
Initialization can raise IRQs. You can't initialize the mouse port unless you're also handling both PS/2 IRQs.