There's not actually a different animation for main/offhand yet, so right clicking with a sword in the offhand will play the mainhand animation. I'll add in selecting your mainhand with 1-4, pressing 1-7 with the inventory open will already move items to your hotbar so makes sense to let you select them when its closed too.