handles.add(addDomListener(getTextInputElement(), "keydown", handlers));
handles.add(addDomListener(getTextInputElement(), "keypress", handlers));
handles.add(addDomListener(this.<Element>cast(), "focus", handlers));
handles.add(addDomListener(this.<Element>cast(), "blur", handlers));
return new HandlerRegistration()
{
public void removeHandler()
{
while (!handles.isEmpty())
removeDomListener(handles.remove());