From bcc0a6964bee2c9b1fde4017b6749562771d95a3 Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 4 Jan 2021 15:53:21 +0900 Subject: [PATCH] adb_usb: Add scan code print --- converter/adb_usb/matrix.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index f4bf50c1..cf57295f 100644 --- a/converter/adb_usb/matrix.c +++ b/converter/adb_usb/matrix.c @@ -387,10 +387,12 @@ uint8_t matrix_scan(void) tick_ms = timer_read(); codes = adb_host_kbd_recv(ADB_ADDR_KEYBOARD); + if (codes) xprintf("%04X ", codes); // Adjustable keybaord media keys if (codes == 0 && has_media_keys && (codes = adb_host_kbd_recv(ADB_ADDR_APPLIANCE))) { + xprintf("m:%04X ", codes); // key1 switch (codes & 0x7f ) { case 0x00: // Mic @@ -434,10 +436,6 @@ uint8_t matrix_scan(void) key0 = codes>>8; key1 = codes&0xFF; - if (debug_matrix && codes) { - print("adb_host_kbd_recv: "); phex16(codes); print("\n"); - } - if (codes == 0) { // no keys return 0; } else if (codes == 0x7F7F) { // power key press -- 2.46.2