Not certain if you can get mouse / keyboard input from fb0. It is great fun though and you'll learn a great deal of how things work in the Unix world.
What you want to begin with is to use the open system call to open the file descriptor and from there you will use ioctl to set the parameters that you need. Then you'll basically just read and write to the fb as a regular file.
You might want to look into mmaping the file though then you can just access it as an array!
So what ioctl can you will probably find in man pages and by reading files in /usr/include
For reading keyboard and mouse input you'd like to use input devices found in the dev filessystem.
All of this might seem mighty strange but the input system is quite powerful.