Author Topic: ADB to USB keyboard converter  (Read 309266 times)

idanyoo and 1 Guest are viewing this topic.

Offline superbia

  • Posts: 102
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #800 on: Fri, 16 March 2018, 05:15:43 »
Ok, so I've tried the process all over again. I see that I've made a mistake in my original post. The second command I use is obviously "make -f Makefile.rev1 KEYMAP=iso", instead of just Makefile.

Anyway, since I have two Pro Micros at hand, one is with the J1 jumped, and the other is not. The 5 second blink sketch works as it should, but the thing I've noticed between the two boards is that the "unjumped" one outputs only 4.6V on pin 3 where the jumped one outputs a nice 4.97V so there is a definite need for the jumper.
Now, ever since day one, I've noticed that both boards behave a bit strange meaning that the blink sketch had some interference. Now I know that it's probably because it uses pin 17 for the integrated led and i just figured that the PC pings the board from time to time and that's why it blinked randomly. The second thing I've noticed is that it's registered as a Leonardo instead of a pro micro. Now that shouldn't be too surprising since the pro micro runs just a modified Leonardo bootloader, but I figured that I would reflash the bootloader just in case. I've used the Arduino as ISP method and selected the board to be the Sparcfun pro micro, 5V@16MHz and flashed it. After that, it just seems that the ROM is corrupt or not partitioned right. I can upload a small sketch like a blink sketch and right after the bootloader flash (first upload after the flash), but when I tried to upload tmk (second upload), it froze on 12% the first time. After a bootloader reflash, tmk upload froze on 10%. Third time arround on 5%, but it's not degrading, it just hangs at random... I've even tried to upload tmk on first upload, but I get the same results. Note that that is on a pro micro with jumped J1 so maybe something is going on there and I will try to flash it without J1.

The problem is that my vacation is now over, so I won't have time to work on this until April... So as much as this looked like a long report to you, it'll serve as a backlog for me to know what I've done when I get back to this.

In the meantime, I'm thinking of ordering a new pro micro from a different vendor and see if that would make any difference.

I'll get back to you as soon as I've made any progress.

tl;dr This only confirms there is yet any errors to be found related with actual firmware, actual 32u4 arhitecture, wiring and your AEKII.
I wrote it many times that it's just not worth it making it yourself because in the end the time costs more than the real thing.

Offline Blaise170

  • * Esteemed Elder
  • Posts: 1242
  • Location: Boston, MA
  • ALPS キーボード
    • XYZ
Re: ADB to USB keyboard converter
« Reply #801 on: Fri, 16 March 2018, 08:41:43 »
It depends a lot on the hardware. If you can find a good vendor with good Arduinos, then it is relatively quick to make it yourself. I flashed a Leonardo a few years ago and it worked the first time I plugged it in. Only took about 30 minutes of my time.
I proxy anything including keyboards (キーボード / 鍵盤), from both Japan (日本) and China (中國). For more information, you may visit my dedicated webpage here: https://www.keyboards.es/proxying.html

View my current and past keyboards here: https://deskthority.net/wiki/User:Blaise170

Offline Mattelec

  • Posts: 2
  • Location: Spain
Re: ADB to USB keyboard converter
« Reply #802 on: Mon, 19 March 2018, 04:39:41 »
Im just a new one in the AEK neighborhood  ;D

Related to the ISO layout, is it possible to modify the keys? I've the layout almost done but as I use the Spanish layout, a few keys are different. I used the TMK Keymap editor, but I'm missing few as or the symbols "><".

I guess I should use a hex editor so it will be easier but I've never used one. I have a Pro Mini ready for the task

Any advive

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #803 on: Mon, 19 March 2018, 06:14:19 »
Im just a new one in the AEK neighborhood  ;D

Related to the ISO layout, is it possible to modify the keys? I've the layout almost done but as I use the Spanish layout, a few keys are different. I used the TMK Keymap editor, but I'm missing few as or the symbols "><".

I guess I should use a hex editor so it will be easier but I've never used one. I have a Pro Mini ready for the task

Any advive

Computer world is absolutely US-centric and you have to think in US-QWERTY way, for example you have to use ';'(KC_SCLN) for  in Spanish keyboard.

As for ISO specific keys, refer to UK layout, UK is big brother of other Europe contries as you expect. Use 'ISO \'(KC_NUBS) and 'ISO #'(KC_NUHS) namely.

This is woe of minorities, such as us from rest of the world :)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Mattelec

  • Posts: 2
  • Location: Spain
Re: ADB to USB keyboard converter
« Reply #804 on: Mon, 19 March 2018, 16:07:57 »
Im just a new one in the AEK neighborhood  ;D

Related to the ISO layout, is it possible to modify the keys? I've the layout almost done but as I use the Spanish layout, a few keys are different. I used the TMK Keymap editor, but I'm missing few as or the symbols "><".

I guess I should use a hex editor so it will be easier but I've never used one. I have a Pro Mini ready for the task

Any advive

Computer world is absolutely US-centric and you have to think in US-QWERTY way, for example you have to use ';'(KC_SCLN) for  in Spanish keyboard.

