In the 18-ev3dev kernel release, we fixed a long standing bug with the EV3 buttons. 1 for pressed and 0 for released were reversed. This most likely breaks some of the button code. You probably need to remove the not here. Not sure if other changes need to be made, so please test.