Ver código fonte

Removed some junk comments

Samuel W. Flint 7 anos atrás
pai
commit
0438e41405
1 arquivos alterados com 1 adições e 10 exclusões
  1. 1 10
      emacs-keyboard.ino

+ 1 - 10
emacs-keyboard.ino

@@ -1,11 +1,7 @@
+// -*- c++ -*-
 // #include "Keyboard.h"
 // #include "HID.h"
 
-// https://www.arduino.cc/en/Reference/KeyboardBegin
-// https://www.arduino.cc/en/Tutorial/KeyboardMessage
-// https://www.arduino.cc/en/Tutorial/KeyboardReprogram
-
-// http://www.cplusplus.com/doc/tutorial/structures/
 struct Key {
   int pin;
   char keyCode;
@@ -16,9 +12,6 @@ const int NUM_OF_KEYS = 4;
 Key keys[NUM_OF_KEYS];
 
 void setup() {
-  // Initialize key data
-  // https://www.arduino.cc/en/Reference/KeyboardModifiers
-  // { buttonPin, keyCode, wasPushed }
   keys[0] = { 5, KEY_LEFT_CTRL , false };
   keys[1] = { 4, KEY_LEFT_ALT, false};
   keys[2] = { 3, KEY_LEFT_SHIFT, false };
@@ -36,12 +29,10 @@ void setup() {
 
 void loop() {
   for(int i = 0; i < NUM_OF_KEYS; i++) {
-    // If key is now pushed, but wasn't before...
     if((digitalRead(keys[i].pin) == LOW) && (keys[i].wasPushed == false)) {
       Keyboard.press(keys[i].keyCode); // Send key down
       keys[i].wasPushed = true;
     }
-    // If key is now unpushed, but was before...
     else if ((digitalRead(keys[i].pin) == HIGH) && (keys[i].wasPushed == true)) {
       Keyboard.release(keys[i].keyCode); // Send key up
       keys[i].wasPushed = false;