#include #include const byte ROWS = 7; //four rows const byte COLS = 6; //four columns //define the cymbols on the buttons of the keypads char hexaKeys[ROWS][COLS] = { {'w','i','1','7','c','v'}, {'a','j','2','8','m','u'}, {'s','k','3','9',',','.'}, {'d','l','4','0','z','x'}, {'e','h','5','t','b','g'}, {'q','n','6','r','y','o'}, {' ',' ','[',']'} }; byte rowPins[ROWS] = {6, 5, 4, 3, 2, 1, 0}; //connect to the row pinouts of the keypad byte colPins[COLS] = {16, 15, 14, 9, 8, 7}; //connect to the column pinouts of the keypad //initialize an instance of class NewKeypad Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); void setup(){ Serial.begin(9600); } void loop(){ char customKey = customKeypad.getKey(); //figure out which key if(customKey == 'y') { Keyboard.press(8); //8 is ASCII code for backspace delay(100); Keyboard.releaseAll(); } else if(customKey == 'o'){ Keyboard.press(' '); delay(100); Keyboard.releaseAll(); }else if(customKey) { Keyboard.press(customKey); delay(100); Keyboard.releaseAll(); delay(10); } }