Quantcast
Channel: Objective Development Forums
Viewing all articles
Browse latest Browse all 4524

Re: Can't send double letters?

$
0
0
Thanks Declan. I didn't even think to look at the password generator code. I was using the HID keyboard. I had tried the original code from Frank Zhao's USB business card without success. And now I've figured out why. Linux or Windows running within a VM are not the same thing as Windows. The Linux box can display the text, but does not respond to the CAPS key being pressed. This is why I started from the HID keyboard example and was going to add a button to replace the CAP key functionality. And it simply doesn't work in windows that's being run in VMware.

As for adding : and /... _BV(1) is the same as MOD_SHIFT_LEFT
case ':':
                    keyboard_report.modifier = _BV(1); // hold shift
                    // fall through

case '/':
                    keyboard_report.keycode[0] = 0x38;
                    break;


I've also made my own character to replicate Windows key + r.

case '\b':
                    keyboard_report.modifier = MOD_GUI_LEFT;
                    keyboard_report.keycode[0] = 4+('r' - 'a');
                    break;

So when you press the caps key, it launches Window+r and then http://google.com\n to launch google.com.

Thanks again for all the help.

Viewing all articles
Browse latest Browse all 4524

Trending Articles