private void toggleKey(int code, boolean isPressed) {
		switch(code) {
		case KeyEvent.VK_LEFT:
			m_keys[KEY_LEFT] = isPressed;
			m_lastKey = KEY_LEFT;
			break;
		case KeyEvent.VK_RIGHT:
			m_keys[KEY_RIGHT] = isPressed;
			m_lastKey = KEY_RIGHT;
			break;
		case KeyEvent.VK_UP:
			m_keys[KEY_UP] = isPressed;
			m_lastKey = KEY_UP;
			break;
		case KeyEvent.VK_DOWN:
			m_keys[KEY_DOWN] = isPressed;
			m_lastKey = KEY_DOWN;
			break;
		case KeyEvent.VK_SPACE:
			m_keys[KEY_ACTION] = isPressed;
			m_lastKey = KEY_ACTION;
			break;
		}
	}