Question: I have started to develop a simple 3D engine. I use OpenGL for rendering, and it is developed for Windows. It is all written in C.

How do I write an interface for the keyboard and mouse input? I would like to keep it as simple as possible - in contrast to the native Win32 input system.

Answer: 
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](http://wiki.libsdl.org/moin.cgi/APIByCategory#Input_Events). Pay attention to [SDL\_event](http://wiki.libsdl.org/moin.cgi/SDL_Event?highlight=%28%5CbCategoryStruct%5Cb%29%7C%28CategoryEvents%29%7C%28SGStructures%29) struct and [SDL\_PollEvent](http://wiki.libsdl.org/moin.cgi/SDL_PollEvent?highlight=%28%5CbCategoryEvents%5Cb%29%7C%28SGFunctions%29%7C%28CategoryStruct%29%7C%28CategoryEnum%29) function.
There are frameworks like [FreeGLUT](http://freeglut.sourceforge.net/) that give a basic input/output abilities with keyboard and mouse, but if you want more there are the [Visual C++ APIs](http://msdn.microsoft.com/en-us/library/windows/desktop/ms645530%28v=vs.85%29.aspx) for Windows.