public final void keyPressed(KeyEvent e)
	{
		lastKeyPressed = e.getKeyCode();		// returned by keyboard.key()
		//System.out.println("lastKeyPressed: " + lastKeyPressed);

       //System.out.print(" ID=" + e.getID());
       //System.out.print(" KeyCode=" + e.getKeyCode());
       //System.out.print("KeyChar=\"" + e.getKeyChar() + "\" " + (int)e.getKeyChar());
       //System.out.println();

		shiftPressed = e.isShiftDown();
		ctrlPressed  = e.isControlDown();
		altPressed   = e.isAltDown();
		if (lastKeyPressed == KeyEvent.VK_ESCAPE)
		{
			if (shiftPressed)
				suspended = !suspended;
			else
				playing = false;
		}
		else if (suspended && lastKeyPressed == KeyEvent.VK_F1)
		{
			suspended = false;
			oneStep = true;
		}
		else
		{
			String loc = "X";
			//if (e.getKeyLocation() == e.KEY_LOCATION_LEFT) loc = "L";
			//else if (e.getKeyLocation() == e.KEY_LOCATION_RIGHT) loc = "R";
			//else if (e.getKeyLocation() == e.KEY_LOCATION_NUMPAD) loc = "N";
			String hashkey = loc + e.getKeyCode();
			synchronized(lock3)
			{
				if (typematicIsOff &&
				    keysThatAreDown.get("Y" + e.getKeyCode()) != null)
				    ; // do nothing, we are supressing multiple keyPress events
				else
					keysThatAreDown.put(hashkey, "*");		// note that key is down
			}
		}
	}