aboutsummaryrefslogtreecommitdiff
path: root/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c')
-rw-r--r--keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c100
1 files changed, 100 insertions, 0 deletions
diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c
new file mode 100644
index 000000000..aba169dbb
--- /dev/null
+++ b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/keymap.c
@@ -0,0 +1,100 @@
1/*
2 * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
3 * Copyright 2021 Drashna Jael're @drashna
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include "drashna.h"
20
21#define LAYOUT_charybdis_3x5_wrapper(...) LAYOUT_charybdis_3x5(__VA_ARGS__)
22#define LAYOUT_charybdis_3x5_base( \
23 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
24 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
25 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
26 ) \
27 LAYOUT_charybdis_3x5 ( \
28 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
29 ALT_T(K11), K12, K13, K14, GUI_T(K15), LGUI_T(K16), K17, K18, K19, LALT_T(K1A), \
30 CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), \
31 LSFT_T(KC_GRV), KC_SPC, BK_LWER, DL_RAIS, RSFT_T(KC_ENT) \
32 )
33#define LAYOUT_charybdis_3x5_base_wrapper(...) LAYOUT_charybdis_3x5_base(__VA_ARGS__)
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37 [_DEFAULT_LAYER_1] = LAYOUT_charybdis_3x5_base_wrapper(
38 _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
39 _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
40 _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
41 ),
42
43 [_DEFAULT_LAYER_2] = LAYOUT_charybdis_3x5_base_wrapper(
44 ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________,
45 ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________,
46 ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________
47 ),
48 [_DEFAULT_LAYER_3] = LAYOUT_charybdis_3x5_base_wrapper(
49 _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
50 _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
51 _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
52 ),
53
54 [_DEFAULT_LAYER_4] = LAYOUT_charybdis_3x5_base_wrapper(
55 _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
56 _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
57 _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
58 ),
59
60 [_MOUSE] = LAYOUT_charybdis_3x5(
61 _______, _______, _______, S_D_MOD, DPI_MOD, KC_WH_U, _______, _______, _______, _______,
62 _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6,
63 _______, _______, _______, S_D_RMOD,DPI_RMOD, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______,
64 _______, SNIPING, _______, _______, _______
65 ),
66 [_LOWER] = LAYOUT_charybdis_3x5_wrapper(
67 _________________LOWER_L1__________________, _________________LOWER_R1__________________,
68 _________________LOWER_L2__________________, _________________LOWER_R2__________________,
69 _________________LOWER_L3__________________, _________________LOWER_R3__________________,
70 _______, _______, _______, _______, AUTO_CTN
71 ),
72 [_RAISE] = LAYOUT_charybdis_3x5_wrapper(
73 _________________RAISE_L1__________________, _________________RAISE_R1__________________,
74 _________________RAISE_L2__________________, _________________RAISE_R2__________________,
75 _________________RAISE_L3__________________, _________________RAISE_R3__________________,
76 REBOOT, KEYLOCK, _______, _______, _______
77 ),
78 [_ADJUST] = LAYOUT_charybdis_3x5_wrapper(
79 _________________ADJUST_L1_________________, _________________ADJUST_R1_________________,
80 _________________ADJUST_L2_________________, _________________ADJUST_R2_________________,
81 _________________ADJUST_L3_________________, _________________ADJUST_R3_________________,
82 EEP_RST, KC_NUKE, _______, _______, RESET
83 ),
84};
85
86void matrix_init_keyemap(void) { setPinInputHigh(A0); }
87
88void matrix_scan_keymap(void) {
89 if (!readPin(A0)) {
90 reset_keyboard();
91 }
92}
93
94#ifdef USB_VBUS_PIN
95bool usb_vbus_state(void) {
96 setPinInputLow(USB_VBUS_PIN);
97 wait_us(5);
98 return readPin(USB_VBUS_PIN);
99}
100#endif