Keybord latency but no lag at all with joystick

Did you know why there is a input lag between a keyboard and a joystick sensor?

Here is a simple example with two cubes:
One cube is controlled by the keybord, the other is controlled by a joystick. The input lag of the keyboard is slower than the joystick one.
I tried both with logic brick and python script on different computers and there is the same issue.

Did I something wrong? How to avoid this lag?
On the prototype game I’m working on, more complex than two cubes, the lag is even bigger but I have no latency at all if I use a joystick.

I do not see a lag or at least nothing unexpected.

I press up-arrow and the cube moves up-Z.

Maybe a keystroke logger? Idk what could cause input lag besides somethng between the keyboard and blender.

You don’t see a lag even if you press the keybord and at the same time the joystick’s hat?
Weird, I can really feel the difference.

I start my game project on Blender 2.67 and I don’t remember I had this issue at the beginning but I tried this old version and the lag is still present, even in my very simple example.

Any ideas are welcome!

BluePrintRandom, what’s a keystroke logger?
Could it be from my computer? OS? keyboard? I don’t have this lag in other games.

I got no (or not much) difference in delay between keyboard and generic control pad, win 7 32 bit, blender 2.70a.
I think you will need someone else with OSX+joystick to test the demo, systems can be very different with devices sometimes.
Is the keyboard wireless by the way?

A keystroke logger is a program that usually is installed on your computer without your knowledge that monitors your keystrokes. It would probably send that data to a hacker, for them to be able to get access to your computer or something like that.

As for the issue, I have seen this before, but to confirm, what OS and type of computer are you using?

My config is a desktop computer : i7, nvidia 760, 6 go ram ddr3, ubuntu 14.04 and win 7 64 bits and a standard logitch keyboard with wire. My second computer is a laptop vaio serie s with i7 cpu, 8 go ram ddr3, radeon 6630M, also with Ubuntu 14.04 and win7 64 bits.

Two really different machines with very different OS.
No lag with Xbox controller as well as the Logitech gamepad F310 and an arcade stick.

Keyboard and mouse input is handled by Blender’s Ghost library, but joystick support goes through SDL. This means there could be some extra latency in Ghost that SDL doesn’t have.

So has anyone else tested keyboard delay compared to joystick especially?

I can’t say there’s much of a delay in keyboard but I don’t have a joystick to compare to and might be were all just accustomed to the delay if there is some.

I’ve seen keyboard issues arise with OS X, but never put in a bug report or heard anything about the issue myself. Maybe someone who uses Mac can check it out? I have a Linux OS myself as well, so maybe I’ll boot into it to test it out and see if there’s any discernible lag for me.

@VincentG - When you say “lag”, do you mean input feels unresponsive and “spotty”, or that it’s just a certain amount of time behind (i.e. 2 or 3 game frames)?

It’s responsible but there is some delay between the pressed button and the reaction on my screen. I would say something like 3-5 frames, but I don’t know how to measure it so it is hard to tell exactly.