I have a 2017 Macbook Pro 13 inch without the Touch Bar. I am using this dongle: https://www.apple.com/shop/product/MJ1K2AM/A/usb-c-digital-av-multiport-adapter
When plugged into the port closest to me, the wired usb Apple keyboard does not work. The power and HDMI still work. When plugged into the port furthest from me, everything works.
I tried a different dongle and tried a different Apple keyboard. Same issue. So I am pretty sure it is the Mac.
I also did the SMC reset like here: http://osxdaily.com/2010/03/24/when-and-how-to-reset-your-mac-system-management-controller-smc/
Anything else I can try? I am hoping it is a software issue and not a hardware issue. I am confused why the other peripherals still work.
UPDATE: It appears that the Thunderbolt port in question is not providing power.
UPDATE 2: I ran the diagnostic found here: https://support.apple.com/en-us/HT202731 and it came up with nothing