Question about programming the Arduino as HID USB keyboard

Hello, I have programmed my UNO to act as a USB keyboard. I am using the keyboard firmware from here: http://hunt.net.nz/users/darran/weblog/b3029/Arduino_UNO_Keyboard_HID_version_03.html and this HID usage table: http://www.usb.org/developers/devclass_docs/Hut1_11.pdf. Everything seems to work fine (the Arduino types expected characters into notepad), but I cannot seem to make the Arduino send the correct command for 'Enter/Return'. According to the table, it looks like it should be buf[2] = 40;but notepad doesn't skip to the next line. Any ideas why this is? Thanks.

You are not telling us what buf is declared as, but I would think that a 40 will just place the value of 40 into buf[0] and not touch buf[1]. If this is declared globally, that will create a valid string since buf will be set to all zeros, but if delared locally, buf[1] will contain garbage.