Ambidentate Cyanide Ion
According to Pearsons hard soft [Lewis] acid base principle, hard Lewis acids have a strong affinity for hard Lewis bases and soft Lewis acids have a strong affinity for soft Lewis bases.

Cyanide ions are ambidentate: they can react via their softer carbanion centre to give cyanides, or via their harder nitranion centres to yield isocyanides. Cyanide ion can discriminate between hard and soft Lewis acid centres.

Note that while hard vs soft comparisons can be made for carefully selected pairs of species and/or reactive centres, the HSAB analysis is NOT general. For more information look in the Chemogenesis webbook section on Pearson's HSAB principle.