I've trying to mess with Tabpanel and integrating it into my site. So far so good, but it'd be really nice (IMHO) to add a KeyListener to it, so when I press a certain key, the right tab will be displayed (instead of clicking on the tab). So far so good too ...

But when I'm in a text input field, and use that key too, the right tab will be opened as well. How do I prevent the KeyListener to work, only when I'm not in some input field? Any pointers?