This defeats the whole purpose of this thread, which is to NOT use third-party solutions, but to have it a built-in feature accessible for everyone.
Unity’s Input System does this with excellence, you don’t need any third-party solution, just plug and play!