Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to not use our short name override, which we need when not using keyboardiohid #1465

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/kaleidoscope/driver/hid/Keyboardio.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "kaleidoscope/driver/hid/keyboardio/Keyboard.h" // for Keyboard, KeyboardProps
#include "kaleidoscope/driver/hid/keyboardio/Mouse.h" // for Mouse, MouseProps

#define KALEIDOSCOPE_HID_DRIVER_KEYBOARDIOHID

namespace kaleidoscope {
namespace driver {
namespace hid {
Expand Down
1 change: 1 addition & 0 deletions src/kaleidoscope/layers.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
__NL__ \
_INIT_SKETCH_EXPLORATION __NL__ \
_INIT_HID_GETSHORTNAME
// TODO(jesse): re-enable GETSHORTNAME once we figure out how to do that for non-keyboardiohid devices

// Macro for defining the keymap. This should be used in the sketch
// file (*.ino) to define the keymap[] array that holds the user's
Expand Down
7 changes: 6 additions & 1 deletion src/kaleidoscope_internal/shortname.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@

#ifndef _INIT_HID_GETSHORTNAME

#define _INIT_HID_GETSHORTNAME __NL__ \
#ifdef KALEIDOSCOPE_HID_DRIVER_KEYBOARDIOHID

#define _INIT_HID_GETSHORTNAME __NL__ \
uint8_t HID_::getShortName(char *name) { __NL__ \
return Kaleidoscope.device().getShortName(name); __NL__ \
}

#else
#define _INIT_HID_GETSHORTNAME
#endif
#endif
Loading