How to detect a key down from input

I have a key assigned in input for accsesing the menu, however the pause menu, sets time.timescale to 0, so input.getaxis no longer works, how can I use input.getkey with the button assigned to the input, like a variable.

thanks

You can try in the function OnGUI() with the code (look here)

if( Event.current.isKey && Event.current.keyCode == ... )

You could use

Input.GetAxisRaw(“AxisNameEG: Horizontal”)

or Input.GetButton / Input.GetButtonDown / Input.GetButtonUp