If I understand correctly, you have not yet built the USB portion (diodes and resistors) of the circuit? If this is accurate, it will hang every single time you make a call to write to the USB bus as there is no USB connection.
This got me during testing as well
PS, I also don't see the main loop in your code where you would make that call...
Thanks a lot for the information -- I haven't looked into the USB code yet, but this suggests to me that the Arduino must apparently wait for a "successful transmission" confirmation from the PC that the keystroke was sent before it exits out of the UsbKeyboard.sendKeyStroke() function and continues executing the code. So, my arduino actually wasn't freezing, it was just never getting the response that it was looking for to continue.
This may also explain why committing to solder made things work out better for you. You probably had a loose wire in there somewhere.
Thanks for your help, huntd69 and Nick! Looks like I'll be placing a component order tonight XD.
I wanted to report back on this project. Unfortunately, I am still having problems getting the circuit up and running. As suggested, I have created both a breadboard version and a protoboard version, but the same problem persists in both cases. I've checked the wiring on both versions and it seems to be correct. As such, I am wondering if this issue is related to my choice of components...
Whenever I plug the circuit into USB, I receive an error that says "USB Device not recognized." Per what I've found online, this issue seems to be related to the 2.2K pull-up resistor, which, when working, would cause the Arduino to be recognized as a low speed USB device. I wanted to play around with different resistor types, so I ordered these 2.2K metal oxide resistors from Mouser. I just noticed that they are rated for 2 watts. (The 68Ohm resistors are also metal oxide and rated for 2 watts.) Could this higher power rating be causing my issue? I ask because I know that the Zener diodes' power rating matter, since a Zener diode's capacitance goes up as the power rating increases. However, I'm not sure if this is the same case with resistors -- shouldn't this rating just be related to how much power the resistors can take before they release their magic smoke? Any insight from you guys would be greatly appreciated!
Other information -- I am running 64bit Windows 7 and I've tried plugging the circuit both into a USB 2.0 and USB 3.0 slot to no avail.