private void inputPaneKeyPressed(java.awt.event.KeyEvent evt) {
		if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
			history.add(inputPane.getText());
			historyPos = 0;
			String text = getIrcString(inputPane.getText());
			ch.write(text);
			if (text.indexOf("PRIVMSG") != -1) {
				writeOutput("<" + nickname + "> " + text.split(":")[1]);
			}
			inputPane.setText("");
			evt.consume();
		} else if (evt.getKeyCode() == KeyEvent.VK_UP) {
			if (historyPos == 0)
				origString = inputPane.getText();
			if (history.size() - historyPos > 0) {
				historyPos++;
				inputPane.setText(history.get(history.size() - historyPos));
			}
		} else if (evt.getKeyCode() == KeyEvent.VK_DOWN) {
			if (historyPos > 0) {
				historyPos--;
				if (historyPos == 0) {
					inputPane.setText(origString);
				} else {
					inputPane.setText(history.get(history.size() - historyPos));
				}
			}
		}
	}