The glass break sensors I've seen which aren't physically attached to the glass pane itself work by detecting high frequency noises. I guess the jangling keys produced a note at the right frequency for it to trigger.