- Home /
Question by
unity_4MTAiSvblB_WUA · May 03 at 08:57 PM ·
inputmanager
onAnyButtonPress capturing input multiple times for a single keystroke
I'm trying to use onAnyButtonPress to log all input, but when typing it is logging some keystrokes multiple times. This seems the happen when typing quickly. I'm using InputSystem 1.3.0.
void Start() { InputSystem.onAnyButtonPress.Call( button => { if (button is KeyControl key) { Debug.Log($"Key {key.name} pressed! (text: {key.displayName})"); } }); }
You can see here I typed "tester", but it produced "teesteer".
screen-shot-2022-05-03-at-15033-pm.png
(39.1 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613060131im_/https://answers.unity.com/themes/thub/images/avi.jpg)