As for ISO specific keys, refer to UK layout, UK is big brother of other Europe contries as you expect. Use 'ISO \'(KC_NUBS) and 'ISO #'(KC_NUHS) namely.

This is woe of minorities, such as us from rest of the world :)

The way it works, could it be that the converter knows the layout of the keyboard and it transfers the pulsations to the PC?
If not, if I program the keys, for example the as ";" , will the PC show in the screen or ";" ?

I'm quite a noobie in this topic  :-[

Offline ILA

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #805 on: Tue, 20 March 2018, 05:03:09 »
The way it works, could it be that the converter knows the layout of the keyboard and it transfers the pulsations to the PC?
If not, if I program the keys, for example the as ";" , will the PC show in the screen or ";" ?

I'm quite a noobie in this topic  :-[

The keyboard always sends a ";" code and it is up to the OS to interpret that code the way it wants. So in short, just chose the ISO layout and set your input language on the OS to be ES and you'll get your special characters, the keyboard doesn't and shouldn't know the localization of your OS.

Offline rich1051414

  • Posts: 343
  • Location: Decaturville, TN
Re: ADB to USB keyboard converter
« Reply #806 on: Tue, 20 March 2018, 07:42:32 »
The way it works, could it be that the converter knows the layout of the keyboard and it transfers the pulsations to the PC?
If not, if I program the keys, for example the as ";" , will the PC show in the screen or ";" ?

I'm quite a noobie in this topic  :-[

The keyboard always sends a ";" code and it is up to the OS to interpret that code the way it wants. So in short, just chose the ISO layout and set your input language on the OS to be ES and you'll get your special characters, the keyboard doesn't and shouldn't know the localization of your OS.
Ah yes, the complete confusion when you change the region of someone's keyboard. It is hilarious when you do it to someone else.
I believe keyboards(if USB) can report itself as being of a specific region and layout. Macintosh actually doesn't like it when the keyboard doesn't report it's language region and layout.
« Last Edit: Tue, 20 March 2018, 07:46:53 by rich1051414 »
Siig Minitouch with Orange Alps, Whitefox 60% Zealios 67g, Realforce 87U 55g Topre, SMK78 With SMK 2nd Gen Cherry MX mount switches, NEC APC-H412 NEC Blue Ovals, Unicomp Model-M Spacesaver, XMIT Hall Effect, WASD Code Cherry MX Clear, KBDFans75 Lubed Gateron Greens, Azio MGK L80 Kailh Brown, XD84 Pale Blue Box Kailh, NIB Pingmaster TMK Converted, KPrepublic XD96 Blue aluminum case with Jade Box Kailh

Offline iand

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #807 on: Wed, 04 April 2018, 10:07:45 »
Thanks @Hasu for all your brilliant work on the ADB converter ;D.
I upgraded my Teensy 2.0/AEKII usb>adb firmware from 2015 version to the 2018 version and noticed a problem with the Non-US backslash character (NUBS) that wasn't present in the 2015 version.  After I successfully uploaded the 2018 ISO firmware using the Teensy App the NUBS character works as expected using my Mac OS X British keyboard layout.  When I disconnect the power the USB and reconnect the NUBS key is subbed with the GRV () key which on my UK keyboard is the key to the left of the 1 key.  I can disconnect and reconnect USB but the problem remains.  If I re-upload the firmware the NUBS returns but only until power is reset.I have checked that I am using the most updated git version and I've used the default ISO keymap file unchanged. Any ideas what this problem might be?

Code: [Select]
make -f Makefile.teensy keymap=iso
« Last Edit: Wed, 04 April 2018, 10:11:56 by iand »

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #808 on: Wed, 04 April 2018, 11:57:35 »
@iand
The firmware includes auto-detect ISO support and it may cause. When you use ISO keyboard you have to plug it into the converter *before* pluging USB.

Can you show me debug mesages on 'hid_listen' when the converter starts up. it would be helpful.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline superbia

  • Posts: 102
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #809 on: Thu, 05 April 2018, 02:26:17 »
Thanks @Hasu for all your brilliant work on the ADB converter ;D.
I upgraded my Teensy 2.0/AEKII usb>adb firmware from 2015 version to the 2018 version and noticed a problem with the Non-US backslash character (NUBS) that wasn't present in the 2015 version.  After I successfully uploaded the 2018 ISO firmware using the Teensy App the NUBS character works as expected using my Mac OS X British keyboard layout.  When I disconnect the power the USB and reconnect the NUBS key is subbed with the GRV () key which on my UK keyboard is the key to the left of the 1 key.  I can disconnect and reconnect USB but the problem remains.  If I re-upload the firmware the NUBS returns but only until power is reset.I have checked that I am using the most updated git version and I've used the default ISO keymap file unchanged. Any ideas what this problem might be?

Code: [Select]
make -f Makefile.teensy keymap=iso

I've had the same thing happen to me, my solution was to plug/unplug and suspend/resume (I don't know the exact order) for my operating system to swap them again. Once they are 'correct' they usually stay 'correct' until I disconnect it.

