Skip to content

Commit

Permalink
Fixed SYM function #70
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Dec 24, 2024
1 parent ed76f64 commit 9ce2f1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions examples/Keyboard_ESP32C3/Keyboard_ESP32C3.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ bool changedValue[colCount][rowCount];
char keyboard[colCount][rowCount];
char keyboard_symbol[colCount][rowCount];

bool symbolSelected;
bool BL_state = false;
bool comdata_flag = false;
char comdata;
Expand Down Expand Up @@ -145,7 +144,6 @@ void setup()
pinMode(cols[x], INPUT_PULLUP);
}

symbolSelected = false;
}

void loop()
Expand Down Expand Up @@ -220,10 +218,6 @@ void readMatrix()
// disable the column
pinMode(curCol, INPUT);
}

if (keyPressed(0, 2)) {
symbolSelected = true;
}
}

bool keyPressed(int colIndex, int rowIndex)
Expand Down Expand Up @@ -254,8 +248,8 @@ void printMatrix()
// we only want to print if the key is pressed and it is a printable character
if (keyPressed(colIndex, rowIndex) && isPrintableKey(colIndex, rowIndex)) {
char toPrint;
if (symbolSelected) {
symbolSelected = false;

if (keyActive(0, 2)) {
toPrint = char(keyboard_symbol[colIndex][rowIndex]);
} else {
toPrint = char(keyboard[colIndex][rowIndex]);
Expand Down
Binary file not shown.

0 comments on commit 9ce2f1e

Please sign in to comment.