Skip to content

Commit

Permalink
Make it possible to not use our short name override, which we need wh…
Browse files Browse the repository at this point in the history
…en not using keyboardiohid
  • Loading branch information
obra committed Mar 25, 2024
1 parent 1f8d465 commit 1a1ab9c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
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

0 comments on commit 1a1ab9c

Please sign in to comment.