### Warning: Most likely there's an easier solution ;-) ###
The signal from the keyboard is processed as a so called IRQ (Interrupt Request)...
These are part of the IDT (Interrupt Descriptor Table)...
These are handled by the Operating System... Or in your case the Keyboard Driver...
To trigger such an event, you just have to call the interrupt handler from the according IRQ (Number 1... I think)... This way you could simulate it ^^...