Turn off clang-format for selected sections of code

There are a number of places in our code where clang-format tries too hard, and
destroys human readability, so I protected them with `clang-format off`
directives.

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1143/head
Michael Richters 3 years ago
parent 3252f9fb2b
commit 69333badc9
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -371,9 +371,11 @@ void RaiseKeyScanner::setKeyscanInterval(uint8_t interval) {
}
void RaiseKeyScanner::setup() {
// clang-format off
static constexpr uint8_t keyscanner_pins[] = {
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42
};
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
}; // clang-format on
for (int i = 0; i < sizeof(keyscanner_pins); i++) {
pinMode(keyscanner_pins[i], OUTPUT);
digitalWrite(keyscanner_pins[i], LOW);

@ -44,6 +44,7 @@ using kaleidoscope::driver::led::no_led;
struct RaiseLEDDriverProps : public kaleidoscope::driver::led::BaseProps {
static constexpr uint8_t led_count = 132;
// clang-format off
static constexpr uint8_t key_led_map[] = {
// ISO & ANSI (ANSI has no LED at 20, but this key can never be pressed so we can have just one map).
0, 1, 2, 3, 4, 5, 6, no_led, no_led, 6 + LHK, 5 + LHK, 4 + LHK, 3 + LHK, 2 + LHK, 1 + LHK, 0 + LHK,
@ -51,7 +52,7 @@ struct RaiseLEDDriverProps : public kaleidoscope::driver::led::BaseProps {
13, 14, 15, 16, 17, 18, no_led, no_led, no_led, 21 + LHK, 20 + LHK, 19 + LHK, 18 + LHK, 17 + LHK, 16 + LHK, 15 + LHK,
19, 20, 21, 22, 23, 24, 25, no_led, no_led, no_led, 27 + LHK, 26 + LHK, 25 + LHK, 24 + LHK, 23 + LHK, 22 + LHK,
26, 27, 28, 29, 30, no_led, 31, 32, 35 + LHK, 34 + LHK, 33 + LHK, 32 + LHK, 31 + LHK, 30 + LHK, 29 + LHK, 28 + LHK
};
}; // clang-format on
};
#undef LHK
@ -76,6 +77,7 @@ class RaiseLEDDriver : public kaleidoscope::driver::led::Base<RaiseLEDDriverProp
// led_count + 1, to account for the Neuron's LED. The last one is the
// Neuron's LED, never send that to SLED.
static constexpr uint8_t led_map[][RaiseLEDDriverProps::led_count + 1] = {
// clang-format off
// ISO
{
// left side - 33 keys includes LP
@ -108,7 +110,7 @@ class RaiseLEDDriver : public kaleidoscope::driver::led::Base<RaiseLEDDriverProp
34 + LPH, 35 + LPH, 36 + LPH, 37 + LPH, 38 + LPH, 39 + LPH, 40 + LPH, 41 + LPH, 42 + LPH, 43 + LPH, 44 + LPH, 45 + LPH, 46 + LPH, 47 + LPH, 48 + LPH, 49 + LPH, 50 + LPH, 51 + LPH,
52 + LPH, 53 + LPH, 54 + LPH, 55 + LPH, 56 + LPH, 57 + LPH, 58 + LPH, 59 + LPH, 60 + LPH, 61 + LPH, 62 + LPH, 63 + LPH, 64 + LPH, 65 + LPH, 0xff
}
};
}; // clang-format on
};
struct RaiseKeyScannerProps : public kaleidoscope::driver::keyscanner::BaseProps {
@ -230,6 +232,8 @@ typedef kaleidoscope::device::dygma::Raise Device;
} // namespace kaleidoscope
// clang-format off
#define PER_KEY_DATA(dflt, \
r0c0, r0c1, r0c2, r0c3, r0c4, r0c5, r0c6, r0c9, r0c10, r0c11, r0c12, r0c13, r0c14, r0c15, \
r1c0, r1c1, r1c2, r1c3, r1c4, r1c5, r1c8, r1c9, r1c10, r1c11, r1c12, r1c13, r1c14, r1c15, \

