[squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel"

marcel.taeumel Marcel.Taeumel at hpi.de
Tue Jun 7 06:25:22 UTC 2016


Chris Muller-3 wrote
> It makes scrolling very choppy.  Instead of scrolling by 3-lines at a
> time, it scrolls by about 10...
> 
> Shouldn't "Send Mouse Wheel Events to Keyboard Focus" be controlled by
> mouseOverForKeyboardFocus?
> 
> On Mon, Jun 6, 2016 at 10:50 AM, marcel.taeumel <

> Marcel.Taeumel@

> > wrote:
>> Hi, there.
>>
>> Here is a change set that adds MouseWheelEvent and everything related to
>> it
>> (including EventHandler):
>> mouse-wheel-events.cs
>> <http://forum.world.st/file/n4899428/mouse-wheel-events.cs>
>>
>> You have two new preferences (in "Morphic", "keyboard", "mouse"
>> categories):
>>
>> [x] Synthesize Mouse Wheel Events from Keyboard Events
>> [x] Send Mouse Wheel Events to Keyboard Focus
>>
>> Both are enabled by default.
>>
>> I refactored the old-style wheel scrolling to use an event filter in
>> ScrollPane but this is regarded a fall-back only and can be used for old
>> applications.
>>
>> The mouse wheel event synthesis is implemented as keyboard event capture
>> filter in HandMorph itself. See the changeset's postload script or
>> HandMorph
>>>> #initForEvents. Once our VMs deliver real mouse wheel events, we can
>> change that and adapt HandMorph >> #generateMouseEvent:.
>>
>> The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used
>> to
>> switch between Windows and OS X behavior.
>>
>> Please, try it out.
>>
>> Best,
>> Marcel
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>

Hi Chris,

there should be no change in the observable behavior by this change. In my
image, it still scrolls 3 text lines in a text morph and 3 items in a list
morph. This is specified in ScrollPane >> #mouseWheel: (resp: ScrollPane >>
#scrollByKeyboard:). Could you please inspect the vertical scrollbar of one
text morph and one list morph and tell me the value of "scrollDelta"? And,
if you have time, could you try it in a fresh Squeak Trunk image? You are
working under Ubuntu Linux?

If the preference #mouseOverForKeyboardFocus is enabled, "Send Mouse Wheel
to Keyboard Focus" has no effect because the keyboard focus is always where
the mouse cursor is. However, there are many users that do disable
#mouseOverForKeyboardFocus and wished for the Mac behavior for a very long
time. Bert, for example. Now, you can make scrolling by mouse wheel behave
like on the Mac:

[ ] mouseOverForKeyboardFocus
[x] Send Mouse Wheel Events to Keyboard Focus
[x] Synthesize Mouse Wheel Events from Keyboard Events

Best,
Marcel



--
View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899504.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list