diff options
author | Jonavin <71780717+Jonavin@users.noreply.github.com> | 2021-05-16 18:30:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-16 15:30:58 -0700 |
commit | 29e35d83b7db08b5e705775064db07c410e1aaad (patch) | |
tree | 7bef537cb8e64a213b804ba25cdfb6bee7d0a066 | |
parent | 526fbf0faf5530fa0b62173273e7974dda4e6e79 (diff) | |
download | qmk_firmware-29e35d83b7db08b5e705775064db07c410e1aaad.tar.gz qmk_firmware-29e35d83b7db08b5e705775064db07c410e1aaad.zip |
[Keymap] Add new quefrency keymap (#12913)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/keebio/quefrency/keymaps/jonavin/config.h | 30 | ||||
-rw-r--r-- | keyboards/keebio/quefrency/keymaps/jonavin/keymap.c | 88 | ||||
-rw-r--r-- | keyboards/keebio/quefrency/keymaps/jonavin/rules.mk | 3 |
3 files changed, 121 insertions, 0 deletions
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/config.h b/keyboards/keebio/quefrency/keymaps/jonavin/config.h new file mode 100644 index 000000000..0622cdfad --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/jonavin/config.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | This is the c configuration file for the keymap | ||
3 | |||
4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
5 | Copyright 2015 Jack Humbert | ||
6 | Copyright 2018 Danny Nguyen <danny@keeb.io> | ||
7 | |||
8 | This program is free software: you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation, either version 2 of the License, or | ||
11 | (at your option) any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | |||
24 | /* Use I2C or Serial, not both */ | ||
25 | |||
26 | #define USE_SERIAL | ||
27 | // #define USE_I2C | ||
28 | |||
29 | #define TAPPING_TOGGLE 2 | ||
30 | // TT set to two taps | ||
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c b/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c new file mode 100644 index 000000000..73d0c5af0 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /* Copyright 2021 Jonavin Eng | ||
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 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | |||
21 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
22 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
23 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
24 | // entirely and just use numbers. | ||
25 | enum custom_layers { | ||
26 | _BASE, | ||
27 | _FN1, | ||
28 | _MO2, | ||
29 | }; | ||
30 | |||
31 | |||
32 | enum custom_keycodes { | ||
33 | DOUBLEZERO = SAFE_RANGE, | ||
34 | }; | ||
35 | |||
36 | |||
37 | |||
38 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
39 | switch (keycode) { | ||
40 | case DOUBLEZERO: | ||
41 | if (record->event.pressed) { | ||
42 | // when keycode DOUBLEZERO is pressed | ||
43 | SEND_STRING("00"); | ||
44 | } else { | ||
45 | // when keycode DOUBLEZERO is released | ||
46 | } | ||
47 | break; | ||
48 | } | ||
49 | return true; | ||
50 | }; | ||
51 | |||
52 | |||
53 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
54 | [_BASE] = LAYOUT_65( | ||
55 | KC_GESC, 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_INS, | ||
56 | KC_PSCR, 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, | ||
57 | TT(_MO2), 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_PGUP, | ||
58 | 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_PGDN, | ||
59 | KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1, KC_SPC), KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), | ||
60 | [_FN1] = LAYOUT_65( | ||
61 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_CALC, KC_NO, | ||
62 | RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, | ||
63 | KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME, | ||
64 | KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RCTL(KC_PGUP), KC_END, | ||
65 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)), | ||
66 | [_MO2] = LAYOUT_65( | ||
67 | KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PPLS, KC_PSLS, KC_NO, KC_NO, KC_TRNS, | ||
68 | KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, KC_NO, KC_PEQL, KC_TRNS, | ||
69 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_TAB, KC_P1, KC_P2, KC_P3, KC_NO, KC_PAST, KC_PENT, KC_HOME, | ||
70 | KC_TRNS, KC_NO, KC_DEL, KC_INS, KC_NO, KC_NO, KC_NLCK, KC_P0, DOUBLEZERO, KC_PDOT, KC_PSLS, KC_TRNS, RCTL(KC_PGUP), KC_END, | ||
71 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)), | ||
72 | }; | ||
73 | |||
74 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
75 | if (index == 0) { | ||
76 | if (clockwise) { | ||
77 | tap_code(KC_PGDN); | ||
78 | } else { | ||
79 | tap_code(KC_PGUP); | ||
80 | } | ||
81 | } else if (index == 1) { | ||
82 | if (clockwise) { | ||
83 | tap_code(KC_VOLU); | ||
84 | } else { | ||
85 | tap_code(KC_VOLD); | ||
86 | } | ||
87 | } | ||
88 | } | ||
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk b/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk new file mode 100644 index 000000000..4b1bcabda --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk | |||
@@ -0,0 +1,3 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | CONSOLE_ENABLE = yes | ||
3 | LTO_ENABLE = yes | ||