diff options
| author | Ross Montsinger <rmontsinger@gmail.com> | 2021-01-01 18:05:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-01 15:05:02 -0800 |
| commit | fcd921f3aa9475f82b0f1a3f35e0d791b1614801 (patch) | |
| tree | bed1ebf9b0d3806c682f5d8e65be095bec79f54b /keyboards/montsinger | |
| parent | e11d3d524da21912250dae170fa8e0d2039f6bcb (diff) | |
| download | qmk_firmware-fcd921f3aa9475f82b0f1a3f35e0d791b1614801.tar.gz qmk_firmware-fcd921f3aa9475f82b0f1a3f35e0d791b1614801.zip | |
[Keyboard] Rebound, adding files for VIA compat (#11193)
* changes for via
* add manu to product name
* remove manu from product value
* remove description
* i m licensed
Diffstat (limited to 'keyboards/montsinger')
| -rw-r--r-- | keyboards/montsinger/rebound/rev4/config.h | 1 | ||||
| -rw-r--r-- | keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c | 118 | ||||
| -rw-r--r-- | keyboards/montsinger/rebound/rev4/keymaps/via/rules.mk | 2 |
3 files changed, 120 insertions, 1 deletions
diff --git a/keyboards/montsinger/rebound/rev4/config.h b/keyboards/montsinger/rebound/rev4/config.h index 9932cd2d6..be97ab98d 100644 --- a/keyboards/montsinger/rebound/rev4/config.h +++ b/keyboards/montsinger/rebound/rev4/config.h | |||
| @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 23 | #define DEVICE_VER 0x0002 | 23 | #define DEVICE_VER 0x0002 |
| 24 | #define MANUFACTURER Montsinger | 24 | #define MANUFACTURER Montsinger |
| 25 | #define PRODUCT Rebound | 25 | #define PRODUCT Rebound |
| 26 | #define DESCRIPTION "A conjoined Let's Split" | ||
| 27 | 26 | ||
| 28 | /* key matrix size */ | 27 | /* key matrix size */ |
| 29 | 28 | ||
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c new file mode 100644 index 000000000..325036231 --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* Copyright 2021 Ross Montsinger | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 20 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 21 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 22 | // entirely and just use numbers. | ||
| 23 | |||
| 24 | enum layer_names { | ||
| 25 | _QWERTY, | ||
| 26 | _COLEMAK, | ||
| 27 | _DVORAK, | ||
| 28 | _LOWER, | ||
| 29 | _RAISE, | ||
| 30 | _ADJUST | ||
| 31 | }; | ||
| 32 | |||
| 33 | enum custom_keycodes { | ||
| 34 | QWERTY = SAFE_RANGE, | ||
| 35 | COLEMAK, | ||
| 36 | DVORAK | ||
| 37 | }; | ||
| 38 | |||
| 39 | #define LOWER MO(_LOWER) | ||
| 40 | #define RAISE MO(_RAISE) | ||
| 41 | #define ADJUST MO(_ADJUST) | ||
| 42 | |||
| 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 44 | |||
| 45 | [_QWERTY] = LAYOUT_all( | ||
| 46 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 47 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 48 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
| 49 | ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 50 | ), | ||
| 51 | |||
| 52 | [_COLEMAK] = LAYOUT_all( | ||
| 53 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | ||
| 54 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
| 55 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
| 56 | ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 57 | ), | ||
| 58 | |||
| 59 | [_DVORAK] = LAYOUT_all( | ||
| 60 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, | ||
| 61 | KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, | ||
| 62 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , | ||
| 63 | ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 64 | ), | ||
| 65 | |||
| 66 | [_LOWER] = LAYOUT_all( | ||
| 67 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, | ||
| 68 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
| 69 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, | ||
| 70 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 71 | ), | ||
| 72 | |||
| 73 | [_RAISE] = LAYOUT_all( | ||
| 74 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, | ||
| 75 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
| 76 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, | ||
| 77 | _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 78 | ), | ||
| 79 | |||
| 80 | [_ADJUST] = LAYOUT_all( | ||
| 81 | _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, | ||
| 82 | _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, | ||
| 83 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 84 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 85 | ) | ||
| 86 | }; | ||
| 87 | |||
| 88 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 89 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
| 90 | } | ||
| 91 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 92 | switch (keycode) { | ||
| 93 | case QWERTY: | ||
| 94 | if (record->event.pressed) { | ||
| 95 | set_single_persistent_default_layer(_QWERTY); | ||
| 96 | } | ||
| 97 | break; | ||
| 98 | case COLEMAK: | ||
| 99 | if (record->event.pressed) { | ||
| 100 | set_single_persistent_default_layer(_COLEMAK); | ||
| 101 | } | ||
| 102 | break; | ||
| 103 | case DVORAK: | ||
| 104 | if (record->event.pressed) { | ||
| 105 | set_single_persistent_default_layer(_DVORAK); | ||
| 106 | } | ||
| 107 | break; | ||
| 108 | } | ||
| 109 | return true; | ||
| 110 | } | ||
| 111 | |||
| 112 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 113 | if (clockwise) { | ||
| 114 | tap_code16(S(KC_VOLD)); | ||
| 115 | } else { | ||
| 116 | tap_code16(KC_VOLU); | ||
| 117 | } | ||
| 118 | } | ||
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/via/rules.mk b/keyboards/montsinger/rebound/rev4/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
