How to make pro micro currently acting as keyboard to direct power and data to flash drive if switch pressed

I'm currently using Pro Micro with old Apple ADB keyboard to translate ADB connection into USB.
If I want my Pro Micro to shift modes between USB passthrough mode and keyboard mode based on the switch state, can I achieve it by including keyboard mode hex file in the code?
Also, can keyboard mode work while looping the switch checker?
I'm new to this forum, and my post might be missing some details. Please comment me if you have any questions.

void loop()
if switch pressed --> direct power and data to flash drive so that flash drive can communicate with laptop
else --> continue using keyboard mode as defined in the included keyboard.h

Welcome to the forum.

How do you see that pass-through mode ? Via the Pro Micro ? You want a USB bus going to the Pro Micro and an other USB bus coming from the Pro Micro board ? Do you have a USB Host module ?
Maybe you can make a drawing of what you want.

Can you add a USB hub and have both the Pro Micro (as a keyboard) and the SD memory card (with a USB card reader) always available ?

Is a SD socket already connected to the Pro Micro ? Then the Pro Micro should be able to do both at the same time.

About your question with the switch: I don't like that, it is better to stay out of trouble.

Your picture (from Imgur):

I don't understand the picture. Do you keep all the USB wires connected to everything and only switch the 5V of the USB ?
Is it legal what you are doing ?

You should desxcribe in much more details what happends in the sign-process.
You wrote

So what exactly are these other things that go beyond

??

Do I understand right that the basic thing is
press a key and a not yet fully described sign-in / login to windows process shall be done

Have you ever looked at solutions like the YubiKey?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.