diff options
author | Jeremy Bernhardt <jeremythegeek@gmail.com> | 2019-04-30 09:28:01 -0600 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-04-30 08:28:01 -0700 |
commit | 0cde8807476d0a7e855124b3145e6dfa1a55de12 (patch) | |
tree | 87ee8e102ac25d7b755565141f80c8be23f8c062 /keyboards/butterstick/sten.h | |
parent | b09dc19d3209a0e08f3d534b14d75d144b698558 (diff) | |
download | qmk_firmware-0cde8807476d0a7e855124b3145e6dfa1a55de12.tar.gz |
🐮🥛 Butterstick Support 🥛🐮 (#5742)
* 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 <jeremythegeek@gmail.com>
* Update keyboards/georgi/georgi.h
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/keymaps/default/keymap.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/keymaps/default/keymap.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/rules.mk
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/rules.mk
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/matrix.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/georgi.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/georgi.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/rules.mk
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/keymaps/default/keymap.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/keymaps/template/keymap.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/matrix.c
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Disabled features, updated info
* Update keyboards/georgi/config.h
Co-Authored-By: germ <jeremythegeek@gmail.com>
* Update keyboards/georgi/config.h
Co-Authored-By: germ <jeremythegeek@gmail.com>
* 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
Diffstat (limited to 'keyboards/butterstick/sten.h')
-rw-r--r-- | keyboards/butterstick/sten.h | 77 |
1 files changed, 77 insertions, 0 deletions
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<<n) +enum ORDER { + SFN = 0, SPWR, SST1, SST2, SST3, SST4, SNUML, SNUMR, + SLSU, SLSD, SLT, SLK, SLP, SLW, SLH, SLR, SLA, SLO, + SRE, SRU, SRF, SRR, SRP, SRB, SRL, SRG, SRT, SRS, SRD, SRZ, SRES1, SRES2 +}; + +// Break it all out +#define FN STN(SFN) +#define PWR STN(SPWR) +#define ST1 STN(SST1) +#define ST2 STN(SST2) +#define ST3 STN(SST3) +#define ST4 STN(SST4) +#define LNO STN(SNUML) // STN1-6 +#define RNO STN(SNUMR) // STN7-C +#define RES1 STN(SRES1) // Use reserved for sticky state +#define RES2 STN(SRES2) + +#define LSU STN(SLSU) +#define LSD STN(SLSD) +#define LFT STN(SLT) // (L)e(F)t (T), preprocessor conflict +#define LK STN(SLK) +#define LP STN(SLP) +#define LW STN(SLW) +#define LH STN(SLH) +#define LR STN(SLR) +#define LA STN(SLA) +#define LO STN(SLO) + +#define RE STN(SRE) +#define RU STN(SRU) +#define RF STN(SRF) +#define RR STN(SRR) +#define RP STN(SRP) +#define RB STN(SRB) +#define RL STN(SRL) +#define RG STN(SRG) +#define RT STN(SRT) +#define RS STN(SRS) +#define RD STN(SRD) +#define RZ STN(SRZ) |