Possible to read buttons from HID devices?

Good afternoon all,

About a month ago, I got started in AppleScript for a client, then as the project requirements added up I moved to AppleScript Studio to develop better quality applications. I am still quite relatively new to AS Studio, and was wondering if anyone could help point me in the right direction for the question I have, or even if it can be done with AS Studio.

My question is, is it possible to read if a button is pushed on an HID device using AS Studio?

For example, we have a custom keypad device that contains 50 or so buttons. Each button performs a different function. We are currently using ControllerMate in order to read this custom device’s buttons, and then perform applescripts based on which button was pushed. It would be sweet if we could eliminate the middleman, so to speak, and read from this custom device using AS Studio itself so everything is handled with one application, not two.

I would be extremely grateful if anyone could point me in the right direction. Thank you!