As shown on the developer hub page, you can read the KeyCode value of the InputObject, to figure out what key a user is pressing.
local function onInputBegan(input, gameProcessed)
if input.KeyCode = Enum.KeyCode.F then
--the F key has been pressed
end
if input.KeyCode = Enum.KeyCode.LeftShift then
--the left Shift key has been pressed
end
end
UserInputService.InputBegan:Connect(onInputBegan)
If you would rather bind specific actions to a function, instead of filtering all input with .InputBegan, you can alternatively use ContextActionService.