aboutsummaryrefslogtreecommitdiff
path: root/layouts/community/ergodox/bepo_alt/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community/ergodox/bepo_alt/keymap.c')
-rw-r--r--layouts/community/ergodox/bepo_alt/keymap.c127
1 files changed, 127 insertions, 0 deletions
diff --git a/layouts/community/ergodox/bepo_alt/keymap.c b/layouts/community/ergodox/bepo_alt/keymap.c
new file mode 100644
index 000000000..fc40afd87
--- /dev/null
+++ b/layouts/community/ergodox/bepo_alt/keymap.c
@@ -0,0 +1,127 @@
1/* Bepo layout for ergodox EZ by Nicolas CARPi (deltablot.com) */
2#include QMK_KEYBOARD_H
3#include "keymap_bepo.h"
4#include "keymap_french.h"
5
6#define BEPO 0 // default layer, for bepo compatible systems
7#define FNAV 1 // function / navigation / mouse layer
8
9const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
10/* Keymap 0: default layer
11 *
12 * ,--------------------------------------------------. ,--------------------------------------------------.
13 * | $ | " | < | > | ( | ) | @ | | + | - | - | / | * | = | % |
14 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
15 * | TAB | B |E_ACUT| P | O |E_GRAV|Backsp| |CapsLo| ^ | V | D | L | J | Z |
16 * |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
17 * | W | A | U | I | E | , |------| |------| C | T | S | R | N | M |
18 * |--------+------+------+------+------+------| | | ESCAP------+------+------+------+------+--------|
19 * | SHIFT |E_CIRC | A_GRAV | Y | X | . | K | | | ' | Q | G | H | F | C_CEDIL|
20 * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
21 * |Ctrl|LSuper|LSuper| LSuper| LAlt| | PgUp | PgDwn| |BEPO| Delete | | AltGr| RSuper|RSuper|RCtrl| Enter|
22 * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
23 * | | |Insert| |L_Fnav| | |
24 * | Space|Shift |------| |------|RShift|Enter |
25 * | | |Mouse | | Fn | | |
26 * `--------------------' `--------------------'
27 * df is for temporary stuff and mo is for toggle (momentary)
28 * so mouse is to toggle the mouse mode
29 */
30[BEPO] = LAYOUT_ergodox(
31
32/* Left hand */
33BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT,
34KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC,
35BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA,
36KC_LSHIFT, BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K,
37KC_LCTL, KC_LGUI, KC_LGUI, KC_LGUI, KC_LALT,
38 KC_PGUP, KC_PGDOWN,
39 KC_INS,
40 KC_SPC, KC_LSHIFT, DF(FNAV),
41
42/* Right hand */
43 BP_PLUS, BP_MINUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, BP_PERCENT,
44 KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
45 BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
46 KC_ESC, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
47 KC_ALGR, KC_RGUI, KC_RGUI, KC_RCTL, KC_ENTER,
48DF(BEPO), KC_DEL,
49DF(FNAV),
50MO(FNAV), KC_RSHIFT, KC_ENTER),
51
52/* Keymap 1: function / navigation / mouse layer
53 *
54 * ,--------------------------------------------------. ,--------------------------------------------------.
55 * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | F12 |
56 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
57 * | | Next |LClick| Up |RClick| WhUp |Backspace| | | PgUp | Home | Up | End | F11 | |
58 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
59 * | | Prev | Left | Down | Right|WhDown|------| |------| Left | Down | Up | Right | F12 | |
60 * |--------+------+------+------+------+------| VolUp| | |------+------+------+------+------+--------|
61 * | Shift | Undo | Cut | Copy | Paste| | | | | | | | | | |
62 * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
63 * | ctrl | super | super | alt | | Home | End | | | | | | Alt | | |Ctrl | |
64 * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
65 * | | | | | | | |
66 * | | |------| |------| | |
67 * | | | | | | | |
68 * `--------------------' `--------------------'
69 */
70[FNAV] = LAYOUT_ergodox(
71
72/* Left hand */
73KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
74KC_NO, KC_MS_BTN5, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_BSPC,
75KC_NO, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN,
76KC_LSHIFT, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_NO, KC_VOLD,
77KC_LCTL, KC_INS, KC_LGUI, KC_LGUI, KC_LALT,
78 KC_HOME, KC_END,
79 KC_TRNS,
80 KC_NO, KC_TRNS, KC_TRNS,
81
82/* Right hand */
83 KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F12,
84 KC_NO, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_F11, KC_NO,
85 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_F12, KC_NO,
86 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
87 KC_RALT, KC_TRNS, KC_TRNS, KC_RCTL, KC_NO,
88KC_TRNS, KC_TRNS,
89KC_TRNS,
90KC_TRNS, KC_TRNS, KC_NO),
91};
92
93/* helper function to switch on of the right LED ON/OFF */
94static void indicate_using_led(const uint8_t led, const bool enabled) {
95 if (enabled) {
96 ergodox_right_led_on(led);
97 } else {
98 ergodox_right_led_off(led);
99 }
100}
101
102/* Runs constantly in the background, in a loop */
103void matrix_scan_user(void) {
104
105 /* red led for shift */
106 if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
107 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
108 indicate_using_led(1, true);
109 } else {
110 indicate_using_led(1, false);
111 }
112
113 /* green led for alt */
114 if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
115 ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
116 indicate_using_led(2, true);
117 } else {
118 indicate_using_led(2, false);
119 }
120
121 /* blue led for function mode */
122 if (IS_LAYER_ON(FNAV)) {
123 indicate_using_led(3, true);
124 } else {
125 indicate_using_led(3, false);
126 }
127};