dynamic triangle drawing, keypress recording