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.
=============== 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].!
Hi
On 07.11.2018, at 21:34, commits@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].!
Does that mean that ctrl-left/right can no longer be used to move
word-wise?
Just askin.
Best regards -Tobias
Hmm. Sorry. That's what it means, unfortunately. I did not notice because I don't really use Ctrl-left/right to move word wise myself. Bummer.
The part of ScrollPane>>mouseWheel: that adds support for left/right scrolling should probably be somewhere else, perhaps in PluggableListMorph, I'm not sure right now. Bad idea to bundle it with the other thing.
Anyway, if you merge the HandMorph>>#filterEvent:for: then the original problem goes away.
-- Milan
-- Sent from: http://forum.world.st/Squeak-Dev-f45488.html
Sorry, please disregard the "Inbox: Morphic-mva.1465.mcz" -- Milan
-- Sent from: http://forum.world.st/Squeak-Dev-f45488.html
Tobias Pape wrote
Does that mean that ctrl-left/right can no longer be used to move word-wise? Just askin.
I only skimmed but it looks like the original solution in Pharo before we abandoned it for the above reason. The workaround was to send a keystroke with all modifiers pressed to make conflicts less likely. Elliot just asked about the VM-side of this on the VM list [1]. Coincidence?
1. http://forum.world.st/On-community-development-of-the-VM-s-platform-code-tp5...
----- Cheers, Sean -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html
On Wed, Nov 7, 2018 at 2:19 PM Sean P. DeNigris sean@clipperadams.com wrote:
Tobias Pape wrote
Does that mean that ctrl-left/right can no longer be used to move word-wise? Just askin.
I only skimmed but it looks like the original solution in Pharo before we abandoned it for the above reason. The workaround was to send a keystroke with all modifiers pressed to make conflicts less likely. Elliot just asked about the VM-side of this on the VM list [1]. Coincidence?
http://forum.world.st/On-community-development-of-the-VM-s-platform-code-tp5...
Setting all modifier bits to indicate the fake wheel event seems like a good short-term solution (*). Just need to have all VMs do this.
(*) the actual solution being to add a new event type to all VMs.
- Bert -
I tried my luck on the actual solution: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/303?
As written on the PR, all seems to work fine without needing to change anything in the image, but more testing should be done.
________________________________ From: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org on behalf of Bert Freudenberg bert@freudenbergs.de Sent: Wednesday, November 7, 2018 11:43 PM To: The general-purpose Squeak developers list Subject: Re: [squeak-dev] The Inbox: Morphic-mva.1465.mcz
On Wed, Nov 7, 2018 at 2:19 PM Sean P. DeNigris <sean@clipperadams.commailto:sean@clipperadams.com> wrote: Tobias Pape wrote
Does that mean that ctrl-left/right can no longer be used to move word-wise? Just askin.
I only skimmed but it looks like the original solution in Pharo before we abandoned it for the above reason. The workaround was to send a keystroke with all modifiers pressed to make conflicts less likely. Elliot just asked about the VM-side of this on the VM list [1]. Coincidence?
1. http://forum.world.st/On-community-development-of-the-VM-s-platform-code-tp5...
Setting all modifier bits to indicate the fake wheel event seems like a good short-term solution (*). Just need to have all VMs do this.
(*) the actual solution being to add a new event type to all VMs.
- Bert -
squeak-dev@lists.squeakfoundation.org