Reading both on and off of a toggle with joystick.h

I am trying to get a simulator to read on and off for a toggle switch. Currently it will only read the state change, which only allows for a “toggle” not a true “on” (does one thing) and “off” (does the opposite). This is important as the toggle switch needs to show in the correct direction. Up is on, down is off.

Is it possible to show the HID (windows USB game controllers) as toggle switch (on) “up” is “1” and toggle switch (down) “off” is “2” for switch 1, on is “3”, off is “4” for switch 2…?

#include <Joystick.h>

  22, 0,                  // Button Count, Hat Switch Count
  false, false, false,     // X and Y, but no Z Axis
  false, false, false,   // No Rx, Ry, or Rz
  false, false,          // No rudder or throttle
  false, false, false);  // No accelerator, brake, or steering

void setup() {
  // Initialize Button Pins
  pinMode(0, INPUT_PULLUP);
  pinMode(1, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  pinMode(3, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);
  pinMode(5, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  pinMode(7, INPUT_PULLUP);
  pinMode(8, INPUT_PULLUP);
  pinMode(9, INPUT_PULLUP);
  pinMode(19, INPUT_PULLUP);
  pinMode(20, INPUT_PULLUP);
  pinMode(21, INPUT_PULLUP);
  pinMode(10, OUTPUT);
  pinMode(14, OUTPUT);
  pinMode(15, OUTPUT);
  pinMode(16, OUTPUT);
  pinMode(18, OUTPUT);
  // Initialize Joystick Library

// Constant that maps the phyical pin to the joystick button.
const int pinToButtonMap = 0;

// Last state of the button
int lastButtonState[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};

void loop() {

  // Turn LED's on or off
  if (lastButtonState[9] != 0) {digitalWrite(10,1);}
  else digitalWrite (10,0);
    if (lastButtonState[20] != 0) {digitalWrite(14,1);}
  else digitalWrite (14,0);
    if (lastButtonState[19] != 0) {digitalWrite(15,1);}
  else digitalWrite (15,0);
    if (lastButtonState[21] != 0) {digitalWrite(16,1);}
  else digitalWrite (16,0);
    if (lastButtonState[8] != 0) {digitalWrite(18,1);}
  else digitalWrite (18,0);

    // Read pin values
  for (int index = 0; index < 22; index++)
     if (index == 10) {index = 19;}
    int currentButtonState = !digitalRead(index + pinToButtonMap);
    if (currentButtonState != lastButtonState[index])
      Joystick.setButton(index, currentButtonState);
      lastButtonState[index] = currentButtonState;