@Override
	public void keyPressed(KeyEvent e)
	{
		if(selectedIndex != -1)
		{
			String chr = KeyEvent.getKeyText(e.getKeyCode());
			if(frame.buttons[selectedIndex].getText().indexOf(chr+" + ") == -1)
				frame.buttons[selectedIndex].setText(frame.buttons[selectedIndex].getText()+chr+" + ");
			
			if(e.getKeyCode() < 16 || e.getKeyCode() > 18)
			{
				keyString = (Boolean.toString(e.isShiftDown())+Boolean.toString(e.isControlDown())+Boolean.toString(e.isAltDown())).replace("true", "1").replace("false", "0")+keyString+e.getKeyCode();
				values[selectedIndex] = keyString;
				String lValue = frame.buttons[selectedIndex].getText();
				frame.buttons[selectedIndex].setText(lValue.substring(0, lValue.length()-3));
				frame.buttons[selectedIndex].setSelected(false);
				selectedIndex = -1;
			}
		}
	}