diff options
| -rw-r--r-- | keyboards/lets_split/keymaps/henxing/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/lets_split/keymaps/henxing/Readme.md | 51 | ||||
| -rw-r--r-- | keyboards/lets_split/keymaps/henxing/config.h | 37 | ||||
| -rw-r--r-- | keyboards/lets_split/keymaps/henxing/keymap.c | 114 | ||||
| m--------- | lib/chibios | 0 |
5 files changed, 205 insertions, 0 deletions
diff --git a/keyboards/lets_split/keymaps/henxing/Makefile b/keyboards/lets_split/keymaps/henxing/Makefile new file mode 100644 index 000000000..457a3d01d --- /dev/null +++ b/keyboards/lets_split/keymaps/henxing/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef QUANTUM_DIR | ||
| 2 | include ../../../../Makefile | ||
| 3 | endif | ||
diff --git a/keyboards/lets_split/keymaps/henxing/Readme.md b/keyboards/lets_split/keymaps/henxing/Readme.md new file mode 100644 index 000000000..231aa6adf --- /dev/null +++ b/keyboards/lets_split/keymaps/henxing/Readme.md | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | # Let's Split the Atreus | ||
| 2 | |||
| 3 | This keymap is a port of the Atreus keymap to the Let's Split keyboard, using a | ||
| 4 | similar method of handling layer switches as the `default` keymap. | ||
| 5 | |||
| 6 | |||
| 7 | # Layers | ||
| 8 | |||
| 9 | The following tables are the layers as implemented. | ||
| 10 | |||
| 11 | ### Underscores in Layer | ||
| 12 | |||
| 13 | Any underscore represents a key that is mapped to `KC_NO`, or no keypress. The | ||
| 14 | 2x3 block in the middle is like this because the Atreus does not have any keys | ||
| 15 | there. It has been left blank for the user to add her own special keypresses or | ||
| 16 | macros that she finds useful to have on that particular layer. | ||
| 17 | |||
| 18 | |||
| 19 | ## `_QWERTY` | ||
| 20 | |||
| 21 | ```c | ||
| 22 | /* | ||
| 23 | * q w e r t _ _ y u i o p | ||
| 24 | * a s d f g _ _ h j k l ; | ||
| 25 | * z x c v b _ _ n m , . / | ||
| 26 | * esc tab gui shift bksp ctrl alt space fn - ' enter | ||
| 27 | */ | ||
| 28 | ``` | ||
| 29 | |||
| 30 | |||
| 31 | ## `_LOWER` | ||
| 32 | |||
| 33 | ```c | ||
| 34 | /* | ||
| 35 | * ! @ up { } _ _ pgup 7 8 9 * | ||
| 36 | * # left down right $ _ _ pgdn 4 5 6 + | ||
| 37 | * [ ] ( ) & _ _ ` 1 2 3 \ | ||
| 38 | * lower insert gui shift bksp ctrl alt space fn . 0 = | ||
| 39 | */ | ||
| 40 | ``` | ||
| 41 | |||
| 42 | ## `_RAISE` | ||
| 43 | |||
| 44 | ```c | ||
| 45 | /* | ||
| 46 | * insert home up end pgup _ _ up F7 F8 F9 F10 | ||
| 47 | * del left down right pgdn _ _ down F4 F5 F6 F11 | ||
| 48 | * _ volup _ _ reset _ _ F1 F2 F3 F12 | ||
| 49 | * _ voldn super shift bksp ctrl alt space L0 prtsc scroll pause | ||
| 50 | */ | ||
| 51 | ``` | ||
diff --git a/keyboards/lets_split/keymaps/henxing/config.h b/keyboards/lets_split/keymaps/henxing/config.h new file mode 100644 index 000000000..7f33a4363 --- /dev/null +++ b/keyboards/lets_split/keymaps/henxing/config.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | This is the c configuration file for the keymap | ||
| 3 | |||
| 4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 5 | Copyright 2015 Jack Humbert | ||
| 6 | |||
| 7 | This program is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 2 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | This program is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef CONFIG_USER_H | ||
| 22 | #define CONFIG_USER_H | ||
| 23 | |||
| 24 | #include "../../config.h" | ||
| 25 | |||
| 26 | /* Use I2C or Serial, not both */ | ||
| 27 | |||
| 28 | #define USE_SERIAL | ||
| 29 | // #define USE_I2C | ||
| 30 | |||
| 31 | /* Select hand configuration */ | ||
| 32 | |||
| 33 | #define MASTER_LEFT | ||
| 34 | // #define _MASTER_RIGHT | ||
| 35 | // #define EE_HANDS | ||
| 36 | |||
| 37 | #endif \ No newline at end of file | ||
diff --git a/keyboards/lets_split/keymaps/henxing/keymap.c b/keyboards/lets_split/keymaps/henxing/keymap.c new file mode 100644 index 000000000..49b89b113 --- /dev/null +++ b/keyboards/lets_split/keymaps/henxing/keymap.c | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | #include "lets_split.h" | ||
| 2 | #include "action_layer.h" | ||
| 3 | #include "eeconfig.h" | ||
| 4 | |||
| 5 | extern keymap_config_t keymap_config; | ||
| 6 | |||
| 7 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 8 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 9 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 10 | // entirely and just use numbers. | ||
| 11 | #define _QWERTY 0 | ||
| 12 | #define _LOWER 1 | ||
| 13 | #define _RAISE 2 | ||
| 14 | |||
| 15 | enum custom_keycodes { | ||
| 16 | QWERTY = SAFE_RANGE, | ||
| 17 | LOWER, | ||
| 18 | RAISE | ||
| 19 | }; | ||
| 20 | |||
| 21 | // Fillers to make layering more clear | ||
| 22 | #define _______ KC_TRNS | ||
| 23 | #define XXXXXXX KC_NO | ||
| 24 | |||
| 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 26 | |||
| 27 | /* | ||
| 28 | * q w e r t _ _ y u i o p | ||
| 29 | * a s d f g _ _ h j k l ; | ||
| 30 | * z x c v b _ _ n m , . / | ||
| 31 | * esc tab gui shift bksp ctrl alt space fn - ' enter | ||
| 32 | */ | ||
| 33 | [_QWERTY] = KEYMAP( \ | ||
| 34 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, \ | ||
| 35 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ | ||
| 36 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ | ||
| 37 | KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ | ||
| 38 | ), | ||
| 39 | |||
| 40 | /* | ||
| 41 | * ! @ up { } _ _ pgup 7 8 9 * | ||
| 42 | * # left down right $ _ _ pgdn 4 5 6 + | ||
| 43 | * [ ] ( ) & _ _ ` 1 2 3 \ | ||
| 44 | * lower insert gui shift bksp ctrl alt space fn . 0 = | ||
| 45 | */ | ||
| 46 | [_LOWER] = KEYMAP( \ | ||
| 47 | KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ | ||
| 48 | KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_NO, KC_NO, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ | ||
| 49 | KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_NO, KC_NO, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ | ||
| 50 | RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ | ||
| 51 | ), | ||
| 52 | |||
| 53 | /* | ||
| 54 | * insert home up end pgup _ _ up F7 F8 F9 F10 | ||
| 55 | * del left down right pgdn _ _ down F4 F5 F6 F11 | ||
| 56 | * _ volup _ _ reset _ _ F1 F2 F3 F12 | ||
| 57 | * _ voldn super shift bksp ctrl alt space L0 prtsc scroll pause | ||
| 58 | */ | ||
| 59 | [_RAISE] = KEYMAP( \ | ||
| 60 | KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ | ||
| 61 | KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_NO, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ | ||
| 62 | KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_NO, KC_NO, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ | ||
| 63 | KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ | ||
| 64 | ) | ||
| 65 | |||
| 66 | }; | ||
| 67 | |||
| 68 | #ifdef AUDIO_ENABLE | ||
| 69 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 70 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 71 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | void persistent_default_layer_set(uint16_t default_layer) { | ||
| 75 | eeconfig_update_default_layer(default_layer); | ||
| 76 | default_layer_set(default_layer); | ||
| 77 | } | ||
| 78 | |||
| 79 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 80 | |||
| 81 | // The value to return | ||
| 82 | bool return_value = false; | ||
| 83 | |||
| 84 | switch (keycode) { | ||
| 85 | case QWERTY: | ||
| 86 | if (record->event.pressed) { | ||
| 87 | #ifdef AUDIO_ENABLE | ||
| 88 | PLAY_SONG(tone_qwerty); | ||
| 89 | #endif | ||
| 90 | persistent_default_layer_set(1UL<<_QWERTY); | ||
| 91 | } | ||
| 92 | break; | ||
| 93 | |||
| 94 | case LOWER: | ||
| 95 | if (record->event.pressed) { | ||
| 96 | layer_on(_LOWER); | ||
| 97 | } else { | ||
| 98 | layer_off(_LOWER); | ||
| 99 | } | ||
| 100 | break; | ||
| 101 | |||
| 102 | case RAISE: | ||
| 103 | persistent_default_layer_set(1UL<<_RAISE); | ||
| 104 | break; | ||
| 105 | default: | ||
| 106 | |||
| 107 | // If the keycode is not handled by any of the other cases, we | ||
| 108 | // should return true | ||
| 109 | return_value = true; | ||
| 110 | break; | ||
| 111 | } | ||
| 112 | |||
| 113 | return return_value; | ||
| 114 | } | ||
diff --git a/lib/chibios b/lib/chibios | |||
| Subproject d34e8eb83101a95f98892bf68605fe545821f32 | Subproject 8fce03b3a75c743e5d5c40b9d59c1637c59d22a | ||