Offline iand

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #810 on: Thu, 05 April 2018, 05:25:44 »
@hasu. The pre-compiled MacOS does not produce any output from the terminal nor compile from source on MacOS High Sierra so I had to run the debug on a Windows 10 PC. I connected the device with 2018 firmware then ran the version command followed by the debug keyboard command and pressed the NUSB and the GRV keys which produced the 4 bottom lines of output. Hope this is the debug output you were looking for but let me know if there are other debug steps you would like me to produce.

hid_listen.exe
Waiting for device:
Listening:
USB configured.
Before init:
Scan: addr:2, reg3:6505
After init:
Scan: addr:2, reg3:6603
debug enabled.
Keyboard start.

        - Version -
DESC: convert ADB keyboard to USB
VID: 0xFEED(t.m.k.) PID: 0x0ADB(ADB keyboard converter) VER: 0x0101
BUILD: unknown (11:06:49 Apr  4 2018)
OPTIONS: LUFA MOUSEKEY EXTRAKEY CONSOLE COMMAND 4096
GCC: 4.8.1 AVR-LIBC: 1.8.0svn AVR_ARCH: avr5

keyboard: on
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 64 00 00 00 00 00
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 35 00 00 00 00 00
« Last Edit: Thu, 05 April 2018, 09:37:33 by iand »

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #811 on: Thu, 05 April 2018, 21:14:44 »
@hasu. The pre-compiled MacOS does not produce any output from the terminal nor compile from source on MacOS High Sierra so I had to run the debug on a Windows 10 PC. I connected the device with 2018 firmware then ran the version command followed by the debug keyboard command and pressed the NUSB and the GRV keys which produced the 4 bottom lines of output. Hope this is the debug output you were looking for but let me know if there are other debug steps you would like me to produce.

hid_listen.exe
Waiting for device:
Listening:
USB configured.
Before init:
Scan: addr:2, reg3:6505
After init:
Scan: addr:2, reg3:6603
debug enabled.
Keyboard start.

        - Version -
DESC: convert ADB keyboard to USB
VID: 0xFEED(t.m.k.) PID: 0x0ADB(ADB keyboard converter) VER: 0x0101
BUILD: unknown (11:06:49 Apr  4 2018)
OPTIONS: LUFA MOUSEKEY EXTRAKEY CONSOLE COMMAND 4096
GCC: 4.8.1 AVR-LIBC: 1.8.0svn AVR_ARCH: avr5

keyboard: on
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 64 00 00 00 00 00
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 35 00 00 00 00 00


Thanks. It seems to work well, right?
Then, could you rephrase your problem here?


As for MacOS you may need 'sudo' to get output on terminal. But let's ignore it, it is not problem here.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline iand

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #812 on: Sun, 08 April 2018, 06:02:06 »
Hello @hasu, I've done some more testing and will attempt to articulate the problem better here.
Thanks for the hid_listen trick about sudo - that helped.
I wanted to rule out MacOS and Windows 10 system behaviour/configuration from being the source of the problem.  On Windows I installed the http://www.logikdev.com/2010/02/18/apple-uk-keyboard-layout-for-windows/Apple UK keyboard layout for Windows from  and plugged in a new Apple USB keyboard then tested each UK specific key to ensure it was expected.
With more tests using the AEKII and USB>ADB adaptor I was able to replicate the same problematic behaviour on Windows 10 and MacOS using 2018 firmware.
NUSB key is the key to the right of shift key on UK ISO AEKII
GRV key is the key to the left of 1 character below escape on UK ISO AEKII


2015 Firmware (Windows and MacOS):
All UK specific AEKII keys work as expected except..
NUSB key outputs ` character when \ is expected

hid_listen debug output for pressing  NUSB, GRV keys
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 64 00 00 00 00 00
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 35 00 00 00 00 00

2018 Firmware (Windows and MacOS) after USB power reconnection:
NUSB key outputs expected = \
NUSB + shift keys outputs expected = ~
GRV key outputs ` expected =
GRV + shift keys outputs ~ expected =

hid_listen debug output for pressing  NUSB, GRV keys
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 64 00 00 00 00 00
keyboard: 00 00 00 00 00 00 00 00
keyboard: 00 00 35 00 00 00 00 00

In conclusion the problem is
1) Both MacOS and Windows character output for NUSB,GRV are reversed when using the 2018 ISO firmware even the AEKII keyboard debug shows the same keys being pressed.
« Last Edit: Sun, 08 April 2018, 06:03:49 by iand »

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #813 on: Sun, 08 April 2018, 06:51:50 »
The converter should work as a Windows UK USB keyboard, it looks like this.
https://en.wikipedia.org/wiki/British_and_American_keyboards#Windows_keyboards

