Leonardo USB HID keyboard & modifier keys? Help!

I've added a fairly comprehensive tutorial on the Leonardo USB HID mouse and keyboard routines on my site, but I've hit a bit of a roadblock!

By poking around USBAPI.h, I think I've iced the mouse functions, but I have yet to figure out the syntax for using the KeyMap/keyReport, to allow the use of modifier keys, like "CTRL-ALT-DEL". I think it uses keyboard.print() somehow, but I just don't have enough info!

Any ideas?

See: http://cal-eng.com/?page_id=579

If you look in HID.cpp you'll see that they handle shifted characters with:

#define SHIFT 0x80
const uint8_t _asciimap[128] =
	0x04|SHIFT,      // A
	0x05|SHIFT,      // B
	0x06|SHIFT,      // C
	0x07|SHIFT,      // D
	0x08|SHIFT,      // E
	0x35,          // `
	0x04,          // a
	0x05,          // b
	0x06,          // c
	0x07,          // d
	0x08,          // e
	0				// DEL


                        if (c & 0x80)
				keys.modifiers |= KEY_MODIFIER_LEFT_SHIFT;
				c &= 0x7F;
			keys.keys[0] = c;

I expect you need to set other modifier flags in keys.modifiers before sending the report. This will require replacing the "Keyboard_::write()" function because that's where the "KeyReport keys = {0}" object gets created and you can't set modifiers in it until it has been created.