Mouse-Wheel Behavior

I have written some custom sub-classes for my module to change the mouse-wheel behavior. I understand the default VASSAL is:
mouse-wheel = scrolling vertical
CTRL+mouse-wheel = scrolling horizontal

I changed it for my module to:
mouse-wheel = scrolling vertical
SHIFT+mouse-wheel = scrolling horizontal (the default MacOS method)
CTRL+mouse-wheel = zoom in/out

Is there any reason why this should not be the standard VASSAL way of using the mouse-wheel in all modules?


from my sub-class of AdjustableSpeedScrollPane (parentMap is set in the constructor):

[code] viewport.addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent e) {
if (e.getScrollAmount() == 0) return;

    		  if (parentMap == null) return;
    		  
    		  Zoomer mapZoomer = parentMap.getZoomer();
    		  
    		  if (mapZoomer == null) return;

    		  if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
    			  if (e.isControlDown()) {
    				  // zoom
    				  int notches = e.getWheelRotation();
    				  int amount = e.getScrollAmount();

    				  for (int i = 0; i < amount; i++) {
    					  if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
    						  if (notches < 0) {
	    						  //UP
	    						  mapZoomer.zoomIn();
	    					  } else {
	    						  //DOWN
	    						  mapZoomer.zoomOut();
	    					  }
    					  }
    				  }

    			  } else {
    				  JScrollBar bar = e.isShiftDown() ?
    						  horizontalScrollBar :
    							  verticalScrollBar;
    				  if (bar == null || !bar.isVisible()) return;

    				  bar.setValue(
    						  bar.getValue() +
    						  e.getUnitsToScroll() *
    						  bar.getUnitIncrement()
    				  );
    			  }
    		  }
    	  }
      });

[/code]

Since AdjustableSpeedScrollPane is probably re-used in other places than just Map, this might be better:

[code] viewport.addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent e) {
if (e.getScrollAmount() == 0) return;

    		  Zoomer mapZoomer = null; 
    			  
    		  if (parentMap != null)
    			  mapZoomer =  parentMap.getZoomer();
    		  
    		  if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
    			  if ((mapZoomer != null) && (e.isControlDown())) {
    				  // zoom
    				  int notches = e.getWheelRotation();
    				  int amount = e.getScrollAmount();

    				  for (int i = 0; i < amount; i++) {
    					  if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
    						  if (notches < 0) {
	    						  //UP
	    						  mapZoomer.zoomIn();
	    					  } else {
	    						  //DOWN
	    						  mapZoomer.zoomOut();
	    					  }
    					  }
    				  }

    			  } else {
    				  JScrollBar bar = e.isShiftDown() ?
    						  horizontalScrollBar :
    							  verticalScrollBar;
    				  if (bar == null || !bar.isVisible()) return;

    				  bar.setValue(
    						  bar.getValue() +
    						  e.getUnitsToScroll() *
    						  bar.getUnitIncrement()
    				  );
    			  }
    		  }
    	  }
      });[/code]

Just noticed that since I changed it to SHIFT+mouse-wheel for horizontal scrolling my 2-axis mouse-wheel on my Logitech works as well, which it doesn’t with the CTRL VASSAL scrolling.

To moderator: I opened this thread under Feature Requests, as I guess that would be a better place than here. Maybe a good idea to close/delete this then.