Key.getCode() not returning anything for Enter key

I’m using following code to trap the key press events.
myListener = new Object ();
myListener.onKeyDown = function ()
if (Key.getCode()==13)//code for ENTER key is 13
trace (“asdf”);
Key.addListener (myListener);

Now when I hit ENTER nothing is traced and “asdf” isn’t printed,
while hitting anyother key gives it’s code in output.

Any clue?