Try to make key acceptance logic clearer