From those debug output It seems to me work as expected. NUBS sends 0x64 and GRAV sends 0x35 collectly. Windows should print \ for NUBS and ` for GRV.

Mac uses non-standard layout for UK keyboard and it may make this problem complicated.
https://en.wikipedia.org/wiki/British_and_American_keyboards#Apple_Macintosh_keyboards

Use firmware downloaded from Keymap Editor and test this on Windows native box(not Mac and virtual machine) without the "Apple UK keyboard layout" .
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1





TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline iand

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #814 on: Sun, 08 April 2018, 11:07:52 »
Hello @hasu. Thanks for clarifying the key codes. Sticking purely to the key codes I hope this demonstrates the problem- sorry if I've confused matters in previous posts.

2015 firmware NUBS NO ISO autodetect + GRAV keys pressed
keyboard_report: 00 00 35 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00
keyboard_report: 00 00 64 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00

adb_usb_rev1 NO ISO autodetect NUBS + GRAV keys pressed
keyboard_report: 00 00 35 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00
keyboard_report: 00 00 64 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00

adb_usb_rev1 firmware ISO auto-detected NUBS + GRAV keys pressed
keyboard_report: 00 00 64 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00
keyboard_report: 00 00 35 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00

193421-0
« Last Edit: Mon, 09 April 2018, 03:08:19 by iand »

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #815 on: Sun, 08 April 2018, 18:17:14 »
Hello @hasu. Thanks for clarifying the key codes. Sticking purely to the key codes I hope this demonstrates the problem- sorry if I've confused matters in previous posts.

2015 firmware NUBS + GRAV keys pressed
keyboard_report: 00 00 35 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00
keyboard_report: 00 00 64 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00

2018 Firmware after teensy upload NUBS + GRAV keys pressed
keyboard_report: 00 00 35 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00
keyboard_report: 00 00 64 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00

adb_usb_rev1 firmware after power cycle NUBS + GRAV keys pressed
keyboard_report: 00 00 64 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00
keyboard_report: 00 00 35 00 00 00 00 00
keyboard_report: 00 00 00 00 00 00 00 00

(Attachment Link)

Then, it seems that 2015 and 2018 don't work as expected. adb_usb_rev1 works correctly.
Are you using your own keymap file for the 2015 and 2018 firmware? If so post it here.


why are you saying  "after power cycle"? It has something wrong "before power cycle"?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline iand

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #816 on: Mon, 09 April 2018, 03:59:24 »
@hasu I have corrected my post above.  When I initially flash the firmware and reboot the teensy there is no automatic ISO detection. I can see a button in the MacOS keyboard settings to allow me to launch the keyboard setup assistant and manually specify the keyboard as ISO and they keys work as expected. Just to be sure I deleted the /Library/Preferences/com.apple.keyboardtype.plist and rebooted and manually specify ISO keyboard when prompted by macOS. The problems happen when I disconnect the adaptor from the USB port and back again. The automatic ISO detection kicks in and the key output between NUBS and GRAV are swapped. The button to manually setup the keyboard also ISO dissapears.  Problems seems to be documented in this thread which I have just seen.
https://github.com/tmk/tmk_keyboard/issues/35#issuecomment-41874635

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #817 on: Mon, 09 April 2018, 19:00:34 »
@iand, I'm completely confused now and I can't know what you are doing :(
I don't have Macn and ISO keyboard to test it unfortunately.  We may have to wait for someone with ISO ADB keyboard and knowledge about ADB, Mac and TMK to come in.

I'm still happty to hear about concreate offer to improve ISO keyboard support. Let me know if anyone have any idea on this problem.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline iand

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #818 on: Fri, 13 April 2018, 04:12:32 »
Hi @hasu.  I managed to change keymap_common.h and make the firmware .hex work with my M3501 British Keyboard. As you linked to wikipedia earlier, Apple British keyboards are not ISO standard. I made a simple change to swap K32 and K0A keys reversing your commit made in 2016.  Now the keys work everytime even when I disconnect the USB cable. Perhaps we need a ISO/UK section. I had a look at the keyboard-autodetection code and there's no accounting for UK keyboards.

/* M3501 Apple Extended Keyboard II UK ISO
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.             ,---.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|             |Pwr|
 * `---'   `---------------' `---------------' `---------------' `-----------'             `---'
 * ,-----------------------------------------------------------. ,-----------. ,---------------.
 * |  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  =|  /|  *|
 * |-----------------------------------------------------------| |-----------| |---------------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Retur| |Del|End|PgD| |  7|  8|  9|  -|
 * |------------------------------------------------------`    | `-----------' |---------------|
 * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  \|    |               |  4|  5|  6|  +|
 * |-----------------------------------------------------------|     ,---.     |---------------|
 * |Shif|  `|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
 * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
 * |Ctrl |Opt |Cmd |         Space           |     |Opt |Ctrl  | |Lef|Dow|Rig| |      0|  .|   |
 * `-----------------------------------------------------------' `-----------' `---------------'
 */
