AND is the most often-used operator to detect multiple button pressing. If you press L without pressing R, ((K AND #L)!=0)==TRUE, ((K AND #R)!=0)==FALSE If you press R without pressing L, ((K AND #L)!=0)==FALSE, ((K AND #R)!=0)==TRUE If you press both L and R at the same time, ((K AND #L)!=0)==TRUE, ((K AND #R)!=0)==TRUE