How do I check what key is pressed with Enhanced Input system?

For context, I’m creating a third-person shooter by following along a course on udemy. I am in the midst of implementing the inventory system to equip different weapons in the inventory. Everything is done with no issues regarding the same.
My inventory is only for guns, with 6 different keybinds to access different weapon slots in the inventory to equip weapons in those slots. Keybinds are ‘F’ and ‘1’ through ‘5’ keys.
My current setup for the functionality is 6 different input actions for each slot, with 6 different functions in cpp to be called by the keys(one for each).
How do I check for what key is pressed so I can collapse those 6 separate functions into one? Have tried using IsInputKeyDown(EKey::F) but that does not work as an argument for that function. I found this as a solution to somebody else’s question that was similar.