How to change patterns with digital input

Hello. I have a pixelblaze 3.6 driving an 8x8 matrix. I am trying to use the digital inputs to control a pattern change, eg. I25 invokes “pattern 1” and I26 “pattern 2”. I will control the inputs by turning each on and off in a way that they both don’t come on at the same time. I have tried a few methods mentioned in the forum, but am having trouble with the code. I wonder if someone could write an example as outlined above so I could paste it in and learn from the code what to do. This would be much appreciated. Thanks.