From 0cde8807476d0a7e855124b3145e6dfa1a55de12 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Tue, 30 Apr 2019 09:28:01 -0600 Subject: 🐮🥛 Butterstick Support 🥛🐮 (#5742) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json * Split the number button and fixed gaming mode. * started work on history feature * Working history/multikeyfuckery * type * inital code reduction refactor * Got multikey patched up, optimizing for size * Forgot to remove stuff * fixed key repeat * Key repeat added. * Symshift locking * Midchord Sym shenanigans. * Added only QWERTY mode * Split out header * Added stickybits, minimal layour * Fixing user layout * Whitespace fixing * Fixing Version name * Starting work on BS * Fixing default layout and rules * Updated Butter fw * Copy-paste rebase * more fixing from merge. Fuck * Forgot to roll version * Added revisions as per @mechmerlin --- keyboards/butterstick/sten.h | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 keyboards/butterstick/sten.h (limited to 'keyboards/butterstick/sten.h') diff --git a/keyboards/butterstick/sten.h b/keyboards/butterstick/sten.h new file mode 100644 index 000000000..5a9771d9a --- /dev/null +++ b/keyboards/butterstick/sten.h @@ -0,0 +1,77 @@ +// 2019, g Heavy Industries +// Blessed mother of Christ, please keep this readable +// and protect us from segfaults. For thine is the clock, +// the slave and the master. Until we return from main. +// +// Amen. + +#include QMK_KEYBOARD_H +#include "mousekey.h" +#include "keymap.h" +#include "keymap_steno.h" +#include "wait.h" + +extern size_t keymapsCount; // Total keymaps +extern uint32_t cChord; // Current Chord + +// Function defs +void processChord(bool useFakeSteno); +uint32_t processQwerty(bool lookup); +uint32_t processFakeSteno(bool lookup); +void saveState(uint32_t cChord); +void restoreState(void); + +// Macros for use in keymap.c +void SEND(uint8_t kc); +void REPEAT(void); +void SET_STICKY(uint32_t); +void SWITCH_LAYER(int); +void CLICK_MOUSE(uint8_t); + +// Keymap helper +#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} + +// Shift to internal representation +// i.e) S(teno)R(ight)F +#define STN(n) (1L<