@@ -0,0 +1,826 @@
+package rhiot;%0A%0Aimport org.jboss.rhiot.ble.bluez.RHIoTTag;%0A%0A/**%0A * Created by sstark on 6/10/16.%0A */%0Apublic class TestKeyState %7B%0A    static void printKeyState(int keys) %7B%0A        RHIoTTag.KeyState keyState = RHIoTTag.KeyState.NONE;%0A        if((keys & 0b01) != 0 && (keys & 0b010) != 0)%0A            keyState = RHIoTTag.KeyState.LEFT_AND_RIGHT;%0A        else if((keys & 0b01) != 0)%0A            keyState = RHIoTTag.KeyState.LEFT;%0A        else if((keys & 0b010) != 0)%0A            keyState = RHIoTTag.KeyState.RIGHT;%0A        else if((keys & 0b0100) != 0)%0A            keyState = RHIoTTag.KeyState.REED;%0A        System.out.printf(%22keyState(%25d) = %25s%5Cn%22, keys, keyState);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        printKeyState(1);%0A        printKeyState(2);%0A        printKeyState(4);%0A        printKeyState(3);%0A    %7D%0A%7D%0A

Test keyState method