aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas CARPi <3043706+NicolasCARPi@users.noreply.github.com>2019-04-02 06:18:06 +0200
committerDrashna Jaelre <drashna@live.com>2019-04-01 21:18:06 -0700
commit448d3ad8dea82a5a71d29fb26d04f44e2a07123e (patch)
treeaeeb162e32ce7d8b7f2d4ff4ceeeb8c18456611a
parent8b8d69f0dfea22936f4b8b9da2917cdf9f838839 (diff)
downloadqmk_firmware-448d3ad8dea82a5a71d29fb26d04f44e2a07123e.tar.gz
qmk_firmware-448d3ad8dea82a5a71d29fb26d04f44e2a07123e.zip
[Keymap] Add alternate bépo layout for Ergodox EZ (#5524)
The other bépo layouts were a bit too complex/weird or without LED code and hard to transition to for new users. This config is a good base for bépo users.
-rw-r--r--layouts/community/ergodox/bepo_alt/keymap.c127
-rw-r--r--layouts/community/ergodox/bepo_alt/readme.md66
-rw-r--r--layouts/community/ergodox/bepo_alt/rules.mk5
3 files changed, 198 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};
diff --git a/layouts/community/ergodox/bepo_alt/readme.md b/layouts/community/ergodox/bepo_alt/readme.md
new file mode 100644
index 000000000..c8cc1225c
--- /dev/null
+++ b/layouts/community/ergodox/bepo_alt/readme.md
@@ -0,0 +1,66 @@
1![layer0](https://i.imgur.com/vd4QLBf.png)
2
3![layer1](https://i.imgur.com/eo101eD.png)
4
5# BEPO keymap for the ErgoDox (alternate version)
6
7This keymap has been made for the BEPO layout (https://bepo.fr), which is an ergonomic french keyboard layout based on Dvorak rules. As it's made for french people, the following of this readme will be in french.
8
9Keyboard Maintainer: [Nicolas CARPi](https://github.com/NicolasCARPi)
10
11Hardware Supported: Ergodox EZ
12
13## Disposition BÉPO pour l'ErgoDox
14
15Cette keymap a été adaptée de la keymap "bepo_csa" présente dans le dossier parent.
16
17Certaines modifications ont été apportées pour ressembler un peu plus à une clavier traditionel:
18
19* entrée sur la touche tout en bas à droite (comme la touche entrée du pavé numérique sur un clavier traditionnel)
20* plusieurs touches "Super" pour faciliter son accès
21
22Il y a deux layers, celui de base, et celui avec les flèches, les touches fonction et la souris (main gauche).
23
24## Particularités
25
26* Touches de repos des pouces : "espace" à gauche et "entrée" à droite.
27* Touche Ctrl gauche accessible avec la paume de la main.
28* Touche "w" placée sur la main gauche (j'ai toujours trouvé le "w" difficle d'accès sur un clavier bépo classique.
29* Plusieurs touches F12.
30* Les flèches sont disposées avec un déplacement à la VIM.
31* Un mode souris permet d'utiliser la souris avec le clavier.
32* Possibilité de changer de mode de manière temporaire ou permanente.
33* Les leds s'allument avec SHIFT, ALT ou la touche function.
34
35J'ai fait cette disposition pour mes besoins, à vous de la modifier pour les vôtres ;)
36
37## Utilisation
38
39### Pré-requis
40
41Pour Archlinux, il est nécessaire d'installer ces paquets au préalable:
42
43~~~bash
44sudo pacman -S avr-gcc avr-libc teensy-loader-cli
45~~~
46
47Les paquets "avr" permettent de compiler le firmware, et teensy-loader permet de le charger sur le clavier.
48
49### Compilation
50
51~~~bash
52# clone the repo
53git clone https://github.com/qmk/qmk_firmware
54# install submodules
55make git-submodule
56# compile this layout
57make ergodox_ez:bepo_alt
58~~~
59
60### Chargement
61
62~~~bash
63teensy-loader-cli -w -mmcu=atmega32u4 -v ergodox_ez_bepo_alt.hex && sleep 6 && setxkbmap fr bepo
64~~~
65
66J'ai ajouté un sleep avant la commande pour remettre en bépo afin de laisser au clavier le temps de rebooter.
diff --git a/layouts/community/ergodox/bepo_alt/rules.mk b/layouts/community/ergodox/bepo_alt/rules.mk
new file mode 100644
index 000000000..faca18b54
--- /dev/null
+++ b/layouts/community/ergodox/bepo_alt/rules.mk
@@ -0,0 +1,5 @@
1# Having a file like this allows you to override Makefile definitions
2# for your own particular keymap
3
4SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
5COMMAND_ENABLE = no # Commands for debug and configuration