NB! It seems this console command is not compatible with CS2.
Command Profile

JOYSTICK_FORCE_DISABLED

CS:GO

This command prevents any joystick input from being pushed through, for cases where a piece of hardware that isn't a joystick is mistakenly identified as one by the game client.

Syntax
joystick_force_disabled [0 / 1]

Description

This command prevents any joystick input from being pushed through, for cases where a piece of hardware that isn't a joystick is mistakenly identified as one by the game client.

Syntax And Arguments

joystick_force_disabled [0 / 1]
0 / 1 Enter a 1 after the command to enable this command and stop all joystick inputs from working, and a 0 after the command to disable it.