   // If the key is 3 characters, it's a number for a special key.
   if(theKey.length() == 3) {
     thisKey = theKey.toInt();
-//    Keyboard.println(thisKey);
+//    Serial.println(thisKey);
   }
   // If the key is 1 character, read the key directly.
   else if(theKey.length() == 1) {
     thisKey = theKey.charAt(0);
-//    Keyboard.println(thisKey);
+//    Serial.println(thisKey);
   }
   // Otherwise, release all the keys.
   else {
-    boolean releaseKeys = true;
+    Keyboard.releaseAll();
   }
   
   if(releaseKeys) {
-    Keyboard.releaseAll();
-//    Keyboard.println("Releasing keys");
+//    Serial.println("Releasing keys");
   }
   if(theAction == 'h') {
     Keyboard.press(thisKey);
   }
   if(theAction == 'p') {
-    Keyboard.press(thisKey);
-    delay(200);
-    Keyboard.release(thisKey);
+    Keyboard.write(thisKey);
+//    Serial.print("Pressing ");
+//    Serial.println(thisKey);
   }
   if(theAction == 'r') {
     Keyboard.release(thisKey);
+//    Serial.print("Releasing ");
+//    Serial.println(thisKey);
   }
 }

  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();

  // Listen for incoming connection only from localhost
  // (no one from the external network could connect)


  digitalWrite(13, HIGH);
  Keyboard.begin();
////  Serial.println(entry);
  delay(1000);
  Keyboard.end();
  digitalWrite(13, LOW);
