public static String keyPressed(int i, String string){

		if(keyState[ANYKEY] && !prevKeyState[ANYKEY]){
			String s = KeyEvent.getKeyText(keyCode);
			if(s.length() == 1)
				string +=s;
			if(keyCode == KeyEvent.VK_BACK_SPACE && string.length() > 0){
				String s2 = string.substring(0, string.length()-1);
				string = s2;
			}
			if(keyCode == KeyEvent.VK_SPACE)
				string+=" ";
			
			System.out.println("key typed "+s);
			System.out.println("string returned " + string);
		}
		return string.toLowerCase();
	}