X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fadb_usb%2Fmatrix.c;h=c3b3ab8bb627e628133d726ee0788db9f216e4ef;hb=a93677cbf145baf210f92a9129ded55c9ef5657b;hp=f4bf50c1f5af375f2da651f0af85e127e821616f;hpb=ce5e565f58003eb5144e08e3e8cdcc63a6110b76;p=max%2Ftmk_keyboard.git diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index f4bf50c1..c3b3ab8b 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 @@ -481,9 +479,9 @@ uint8_t matrix_scan(void) * ------------- --------- * Key ANSI ISO ANSI ISO * --------------------------------------------- - * *a 0x32 0x0A 0x35 0x35 - * *b ---- 0x32 ---- 0x64 - * *c 0x2A 0x2A 0x31 0x31(or 0x32) + * *a 0x32 0x0A GRAVE GRAVE + * *b ---- 0x32 ---- NUBS + * *c 0x2A 0x70 BSLASH NUHS */ if (is_iso_layout) { if ((key0 & 0x7F) == 0x32) { @@ -491,6 +489,9 @@ uint8_t matrix_scan(void) } else if ((key0 & 0x7F) == 0x0A) { key0 = (key0 & 0x80) | 0x32; } + if ((key0 & 0x7F) == 0x2A) { + key0 = (key0 & 0x80) | 0x70; + } } register_key(key0); if (key1 != 0xFF) // key1 is 0xFF when no second key.