Just to clarify...
The $self that goes with updt is implicit in the value of the attribute
$self->{sub_to_call_on_keypress}
whereas the $self explicit in the the above attribute is the SAME self that is also explicit in the attribute
$self->{contents}