@Override
	public void keyPressed(KeyEvent e) {
		if (e.getComponent() == wordSearchField) {
			shouldHide = false;
			switch (e.getKeyCode()) {
			case KeyEvent.VK_TAB:
			case KeyEvent.VK_RIGHT:
				if (this.wordSearchTips.getModel().getSize() > 0) {
					this.wordSearchField.setText(wordSearchTips.getModel()
							.getElementAt(0));
				}
				break;
			case KeyEvent.VK_ENTER:
				String keyword = wordSearchField.getText().trim();
				wordPanel.setCurWord(wordbook.search(keyword));
				shouldHide = true;
				listPanel.wordlist.setSelectedValue(keyword, true);
				break;
			case KeyEvent.VK_ESCAPE:
				shouldHide = true;
				break;
			default:
				break;
			}
		} else if (e.getComponent() == listPanel.wordlist) {
			if (e.getKeyCode() == KeyEvent.VK_ENTER) {
				if (wordbook != null) {
					String keyword = listPanel.wordlist.getSelectedValue();
					listPanel.lastselect = keyword;
					wordPanel.setCurWord(wordbook.search(keyword));
				}
			}
		}
	}