something like:

sub text1_keypress(keyascii as integer)
if keyascii=48 then
command0.press
end if
end sub