Get keycode on keypress, keydown or keyup in textfield

Hello,

i am trying to add a check for password-fields if caps-lock is active.

Therefore I want to use my old function "check_capslock(e)". I don't know how to map that function to a textfield. I found various methods to do, but nothing works. I downloaded the newest version of ExtJs today.

Here is my last try. I think "*" will not work, but I want to call that function if ANY character is pressed.

Still the same question:How to listen on keypressed or keyup events on Ext.form.TextField ??

-----------------------------------------------------------------------------------
well, I found the solution.
the on method must be called NOT on the Ext.form.TextField object (surprise!)
but on the Ext.form.TextField.getEl() function (?? why is this not documented??)