Inventory slots

my question is how can I apply move between slots in inventory using keyboard arrows or joysticks as all what I found on youtube is the method of drag ?