diff options
Diffstat (limited to 'keyboards/idobao/id75/keymaps')
43 files changed, 1669 insertions, 0 deletions
diff --git a/keyboards/idobao/id75/keymaps/default/keymap.c b/keyboards/idobao/id75/keymaps/default/keymap.c new file mode 100644 index 0000000000..6c0c09804d --- /dev/null +++ b/keyboards/idobao/id75/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2018 MechMerlin + * + * 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 the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x15( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/idobao/id75/keymaps/default/readme.md b/keyboards/idobao/id75/keymaps/default/readme.md new file mode 100644 index 0000000000..577c62b51f --- /dev/null +++ b/keyboards/idobao/id75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for idobo diff --git a/keyboards/idobao/id75/keymaps/default75/keymap.c b/keyboards/idobao/id75/keymaps/default75/keymap.c new file mode 100644 index 0000000000..8d8ae4414c --- /dev/null +++ b/keyboards/idobao/id75/keymaps/default75/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2018 Milton Griffin + * + * 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 + +// Keyboard Layers +#define _QW 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | DEL | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | UP | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | FN | SPACE | SPACE | LEFT | DOWN | RIGHT | SPACE | SPACE | FN | RALT | RGUI | RCTRL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SELECT | CALC | MYCOMP | MAIL | RGB HD | RGB HI | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PAUSE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | STOP | RGB SD | RGB SI | P4 | P5 | P6 | + | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ | APP | RGB VD | RGB VI | P1 | P2 | P3 | PENT | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ + ), +}; diff --git a/keyboards/idobao/id75/keymaps/default75/readme.md b/keyboards/idobao/id75/keymaps/default75/readme.md new file mode 100644 index 0000000000..a1c0236ed9 --- /dev/null +++ b/keyboards/idobao/id75/keymaps/default75/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75, with led controls
\ No newline at end of file diff --git a/keyboards/idobao/id75/keymaps/drewdobo/config.h b/keyboards/idobao/id75/keymaps/drewdobo/config.h new file mode 100644 index 0000000000..58787ce12b --- /dev/null +++ b/keyboards/idobao/id75/keymaps/drewdobo/config.h @@ -0,0 +1,23 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 + + +// place overrides here + + +#define TAPPING_TOGGLE 5 diff --git a/keyboards/idobao/id75/keymaps/drewdobo/keymap.c b/keyboards/idobao/id75/keymaps/drewdobo/keymap.c new file mode 100644 index 0000000000..9dfc335e82 --- /dev/null +++ b/keyboards/idobao/id75/keymaps/drewdobo/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 Drew Smathers + * + * 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 + +// Keyboard Layers +enum layer_names { + _QW, + _QW_MAC, + _FN, + _MOUSE, +}; + +// Some short-cut aliases +#define Z_LALT LALT_T(KC_ESC) +#define Z_MAC DF(_QW_MAC) +#define Z_PC DF(_QW) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \ + Z_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RALT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, XXXXXXX, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + TT(_FN), XXXXXXX, XXXXXXX, TT(_MOUSE), KC_EQL, KC_BSPC, KC_DEL, XXXXXXX, KC_ENT, KC_SPC, KC_MINUS, KC_GRAVE, KC_LBRC, KC_RBRC, XXXXXXX \ + ), + + [_QW_MAC] = LAYOUT_ortho_5x15( /* QWERTY MAC */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BRMU, KC_MUTE, KC__VOLUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRMD, XXXXXXX, KC__VOLDOWN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \ + Z_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RALT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCMD, XXXXXXX, KC_RCMD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + TT(_FN), KC_LCTL, XXXXXXX, TT(_MOUSE), KC_EQL, KC_BSPC, KC_DEL, XXXXXXX, KC_ENT, KC_SPC, KC_MINUS, KC_GRAVE, KC_LBRC, KC_RBRC, KC_RCTL \ + ), + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, RESET, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, Z_MAC, _______, XXXXXXX, KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, \ + TT(_FN), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, Z_PC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + [_MOUSE] = LAYOUT_ortho_5x15( /* MOUSE */ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + TT(_FN), XXXXXXX, XXXXXXX, TT(_MOUSE), XXXXXXX, KC_ACL1, KC_ACL2, XXXXXXX, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) +}; diff --git a/keyboards/idobao/id75/keymaps/drewdobo/readme.md b/keyboards/idobao/id75/keymaps/drewdobo/readme.md new file mode 100644 index 0000000000..209808ca87 --- /dev/null +++ b/keyboards/idobao/id75/keymaps/drewdobo/readme.md @@ -0,0 +1 @@ +# Drew's thumb-friendly keymap for idobo boards diff --git a/keyboards/idobao/id75/keymaps/drewdobo/rules.mk b/keyboards/idobao/id75/keymaps/drewdobo/rules.mk new file mode 100644 index 0000000000..f9bbfd4948 --- /dev/null +++ b/keyboards/idobao/id75/keymaps/drewdobo/rules.mk @@ -0,0 +1,17 @@ +# Copyright 2013 Jun Wako <wakojun@gmail.com> +# +# 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/>. + + +MOUSEKEY_ENABLE = yes diff --git a/keyboards/idobao/id75/keymaps/egstad/config.h b/keyboards/idobao/id75/keymaps/egstad/config.h new file mode 100644 index 0000000000..45dbd3df82 --- /dev/null +++ b/keyboards/idobao/id75/keymaps/egstad/config.h @@ -0,0 +1,68 @@ +/* Copyright 2020 Jordan Egstad + * + * 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 TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define RGBLIGHT_SLEEP + + + +/* Leader Key + ========================================================================== */ + +// Activates the leader key +// #define LEADER_PER_KEY_TIMING +// resets the timeout after each key is tapped +// #define LEADER_TIMEOUT 240 + + + + + + +/* Autoshifting + ========================================================================== */ + +// This controls how long you have to hold a key before you get the shifted state. +#define AUTO_SHIFT_TIMEOUT 150 + +// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /? +// #define NO_AUTO_SHIFT_SPECIAL + +// Do not Auto Shift numeric keys, zero through nine. +#define NO_AUTO_SHIFT_NUMERIC + +// Do not Auto Shift alpha characters, which include A through Z. +// #define NO_AUTO_SHIFT_ALPHA + +// Lower the Auto Shift timeout variable (down) +// KC_ASDN + +// Raise the Auto Shift timeout variable (up) +// KC_ASUP + +// Report your current Auto Shift timeout value +// KC_ASRP + +// Turns on the Auto Shift Function +// KC_ASON + +// Turns off the Auto Shift Function +// KC_ASOFF + +// Toggles the state of the Auto Shift feature +// KC_ASTG diff --git a/keyboards/idobao/id75/keymaps/egstad/keymap.c b/keyboards/idobao/id75/keymaps/egstad/keymap.c new file mode 100644 index 0000000000..febbad7c6e --- /dev/null +++ b/keyboards/idobao/id75/keymaps/egstad/keymap.c @@ -0,0 +1,267 @@ +/* Copyright 2020 Jordan Egstad + * + * 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 + + + + + + +/* ========================================================================== + LAYERS + ========================================================================== */ + +// qwerty +#define _QW 0 +// functions +#define _FN 1 + + + + + + +/* ========================================================================== + CUSTOM KEYS + ========================================================================== */ + +// Tap dances +#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape +#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal +#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close + +// Layers +#define FN_SPC LT(_FN, KC_SPC) // Tap for space, hold for _FN + +// Modifiers +#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in) +#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out) +#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift + +// Tap Dances +enum { + TD_BRC = 0, + TD_MIN, + TD_GV_ESC, + TD_BS +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Left Brace, twice for Right Brace + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + //Tap once for Minus, twice for Equal + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL), + // Tap once for Grave, tap twice for Escape + [TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE) +}; + + + + + + +/* ========================================================================== + KEYMAPS + ========================================================================== */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY (_QW) + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | \| | 6 | 7 | 8 | 9 | 0 | - + | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | [ ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | | | | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | ZOOM- | ZOOM+ | LALT | FN | CMD | BSPC | | | FN | SPACE | ENTER | LEFT | UP | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_PIPE, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC, \ + _______, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT_SHFT, \ + LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, _______, RESET, _______, FN_SPC, KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ + ), + + +/* FUNCTION (_FN) + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | P | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | RGB HD | RGB HI | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | A-SFT | | | | | | RGB SD | RGB SI | | | LEFT | UP | DOWN | RIGHT | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RGB | | | | | | RGB VD | RGB VI | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RESET | | | | | | RGB RMD| RGB MD | | | PLAY | PREV | VOL UP | VOL DN | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, \ + KC_ASTG, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, \ + RGB_TOG, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, \ + RESET, _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD \ + ), +}; + + + + + + +/* ========================================================================== + LEDs + ========================================================================== */ + +// RGB MODES +// 1 = Static +// 2-5 = Breathing +// 6-8 = Rainbow +// 9-14 = Swirl +// 15-20 = Snake +// 21-24 = Nightrider +// 25 = Christmas +// 26-30 = Static Gradient + +// Default LED colors +uint8_t h = 170; +uint8_t s = 255; +uint8_t v; + +// default animation +uint8_t rgbMode = RGBLIGHT_MODE_STATIC_LIGHT; +// boot animation +uint8_t rgbBootMode = RGBLIGHT_MODE_SNAKE; +// boot timeout vars +uint8_t bootComplete = 0; +int bootTimeoutDuration = 2000; +int bootTimeout; + + +void init_hsv(void) { + // fetch what the brightness was last sesion + v = rgblight_get_val(); + rgblight_sethsv(h,s,v); +} + +// fetch current HSV vals +void get_hsv(void) { + h = rgblight_get_hue(); + s = rgblight_get_sat(); + v = rgblight_get_val(); +} + +// reset HSV vals +void reset_hsv(void) { + int currentV = rgblight_get_val(); + rgblight_sethsv(h,s,currentV); +} + +// deterimes when to stop bootup animation +void bootupAnimation(void) { + bootComplete = (timer_elapsed(bootTimeout) > bootTimeoutDuration) ? 1 : 0; + + if (bootComplete) { + rgblight_mode(rgbMode); + } +} + + + + + + +/* ========================================================================== + INITIALIZATION FUNCTION + ========================================================================== */ + +void keyboard_post_init_user(void) { + // start a timeout + bootTimeout = timer_read(); + // set rgb color + init_hsv(); + // init rgb + rgblight_enable(); + // animate in snake ledGreende + rgblight_mode(rgbBootMode); +}; + + + + + + +/* ========================================================================== + ALWAYS RUNNING + ========================================================================== */ +void matrix_scan_user(void) { + // keep an eye on these layers + uint8_t layer = get_highest_layer(layer_state); + // handle boot-up sequence + bootupAnimation(); + // watch the brightness for changes + v = rgblight_get_val(); + + switch (layer) { + case _FN: + // set leds to white + rgblight_sethsv_noeeprom(h,0,v); + break; |