FLTK logo

Re: [RFE] STR #3521: Allow shift+scroll for horizontal scrolling

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.bugs  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [RFE] STR #3521: Allow shift+scroll for horizontal scrolling Manolo Gouy May 19, 2019  
 
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: https://www.fltk.org/str.php?L3521
Version: 1.4-feature


I tried to process wheel+shift events as equivalent
to horizontal movements by doing this starting at
line #1973 of file src/Fl_x.cxx :

  case ButtonPress:
    Fl::e_keysym = FL_Button + xevent.xbutton.button;
    set_event_xy(window);
    Fl::e_dx = Fl::e_dy = 0;
    if (xevent.xbutton.button == Button4) {
      Fl::e_dy = -1; // Up
      event = FL_MOUSEWHEEL;
    } else if (xevent.xbutton.button == Button5) {
      Fl::e_dy = +1; // Down
      event = FL_MOUSEWHEEL;
    } else if (xevent.xbutton.button == 6 || (xevent.xbutton.button ==
Button4 && xevent.xbutton.state & ShiftMask)) {
	Fl::e_dx = -1; // Left
	event = FL_MOUSEWHEEL;
    } else if (xevent.xbutton.button == 7 || (xevent.xbutton.button ==
Button5 && xevent.xbutton.state & ShiftMask)) {
	Fl::e_dx = +1; // Right
	event = FL_MOUSEWHEEL;
    } else {
      Fl::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
      event = FL_PUSH;
      checkdouble();
    }

But, on my setup which is Ubuntu within Virtualbox on macOS,
something swallows altogether events when the mouse wheel
is moved AND shift is pressed: function fl_handle(const XEvent& )
doesn't even run. That is possibly caused by VirtualBox on macOS
since you report that shift+wheel with the patched Fl_Scrollbar.cxx
does activate the horizontal scroll with VirtualBox on windows.


Link: https://www.fltk.org/str.php?L3521
Version: 1.4-feature


Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.