diff options
author | KamoNanban <35567743+KamoNanban@users.noreply.github.com> | 2020-02-06 02:14:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-05 09:14:00 -0800 |
commit | 9fe0c87e9aee518f4bdbc839cb451d69f2a3ad18 (patch) | |
tree | db576e13ef2102ab84d263206b095457f4ea7444 /keyboards/manta60/keymaps | |
parent | b32a9a201dfd02fa6cd131011319bfd1e99e0af5 (diff) | |
download | qmk_firmware-9fe0c87e9aee518f4bdbc839cb451d69f2a3ad18.tar.gz qmk_firmware-9fe0c87e9aee518f4bdbc839cb451d69f2a3ad18.zip |
[Keyboard] manta60 (#8068)
* manta60_update
* Update config.h
* Update config.h
* Update config.h
* Fixed info and readme
* Fixed config.h
* Fixed rules.mk
* Fixed keymap.c
* Update keyboards/manta60/rules.mk
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Fixed keymap.c
* Fixed rules.mk
* Update rules.mk
* Update keyboards/manta60/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/manta60/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/manta60/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/manta60/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/manta60/keymaps')
-rw-r--r-- | keyboards/manta60/keymaps/default/config.h | 21 | ||||
-rw-r--r-- | keyboards/manta60/keymaps/default/keymap.c | 131 | ||||
-rw-r--r-- | keyboards/manta60/keymaps/default/readme.md | 1 |
3 files changed, 153 insertions, 0 deletions
diff --git a/keyboards/manta60/keymaps/default/config.h b/keyboards/manta60/keymaps/default/config.h new file mode 100644 index 0000000000..55af5473e0 --- /dev/null +++ b/keyboards/manta60/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 kamonanban + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define RGBLIGHT_SLEEP + +// place overrides here diff --git a/keyboards/manta60/keymaps/default/keymap.c b/keyboards/manta60/keymaps/default/keymap.c new file mode 100644 index 0000000000..5e98141b70 --- /dev/null +++ b/keyboards/manta60/keymaps/default/keymap.c @@ -0,0 +1,131 @@ +/* Copyright 2020 kamonanban + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_AT, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_COMM, KC_DOT, KC_H, KC_J, KC_K, KC_L, KC_UP, KC_SCLN, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_SLSH, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, KC_LALT, KC_LCTRL, KC_SPC, KC_LGUI, KC_ENT, KC_BSPC, KC_DEL, KC_SPC, KC_RCTRL, KC_RALT, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------.,---------------------------------------------------------------------. + _______, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_SN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, RGB_M_T, RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_K, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + _______, RGB_M_P, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_SW, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------|\---------+---------+---------+---------+---------+---------+---------| + LOWER, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, RAISE + //`---------+----------/\-------+---------+---------+---------+---------/\---------+---------+---------+---------+---------/\--------+----------' + ) +}; + +static inline void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { +case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; +case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; +case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/manta60/keymaps/default/readme.md b/keyboards/manta60/keymaps/default/readme.md new file mode 100644 index 0000000000..f5c0e2c18c --- /dev/null +++ b/keyboards/manta60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for manta60 |