For a project I'm doing, I need to make a sprint script that increases your walkspeed and widens your camera angle a little bit when you hold down shift. (For future reference, this is a LocalScript.) No problem--I've made one before. The issue arose when I felt like making a brand new one just because.
Since I was a little rusty on my scripting, I popped onto ROBLOX Wiki and looked up the instance Mouse to find the keybinding events associated with it, but ROBLOX Wiki did not list any keybinding events under Mouse as usual. In the absence of these, I attempted to look up KeyDown, one such keybinding event. At the top of the resulting page, there was a message with a background of red stating that KeyDown is deprecated and exists only for compatibility reasons, and is not to be used in new scripts. I went to the pages of related events (such as KeyUp) and found the same message.
This stumped me a little. I cannot seem to find any new method of keybinding, if there even is one. How do I keybind now that the old events are deprecated?

4 comments
You can still use them, they'll work perfectly fine.
I know, I just want to use the most up-to-date way to do it.
I don't think there is a more up-to-date way. The only other way would be to use UserInputService. I could post an answer explaining that a bit if you want?
Sure.