The method didn't send key events, it handled them

pull/18/head
Jesse Vincent 9 years ago
parent 02798e4b1c
commit fb5446c71d

@ -67,7 +67,7 @@ void set_keymap_keymap(Key keymapEntry, byte matrixStateEntry);
// sending events to the computer // sending events to the computer
void handle_synthetic_key_press(byte switchState, Key mappedKey); void handle_synthetic_key_press(byte switchState, Key mappedKey);
void send_key_events(); void send_key_events();
void send_key_event(byte row, byte col); void handle_key_event(byte row, byte col);
void press_key(Key mappedKey); void press_key(Key mappedKey);
int setup_sx1509(sx1509Class sx1509, uint8_t colpins[], uint8_t rowpins[]); int setup_sx1509(sx1509Class sx1509, uint8_t colpins[], uint8_t rowpins[]);

@ -56,11 +56,11 @@ void scan_matrix() {
matrixState[row][col] = implementation_scan_left_col(row,col,matrixState[row][col]); matrixState[row][col] = implementation_scan_left_col(row,col,matrixState[row][col]);
matrixState[row][(COLS - 1) - col] = implementation_scan_right_col(row,col,matrixState[row][(COLS - 1) - col]); matrixState[row][(COLS - 1) - col] = implementation_scan_right_col(row,col,matrixState[row][(COLS - 1) - col]);
TS("calling send_key_event") TS("calling handle_key_event")
send_key_event(row, col); handle_key_event(row, col);
if (implementation_right_hand_connected()) { if (implementation_right_hand_connected()) {
send_key_event(row, (COLS - 1) - col); handle_key_event(row, (COLS - 1) - col);
} }
} }
TS("clearing output pins") TS("clearing output pins")
@ -144,7 +144,7 @@ void handle_synthetic_key_press(byte switchState, Key mappedKey) {
} }
} }
void send_key_event(byte row, byte col) { void handle_key_event(byte row, byte col) {
//for every newly pressed button, figure out what logical key it is and send a key down event //for every newly pressed button, figure out what logical key it is and send a key down event
// for every newly released button, figure out what logical key it is and send a key up event // for every newly released button, figure out what logical key it is and send a key up event

Loading…
Cancel
Save