With the object selected in the scene, right-click the attribute in the
Channel Box and select
Lock Attribute. Maya displays locked attributes with a gray background.

Locking a Channel Box attribute
To unlock an attribute, Right-click and select Unlock Attribute.
Locked Channel Box attributes appear gray and non-keyable attributes show as light gray. See Channel Box colors for a list of the different color states that appear in the Channel Box.