InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

Keyboard keys not reporting accurately

Open jackpr-unity opened this issue 8 years ago • 14 comments

Pressing this key on keyboard > causes InputSystem to report this key

Numpad + > Numpad - Numpad - > Numpad * Numpad * > Numpad / Numpad / > Numpad =

I don't yet have a keyboard with a numpad equals sign. Will update when I find one.

jackpr-unity avatar Feb 13 '18 18:02 jackpr-unity

Found a keyboard with a numberpad = sign. In one test it registered as a '5' - on the next test when I tried to differentiate between numperpad 5 and digit 5, it did not report as anything.

Backslash reports accurately through Keyboard.onTextInput, but updates Keyboard.OEM1.value instead of Keyboard.Backslash.value

jackpr-unity avatar Feb 13 '18 18:02 jackpr-unity

Keyboard.Digit9.value does not update. Keyboard.onTextInput does work for this key.

jackpr-unity avatar Feb 13 '18 18:02 jackpr-unity

Pressing Insert, Home, PageUp, Delete, End, PageDown report correctly from Keyboard.current[], but also seem to change the state of the print screen button.

Odd, rebooting fixed this specific issue. Rebooting also fixed the numpad= reporting as 5, so there is some sort of odd state that the editor is slipping into. Possibly related, possibly its own issue.

jackpr-unity avatar Feb 13 '18 20:02 jackpr-unity

^ All of the above were tested in the Windows Editor

jackpr-unity avatar Feb 13 '18 21:02 jackpr-unity

Pressing Insert, Home, PageUp, Delete, End, PageDown report correctly from Keyboard.current[], but also seem to change the state of the print screen button. Odd, rebooting fixed this specific issue. Rebooting also fixed the numpad= reporting as 5, so there is some sort of odd state that the editor is slipping into. Possibly related, possibly its own issue.

Rebooting the machine or restarting Unity? Did you try the latter?

Does indeed sound like the keyboard code is getting into some weird state.

Keyboard.Digit9.value does not update. Keyboard.onTextInput does work for this key. Backslash reports accurately through Keyboard.onTextInput, but updates Keyboard.OEM1.value instead of Keyboard.Backslash.value

These and numpad issues fixed in 16b4ab363780.

Temporarily removed support for numpad= on Windows.

Rene-Damm avatar Feb 28 '18 00:02 Rene-Damm

Pressing Insert, Home, PageUp, Delete, End, PageDown report correctly from Keyboard.current[], but also seem to change the state of the print screen button. Odd, rebooting fixed this specific issue. Rebooting also fixed the numpad= reporting as 5, so there is some sort of odd state that the editor is slipping into. Possibly related, possibly its own issue.

Rebooting the machine or restarting Unity? Did you try the latter?

Does indeed sound like the keyboard code is getting into some weird state.

I couldn't repro it, unfortunately. I'm not sure how it got in that state. It was relaunching the editor that fixed it.

jackpr-unity avatar Feb 28 '18 19:02 jackpr-unity

Ok, something to keep an eye on. Definitely sounds like a bug either in the new backend or in the state keeping.

Rene-Damm avatar Feb 28 '18 20:02 Rene-Damm

Everything except for numpad= should be fixed on trunk. Numpad= needs testing.

Rene-Damm avatar Mar 09 '18 22:03 Rene-Damm

Waiting for the Numpad= to be checked.

JiaUnity avatar Feb 12 '19 23:02 JiaUnity

Testing with Unity 2018.3.5f1 and commit d8e3ad0553d91e81cb48d660becafb9af075f71b

Progress, but some issues remain. I found these issues using the ISX_KB_Mouse_Basic scene

  • alpha 9 sets keyboard state for alpha 8. Alpha 8 still correctly sets keyboard state for alpha 8. Keyboard.onTextInput correctly reports when the alpha 9 key is pressed.
  • I ran into the print screen issue again. Once again it won't repro. This time it was unplugging the usb and then plugging it back in that fixed the issue. Possibly a mac keyboard thing? I've never seen this happen on my Microsoft keyboard or laptop keyboard.
  • The numpad = key doesn't report at all
  • Numpad numbers don't report through Keyboard.onTextInput. Should they?

jackpr-unity avatar Feb 14 '19 01:02 jackpr-unity

I had an issue where my Keyboard.current.leftShift.isPressed was returning the opposite state, but restarting unity fixed it. using input system 0.2.0 - unity 2018.3.0f2

michaeleconomy avatar Mar 11 '19 21:03 michaeleconomy

All issues I had seem fixed using 2019.1.0b8 and package commit 717086861b14d71bca05636c5d6af72491820040

@JiaUnity can you verify that all keys work correctly using the mac keyboard as well (especially numpad '=')?

jackpr-unity avatar Mar 25 '19 19:03 jackpr-unity

@JiaUnity can you verify that all keys work correctly using the mac keyboard as well (especially numpad '=')?

The numpad = still doesn't work.

JiaUnity avatar Mar 25 '19 20:03 JiaUnity

Closing. For the issue is tracked: https://issuetracker.unity3d.com/issues/windows-keyboard-when-using-mac-magic-keyboard-equals-in-the-numpad-is-not-detected-at-all

JiaUnity avatar Apr 09 '19 22:04 JiaUnity