Key Codes

I need help with key codes. this is what i got and it dont wrk:
[AS]onClipEvent(load) {
var key = Key.getCode();
}
onClipEvent(enterFrame) {
if (key == 68) {
trace(“Problem Fixed”);
}
}[/AS]