public void keyPressed(KeyEvent e) {
			if (e.isControlDown()) {
				switch (e.getKeyCode()) {
				case KeyEvent.VK_DOWN:
					// zoom in, mag gets bigger
					total_mag *= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					x_max *= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					x_min *= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					y_max *= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					y_min *= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					break;
				case KeyEvent.VK_UP:
					// zoom out, mag gets smaller
					total_mag /= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					x_max /= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					x_min /= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					y_max /= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					y_min /= MAG_INCREMENT_PER_MOUSE_WHEEL_NOTCH;
					break;
				}
			} else {
				double dx = 0;
				double dy = 0;
				switch (e.getKeyCode()) {
				case KeyEvent.VK_RIGHT:
					dx = -.025 * (x_max - x_min);
					break;
				case KeyEvent.VK_DOWN:
					dy = .025 * (y_max - y_min);
					break;
				case KeyEvent.VK_LEFT:
					dx = .025 * (x_max - x_min);
					break;
				case KeyEvent.VK_UP:
					dy = -.025 * (y_max - y_min);
					break;
				}
				x_max += dx;
				x_min += dx;
				y_max += dy;
				y_min += dy;
			}
			repaint();
		}