#define KEYMAP_EXT_ISO( \
    K35,  K7A,K78,K63,K76, K60,K61,K62,K64, K65,K6D,K67,K6F, K69,K6B,K71,              K7F, \
    K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74,  K47,K51,K4B,K43, \
    K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K24, K75,K77,K79,  K59,K5B,K5C,K4E, \
    K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,K2A,                   K56,K57,K58,K45, \
    K38,K0A,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,    K7B,     K3E,      K53,K54,K55,     \
    K36,K3A,K37,        K31,                        K7C,K7D, K3B,K3D,K3C,  K52,    K41,K4C  \
) { \
    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
    { KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
    { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_PENT,  KC_##K35, KC_##K36, KC_##K37 }, \
    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO    }, \
    { KC_F17,   KC_##K41, KC_NO,    KC_##K43, KC_F18,   KC_##K45, KC_NO,    KC_##K47 }, \
    { KC_NO,    KC_NO,    KC_NO,    KC_##K4B, KC_##K4C, KC_NO,    KC_##K4E, KC_F18   }, \
    { KC_F19,   KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
    { KC_##K58, KC_##K59, KC_F20,   KC_##K5B, KC_##K5C, KC_INT3,  KC_INT1,  KC_PCMM  }, \
    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_LANG2, KC_##K67 }, \
    { KC_LANG1, KC_##K69, KC_F16,   KC_##K6B, KC_NO,    KC_##K6D, KC_APP,   KC_##K6F }, \
    { KC_NO,    KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_NO,    KC_##K7F }  \
}

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #819 on: Fri, 13 April 2018, 06:36:19 »
@iand, code you pasted is equivalent to the latest code on github repo except for changes in comment. The 'change in comment' doesn't affect how firmware works at all. If the code you pasted works for you the latest firmware will work without any fix.

can you show your keymap file if you modified it?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Worthless_Owl

  • Posts: 11
Re: ADB to USB keyboard converter
« Reply #820 on: Fri, 13 April 2018, 16:49:58 »
Problem solved, the firmware i get from the web doesn't work. I "make" the files from hasu's github and it worked like a charm. Thanks a lot Hasu! Typing this on my AEKII right now!

Scratch that. The converter work fine with the "adb_usb_rev1_unimap.hex" found in the binary file. Doesn't work with "adb_usb_rev2_unimap.hex", nor the make'd file. After flashing with qmk toolbox it disconnects immediately, while using unimap rev1 shows the blue debugging messages. Any help?
« Last Edit: Mon, 16 April 2018, 08:05:07 by Worthless_Owl »

Offline snufflecat

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #821 on: Thu, 19 April 2018, 07:08:11 »
Hi there. First of all thanks for making this. I'm trying to make my own adapter for my AEKII but have a hard time understanding a few things, please excuse my banal questions:

- Is it possible to use the Arduino IDE to compile the necessary hex-files that you flash the Teensy with?
- What files do I have to modify if I want to add Norwegian characters like "", "" and ""? I've tried looking into the "keymap_iso.c", but it's mostly giving me a headache  :confused:
- Do I need to add an extra layer that's activated via the shift-key in order to get capital letters etc.?

I'm pretty sure most of what I'm asking is answered in the different wikis and guides, but they're so incredibly large that I have a hard time finding out exactly where to look.

Thank you!

Offline rich1051414

  • Posts: 343
  • Location: Decaturville, TN
Re: ADB to USB keyboard converter
« Reply #822 on: Thu, 19 April 2018, 18:18:55 »
- Is it possible to use the Arduino IDE to compile the necessary hex-files that you flash the Teensy with?

No.

What files do I have to modify if I want to add Norwegian characters like "", "" and ""? I've tried looking into the "keymap_iso.c", but it's mostly giving me a headache

There is an online tool you can use to make custom keymap hex files.
For TMK converter(ATMega32u2)
For old TMK converter rev.1(ATMega32u4)

- Do I need to add an extra layer that's activated via the shift-key in order to get capital letters etc.?
No.


Siig Minitouch with Orange Alps, Whitefox 60% Zealios 67g, Realforce 87U 55g Topre, SMK78 With SMK 2nd Gen Cherry MX mount switches, NEC APC-H412 NEC Blue Ovals, Unicomp Model-M Spacesaver, XMIT Hall Effect, WASD Code Cherry MX Clear, KBDFans75 Lubed Gateron Greens, Azio MGK L80 Kailh Brown, XD84 Pale Blue Box Kailh, NIB Pingmaster TMK Converted, KPrepublic XD96 Blue aluminum case with Jade Box Kailh

Offline snufflecat

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #823 on: Fri, 20 April 2018, 01:37:10 »
- Is it possible to use the Arduino IDE to compile the necessary hex-files that you flash the Teensy with?

No.

What files do I have to modify if I want to add Norwegian characters like "", "" and ""? I've tried looking into the "keymap_iso.c", but it's mostly giving me a headache

There is an online tool you can use to make custom keymap hex files.
For TMK converter(ATMega32u2)
For old TMK converter rev.1(ATMega32u4)

- Do I need to add an extra layer that's activated via the shift-key in order to get capital letters etc.?
No.

Thanks. I've tried using the online generator before but there's no way to actually add custom characters?

Offline rich1051414

  • Posts: 343
  • Location: Decaturville, TN
Re: ADB to USB keyboard converter
« Reply #824 on: Fri, 20 April 2018, 19:30:02 »
- Is it possible to use the Arduino IDE to compile the necessary hex-files that you flash the Teensy with?

No.

What files do I have to modify if I want to add Norwegian characters like "", "" and ""? I've tried looking into the "keymap_iso.c", but it's mostly giving me a headache

There is an online tool you can use to make custom keymap hex files.
For TMK converter(ATMega32u2)
For old TMK converter rev.1(ATMega32u4)

- Do I need to add an extra layer that's activated via the shift-key in order to get capital letters etc.?
No.

Thanks. I've tried using the online generator before but there's no way to actually add custom characters?

The action map under the 'Code Edit' tab lists all of the characters by their official labels, and the character seen by the OS depends on the keyboard language. The keyboard only sends a code, it is up to the OS to decide what letter that represents, and depends on the keyboard language settings.

You can set a macro to punch in the alt-code though, but I have no experience with setting up macros with this firmware, but it looks like that functionality is there.

In case you don't know, most OS's have the ability to manually punch in an Alt code which bypasses the keyboards language settings. Usually this is done by holding left alt and punching in the alt code number on the numpad, then the keystroke is sent when you release alt. It MUST be numpad digits, the top row numbers do not work for this. Also, this only works if the numpad is the same physical hardware as the alt key being held. Very unfortunate for external numpad users. Obviously this has the limitation of symbols or characters entered this way being one shot, and will not function as a typical key with physical state change information. Like, key repeating when holding down the key couldn't work.

If on windows, the tool 'charmap' will list the physical alt-code for all symbols in each font you have installed on your system. The format is 'U+XXXX', the 4 digits are in hex, so you need to convert that to decimal first.



I hope you don't want this function to do childish stuff like this:̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̄̅̅̅̅̅̅̅̅M
« Last Edit: Fri, 20 April 2018, 19:55:41 by rich1051414 »
Siig Minitouch with Orange Alps, Whitefox 60% Zealios 67g, Realforce 87U 55g Topre, SMK78 With SMK 2nd Gen Cherry MX mount switches, NEC APC-H412 NEC Blue Ovals, Unicomp Model-M Spacesaver, XMIT Hall Effect, WASD Code Cherry MX Clear, KBDFans75 Lubed Gateron Greens, Azio MGK L80 Kailh Brown, XD84 Pale Blue Box Kailh, NIB Pingmaster TMK Converted, KPrepublic XD96 Blue aluminum case with Jade Box Kailh

Offline snufflecat

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #825 on: Wed, 25 April 2018, 09:55:22 »
Hi again @Hasu,

Just wanted to say a huge thank you! I finally managed to get my controller working, and you would not believe how satisfying it is to finally make my own adapter. It's been a rough journey, but I've learned so much from it.

Do you take donations? Because I really feel that I should pay some sort of respect to you for making all of this possible for laypeople like myself.
Let me know :)
« Last Edit: Fri, 11 May 2018, 03:54:07 by snufflecat »

Offline jracabado

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #826 on: Mon, 21 May 2018, 08:31:32 »
Hi,

UPDATE: response is in the post above, I looked at the wrong diagram.

I've made my attempt at building my own adapter for an Apple Extended Keyboard II. I purchased a Pro Micro Leonardo ATmega32U4 5V/16MHz and did the wirings according to the instructions but it's not functioning well. I've just tested in OS X.

I used a 10k resistor, here is how the wiring looks:

195965-0


I did compile the firmware with ADB_DATA_BIT as 15. I had to learn how to reset the Pro Micro so I could upload the firmware but in the end I figured it out.

Once I did that when I plug in the adapter via USB it is detected as an ADB Keyboard Converter in OSX. The Assistant Keyboard wizards also pops to help me identify the keyboard.

The adapter shows a green light:

195967-1

After plugging the AEK II to the ADB cable the adapter stays green but when listing the USB devices it no longer shows the adapter identied as "ADB keyboard converter" but rather "Arduino Micro".

Nothing happens besides the mouse moving left a fixed amount of pixels periodically. The keyboard lights show no signs of life and no key registers.

Not sure where to go from here. I've double checked the wiring with a multimeter. Can it be the 10k resistor? Also there is a reference to the J1 jumper on the first post but I couldn't find any more information. Do you guys have any ideas how to troubleshoot this?

Some other peculiar behaviour to note is that when I plugin the ADB cable on the right keyboard socket the lights on the adapter go off as seen here:

195969-2

Also when disconnecting the keyboard on the left socket the adapter lights go red:

195971-3






 
« Last Edit: Tue, 22 May 2018, 04:07:14 by jracabado »

Offline snufflecat

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #827 on: Tue, 22 May 2018, 03:02:57 »
Hi,

I've made my attempt at building my own adapter for an Apple Extended Keyboard II. I purchased a Pro Micro Leonardo ATmega32U4 5V/16MHz and did the wirings according to the instructions but it's not functioning well. I've just tested in OS X.

I had kind of the same problems as you with the mouse jumping around on the screen and nothing happening, and what I finally learned was that I had wired the wrong cables to the controller.
It dawned on me that the pinout that's shown on most tutorials is for the female plug, not the male cable, which is "flipped", see the attached image for reference. The x marks what cables shouldn't be connected.

In my case this lead me to connect the brown, orange and black cable, while the red wasn't connected at all. If your cable is like mine then that might be the solution.

196025-0
« Last Edit: Tue, 22 May 2018, 03:04:31 by snufflecat »

Offline jracabado

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #828 on: Tue, 22 May 2018, 04:08:05 »
That's exactly the problem. Thanks for the help, we will have to rewire it.

Hopefully everything else is working.

Offline snufflecat

  • Posts: 6
Re: ADB to USB keyboard converter
« Reply #829 on: Thu, 24 May 2018, 06:59:45 »
That's exactly the problem. Thanks for the help, we will have to rewire it.

Hopefully everything else is working.
Keep us posted on how it works out. :)

Offline ReDsNoTDeAd

  • Posts: 21
Re: ADB to USB keyboard converter
« Reply #830 on: Wed, 06 June 2018, 11:35:09 »
Hasu, I am wanting to update my ADB-USB converter to rev2 firmware, but cannot figure out how.

Can you write some short instructions? I can get hex file and I have ATMEL FLIP software, but after this I am lost.

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #831 on: Wed, 06 June 2018, 18:10:43 »
Hasu, I am wanting to update my ADB-USB converter to rev2 firmware, but cannot figure out how.

Can you write some short instructions? I can get hex file and I have ATMEL FLIP software, but after this I am lost.

See this wiki entry and you should select 'ATmega32U2' as chip in FLIP assuming you are using TMK converter.
https://github.com/tmk/tmk_keyboard/wiki#atmel-flip-for-windows
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline jracabado

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #832 on: Tue, 12 June 2018, 07:28:55 »
That's exactly the problem. Thanks for the help, we will have to rewire it.

Hopefully everything else is working.
Keep us posted on how it works out. :)

So I corrected the wiring, double checked with multi-meter and everything seems connected in the right place but it still doesn't work.

I get the same mouse left and slightly up behaviour. The improvement is that now when I connect the keyboard it keeps showing as "ADB keyboard converter" in the USB devices and the Arduino doesn't change to the red lights. Besides that when I connect the cable to the right socket it quickly flashes the keyboard lights, nothing happens when connecting to the keyboard left ADB socket.

That's as far as I managed to get and I'm not sure what else can I change/test.

I did verify the voltage in the VCC line and it's around 4.6V, is that enough? My Macbook only feeds 4.7V through the USB cable.

Offline hasu

  • Thread Starter
  • Posts: 2731
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #833 on: Tue, 12 June 2018, 20:06:09 »
That's exactly the problem. Thanks for the help, we will have to rewire it.

Hopefully everything else is working.
Keep us posted on how it works out. :)

So I corrected the wiring, double checked with multi-meter and everything seems connected in the right place but it still doesn't work.

I get the same mouse left and slightly up behaviour. The improvement is that now when I connect the keyboard it keeps showing as "ADB keyboard converter" in the USB devices and the Arduino doesn't change to the red lights. Besides that when I connect the cable to the right socket it quickly flashes the keyboard lights, nothing happens when connecting to the keyboard left ADB socket.

That's as far as I managed to get and I'm not sure what else can I change/test.

I did verify the voltage in the VCC line and it's around 4.6V, is that enough? My Macbook only feeds 4.7V through the USB cable.


The mouse behaviour means that you have something wrong on data line. Connect data line on PD0 pin which is Pin3 on Pro Micro, and then flash default firmware for ATMega32u4.
I think converter works at 4.6-4.7V but it doesn't look like good enough as power supply, cheap cable or bad USB port perhaps? you may want to try other computers like desktop pc.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline katotaka

  • Posts: 14
  • Location: Hong Kong
Re: ADB to USB keyboard converter
« Reply #834 on: Tue, 26 June 2018, 05:35:26 »
Apologies, didn't really went through whole thread (and Git page) yet, but:

Could this be a good gateway starter project for a newbie builder?
I would happily just give up and get ready to use converter if that turns out too difficult

Looking to use my second AEK2 at work.
Never had similar experience except making first AEK2 into Alps64 (PCB set from @hasu) but I assume if I want to build one, I could just get a correct Pro Micro, solder S-Video Cable, add 1k~10k ohm resistor, flash .hex via FLIP and it's done...?


Offline katotaka

  • Posts: 14
  • Location: Hong Kong
Re: ADB to USB keyboard converter
« Reply #835 on: Wed, 27 June 2018, 21:43:10 »
Apologies, didn't really went through whole thread (and Git page) yet, but:

Could this be a good gateway starter project for a newbie builder?
I would happily just give up and get ready to use converter if that turns out too difficult

Looking to use my second AEK2 at work.
Never had similar experience except making first AEK2 into Alps64 (PCB set from @hasu) but I assume if I want to build one, I could just get a correct Pro Micro, solder S-Video Cable, add 1k~10k ohm resistor, flash .hex via FLIP and it's done...?

I just force fed myself with some single board computer 101 and it just worked! yay!

Offline superbia

  • Posts: 102
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #836 on: Thu, 28 June 2018, 07:07:32 »
Apologies, didn't really went through whole thread (and Git page) yet, but:

Could this be a good gateway starter project for a newbie builder?
I would happily just give up and get ready to use converter if that turns out too difficult

Looking to use my second AEK2 at work.
Never had similar experience except making first AEK2 into Alps64 (PCB set from @hasu) but I assume if I want to build one, I could just get a correct Pro Micro, solder S-Video Cable, add 1k~10k ohm resistor, flash .hex via FLIP and it's done...?

I just force fed myself with some single board computer 101 and it just worked! yay!

Be sure to post some pictures of it  ;)

Offline katotaka

  • Posts: 14
  • Location: Hong Kong
Re: ADB to USB keyboard converter
« Reply #837 on: Thu, 28 June 2018, 07:41:52 »
Be sure to post some pictures of it  ;)

Pretty much the same as few replies above but with a short S-Video cable.
I'm pretty confident with the soldering iron but the programming was the hard part, end up following this guide and flashed the hex using avrdude in CMD(win10).

I then connected my AEK2 to the Mac at work and found out I forgot to set locking capslock and the symbols on the numpad were in the wrong places, quickly made new hex file and flashed with avrdude again, and BAM! it's working.

Next up I fired up Fusion360 and quickly drafted an enclosure, since this board will be dedicated to the AEK2 so I kept the design simple sealed it with glue.
Forgot to take pictures before leaving work so no actual photos.
198792-0

Offline katotaka

  • Posts: 14
  • Location: Hong Kong
Re: ADB to USB keyboard converter
« Reply #838 on: Sat, 30 June 2018, 03:22:46 »
My second AEK2 this adapter will be dedicated for, this one has bright white switches


Finished Adapter


Adapter in 3D printed case


Intended location on the case (disassembled for cleaning and retr0bright), will probably be attached with some double sided tape, caps are being cleaned in ultrasonic bath

Offline superbia

  • Posts: 102
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #839 on: Sat, 30 June 2018, 05:29:20 »
Very clean, congrats on the success  :)

