keyboardEvent

I’ve looked on the internet and this forum and I still haven’t found anything that works for key capture. I’ve found a couple of classes made by senocular, but I cannot for the life of me get them to work. The last one I tried was his KeyObject.as with the code listed in the remarks of the class implemented in Flash like so, but it never did a thing:

var key:KeyObject = new KeyObject(stage);
if (key.isDown(key.LEFT)) { trace("left"); }

I don’t have a project that needs it right now, but I am trying to learn what is possible so I can figure out cool ways to use it. Is it possible to know what key was being pressed when an object is clicked or mouse over? Like a shift key modifier.

Also, I’ve tried some code from the Flash CS3 help file and it did work as long as you open it and then start hitting keys, but all trace() functions stop reporting as soon as anything is clicked. That code was the furthest I ever got, but what good is it if it only works as long as you only interact with the keyboard?

Honestly, I am frustrated beyond belief right now! What am I missing? What do I need to keep in mind to implement KeyboardEvents in different ways? What are the limitations?