The event must define the getKey() method.
The event must have an attribute "type" (though the current
implementation does not actually use this, the information
should be available in ambiguous circumstances).

Key "pressed" event, doesn't include control characters,
and should provide "processed" characters, so that, for
instance, <shift>-<capslock>-A gives "a", not "A". Note also
that these are "full-press" events, not up/down notifications

Note: Attempts will be made to convert the character
to the "real" character typed (i.e. if shift is down
you should get 'F' instead of 'f' unless caps-lock is
also down). This is going to be fragile because it
may require trying to figure it out just from the
modifier states, and that won't work across keyboard
types.

modifiers -- (shift, control, alt) as a tuple of booleans.
function -- function taking a single argument (a KeypressEvent)
or None to deregister the callback.

The event must define the getKey() method.
The event must have an attribute "type" (though the current
implementation does not actually use this, the information
should be available in ambiguous circumstances).