Author Topic: Getting input from Keyboard  (Read 3296 times)

Akasurde

  • Newbie
  • *
  • Posts: 2
Getting input from Keyboard
« on: April 08, 2016, 05:55:05 am »
Hi All,

I am trying to get input from Keyboard to my Digispark. The Keyboard in connected to my computer and I want to trigger event using input received from the Keyboard.

I tried look into DigiKeyboard.h but I am not able to find any function which is related to "Receiveing" input from Keyboard.

Can anyone point me in right direction ?

michael_x

  • Newbie
  • *
  • Posts: 2
Re: Getting input from Keyboard
« Reply #1 on: August 29, 2016, 12:07:22 pm »
Quote
Can anyone point me in right direction ?
Turn around ;) 

Using the DigiKeyboard library, your Digispark looks like a USB keyboard to your computer.
How would two keyboards talk to each other? Even the only way to talk to a keyboard (e.g. turning light on) is not supported by the DigiKeyboard.h library.

Serial or CDC is bidirectional.

supersjimmie

  • Newbie
  • *
  • Posts: 3
Re: Getting input from Keyboard
« Reply #2 on: May 25, 2017, 10:24:41 am »
To read from another keyboard, adding an USB Host would be needed.
With a USB Host, you connect the real keyboard to the USB Host, read it's keystrokes and send them to the computer via the DigiKeyboard library.
There are USB Host shields for Arduino, they are connected over SPI. I am not sure if the digistrumps can handle it.