Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

VUSB Questions
Moderators: adafruit_support_bill, adafruit

VUSB Questions

by imagiro1 on Sun Jan 13, 2013 12:20 pm

I have built the a circuit and compiled a simple keyboard code on an ATmega168. I hope somebody has some experience and can help me out. I've posted in the VUSB forum yesterday. But ever since codeandlife inspired so many people, it looks like their forum has been flooded with questions like mine.
1. How do I use the modifier keys? For example, I want to send Win+L to lock the screen. Here is part of the code I currently have for setting up keys.

case '@':
keyboard_report.modifier = _BV(1); // hold shift
keyboard_report.keycode[0] = 29 + 2;

What would I put instead of the @ and where do I find the equivalent of "hold shift"
2. Is it possible to send a string? The example I am working with only sends one letter at a time. I could put the chars in an array, but I was hoping I could use a string. Is there an example for this?

Thanks in advance.
Posts: 1
Joined: Sun Jan 13, 2013 12:14 pm