 
   if (triggerButton.onPress())
   {
-    ble.println("AT+BLEKEYBOARDCODE=00-00-" + hex_to_str( TRIGGER_KEY ));
-    Serial.println("trigger");
-    delay( 10 );
+    //ble.println("AT+BLEKEYBOARDCODE=00-00-" + hex_to_str( TRIGGER_KEY ));
+  
+    //delay( 10 );
     //  release key
-    ble.println("AT+BLEKEYBOARDCODE=00-00");
+    //ble.println("AT+BLEKEYBOARDCODE=00-00");
 
     recenterTime = millis() + recenterTimeDelay;
     digitalWrite(LED_BUILTIN, HIGH);
   }
 
+  if ( triggerButton.onRelease() )
+  {
+     Serial.println("triggerReleased");
+    ble.print("triggerReleased");
+  }
+
   if (reloadButton.onPress())
   {
-    ble.println("AT+BLEKEYBOARDCODE=00-00-" + hex_to_str( RELOAD_KEY ));
+    //ble.println("AT+BLEKEYBOARDCODE=00-00-" + hex_to_str( RELOAD_KEY ));
+    ble.print("reload");
     Serial.println("reload");
-    delay( 10 );
+    //delay( 10 );
     //  release key
-    ble.println("AT+BLEKEYBOARDCODE=00-00");
+    //ble.println("AT+BLEKEYBOARDCODE=00-00");
     digitalWrite(LED_BUILTIN, HIGH);
   }
 

    Serial.println(diffQuat.w(), 4);


    ble.print("AT+BLEKEYBOARD=");
    ble.print(diffQuat.x(), 4);
    ble.print(",");



  if (triggerButton.isPressed())
  {
    Serial.println("trigger");
    ble.print("trigger");
    
    if (  millis() > recenterTime )
    {

      CalibrateGun();
      
      ble.print("recenter");
      //ble.println("AT+BLEKEYBOARDCODE=00-00-" + hex_to_str( RECENTER_KEY ));
      Serial.println("recenter");
      //delay( 10 );
      //  release key
      //ble.println("AT+BLEKEYBOARDCODE=00-00");
      recenterTime = millis() + 10000;
    }
  }
