[squeak-dev] The Inbox: Morphic-mva.1465.mcz
Tobias Pape
Das.Linux at gmx.de
Wed Nov 7 20:57:15 UTC 2018
Hi
> On 07.11.2018, at 21:34, commits at source.squeak.org wrote:
>
> A new version of Morphic was added to project The Inbox:
> http://source.squeak.org/inbox/Morphic-mva.1465.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-mva.1465
> Author: mva
> Time: 7 November 2018, 9:30:51.376226 pm
> UUID: 8ece769f-8df7-436c-8d42-37f798a6849a
> Ancestors: Morphic-eem.1464
>
> Convert Ctrl-left/right to mouse wheel events to fix
> "VM sending keystrokes on mouse-wheel?"
> http://forum.world.st/VM-sending-keystrokes-on-mouse-wheel-td5088162.html
> using Tom Beckmann's idea.
>
> Use the generated wheeelLeft and wheelRight
> events in ScrollPane to scroll sideways if horizontal
> scrollbars are not suppressed by
> alwaysHideHScrollbar preference.
Does that mean that ctrl-left/right can no longer be used to move word-wise?
Just askin.
Best regards
-Tobias
>
> =============== Diff against Morphic-eem.1464 ===============
>
> Item was changed:
> ----- Method: HandMorph>>filterEvent:for: (in category 'events-filtering') -----
> filterEvent: aKeyboardEvent for: aMorphOrNil
> "Fixes VM behavior. Usually, there are no mouse wheel events generated by the VM but CTRL+UP/DOWN. Convert these into mouse wheel events.
>
> We installed ourself as keyboard filter only!! No need to check whether this is a keyboard event or not!! See HandMorph >> #initForEvents.
>
> Might be removed in the future if this mapping gets obsolete."
>
> HandMorph synthesizeMouseWheelEvents ifFalse: [^ aKeyboardEvent].
>
> (aKeyboardEvent isKeystroke and: [aKeyboardEvent controlKeyPressed]) ifTrue: [
> aKeyboardEvent keyCharacter caseOf: {
> [Character arrowUp] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: 2r1000].
> [Character arrowDown] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: 2r0100].
> + [Character arrowLeft] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: 2r0010].
> + [Character arrowRight] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: 2r0001].
> } otherwise: [^ aKeyboardEvent]].
>
> ^ aKeyboardEvent!
>
> Item was changed:
> ----- Method: ScrollPane>>mouseWheel: (in category 'event handling') -----
> mouseWheel: evt
>
> evt isWheelUp ifTrue: [scrollBar scrollUp: 3].
> + evt isWheelDown ifTrue: [scrollBar scrollDown: 3].
> + evt isWheelLeft ifTrue: [hScrollBar scrollUp: 3].
> + evt isWheelRight ifTrue: [hScrollBar scrollDown: 3].
> + !
> - evt isWheelDown ifTrue: [scrollBar scrollDown: 3].!
>
>
More information about the Squeak-dev
mailing list
|