0

Someone asked me to shut down Windows with a Teensy 2.0. I have to use the following scancodes found on win.tue.nl.

         Set-1 make/brake     Set-2 make/brake
Power    e0 5e / e0 de        e0 37 / e0 f0 37
Sleep    e0 5f / e0 df        e0 3f / e0 f0 3f
Wake     e0 63 / e0 e3        e0 5e / e0 f0 5e 

Right now I am using Arduino IDE with Teensyduino add-on to program the Teensy. My question is how to use the above called scancodes to simulate a "power" keystroke to shut down a PC?

I hope someone can help me.

/Zwilk

Zwilk
  • 11
  • 3

1 Answers1

0

You can find the definitions in USB Keyboard Library (usb_keyboard.h, usb_keyboard.c) from pjrc. If you want to extend custom keys you can adapt these files.

user3704293
  • 1,026
  • 2
  • 16
  • 28
  • Thank you for the answer. In the USB Keyboard Library I add the Power/Sleep/Wake button. But it doesn't work. Nothing happens when I call it. Can you be more specified about how to do it? – Zwilk Oct 09 '14 at 07:45