diff options
| author | Adam Lickel <adam@lickel.com> | 2021-11-30 09:48:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-30 09:48:44 -0800 |
| commit | 3d469516cb39fffdc7b6edb782ddd4e466d42f84 (patch) | |
| tree | eab628bdbdb689de6f4022097d76e4e4ec03de42 | |
| parent | 81550527c47b9b99ccc47967bcb63c2d804a2ed9 (diff) | |
| download | qmk_firmware-3d469516cb39fffdc7b6edb782ddd4e466d42f84.tar.gz qmk_firmware-3d469516cb39fffdc7b6edb782ddd4e466d42f84.zip | |
[Keymap] Keebio Sinc layout with macOS support (#15324)
Co-authored-by: Ryan <fauxpark@gmail.com>
| -rw-r--r-- | keyboards/keebio/sinc/keymaps/lickel/keymap.c | 109 | ||||
| -rw-r--r-- | keyboards/keebio/sinc/keymaps/lickel/readme.md | 18 | ||||
| -rw-r--r-- | keyboards/keebio/sinc/keymaps/lickel/rules.mk | 2 |
3 files changed, 129 insertions, 0 deletions
diff --git a/keyboards/keebio/sinc/keymaps/lickel/keymap.c b/keyboards/keebio/sinc/keymaps/lickel/keymap.c new file mode 100644 index 000000000..abdb33e93 --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/lickel/keymap.c | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* Copyright 2021 @ Adam Lickel | ||
| 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 | enum custom_keycodes { | ||
| 20 | #ifdef VIA_ENABLE | ||
| 21 | KC_MISSION_CONTROL = USER00, | ||
| 22 | #else | ||
| 23 | KC_MISSION_CONTROL = SAFE_RANGE, | ||
| 24 | #endif | ||
| 25 | KC_LAUNCHPAD | ||
| 26 | }; | ||
| 27 | |||
| 28 | #define KC_MCTL KC_MISSION_CONTROL | ||
| 29 | #define KC_LPAD KC_LAUNCHPAD | ||
| 30 | |||
| 31 | // clang-format off | ||
| 32 | |||
| 33 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 34 | [0] = LAYOUT_80_with_macro( | ||
| 35 | KC_MUTE, KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_MPLY, | ||
| 36 | KC_F1, KC_F2, KC_GRV, 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_BSPC, KC_BSPC, KC_HOME, | ||
| 37 | KC_F3, KC_F4, 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_BSLS, KC_PGUP, | ||
| 38 | KC_F5, KC_F6, 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_PGDN, | ||
| 39 | KC_F7, KC_F8, 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_UP, KC_END, | ||
| 40 | KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 41 | ), | ||
| 42 | [1] = LAYOUT_80_with_macro( | ||
| 43 | _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | ||
| 44 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 45 | _______, _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 46 | _______, _______, _______, RGB_RMOD,RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 47 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 48 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 49 | ), | ||
| 50 | [2] = LAYOUT_80_with_macro( | ||
| 51 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 53 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 57 | ), | ||
| 58 | [3] = LAYOUT_80_with_macro( | ||
| 59 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 60 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 61 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 62 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 65 | ) | ||
| 66 | }; | ||
| 67 | |||
| 68 | // clang-format on | ||
| 69 | |||
| 70 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 71 | if (index == 0) { | ||
| 72 | if (clockwise) { | ||
| 73 | tap_code(KC_PGDN); | ||
| 74 | } else { | ||
| 75 | tap_code(KC_PGUP); | ||
| 76 | } | ||
| 77 | return false; | ||
| 78 | } else if (index == 1) { | ||
| 79 | if (clockwise) { | ||
| 80 | tap_code(KC_VOLU); | ||
| 81 | } else { | ||
| 82 | tap_code(KC_VOLD); | ||
| 83 | } | ||
| 84 | return false; | ||
| 85 | } else { | ||
| 86 | return true; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | |||
| 90 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 91 | switch (keycode) { | ||
| 92 | case KC_MISSION_CONTROL: | ||
| 93 | if (record->event.pressed) { | ||
| 94 | host_consumer_send(0x29F); | ||
| 95 | } else { | ||
| 96 | host_consumer_send(0); | ||
| 97 | } | ||
| 98 | return false; | ||
| 99 | case KC_LAUNCHPAD: | ||
| 100 | if (record->event.pressed) { | ||
| 101 | host_consumer_send(0x2A0); | ||
| 102 | } else { | ||
| 103 | host_consumer_send(0); | ||
| 104 | } | ||
| 105 | return false; | ||
| 106 | default: | ||
| 107 | return true; | ||
| 108 | } | ||
| 109 | } | ||
diff --git a/keyboards/keebio/sinc/keymaps/lickel/readme.md b/keyboards/keebio/sinc/keymaps/lickel/readme.md new file mode 100644 index 000000000..a41c16de2 --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/lickel/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # lickel's Sinc keymap | ||
| 2 | |||
| 3 | - Via support is enabled by default | ||
| 4 | - Function Row is optimized for macOS | ||
| 5 | - RGB controls mimic the stock Keychron Q1 layout | ||
| 6 | - F3 opens Mission Control and F4 opens Launchpad | ||
| 7 | - Left macros are: F1->F10 | ||
| 8 | - Right macros are: Play, Home, Pg Up, Pg Dn, End, Right | ||
| 9 | |||
| 10 |  | ||
| 11 | |||
| 12 | ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0350d8914cac3166abcca6abfd093b7)) | ||
| 13 | |||
| 14 | ## Changelog | ||
| 15 | |||
| 16 | ### 11/27/2021 - 1.0 | ||
| 17 | |||
| 18 | - Initial release | ||
diff --git a/keyboards/keebio/sinc/keymaps/lickel/rules.mk b/keyboards/keebio/sinc/keymaps/lickel/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/lickel/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