@ -96,6 +96,8 @@ class ErgoDox : public kaleidoscope::device::ATmega32U4Keyboard<ErgoDoxProps> {
class ErgoDox;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA_STACKED(dflt, \
/* left hand, spatial positions */ \
r0c0, r0c1, r0c2, r0c3, r0c4, r0c5, r0c6, \

@ -43,10 +43,12 @@ struct EvalProps: kaleidoscope::device::BaseProps {
class Eval: public kaleidoscope::device::Base<EvalProps> {};
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1 \
) \
R0C0, R0C1
// clang-format on
} // namespace gd32
} // namespace device

@ -63,6 +63,7 @@ class KBD4x;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6, R0C7, R0C8, R0C9, R0C10, R0C11, \
R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6, R1C7, R1C8, R1C9, R1C10, R1C11, \
@ -73,6 +74,7 @@ class KBD4x;
R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6, R1C7, R1C8, R1C9, R1C10, R1C11, \
R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R2C6, R2C7, R2C8, R2C9, R2C10, R2C11, \
R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R3C5, R3C7, R3C8, R3C9, R3C10, R3C11
// clang-format on
} // namespace kbdfans
} // namespace device

@ -61,6 +61,7 @@ class Atreus;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C7, R0C8, R0C9, R0C10, R0C11, \
@ -89,6 +90,8 @@ class Atreus;
R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R2C6, R2C7, R2C8, R2C9, R2C10, R2C11, \
R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R3C6, R3C7, R3C8, R3C9, R3C10, R3C11
// clang-format on
} // namespace keyboardio
} // namespace device

@ -43,11 +43,13 @@ using kaleidoscope::driver::led::no_led;
struct ImagoLEDDriverProps: public kaleidoscope::driver::led::BaseProps {
static constexpr uint8_t led_count = 78;
static constexpr uint8_t key_led_map[/* 5*16 */] PROGMEM = {
104, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 115, 12, 116,
// clang-format off
104, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 115, 12, 116,
91, 13, no_led, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 102, 15, 103,
78, 26, 27, 28, 29, 30, 31, no_led, 33, 34, 35, 36, 37, 89, 38, no_led,
65, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, no_led, 90,
52, 66, 53, 54, no_led, 56, 57, 71, 59, no_led, 61, 62, 63, 64, no_led, 77
// clang-format on
};
};
@ -107,6 +109,7 @@ class Imago: public kaleidoscope::device::ATmega32U4Keyboard<ImagoProps> {
};
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6, R0C7, R0C8, R0C9, R0C10, R0C11, R0C12, R0C13, R0C14, R0C15, \
R1C0, R1C1, R1C3, R1C4, R1C5, R1C6, R1C7, R1C8, R1C9, R1C10, R1C11, R1C12, R1C13, R1C14, R1C15, \
@ -119,6 +122,7 @@ class Imago: public kaleidoscope::device::ATmega32U4Keyboard<ImagoProps> {
R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R2C6, XXX, R2C8, R2C9, R2C10, R2C11, R2C12, R2C13, R2C14, XXX , \
R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R3C6, R3C7, R3C8, R3C9, R3C10, R3C11, R3C12, R3C13, XXX, R3C15, \
R4C0, R4C1, R4C2, R4C3, XXX, R4C5, R4C6, R4C7, R4C8, XXX, R4C10, R4C11, R4C12, R4C13, XXX, R4C15
// clang-format on
} // namespace keyboardio
} // namespace device

