It’s all in how you handle it. Logically, what does “holding a button” or “double tapping” mean? It’s all pretty straightforward when you logically step through it in your head.
For checking if a player is holding a button, you could set a function timer on key press, and clear said function timer on release. If it hasn’t been released, it’ll execute the logic inside the function.
For double tapping, set a float (LastPress in this example) to the current time, every time you hit the key. Before setting said float, check it to see if CurrentTime - LastPress <= 200 to 300 milliseconds (tweak to your liking). If so, they’ve double tapped, execute the double tap logic.
For using the same key to interact/reload, it’s just more logic to step through conceptually. If you’re already detecting that an interactable object is within range (example, showing something on the screen to indicate to the user that they can open/use it), you’re 95% of the way there. Set some variables like, “ShouldInteract” = true, “InteractWith” = <the object>, etc. Just check for those variables when the key is pressed. Default to attempting a reload if there’s nothing set to interact with.
With all of this logic existing for one key, you have to account for more scenarios, though. Example, I’m about to die and frantically hitting R to reload. Should that door open up which has a flood of enemies behind it? Probably not. User Experience is key here and you’ll have to playtest it yourself a ton to make sure you’re not doing something which will frustrate your players. Another example is crouching and evading in one key. You’ll likely need the evade logic to run on key release, instead of on key press. Then, make sure it only evades if they didn’t crouch. Final example, double tapping. What happens on the first tap? Do you just wait to see if they tap again, or do you execute single tap logic so the game feels more snappy? It could appear janky if it cycles and then goes to the alternate weapon.
My own take on it is to run the logic as quickly as possible so people don’t feel like they have a delay to account for. For a dodge system it’s a lot easier since tapping right will move right, and double tapping will slightly move then dodge. It just feels snappy and responsive. This is a great example of synergy, however. As a player, I don’t mind if I step to the right just a bit before I dodge, and I appreciate that the movement controls don’t “wait” to see if I’m attempting a dodge or just strafing.
In your case, someone could have accidentally pressed the button to cycle, and could be quick enough to tap it again (hoping to get back to their primary weapon) and go to the alternate on accident. Be very careful with how you handle the logic, and remember that being agile is failing often. If the double tap just doesn’t work (or, rather, works but leads to some frustrating edge cases), try something else until you find the right solution. At the end of the day, you don’t want a player to expect one thing, and get a totally different outcome because you’re trying to be clever with keys. Your average gamer would rather have more keybindings than accidentally do something that’ll lead to an extremely frustrating death, for example.