@Override
	public boolean dispatchKeyEvent(KeyEvent e) {
		
		if (!active) {
			return false;
		}
		
		if(e.getExtendedKeyCode() == KeyEvent.VK_TAB) {
			if(e.getID() == KeyEvent.KEY_RELEASED) {
				gui.hideAndShowToolbars(e.isShiftDown());
			}
			return true;
		}
		
		if(e.getExtendedKeyCode() == KeyEvent.VK_A && e.isControlDown()) {
			if(e.getID() == KeyEvent.KEY_RELEASED ) {
				gui.selectAll();
			}
			return true;
		}
		
		if(e.getExtendedKeyCode() == KeyEvent.VK_D && e.isControlDown()) {
			if(e.getID() == KeyEvent.KEY_RELEASED ) {
				gui.deselectAll();
			}
			return true;
		}
		
		
		
		return false;
	}