keyboard: more defensive isListening check