"!=" stands for "not equal". "(B AND #RIGHT)!=0" is almost same as "B==#RIGHT", but when you press RIGHT on D-pad and another button (e.g. A button) at the same time, the former can detect RIGHT press but the latter cannot.