diff options
author | wanleg <32079073+wanleg@users.noreply.github.com> | 2018-08-17 16:11:21 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-08-17 16:11:21 -0700 |
commit | 9175eebc8796f31a481ba16b1ca2ba9e4432502e (patch) | |
tree | fe799b4792343343351be2dd3cc84715c3ffaafc /users/wanleg/wanleg.c | |
parent | 8007d9f3a7583adeedd26fa7ab1622e06fed8034 (diff) |
Keymap: Wanleg userspace (#3670)
* configure wanleg userspace
* additional layout support
* additional layout support
* userspace edits
* fix swap hands between 30 and 40 percent
* add additional keymaps
* userspace edits
* userspace configuration
* userspace configuration
* Update readme.md
* userspace work
* swap hands userspace fix
* made requested edits
* Update readme.md
* use relative paths instead of copying file
* Update wanleg.h
* fixing layer order
Diffstat (limited to 'users/wanleg/wanleg.c')
-rw-r--r-- | users/wanleg/wanleg.c | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c new file mode 100644 index 0000000000..0175ae2010 --- /dev/null +++ b/users/wanleg/wanleg.c @@ -0,0 +1,158 @@ +#include "wanleg.h" + +// Defines actions for my global custom keycodes. Defined in wanleg.h file +// Then runs the _keymap's record handier if not processed here +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QW); + } + return false; + break; + case GHERKIN: + if (record->event.pressed) { + set_single_persistent_default_layer(_GK); + } + return false; + break; + case gGHERKIN: + if (record->event.pressed) { + set_single_persistent_default_layer(gGK); + } + return false; + break; + case ONEHAND: + if (record->event.pressed) { + set_single_persistent_default_layer(ONE); + } + return false; + break; + case QWERTY75: + if (record->event.pressed) { + set_single_persistent_default_layer(QW75); + } + return false; + break; + case GHERKIN75: + if (record->event.pressed) { + set_single_persistent_default_layer(GK75); + } + return false; + break; + case SUBTER: + if (record->event.pressed) { + layer_on(SUB); + } else { + layer_off(SUB); + } + return false; + break; + case SUPRA: + if (record->event.pressed) { + layer_on(SUP); + } else { + layer_off(SUP); + } + return false; + break; + case NUMBER: + if (record->event.pressed) { + layer_on(NUM); + } else { + layer_off(NUM); + } + return false; + break; + case DIRECTION: + if (record->event.pressed) { + layer_on(DIR); + } else { + layer_off(DIR); + } + return false; + break; + case ETCETERA: + if (record->event.pressed) { + layer_on(ETC); + } else { + layer_off(ETC); + } + return false; + break; + case gNUMBER: + if (record->event.pressed) { + layer_on(gNUM); + } else { + layer_off(gNUM); + } + return false; + break; + case gDIRECTION: + if (record->event.pressed) { + layer_on(gDIR); + } else { + layer_off(gDIR); + } + return false; + break; + case gETCETERA: + if (record->event.pressed) { + layer_on(gETC); + } else { + layer_off(gETC); + } + return false; + break; + case SUBTER75: + if (record->event.pressed) { + layer_on(SUB75); + } else { + layer_off(SUB75); + } + return false; + break; + case SUPRA75: + if (record->event.pressed) { + layer_on(SUP75); + } else { + layer_off(SUP75); + } + return false; + break; + case NUMBER75: + if (record->event.pressed) { + layer_on(NUM75); + } else { + layer_off(NUM75); + } + return false; + break; + case DIRECTION75: + if (record->event.pressed) { + layer_on(DIR75); + } else { + layer_off(DIR75); + } + return false; + break; + case ETCETERA75: + if (record->event.pressed) { + layer_on(ETC75); + } else { + layer_off(ETC75); + } + return false; + break; + case FUNCTION75: + if (record->event.pressed) { + layer_on(FN75); + } else { + layer_off(FN75); + } + return false; + break; + } + return true; +} |