A solution could be to set up the same callback for each pin of interest:
for channel in channels_of_interest:
# add rising edge detection on a channel
GPIO.add_event_detect(channel, GPIO.RISING, callback=cb)
The callback, which I denoted cb, has a single argument that represents the channel being triggered:
if channel == 18:
According to https://gist.github.com/aitzol/1b1642712146adf5bcd8 we can use this simple code:
import RPi.GPIO as GPIO
data = input("Insert GPIO BCN number to check status (blank to quit): ")
if (data == ''):
number = int(data)
I have no reason to doubt that your tests are correct for the RPi.GPIO Python module.
If you need to have more events queued you could use the pigpio Python module. It will queue up hundreds of events.