Can Mega emulate usb keyboard

Ive read some post that suggest it can but I have to reprogram the mega. I want to use 3 or four shift registers connected to 24 pushbuttons when I push a button I want the mega to print out 2 letters in Notepad. Two differnet combination of two letters for each of the 24 buttons
Can this be done
Rick

I haven't tried it, but it's supposed to be possible: GitHub - NicoHood/HID: Bring enhanced HID functions to your Arduino!

It may be possible, but probably much easier if you have a board like the Leonardo that has USB host capabilities.

I think the UNO can as well..

I believe any 8u2/16u2..etc based chips need to be reflashed for this behavior? (didnt check out link, so maybe thats different)

xl97:
I think the UNO can as well..

I believe any 8u2/16u2..etc based chips need to be reflashed for this behavior? (didnt check out link, so maybe thats different)

But when you do that, be forewarned that you can no longer upload your code over the USB and will have to flash your code in a different way like ISP.

xl97:
I believe any 8u2/16u2..etc based chips need to be reflashed for this behavior? (didnt check out link, so maybe thats different)

Yes, that's correct. It's using the USB to serial chip for the emulation. You need to flash it with GitHub - NicoHood/HoodLoader2: 16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE. This means if you have a clone Uno with a CH340 chip or a board with an FTDI FT232RL it won't work.

Delta_G:
be forewarned that you can no longer upload your code over the USB and will have to flash your code in a different way like ISP.

Hoodloader2 claims to still allow USB uploads(though it's a bit more complex than normal: Uploading programs · NicoHood/HoodLoader2 Wiki · GitHub