The weak acid HCN is dissociated as follows :

The dissociation constant Ka is represented as,

When HCl is added, it increases the concentration of H3O+, hence in order to keep the ratio constant, then by Le Chatelier’s principle, the equilibrium is shifted from right to left, suppressing the dissociation of HCN.