There is more than one one way to skin the cat. If I understand correctly, you want to be able to take input from keyboard and mouse and use that to control stuff in your engine. But to write such interface from scratch, by yourself, would not only be a classic case of reinventing the wheel, but also, a very tedious task (think about it... you want to be able to support PS/2 and USB mice, as well as keyboards and you must admit, testing whether there's something present in a particular port, polling through USB hubs and ports... it's too much hassle when there's already available software to do that for you, right?)
So you will save much time using an already developed interface/framework of that kind. Such a component is a part of already mentioned FreeGLUT, but there is also SDL, which handles not only that, but also window manipulation, threading and more. Check it out. Pay attention to SDL_event struct and SDL_PollEvent function.