USB or keyboard hack for response time in Win7?

Hi,

I'm new to Arduino, but wanted to check latency issues with emulating a keyboard.

I'm putting together a rotary encoder to emulate KEY_UP_ARROW and KEY_DOWN_ARROW, but given that I'm using windows 7 & USB drivers can be picky, would it be a more reliable bet for me to hack the keyboard that is already present (using relays to close the up & down arrow circuits), or can I achieve low latency with the Arduino USB driver to emulate a(nother) keyboard (It really needs to be low latency & reliable).

Thanks so much!

I'm new to Arduino, but wanted to check latency issues with emulating a keyboard.

Using which Arduino?

USB drivers can be picky

That hasn't been my experience.

would it be a more reliable bet for me to hack the keyboard that is already present (using relays to close the up & down arrow circuits)

Do you have the skills to do that?

or can I achieve low latency with the Arduino USB driver to emulate a(nother) keyboard (It really needs to be low latency & reliable).

What is your definition of "low latency"? What are the up and down arrow keys driving?

I built a sequential shifter, for racing sims (the Logitech G27 doesn't have one), with a Leonardo and have had absolutely no issues. The PC thinks it's a keyboard. If it was laggy it wouldn't be usable.

Thanks so much for replies.
I'll add extra info below :slight_smile:

PaulS:
Using which Arduino?

SainSmart UNO R3 ATmega328P

PaulS:
Do you have the skills to do that?

I don't see too many hiccups

PaulS:
What is your definition of "low latency"?

I've had issues with windows delaying the execution of keyboard remaps... from a mouse, together with a wacom tablet... And now I'm thinking of adding another device (they'll all be used in tandem)... So I just wanted to check. I'm estimating I would want to send up to 15 keystrokes/second through the UNO

PaulS:
What are the up and down arrow keys driving?

They'll be driving keystrokes in Adobe Lightroom

SainSmart UNO R3 ATmega328P

I don't think that is going to work. Only the Leonardo and Micro can send keystrokes as a USB device.

I've had issues with windows delaying the execution of keyboard remaps

But that requires processor intervention. Keystrokes are handled as interrupts.

PaulS:
I don't think that is going to work. Only the Leonardo and Micro can send keystrokes as a USB device.

Aaah, my bad... OK, Micro is in the mail :slight_smile:

PaulS:
But that requires processor intervention. Keystrokes are handled as interrupts.

OK, that sounds very promising. Just to double check then... given that arduino doesn't have a windows natively supported driver, can I expect the driver to play well with other devices or introduce other delays?

Thanks!

given that arduino doesn't have a windows natively supported driver

Not true. What Arduino doesn't have is a Microsoft-developed/supported/delivered driver. Which doesn't mean shit, given the quality of some of the crap that is developed just down the road.

can I expect the driver to play well with other devices

Of course.

or introduce other delays?

It should not. The interrupt system doesn't care where the "Hey, there's a keypress event that needs to be handled" interrupt comes from.

Thanks so much Paul for your replies... Much appreciated! Looking forward to putting the Micro together when it arrives :slight_smile:

PaulS:
Not true. What Arduino doesn't have is a Microsoft-developed/supported/delivered driver. Which doesn't mean shit, given the quality of some of the crap that is developed just down the road.
Of course.
It should not. The interrupt system doesn't care where the "Hey, there's a keypress event that needs to be handled" interrupt comes from.