Permalink
Browse files

Add Markdown-safe ¯\_(ツ)_/¯

  • Loading branch information...
ilianaw committed Feb 11, 2019
1 parent e7f7805 commit ed72ac9b58a8507a202ef7263c95f1c2ca8fe943
Showing with 9 additions and 2 deletions.
  1. +9 −2 Model01-Firmware.ino
@@ -133,16 +133,23 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
case MACRO_SHRUG:
// Originally from algernon: https://github.com/algernon/Model01-sketch/blob/721187bc8f2205a4b6bf798377f4cfb79e4deb36/src/Leader.cpp#L52-L66
if (keyToggledOn(keyState)) {
bool markdown = kaleidoscope::hid::wasModifierKeyActive(Key_LeftShift) || kaleidoscope::hid::wasModifierKeyActive(Key_RightShift);
Unicode.type(0xaf);
if (markdown)
Macros.play(MACRO(Tc(Backslash), Tc(Backslash)));
Macros.play(MACRO(Tc(Backslash),
D(RightShift),
Tc(Minus),
Tc(9),
U(RightShift)));
Unicode.type(0x30c4);
Macros.play(MACRO(D(RightShift),
Tc(0),
Tc(Minus),
Tc(0)));
if (markdown)
Macros.play(MACRO(U(RightShift),
Tc(Backslash),
D(RightShift)));
Macros.play(MACRO(Tc(Minus),
U(RightShift),
Tc(Slash)));
Unicode.type(0xaf);

0 comments on commit ed72ac9

Please sign in to comment.