Need help with using a rotary switch for a HID input

Don't forget that the analog pins can act as digital ones too.