This was a transmitter hidden inside of a book. The prisoner used it to listen into the cell shakedown scheduled, as relayed by the guards.
Good thing they didn't make a spoon from a key.