<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Ok. I don't know how horizontall
scrolling is supposed to work. But let's say that horizontall
scrolling is enabled when mouse scroll + modifier key.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Then, if I insert this hack, I can have
it for Ctrl key here on Linux:</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">generateMouseScrollEvent: evtBuf<br>
"Generate the appropriate mouse wheel event for the given raw
event buffer<br>
<br>
Copied from Sqeak 5.3 and modifed."<br>
<br>
| buttons modifiers stamp deltaX deltaY direction oldButtons |<br>
stamp evtBuf second.<br>
stamp = 0 ifTrue: [stamp := Time millisecondClockValue ].<br>
deltaX evtBuf third.<br>
deltaY evtBuf fourth.<br>
"This implementation deliberatly ignores movements in both
dimensions:"<br>
direction <br>
deltaY negative<br>
ifTrue: [ #down ]<br>
ifFalse: [ deltaY strictlyPositive<br>
ifTrue: [ #up ]<br>
ifFalse: [ deltaX negative<br>
ifTrue: [ #left ]<br>
ifFalse: [ deltaX strictlyPositive<br>
ifTrue: [ #right ]<br>
ifFalse: [ nil "No movement, bailing
out" ] ] ] ].<br>
modifiers evtBuf fifth.<br>
buttons (modifiers bitShift: 3) bitOr: (lastMouseEvent
buttons bitAnd: 7).<br>
oldButtons lastEventBuffer fifth <br>
bitOr: (lastEventBuffer sixth bitShift: 3).<br>
lastEventBuffer := evtBuf.<br>
"Hack"<br>
evtBuf sixth = 2 ifTrue: [<br>
direction = #up ifTrue: [direction #right].<br>
direction = #down ifTrue: [direction #left]].<br>
"End of hack"<br>
MouseScrollEvent new<br>
setType: #mouseScroll<br>
position: self morphPosition <br>
direction: direction<br>
buttons: (oldButtons bitXor: buttons)<br>
hand: self<br>
stamp: stamp</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">What I mean is, modifier keys are
available in evtBuf. But I'm probably making up when an horizontal
scrolling should be enabled.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"> Mariano<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">El 4/11/22 a las 12:45, Mariano Montone
escribió:<br>
</div>
<blockquote type="cite"
cite="mid:3520291f-feef-e0dd-2b2b-359bb29befbf@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">El 4/11/22 a las 12:27, Juan Vuletich
escribió:<br>
</div>
<blockquote type="cite" cite="mid:63652F79.9080804@cuis.st">
<blockquote type="cite" style="color: #007cff;">One thing: can
you look at the code for changing the depth via scroll + ctrl?
Doesn't work here on Linux, and I don't know what I may be
doing wrong. It'd be great you can fix that detail. <br>
</blockquote>
<br>
This seems to be a VM issue. If you hack
#generateMouseScrollEvent: to do `evtBuf print`, you'll see that
on the Mac it correctly reports both positive and negative
deltas both in Y and X. On Linux it only reports negative X and
positive Y. On Windows, it seems not to generate scroll events
at all. <br>
<br>
I think this is worth discussing in vm-dev. </blockquote>
<p>When I press Ctrl, or Alt, or Shift, plus MouseScroll, I see a
different mode indicator in the evtBuf. So, it is working, the
difference in the event is there. But I think it is not
translated to #left, #right to the Scroll event in Cuis. I'll
try to have a closer look.</p>
<p><br>
</p>
<p> Mariano<br>
</p>
<p><br>
</p>
</blockquote>
<p><br>
</p>
</body>
</html>