Call this method to set the onkeypress attribute
HTMLElement Class | com.plumtree.xpshared.htmlelements Namespace