public void update()
	{
		mouseReleased = false;

		upKeys.clear();

		for (int i = 0; i < NUM_KEYCODES; i++)
			if (!getKey(i) && currentKeys.contains(i))
				upKeys.add(i);

		downKeys.clear();

		for (int i = 0; i < NUM_KEYCODES; i++)
			if (getKey(i) && !currentKeys.contains(i))
				downKeys.add(i);

		currentKeys.clear();

		for (int i = 0; i < NUM_KEYCODES; i++)
			if (getKey(i))
				currentKeys.add(i);

		click = false;
	}