Offline Gouty

  • Posts: 32
Re: ADB to USB keyboard converter
« Reply #840 on: Sat, 14 July 2018, 05:10:14 »
I made an ADB to USB converter using an pro micro (5V version) for my ISO UK AEK II and it works really well.  Thanks to everyone for their contributions to this thread, made the process simple and answered all my questions I had throughout the process of making it.

I downloaded a hex file from the TMK gui https://goo.gl/KW66Rt and flashed it to the pro micro using AVRDUDE under windows 10

First I tried rev.2 but for some reason once the device was flashed it would reboot and be unrecognized, then when disconnecting and reconnecting it nothing would come up at all (as if it was never connected)

Resetting it was fine, so I did just that and then put on a rev.1 hex file.  This time it recognised it immediately as an ADB converter and appeared as HID keyboard and mouse, which was great.

Any idea why the rev.2 would not work but the rev.1 would?  Is it a quirk of the pro micro?
EDIT: I can't read, it says clearly on the opening post that rev.2 is for atmega32u2 boards like Hasu's own converter (this was pointed out to me by Laser over at DT)

Also, the numpad equals (keymapd equal) is weird under windows, it outputs 5 in most instances and nothing in the command prompt.  Anyone know why this might be?  I changed it to regular equals, so it's not really an issue.

