Flash reading Hardware inputs (other than keyboard)

Hi all,

I was wondering what kind of process is going on behind the scenes when Flash reads a keyboard stroke?

I have a custom hardware device with physical inputs and I need to link it to a flash interface? I know programming languages like Processing can do this, but what about flash?

Flash reads regular keyboard strokes, can it read hardware buttons emulated as keyboard keys? What sort of software / programming / drives do I need? What are we really talking about here?

Can you create your own ‘custom’ key stroke with action script?

thanks!

haus