The space button does not correctly take over the "aiming" function

When I place the “aiming” function on the Space button from the second mouse button, there is only an incomplete animation of the aiming. The animation trembles because it breaks off constantly and restarts.