Capturing and refiring keyboard events

I have an application which needs to be capable of processing the Enter Key as the Tab Key. Intercepting the Enter Key is straight forward enough. In the onItemKeyPress event, I want to pass the event on as if the Tab key was pressed.

theForm.addItemKeyPressHandler(new ItemKeyPressHandler() {
	public void onItemKeyPress(ItemKeyPressEvent event) {
	             if (event.getKeyName().equalsIgnoreCase("enter")) {
	                    
                             ... pass on event with Tab key pressed event ...

		}
	}
});

Do you get to fire the tab event?

If I type the example code I get always the same error message:
in FF: -> “missing ) after argument list”
in Chrome: “Uncaught SyntaxError: Unexpected token {”

Thanks in advance.