@ -53,10 +53,12 @@ namespace keyboardio {
struct Model01LEDDriverProps : public kaleidoscope::driver::led::BaseProps {
static constexpr uint8_t led_count = 64;
static constexpr uint8_t key_led_map[] PROGMEM = {
// clang-format off
3, 4, 11, 12, 19, 20, 26, 27, 36, 37, 43, 44, 51, 52, 59, 60,
2, 5, 10, 13, 18, 21, 25, 28, 35, 38, 42, 45, 50, 53, 58, 61,
1, 6, 9, 14, 17, 22, 24, 29, 34, 39, 41, 46, 49, 54, 57, 62,
0, 7, 8, 15, 16, 23, 31, 30, 33, 32, 40, 47, 48, 55, 56, 63,
1, 6, 9, 14, 17, 22, 24, 29, 34, 39, 41, 46, 49, 54, 57, 62,
0, 7, 8, 15, 16, 23, 31, 30, 33, 32, 40, 47, 48, 55, 56, 63,
// clang-format on
};
};
@ -143,6 +145,8 @@ EXPORT_DEVICE(kaleidoscope::device::keyboardio::Model01)
} // namespace kaleidoscope
// clang-format off
#define PER_KEY_DATA_STACKED(dflt, \
r0c0, r0c1, r0c2, r0c3, r0c4, r0c5, r0c6, \
r1c0, r1c1, r1c2, r1c3, r1c4, r1c5, r1c6, \

@ -55,10 +55,12 @@ struct Model100StorageProps: public kaleidoscope::driver::storage::GD32FlashProp
struct Model100LEDDriverProps : public kaleidoscope::driver::led::BaseProps {
static constexpr uint8_t led_count = 64;
static constexpr uint8_t key_led_map[] PROGMEM = {
// clang-format off
3, 4, 11, 12, 19, 20, 26, 27, 36, 37, 43, 44, 51, 52, 59, 60,
2, 5, 10, 13, 18, 21, 25, 28, 35, 38, 42, 45, 50, 53, 58, 61,
1, 6, 9, 14, 17, 22, 24, 29, 34, 39, 41, 46, 49, 54, 57, 62,
0, 7, 8, 15, 16, 23, 31, 30, 33, 32, 40, 47, 48, 55, 56, 63,
1, 6, 9, 14, 17, 22, 24, 29, 34, 39, 41, 46, 49, 54, 57, 62,
0, 7, 8, 15, 16, 23, 31, 30, 33, 32, 40, 47, 48, 55, 56, 63,
// clang-format on
};
};
@ -165,6 +167,8 @@ EXPORT_DEVICE(kaleidoscope::device::keyboardio::Model100)
} // namespace kaleidoscope
// clang-format off
#define PER_KEY_DATA_STACKED(dflt, \
r0c0, r0c1, r0c2, r0c3, r0c4, r0c5, r0c6, \
r1c0, r1c1, r1c2, r1c3, r1c4, r1c5, r1c6, \

@ -56,6 +56,7 @@ class Planck;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6, R0C7, R0C8, R0C9, R0C10, R0C11, \
R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6, R1C7, R1C8, R1C9, R1C10, R1C11, \
@ -66,6 +67,7 @@ class Planck;
R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6, R1C7, R1C8, R1C9, R1C10, R1C11, \
R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R2C6, R2C7, R2C8, R2C9, R2C10, R2C11, \
R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R3C6, R3C7, R3C8, R3C9, R3C10, R3C11
// clang-format on
} // namespace olkb
} // namespace device

@ -68,6 +68,8 @@ class Splitography: public kaleidoscope::device::ATmega32U4Keyboard<Splitography
class Splitography;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
r0c0 ,r0c1 ,r0c2 ,r0c3 ,r0c4 ,r0c5 ,r0c6 ,r0c7 ,r0c8 ,r0c9 ,r0c10 ,r0c11 \
,r1c0 ,r1c1 ,r1c2 ,r1c3 ,r1c4 ,r1c5 ,r1c6 ,r1c7 ,r1c8 ,r1c9 ,r1c10 ,r1c11 \
@ -96,6 +98,8 @@ class Splitography;
r2c0 ,r2c1 ,r2c2 ,r2c3 ,r2c4 ,r2c5 ,r2c6 ,r2c7 ,r2c8 ,r2c9 ,r2c10 ,r2c11, \
dflt ,dflt ,dflt ,dflt ,r3c4 ,r3c5 ,r3c6 ,r3c7 ,dflt ,dflt ,dflt ,dflt
// clang-format on
} // namespace softhruf
} // namespace device