P.S. If you find that when you plug in the keyboard your mouse starts moving around 50 pixels to the left every second or so, then you have the PD0 and VCC wires the wrong way (yes I am a dumbass)
« Last Edit: Sun, 15 July 2018, 05:00:04 by Gouty »

Offline Felinski

  • Posts: 1
  • Location: Sweden
Re: ADB to USB keyboard converter
« Reply #841 on: Sat, 14 July 2018, 17:08:28 »
 I'm a bit confused as to which resistor i should use, I was looking at resistors and I found some cheap 1k Ohm resistors but they had different values of W on them
 Some are 5W 1k ohm resistors, some are 1W, 10W, and so on. What type do I need?
Secondly, is the resistor just supposed to go between 5V (VCC) to DATA (D0) on my teensy? 

Also, how can I identify the cables as to which ones they are? My plan right now is to cut apart an ADB cable and solder the pins on to my teensy rather than messing with the keyboard itself.

My AEK has a detachable ADB cable, am I correct to assume that both ends on my cable are male?

Sorry for all the questions, this is my first venture into microelectronics.
My profile picture accurately represents how much I know of what I'm doing

Offline Gouty

  • Posts: 32
Re: ADB to USB keyboard converter
« Reply #842 on: Sun, 15 July 2018, 05:09:16 »
I'm a bit confused as to which resistor i should use, I was looking at resistors and I found some cheap 1k Ohm resistors but they had different values of W on them
 Some are 5W 1k ohm resistors, some are 1W, 10W, and so on. What type do I need?

The wattage value is the amount of energy the resistor can dissipate without failing. Because this is a low power application either of those should be fine, just go for the cheaper one.

Secondly, is the resistor just supposed to go between 5V (VCC) to DATA (D0) on my teensy? 

Yes

Also, how can I identify the cables as to which ones they are? My plan right now is to cut apart an ADB cable and solder the pins on to my teensy rather than messing with the keyboard itself.

Get a multimeter, set it to beep or buzz when the ends make contact, strip the end of the cable you want to use, hold a probe to a pin, and then test the wires and write down what connects to what colour. Alternatively, if you don't have a multimeter, do the same with a battery and LED.

My AEK has a detachable ADB cable, am I correct to assume that both ends on my cable are male?
If they both have visible pins rather than plugs (outties rather than innies) then you've got a male my friend (chances are, yes it is male to male as this is what was needed to connect it up to the computer)

If you are doing this under windows I wrote a little guide on my experiences and how to do it here.