For the pins you have these lines of code
if ((IER &= (byte)(0b00000010)) == 0b00000001)
You never changed the byte to be anded with, so it only works for ca1, and also using &= instead of & would alter the value of IER which I don't think is what you want
(this issue was addressed in my pull request, along more major additions like the serial interface window and realistic keyboard to be compatible with what ben showed in his videos, so i will close this now)
For the pins you have these lines of code
if ((IER &= (byte)(0b00000010)) == 0b00000001)
You never changed the byte to be anded with, so it only works for ca1, and also using &= instead of & would alter the value of IER which I don't think is what you want