[squeak-dev] How do I translate "sendKeyboardEvent: CR" to real code?

Eduardo Ochs eduardoochs at gmail.com
Fri Feb 3 14:24:09 UTC 2023

Hi list,

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!
  Eduardo Ochs

More information about the Squeak-dev mailing list