'JOYSTICK_' 32-FUNCTION-BUTTON-BOX-master Error uploading sketch

Hello Friends,
am new here. am trying to upload a popular sketch "from internet" to my Arduino Micro.
first it give this error "Keypad.h" and i searched here and found that i have to download it to library. i did and it was solved.
then i faced another error "Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
JOYSTICK_TYPE_JOYSTICK, 32, 0,
false, false, false, false, false, false,
false, false, false, false, false);"
i downloaded all joystick from library but it didn't work. I also downloaded this joystick library and i didn't work too.

MHeironimus/ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support. - MHeironimus/ArduinoJoystickLibrary
here is the error.
thanks in advance.

</> Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Micro"

ARDUINO_BUTTON_BOXV2:97:1: error: 'Joystick_' does not name a type; did you mean 'Joystick'?

Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,

^~~~~~~~~

Joystick

C:\Users\Ibrahim\Desktop\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino: In function 'void setup()':

ARDUINO_BUTTON_BOXV2:103:11: error: expected unqualified-id before '.' token

Joystick.begin();

       ^

C:\Users\Ibrahim\Desktop\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino: In function 'void CheckAllButtons()':

ARDUINO_BUTTON_BOXV2:124:39: error: expected unqualified-id before '.' token

                           Joystick.setButton(buttbx.key[i].kchar, 1);

                                   ^

ARDUINO_BUTTON_BOXV2:128:39: error: expected unqualified-id before '.' token

                           Joystick.setButton(buttbx.key[i].kchar, 0);

                                   ^

C:\Users\Ibrahim\Desktop\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino: In function 'void CheckAllEncoders()':

ARDUINO_BUTTON_BOXV2:159:15: error: expected unqualified-id before '.' token

   Joystick.setButton(rotaries[i].ccwchar, 1); delay(50); Joystick.setButton(rotaries[i].ccwchar, 0);

           ^

ARDUINO_BUTTON_BOXV2:159:70: error: expected unqualified-id before '.' token

   Joystick.setButton(rotaries[i].ccwchar, 1); delay(50); Joystick.setButton(rotaries[i].ccwchar, 0);

                                                                  ^

ARDUINO_BUTTON_BOXV2:162:15: error: expected unqualified-id before '.' token

   Joystick.setButton(rotaries[i].cwchar, 1); delay(50); Joystick.setButton(rotaries[i].cwchar, 0);

           ^

ARDUINO_BUTTON_BOXV2:162:69: error: expected unqualified-id before '.' token

   Joystick.setButton(rotaries[i].cwchar, 1); delay(50); Joystick.setButton(rotaries[i].cwchar, 0);

                                                                 ^

Multiple libraries were found for "Joystick.h"

Used: C:\Users\Ibrahim\Documents\Arduino\libraries\Joystick

Not used: C:\Users\Ibrahim\Documents\Arduino\libraries\ArduinoJoystickLibrary-master

Not used: C:\Users\Ibrahim\Documents\Arduino\libraries\AxisJoystick

exit status 1

'Joystick_' does not name a type; did you mean 'Joystick'?

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

use </> button at inserting a code or Error messages.

thanks

i have no errors

When uploading the sketch to the board this error appears and stops loading.

Joystick_' does not name a type; did you mean 'Joystick'?

i have this error not. it compiles completely and uploaded how expected

So, would it be any of the below cases,
Cable problem
Board type
Computer issue

replace old Cable/Board/Computer with new one but please don't post your sketch here. let me guess to the end.

thanks for your efforts and time :slight_smile:

It will definitely not be a cable problem as you do not even get to the upload stage. Your board type is correct and this is not a computer issue in the sense that it requires you to troubleshoot your PC (although one never knows how or what Microsoft manages to screw up).

Have you tried one of the examples that come with the library?