[squeak-dev] Re: Unique Mouse Wheel Events

David T. Lewis lewis at mail.msen.com
Tue Mar 24 12:02:07 UTC 2015


On Tue, Mar 24, 2015 at 01:09:42AM -0700, Marcel Taeumel wrote:
> Let me elaborate this a little bit more.
> 
> I claim that tools (in-image) should provide feasible interaction techniques
> for all kinds of common user input methods. For example, a calculator
> application should be usable with both mouse and keyboard input. Some users
> may have no mouse attached or just prefer hitting keys. It's the tools' job
> to think about that -- not the VM's.
> 
> Now, we want to be cross-platform compatible and thus we need a mapping from
> operating system-specific user input events to Smalltalk image-land. This is
> already done for some events. At the moment, the image gets some arrays with
> magic numbers and decodes it to real objects such as KeyboardEvent and
> MouseEvent. However, this mapping needs to be *injective* (math speak) and
> must not mask any user input information (like CTRL+LEFTCLICK does).
> 
> (https://en.wikipedia.org/wiki/Injective_function)
> 
> What kinds of events do operating systems provide nowadays?
> 
> * keyboard events (w/ modifiers, deadkeys, etc.)
> * mouse click events (w/ modifiers)
> * mouse wheel events
> * touch events
> * ...
> 
> We should support those events at VM-level and pass them using an apropriate
> format to Smalltalk-level.
> 
> To give you an impression on this kind of cross-platform abstraction, take a
> short look at the Qt API and its QInputEvent inheritance tree:
> http://doc.qt.io/qt-5/qinputevent.html
> 
> On backwards compatibility: A simple change set could be loaded into older
> images to perform that old-style event mapping in the image (HandMorph >>
> #processEvents).
> 

Marcel,

Thanks for raising this topic, and for providing the references.

Providing a good abstract representation of input events for both the VM
and the image would be a very worthwhile project. It is also becoming more
important as we consider devices with touch and swipe inputs.

The SqueakJS VM makes it amazingly easy to run Squeak on my cell phone,
but we do not yet have a good model for the user input interactions.

Dave



More information about the Squeak-dev mailing list