added keypress and fixed negation