[squeak-dev] How do I translate "sendKeyboardEvent: CR" to real code?
marcel.taeumel at hpi.de
Fri Feb 3 15:03:46 UTC 2023
Hi Eduardo --
Maybe take a look at
UserInputEventTests >> #keystroke:at:
Am 03.02.2023 15:24:33 schrieb Eduardo Ochs <eduardoochs at gmail.com>:
suppose that I am exploring a morph and want to use the debugger to
understand what happens when I send a CR to one of its submorphs. I
guess that a good way to do that would be to run a one-liner like this
in the explorer window,
42 halt. (self submorphs at: 1) sendKeyboardEvent: CR.
but this is just pseudo-code, of course... I've spent some hours on
the swiki and browsing the source code of methods and classes that
looked promising, like these ones,
but I couldn't find any code that generates a keyboard event itself
and sends it to a morph... I know how to add a breakpoint to a
keyDown: method, but debugging that breakpoint would start the
debugger in a place in which a keyboard event had already been
generated, and is being processed - and I'm looking for a way to do
something that is several steps before that (break)point.
Any hints? Translations of the "sendKeyboardEvent: CR" above to real
code - either low-level or high-level - would be ideal, but links
can help me a lot too, of course...
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev