I want to capture the TAB keypress, cancel the default action and call my own javascript function.
Try this:
$('#contra').focusout(function (){ $('#btnPassword').focus(); });