@Override
	public void keyPressed(KeyEvent ke) {
		if(ke.getKeyChar() == 'c') {
			lastTool = curTool;
			curTool = 2;
		} else if(ke.getKeyChar() == 'l') {
			lastTool = curTool;
			curTool = 3;
		} else if(ke.getKeyChar() == 'f') {
			lastTool = curTool;
			curTool = 1;
		} else if(ke.getKeyChar() == 'd') {
			lastTool = curTool;
			curTool = 0;
		} 
		
		if(ke.getKeyCode() == KeyEvent.VK_EQUALS) {
			scale *= 2;
			if(scale > 32) {
				scale = 32;
			}
			tp.setScale(scale);
			tp.repaint();
			this.texturePane.revalidate();
		} else if(ke.getKeyCode() == KeyEvent.VK_MINUS) {
			scale /= 2;
			if(scale < 1) {
				scale = 1;
			}
			tp.setScale(scale);
			tp.repaint();
			this.texturePane.revalidate();
		}
		
		this.texturePane.getHorizontalScrollBar().setUnitIncrement(scale);
		this.texturePane.getVerticalScrollBar().setUnitIncrement(scale);
		
		this.setTool(curTool);
	}