diff --git a/matrix_keypad/RPi_GPIO.py b/matrix_keypad/RPi_GPIO.py index ad8400f..eec0ad2 100644 --- a/matrix_keypad/RPi_GPIO.py +++ b/matrix_keypad/RPi_GPIO.py @@ -72,7 +72,7 @@ def getKey(self): colVal=j # if colVal is not 0 thru 2 then no button was pressed and we can exit - if colVal <0 or colVal >2: + if colVal <0 or colVal > len(self.COLUMN): self.exit() return