@ -85,6 +85,8 @@ class Atreus: public kaleidoscope::device::ATmega32U4Keyboard<AtreusProps> {};
class Atreus;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C7, R0C8, R0C9, R0C10, R0C11, \
R1C0, R1C1, R1C2, R1C3, R1C4, R1C7, R1C8, R1C9, R1C10, R1C11, \
@ -113,6 +115,8 @@ class Atreus;
R2C0, R2C1, R2C2, R2C3, R2C4, R3C5, R2C7, R2C8, R2C9, R2C10, R2C11, \
R3C0, R3C1, R3C2, R3C3, R3C4, R3C6, R3C7, R3C8, R3C9, R3C10, R3C11
// clang-format on
} // namespace technomancy
} // namespace device

@ -58,12 +58,15 @@ class ButterStick;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6, R0C7, R0C8, R0C9, \
R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6, R1C7, R1C8, R1C9 \
) \
R0C9, R0C8, R0C7, R0C6, R0C5, R0C4, R0C3, R0C2, R0C1, R0C0, \
R1C9, R1C8, R1C7, R1C6, R1C5, R1C4, R1C3, R1C2, R1C1, R1C0
// clang-format on
} // namespace gheavy
} // namespace device

@ -58,11 +58,14 @@ class FaunchPad;
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
// clang-format off
#define PER_KEY_DATA(dflt, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6, R0C7 \
) \
R0C0, R0C1, R0C2, R0C3, \
R0C4, R0C5, R0C6, R0C7
// clang-format on
} // namespace gheavy
} // namespace device

