add conditions to mouseup.charcout event