Wie fragst du "beide" Tasten ab, wenn nur eine als Input gilt ?
Der code ist zwar sehr übersichtlich, ich nehm aber an, daß er nicht ganz vollständig ist.