In our game Notoriety, we have the ability for users to edit their keybinds in a menu. Part of that is disabling a keybind, which we set in their data to Enum.KeyCode.Unknown, which, up until recently, effectively disabled it as we didn’t expect them to ever come through as user input.
Here’s an example of what some users are experiencing who had unbound their ‘weapon switch’ key. Every time they touch their screen it triggers
WARNING: Loud music
I have attached a blank baseplate repo file below, but interestingly this doesn’t show up when using studios emulator, it only shows up on the mobile client. In this case, I tested on IOS. mobileIssue.rbxl (77.2 KB)
You should be able to publish and run on a mobile device to see the following output:
In engine version 731 we released a change that aliases the KeyCode.Unknown enum to KeyCode.None but preserves the same value. I believe this version is released to Studio and all clients other than iOS which may explain the behavior you are seeing. Can you let me know a bit more on your issue - are you doing direct string comparison of the enum name?
Hi, the change should have just been a rename, and unfortunately we are not able to support direct string comparison of enum names with this update. I apologize for the issue this caused.
As for the issue with LMB/RMB triggering None, could you provide some more details? This should not be an intended part of the engine change, with UserInputService a mouse left/right click should continue firing an InputObject with UserInputType.MouseButton1/2 and KeyCode.None (previously Unknown).
I see. Basically, we were storing the Unknown value as a string in datastores since we can’t serialize enums directly.
Now we must check for stale “Unknown” keybinds from engine v 720 730, and for engine v 721 731, we have to make sure that any None keybinds coming through don’t match with our unbound keybinds. I think Notoriety might be a bit unique in that we allow users to unbind keys. We are monitoring to see if this has been fully resolved, but we did deploy an attempt at a fix.
Thanks for getting back to me, I understand. Are you able to serialize the value of the enum (perhaps convert from int to string) rather than the string name?
Please keep us updated on the results of your fix and if you encounter any additional issues! Once again, I apologize that this change caused problems and thank you for your patience with us.