Joe Koberg wrote: > I am trying to make a USB-connected PIC18F2553 send some kind of event=20 > every 30 seconds or so, to keep the screensaver on my Windows 7 PC from=20 > activating while idle. >=20 > I figured the most innocuous events to send would be "volume up"=20 > followed by "volume down" keypresses. I presume these key events will=20 > reset the screensaver timeout, and don't see them affecting much else=20 > that might be in the foreground. I want to leave the device plugged in=20 > at all times, and mouse movements or virtually any other keypress might=20 > be misinterpreted depending on what I'm working on. >=20 > I am using JALv2 and have the following code running. However the 0x80=20 > and 0x81 scancodes for Volume Up/Down do not seem to be recognized by=20 > Windows. I have changed them to "alpha" keys and it accepts those and=20 > produces the characters, so I know the underlying code is working. >=20 I have tried using the $80 and $81 USB keyboard codes from an AVR HID=20 device but they are ignored by my windows XP PC. My Dell Latitude laptop has Fn volume control keys but according to the=20 utility (mentioned below) they use reserved scan codes (presumably a=20 specific keyboard driver required). This utility for viewing USB keycodes on the PC helped to discover that=20 windows was not dealing with the keyboard codes:- I can change the windows volume control from the USB port by identifying=20 the hardware as a "Consumer Device" and using the report descriptor from=20 this page:- As he uses a PIC and encoder it may be useful to you. Changing the volume control via USB /does/ reset the screensaver timeout. --=20 George Smith --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .