moving code from UNO to MEGA: not working anymore

but I did not understand why it worked and I'm curious... can you enlight me?

I've tried. You are not listening. The Mega does not support pin change interrupts on pins 2 and 3.