Is it possible to make so when you press R link swings his sword and to be able to choose what item goes on the A button?

EDIT: just found out that it's a quest rule that allows you to choose what item goes on the A button so I don't need that anymore but I still what to be able to make it so that if you press R link swings his sword