I have written an character device, I want to declare it as the keyboard and use it to generate events from the virtual keyboard?
If you've written the character device driver yourself, and it is intended to be used as an input device, then you might be best off altering your driver to work as an input device instead of a generic character device.
Fortunately, there is some good documentation in the kernel tree, at:
For an online version, take a look at the input-programming.txt file in the linux tree on kernel.org.
Basically, you'll create a