@ -25,16 +25,18 @@
struct cRGB;
// clang-format off
#define SYM4x4( \
p00, p01, p02, p03, \
p10, p11, p12, p13, \
p20, p21, p22, p23, \
p30, p31, p32, p33) \
p30, p31, p32, p33) \
(uint16_t) ( \
p00 << 0 | p01 << 1 | p02 << 2 | p03 << 3 | \
p10 << 4 | p11 << 5 | p12 << 6 | p13 << 7 | \
p20 << 8 | p21 << 9 | p22 << 10 | p23 << 11 | \
p30 << 12 | p31 << 13 | p32 << 14 | p33 << 15 )
// clang-format on
namespace kaleidoscope {
namespace plugin {

@ -14,6 +14,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#ifndef KALEIDOSCOPE_LED_FONT

@ -26,11 +26,14 @@ namespace plugin {
namespace alpha_square {
namespace symbols {
// clang-format off
/* λ */
static constexpr uint16_t Lambda = SYM4x4(1, 0, 0, 0,
0, 1, 0, 0,
0, 1, 1, 0,
1, 0, 0, 1);
// clang-format on
} // namespace symbols
} // namespace alpha_square

@ -44,10 +44,12 @@ int16_t WavepoolEffect::ripple_hue = WavepoolEffect::rainbow_hue; // automatic h
// map native keyboard coordinates (16x4) into geometric space (14x5)
PROGMEM const uint8_t WavepoolEffect::TransientLEDMode::rc2pos[Runtime.device().numKeys()] = {
// clang-format off
0, 1, 2, 3, 4, 5, 6, 59, 66, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 34, 60, 65, 35, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 48, 61, 64, 49, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 58, 62, 63, 67, 50, 51, 52, 53, 54, 55,
// clang-format on
};
WavepoolEffect::TransientLEDMode::TransientLEDMode(const WavepoolEffect *parent)
@ -162,11 +164,14 @@ void WavepoolEffect::TransientLEDMode::update(void) {
uint8_t offset = (y * WP_WID) + x;
int16_t value;
int8_t offsets[] = { -WP_WID, WP_WID,
-1, 1,
-WP_WID - 1, -WP_WID + 1,
WP_WID - 1, WP_WID + 1
};
int8_t offsets[] = {
// clang-format off
-WP_WID, WP_WID,
-1, 1,
-WP_WID - 1, -WP_WID + 1,
WP_WID - 1, WP_WID + 1
// clang-format on
};
// don't wrap around edges or go out of bounds
if (y == 0) {
offsets[0] = 0;

@ -16,6 +16,7 @@
#pragma once
// clang-format off
// These mappings were extracted and transcribed from
// https://www.usb.org/sites/default/files/hut1_2.pdf

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include <Arduino.h> // for PROGMEM

@ -72,6 +72,7 @@ void DefaultHIDReportConsumer::processHIDReport(
if (!anything) {
keypresses << "none";
} else {
// clang-format off
FOREACHBIT(report_data.modifiers, keypresses,
"lctrl ", "lshift ", "lalt ", "lgui ",
"rctrl ", "rshift ", "ralt ", "rgui ")
@ -114,6 +115,7 @@ void DefaultHIDReportConsumer::processHIDReport(
FOREACHBIT(report_data.keys[16], keypresses,
"volup ", "voldn ", "capslock_l ", "numlock_l ",
"scrolllock_l ", "num, ", "num= ", "(other) ")
// clang-format on
for (int i = 17; i < KEY_BYTES; i++) {
// A little imprecise, in two ways:

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
// This file defines the names and argument signatures for all event handlers

@ -30,6 +30,7 @@ namespace kaleidoscope {
// that we can compile sketches that use no plugins, without them having to use
// KALEIDOSCOPE_INIT_PLUGINS() with a dummy plugin.
// clang-format off
#define INSTANTIATE_WEAK_HOOK_FUNCTION( \
HOOK_NAME, HOOK_VERSION, DEPRECATION_TAG, \
SHOULD_EXIT_IF_RESULT_NOT_OK, \
@ -43,6 +44,7 @@ namespace kaleidoscope {
}
_FOR_EACH_EVENT_HANDLER(INSTANTIATE_WEAK_HOOK_FUNCTION)
// clang-format on
#undef INSTANTIATE_WEAK_HOOK_FUNCTION

@ -64,6 +64,7 @@ class Hooks {
// The following private functions are just to be called by classes
// and functions that are declared as friends above.
// clang-format off
#define DEFINE_WEAK_HOOK_FUNCTION( \
HOOK_NAME, HOOK_VERSION, DEPRECATION_TAG, \
SHOULD_EXIT_IF_RESULT_NOT_OK, \
@ -76,6 +77,8 @@ class Hooks {
_FOR_EACH_EVENT_HANDLER(DEFINE_WEAK_HOOK_FUNCTION)
#undef DEFINE_WEAK_HOOK_FUNCTION
// clang-format on
};
} // namespace kaleidoscope

@ -22,6 +22,7 @@ static const uint8_t LAYER_OP_OFFSET = 42;
static const uint8_t LAYER_SHIFT_OFFSET = LAYER_OP_OFFSET;
static const uint8_t LAYER_MOVE_OFFSET = LAYER_SHIFT_OFFSET + LAYER_OP_OFFSET;;
// Layer number constants
#define KEYMAP_0 0
#define KEYMAP_1 1
#define KEYMAP_2 2
@ -31,17 +32,19 @@ static const uint8_t LAYER_MOVE_OFFSET = LAYER_SHIFT_OFFSET + LAYER_OP_OFFSET;;
#define KEYMAP_6 6
#define KEYMAP_7 7
// Previous/next layer key constants
#define KEYMAP_PREVIOUS 33
#define KEYMAP_NEXT 34
// Layer lock keys
#define Key_Keymap0 Key(KEYMAP_0, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap1 Key(KEYMAP_1, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap2 Key(KEYMAP_2, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap3 Key(KEYMAP_3, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap4 Key(KEYMAP_4, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap5 Key(KEYMAP_5, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
// Layer shift keys
#define Key_Keymap0_Momentary Key(KEYMAP_0 + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap1_Momentary Key(KEYMAP_1 + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap2_Momentary Key(KEYMAP_2 + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
@ -49,6 +52,7 @@ static const uint8_t LAYER_MOVE_OFFSET = LAYER_SHIFT_OFFSET + LAYER_OP_OFFSET;;
#define Key_Keymap4_Momentary Key(KEYMAP_4 + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_Keymap5_Momentary Key(KEYMAP_5 + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
// Next/previous layer shift keys
#define Key_KeymapNext_Momentary Key(KEYMAP_NEXT + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)
#define Key_KeymapPrevious_Momentary Key(KEYMAP_PREVIOUS + LAYER_SHIFT_OFFSET, KEY_FLAGS | SYNTHETIC | SWITCH_TO_KEYMAP)

@ -29,6 +29,8 @@
#include "kaleidoscope_internal/shortname.h" // for _INIT_HID_GETSHOR...
#include "kaleidoscope_internal/sketch_exploration/sketch_exploration.h" // for _INIT_SKETCH_EXPL...
// clang-format off
#define START_KEYMAPS __NL__ \
constexpr Key keymaps_linear[][kaleidoscope_internal::device.matrix_rows * kaleidoscope_internal::device.matrix_columns] PROGMEM = {
@ -48,6 +50,8 @@
layers __NL__ \
END_KEYMAPS
// clang-format on
extern uint8_t layer_count;
namespace kaleidoscope {

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
// Code generated by muli-line pre-processor macros is hard to read after

@ -26,6 +26,8 @@
* prior written authorization from the authors.
*/
// clang-format off
#pragma once
#define EVAL0(...) __VA_ARGS__

@ -1,5 +1,7 @@
// -*- mode: c++ -*-
// clang-format off
#pragma once
// We use `include-what-you-use`, which uses `clang` to help manage header

@ -383,6 +383,8 @@ class LEDModeManager {
} // namespace internal
} // namespace kaleidoscope
// clang-format off
// Some auxiliary macros that are mapped to the list of
// plugins defined via KALEIDOSCOPE_INIT_PLUGINS follow.

@ -14,8 +14,12 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include "kaleidoscope/macro_helpers.h" // for __NL__
// Please note that due to a bug in older gcc versions the following
// warning suppressions mechanism does not work for gcc versions below 6.1.

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include "kaleidoscope/macro_helpers.h"

@ -31,6 +31,8 @@
* generated code in an entirely different namespace.
*/
// clang-format off
#pragma once
#include "kaleidoscope/event_handlers.h"

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include "kaleidoscope/event_handlers.h" // for _PROCESS_E...

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
/*

@ -208,6 +208,8 @@ extern void pluginsExploreSketch();
//
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// clang-format off
// This macro defines a Sketch interface class that is passed to the
// exploreSketch<_Sketch>(...)-hook.
//
@ -302,5 +304,7 @@ extern void pluginsExploreSketch();
} /* namespace sketch_exploration */ \
} /* namespace kaleidoscope */
// clang-format on
} // namespace sketch_exploration
} // namespace kaleidoscope

@ -156,6 +156,8 @@ struct Plugins__ {
} // namespace sketch_exploration
} // namespace kaleidoscope
// clang-format off
#define _FIX_PLUGIN_TYPE_AND_NAME_AMBIGUITIES(T) T
#define _INIT_PLUGIN_EXPLORATION(...) \

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include "kaleidoscope_internal/sketch_exploration/keymap_exploration.h"

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include "kaleidoscope/macro_helpers.h" // for __NL__

@ -14,6 +14,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#pragma once
#include "kaleidoscope/macro_helpers.h" // for __NL__, UNWRAP, ADD_TEMPLATE...

Loading…
Cancel
Save