Shortcut keys with enkoder

Hello,
I am building small deck - 8 keys [F13-F20,without matrix] and one volume knob.
I combined two codes: Building a DIY Stream Deck (Mini Macro Keyboard) - Parts Not Included
and: http://prusa3d.com/downloads/others/oversized_volume_knob.zip ,

The problem is that I get error:

In file included from c:\users\sebastian\documents\arduino\libraries\hid-project\src\hid-apis\KeyboardAPI.h:29:0,

from c:\users\sebastian\documents\arduino\libraries\hid-project\src\hid-apis\defaultkeyboardapi.h:27,

from C:\Users\Sebastian\Documents\Arduino\libraries\HID-Project\src/SingleReport/BootKeyboard.h:30,

from C:\Users\Sebastian\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:50,

from C:\Users\Sebastian\Documents\Arduino\DECK_2\DECK_2.ino:33:

c:\users\sebastian\documents\arduino\libraries\hid-project\src\keyboardlayouts\improvedkeylayouts.h:54:18: note: #pragma message: Using default ASCII layout for keyboard modules

#pragma message “Using default ASCII layout for keyboard modules”

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\Sebastian\Documents\Arduino\DECK_2\DECK_2.ino:34:0:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\libraries\Keyboard\src/Keyboard.h:95:7: error: redefinition of ‘class Keyboard_’

class Keyboard_ : public Print

^~~~~~~~~

In file included from C:\Users\Sebastian\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:51:0,

from C:\Users\Sebastian\Documents\Arduino\DECK_2\DECK_2.ino:33:

C:\Users\Sebastian\Documents\Arduino\libraries\HID-Project\src/MultiReport/ImprovedKeyboard.h:33:7: note: previous definition of ‘class Keyboard_’

class Keyboard_ : public DefaultKeyboardAPI

^~~~~~~~~

exit status 1
Error compiling for board Arduino Micro.

When I delete from code “#include <Keyboard.h>” I can run it, but keys are “H-O” [not F13-F20]

DECK_2.ino (4.66 KB)

ardu.jpg

#include <HID-Project.h>
#include <Keyboard.h>

Why do you include Keyboard.h?

To use F13-F20 buttons. Can I do this without this library? How?

I don't understand how you used the Keyboard and HID-Project libraries. The two libraries seems to do the same task (correct me if I'm wrong), so conflicts are predefined. I strongly recommend to use just one of them. You definitely don't need one just because it defines some keycodes.

Ok, it works, thanks for the advice :slight_smile:

DECK_5.ino (4.55 KB)