Multiple keypad in flash game

I am developing a flash game (2 players) that require the use of 2 similar wireless keypads.

In 2 player mode, player 1 is only able to use keypad 1 while player 2 can only use keypad 2.

Is there any software or tool that can help to identify the keypress of each keypad so that i can pass the data into flash?