diff options
| author | Frothy <frothykillskittens@gmail.com> | 2020-05-18 06:40:41 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-18 02:40:41 -0700 |
| commit | 81698df0560376abfbd57c150cf571d0543e5fdb (patch) | |
| tree | af2a99df5c3f586e25581bd3554be305f1151b1c /keyboards/contra | |
| parent | fca35a354092d3f706d1d628e695572f9f5579d0 (diff) | |
| download | qmk_firmware-81698df0560376abfbd57c150cf571d0543e5fdb.tar.gz qmk_firmware-81698df0560376abfbd57c150cf571d0543e5fdb.zip | |
[Keymap] Add Via keymap for Contra (#9119)
* Add Via keymap for Contra
* Added Via-enabled keymap
* Changed VENDOR_ID from 0xFEED to 0x4354 (CT)
* Removed unnecessary RGB mappings
* PR changes
* Removed empty via/config.h
* Changed product ID from 0x6060 to 0x0001
Diffstat (limited to 'keyboards/contra')
| -rwxr-xr-x | keyboards/contra/config.h | 4 | ||||
| -rw-r--r-- | keyboards/contra/keymaps/via/keymap.c | 98 | ||||
| -rw-r--r-- | keyboards/contra/keymaps/via/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/contra/keymaps/via/rules.mk | 1 |
4 files changed, 103 insertions, 2 deletions
diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index b32d86865..f4b84af5a 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include "config_common.h" | 4 | #include "config_common.h" |
| 5 | 5 | ||
| 6 | /* USB Device descriptor parameter */ | 6 | /* USB Device descriptor parameter */ |
| 7 | #define VENDOR_ID 0xFEED | 7 | #define VENDOR_ID 0x4354 /* "CT" */ |
| 8 | #define PRODUCT_ID 0x6060 | 8 | #define PRODUCT_ID 0x0001 |
| 9 | #define DEVICE_VER 0x0001 | 9 | #define DEVICE_VER 0x0001 |
| 10 | #define MANUFACTURER Cartel | 10 | #define MANUFACTURER Cartel |
| 11 | #define PRODUCT Contra | 11 | #define PRODUCT Contra |
diff --git a/keyboards/contra/keymaps/via/keymap.c b/keyboards/contra/keymaps/via/keymap.c new file mode 100644 index 000000000..4bf7a9c17 --- /dev/null +++ b/keyboards/contra/keymaps/via/keymap.c | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | /* This program is free software: you can redistribute it and/or modify | ||
| 2 | * it under the terms of the GNU General Public License as published by | ||
| 3 | * the Free Software Foundation, either version 2 of the License, or | ||
| 4 | * (at your option) any later version. | ||
| 5 | * | ||
| 6 | * This program is distributed in the hope that it will be useful, | ||
| 7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 9 | * GNU General Public License for more details. | ||
| 10 | * | ||
| 11 | * You should have received a copy of the GNU General Public License | ||
| 12 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include QMK_KEYBOARD_H | ||
| 16 | |||
| 17 | |||
| 18 | enum planck_layers { | ||
| 19 | _BASE, | ||
| 20 | _LOWER, | ||
| 21 | _RAISE, | ||
| 22 | _ADJUST | ||
| 23 | }; | ||
| 24 | |||
| 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 26 | |||
| 27 | /* Base | ||
| 28 | * ,-----------------------------------------------------------------------------------. | ||
| 29 | * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 30 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 31 | * | Tab | A | S | D | F | G | H | J | K | L | ; | " | | ||
| 32 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 33 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | | ||
| 34 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 35 | * | Adjst| Ctrl | Gui | Alt |Lower | Space |Raise | Left | Down | Up |Right | | ||
| 36 | * `-----------------------------------------------------------------------------------' | ||
| 37 | */ | ||
| 38 | [_BASE] = LAYOUT_planck_mit( | ||
| 39 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 40 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 41 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
| 42 | MO(_ADJUST), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 43 | ), | ||
| 44 | |||
| 45 | /* Lower | ||
| 46 | * ,-----------------------------------------------------------------------------------. | ||
| 47 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
| 48 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 49 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 50 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 51 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End | | | ||
| 52 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 53 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 54 | * `-----------------------------------------------------------------------------------' | ||
| 55 | */ | ||
| 56 | [_LOWER] = LAYOUT_planck_mit( | ||
| 57 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, | ||
| 58 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
| 59 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______, | ||
| 60 | _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 61 | ), | ||
| 62 | |||
| 63 | /* Raise | ||
| 64 | * ,-----------------------------------------------------------------------------------. | ||
| 65 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 66 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 67 | * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 68 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 69 | * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | | ||
| 70 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 71 | * | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 72 | * `-----------------------------------------------------------------------------------' | ||
| 73 | */ | ||
| 74 | [_RAISE] = LAYOUT_planck_mit( | ||
| 75 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
| 76 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
| 77 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_PGDN, _______, | ||
| 78 | _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 79 | ), | ||
| 80 | |||
| 81 | /* Adjust | ||
| 82 | * ,----------------------------------------------------------- ------------------------. | ||
| 83 | * | | Reset| Debug| | | | | | | | | Del | | ||
| 84 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 85 | * | | | | | | | | | | | | | | ||
| 86 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 87 | * | | | | | | | | | | | | | | ||
| 88 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 89 | * | | | | | | | | | | | | | ||
| 90 | * `-----------------------------------------------------------------------------------' | ||
| 91 | */ | ||
| 92 | [_ADJUST] = LAYOUT_planck_mit( | ||
| 93 | _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , | ||
| 94 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 95 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 96 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 97 | ) | ||
| 98 | }; \ No newline at end of file | ||
diff --git a/keyboards/contra/keymaps/via/readme.md b/keyboards/contra/keymaps/via/readme.md new file mode 100644 index 000000000..3c863243d --- /dev/null +++ b/keyboards/contra/keymaps/via/readme.md | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # A basic Contra Layout with VIA enabled | ||
| 2 | |||
diff --git a/keyboards/contra/keymaps/via/rules.mk b/keyboards/contra/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/contra/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes \ No newline at end of file | |||
