Trigger key events from a button

Hi
I would like to code an addon that emulates the numpad.
This would simply sit as a small toolbar in the toolshelf as a small group of buttons.
This should improve the workflow in that it allows the right hand to stay on the mouse instead of the moving to the numpad.
I know about 3D_Navigation addon however this implements specific default numpad operations.
I would like this addon to trigger the numpad key event to allow userprefs keybindings to remain as normal.
That’s my reasoning here is my problem.

It appears that the interface only responds to OS specific keyboard events and that triggering them is totally OS dependent.
Is this the case or is there somewhere in the API some way of triggering a keypress event.
I have googled and searched all over and it so far appears that it is OS specific and python API doesn’t provide the functionality.

Any ideas
Thanks Greg

You can’t trigger events in the python API, but button clicks are like calls of bpy.ops operators with a certain context, so you can kinda fake it. You can add default keybindings, which the user can tweak in the user preferences, as well as read existing bindings and call different operators accordingly.

Thanks I was starting to think that.
I think the cleanest way to do this is check the state of the Ctl Alt and Shift key, then respond accordingly.
Yep fake it is then.
I will probably just read in the keymaps from the user settings.
This is a long winded way of doing something simple.
Thanks again CoDEmanX

By the way do you think the idea of the addon has merit.
I am new to blender and havn’t settled into the interface yet.
I would like to hear your opinions.
The widget could be really small but really handy.
Thanks Greg