[squeak-dev] Re: Unique Mouse Wheel Events

Marcel Taeumel marcel.taeumel at student.hpi.uni-potsdam.de
Tue Mar 24 08:09:42 UTC 2015


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).

Best,
Marcel



--
View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814662.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list