Outils pour utilisateurs

Outils du site


ergodox

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
ergodox [2020/10/18 14:41] – notes octobre 2020 simonergodox [2021/02/08 21:31] (Version actuelle) – [Envoyer la configuration sur le clavier] simon
Ligne 2: Ligne 2:
 {{tag>clavier ergodox}} {{tag>clavier ergodox}}
  
-{{ :img_20190207_232329.jpg?400 |}} +===== Introduction =====
-(D'autres photos : [[https://simonlefort.be/images/?dir=keyboard|Galerie]])+
  
-===== Flasher le firmware =====+Ça fait longtemps que j'ai le projet de me fabriquer et d'apprendre à utiliser un clavier mécanique. Après avoir regardé longuement, bavé sur des modèles comme le [[https://marcyoung.us/post/pterodactyl/|Pterodactyl]], ou d'autres claviers particuliers comme le [[https://www.velocifiretech.com/product/dumang-dk6-ergo-v2/|DUMANG DK6]] ([[https://hackers.town/@zpojqwfejwfhiunz/103573273574733970|pouet mastodon]]), j'ai choisi de m'orienter vers un [[https://www.ergodox.io/|Ergodox]].
  
-==== Prérequis ==== +Après avoir rêvé de tout reprendre de A à Z, de fabriquer le boitier en fibre de carbone et redessiner la carte électronique, je me suis avoué vaincu par le temps. J'ai commandé un kit chez [[https://falba.tech/customize-your-keyboard/customize-your-ergodox/?v=d3dcf429c679|falba.tech]].
-Il faut installer :+
  
-<code bash> +{{ :img_20190207_232329.jpg?400 |}} 
-$ sudo apt install gcc-avr +(D'autres photos : [[https://images.simonlefort.be/?dir=Keyboard|Galerie]])
-</code>+
  
-==== Avec TMK ===+===== Programmer le clavier =====
  
-J'ai tout d'abord essayé avec le firmware "tmk" mais je n'ai jamais réussi à avoir quelque chose de fonctionnel. Le firmware est apparemment envoyé sur le clavier mais pas une touche ne marche. +==== Installation de QMK ====
  
-Pour mémoire: +Après avoir testé le [[https://github.com/tmk/tmk_keyboard|firmware TMK (github)]] sans succès, je suis passé à [[https://qmk.fm/|QMK (site)]]. Pour l'installation, j'ai suivi la [[https://docs.qmk.fm/#/|documentation de QMK]]. Installation avec pip3 
-<hidden>+
 <code bash> <code bash>
-simon@deb:~/Programmesgit clone https://github.com/cub-uanic/tmk_keyboard.git+python3 -m pip install --user qmk
 </code> </code>
-<hidden>+ 
 +J'ai copié [[https://github.com/qmk/qmk_firmware/blob/master/util/udev/50-qmk.rules|ce fichier]] pour les règles [[informatique:udev]] : 
 <code bash> <code bash>
-Clonage dans 'tmk_keyboard'... +$ sudo vim /etc/udev/rules.d/50-qmk.rules 
-remote: Enumerating objects: 1, done. +$ sudo udevadm control --reload-rules 
-remote: Counting objects: 100% (1/1), done+$ sudo udevadm trigger
-remote: Total 17079 (delta 0), reused 0 (delta 0), pack-reused 17078 +
-Réception d'objets: 100% (17079/17079), 22.31 MiB | 3.12 MiB/s, fait. +
-Résolution des deltas: 100% (10038/10038), fait.+
 </code> </code>
-</hidden>+ 
 +J'ai fait la configuration comme indiqué : 
 <code bash> <code bash>
-simon@deb:~/Programmescd tmk_keyboard/keyboard/ergodox/ +qmk setup
-simon@deb:~/Programmes/tmk_keyboard/keyboard/ergodox$ make -f Makefile.lufa clean+
 </code> </code>
-<hidden> +Il installe toutes les dépendances, vérifie les règles udev, demande où il peut s'installer par défaut, etc.. (Il reste quelques erreurs relatives à udev mais elles concernent d'autres types de clavier et ne semblent pas poser de problèmes pour la suite.)
-<code bash> +
-simon@deb:~/Programmes/tmk_keyboard/keyboard/ergodox$ make -f Makefile.lufa+
  
--------- begin -------- +==== Créer une "keymap" ====
-avr-gcc (GCC) 5.4.0 +
-Copyright (C) 2015 Free Software Foundation, Inc. +
-This is free software; see the source for copying conditions.  There is NO +
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.+
  
-(...)+J'ai créé une nouvelle keymap dans le dossier de l'ergodox_ez (qui correspond le plus à ce que j'ai
 +<code bash> 
 +$ qmk new-keymap -kb ergodox_ez 
 +Keymap Name: my-ergodox 
 +Ψ my-ergodox keymap directory created in: /home/simon/qmk_firmware/keyboards/ergodox_ez/keymaps/my-ergodox 
 +Ψ Compile a firmware with your new keymap by typing: 
  
- + qmk compile -kb ergodox_ez -km my-ergodox
-Creating load file for Flash: ergodox_lufa.hex +
-avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature ergodox_lufa.elf ergodox_lufa.hex +
- +
-Creating load file for EEPROM: ergodox_lufa.eep +
-avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load"+
---change-section-lma .eeprom=0 --no-change-warnings -O ihex ergodox_lufa.elf ergodox_lufa.eep || exit 0 +
- +
-Creating Extended Listing: ergodox_lufa.lss +
-avr-objdump -h -S -z ergodox_lufa.elf > ergodox_lufa.lss +
- +
-Creating Symbol Table: ergodox_lufa.sym +
-avr-nm -n ergodox_lufa.elf > ergodox_lufa.sym +
- +
-Size after: +
-   text    data     bss     dec     hex filename +
-  23404      58     314   23776    5ce0 ergodox_lufa.elf +
-</code> +
-</hidden> +
-Vérification du MCU (voir [[https://pjrc.com/teensy/loader_cli.html|pjrc.com]]) : +
-<code bash> +
-simon@deb:~/Programmes/tmk_keyboard/keyboard/ergodox$ cat Makefile.lufa | grep MCU +
-# MCU name, you MUST set this to match the board you are using +
-MCU = atmega32u4 +
-#MCU = at90usb1286+
 </code> </code>
  
-{{ ::ergodox-teensy-flash01.png?400 |}} +On peut modifier cette keymap 
-{{ ::ergodox-teensy-flash02.png?400 |}} +
-{{ ::ergodox-teensy-flash03.png?400 |}} +
-</hidden> +
- +
-==== Avec QMK ==== +
- +
-Ensuite, j'ai essayé avec le firmware [[https://qmk.fm/|qmk]] ([[https://github.com/qmk/qmk_firmware.git|github]]), qui est lui-même basé sur tmk, avec plus de succès. +
 <code bash> <code bash>
-simon@deb:~/gitgit clone https://github.com/qmk/qmk_firmware.git +vim ~/qmk_firmware/keyboards/ergodox_ez/keymaps/my-ergodox/keymap.c
- +
-simon@deb:~/git$ cd qmk_firmware/ +
- +
-simon@deb:~/git/qmk_firmware$ ls +
-autocomplete.sh     common.mk     LICENSE                  shell.nix +
-book.json           Dockerfile    license_GPLv2.md         show_options.mk +
-bootloader.mk       docs          license_GPLv3.md         testlist.mk +
-build_full_test.mk  Doxyfile      license_Modified_BSD.md  tests +
-build_keyboard.mk   doxygen-todo  Makefile                 tmk_core +
-build_layout.mk     drivers       message.mk               users +
-build_test.mk       keyboards     quantum                  util +
-CODE_OF_CONDUCT.md  layouts       readme.md                Vagrantfile +
-common_features.mk  lib           secrets.tar.enc +
- +
-simon@deb:~/git/qmk_firmware$ ls -al keyboards/ +
-total 980 +
-(...) +
-drwxr-xr-x   3 simon simon 4096 avr 10 19:49 ergodone +
-drwxr-xr-x   4 simon simon 4096 avr 10 19:49 ergodox_ez +
-drwxr-xr-x   3 simon simon 4096 avr 10 19:49 ergodox_infinity +
-(...) +
- +
-simon@deb:~/git/qmk_firmware$ ls -al keyboards/ergodox_ez/ +
-total 84 +
-drwxr-xr-x   4 simon simon  4096 avr 10 19:49 . +
-drwxr-xr-x 243 simon simon  4096 avr 10 19:49 .. +
--rw-r--r--   1 simon simon   673 avr 10 19:49 190hotfix.sh +
--rw-r--r--   1 simon simon  4340 avr 10 19:49 config.h +
--rw-r--r--   1 simon simon 11644 avr 10 19:49 ergodox_ez.c +
--rw-r--r--   1 simon simon 11160 avr 10 19:49 ergodox_ez.h +
--rw-r--r--   1 simon simon  8830 avr 10 19:49 info.json +
-drwxr-xr-x  24 simon simon  4096 avr 10 19:49 keymaps +
--rw-r--r--   1 simon simon  9196 avr 10 19:49 matrix.c +
--rw-r--r--   1 simon simon  1298 avr 10 19:49 readme.md +
--rw-r--r--   1 simon simon  3481 avr 10 19:49 rules.mk +
-drwxr-xr-x   2 simon simon  4096 avr 10 19:49 util +
- +
-simon@deb:~/git/qmk_firmware$ ls -al keyboards/ergodox_ez/keymaps/ +
-total 96 +
-(...) +
-drwxr-xr-x  2 simon simon 4096 avr 10 19:49 bdk +
-drwxr-xr-x  2 simon simon 4096 avr 10 19:49 bepo_tm_style +
-drwxr-xr-x  2 simon simon 4096 avr 10 19:49 blakedietz +
-(...) +
- +
-simon@deb:~/git/qmk_firmware$ make git-submodule +
- +
-simon@deb:~/git/qmk_firmware$ make ergodox_ez:bepo_tm_style:all  +
-QMK Firmware 0.6.328 +
-Making ergodox_ez with keymap bepo_tm_style and target all +
- +
-avr-gcc (GCC) 5.4.0 +
-Copyright (C) 2015 Free Software Foundation, Inc. +
-This is free software; see the source for copying conditions.  There is NO +
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +
- +
-Size before: +
-   text    data     bss     dec     hex filename +
-      0   30658       0   30658    77c2 .build/ergodox_ez_bepo_tm_style.hex +
- +
-Compiling: tmk_core/common/command.c                                                                [OK] +
-Linking: .build/ergodox_ez_bepo_tm_style.elf                                                        [OK] +
-Creating load file for flashing: .build/ergodox_ez_bepo_tm_style.hex                                [OK] +
-Copying ergodox_ez_bepo_tm_style.hex to qmk_firmware folder                                         [OK] +
-Checking file size of ergodox_ez_bepo_tm_style.hex                                                  [OK] +
- * The firmware size is fine - 30658/32256 (1598 bytes free)+
 </code> </code>
  
-Le firmware ( ergodox_ez_bepo_tm_style.hex ) est dans le dossier courant. On peut l'envoyer avec cette commande +Ensuite, on peut la compiler :
 <code bash> <code bash>
-simon@deb:~/git/qmk_firmwareteensy_loader_cli --mcu=atmega32u4 -v -w ergodox_ez_bepo_tm_style.hex  +qmk compile -kb ergodox_ez -km my-ergodox
-Teensy Loader, Command Line, Version 2.1 +
-Read "ergodox_ez_bepo_tm_style.hex": 30658 bytes, 95.0% usage +
-Waiting for Teensy device... +
- (hint: press the reset button) +
-Found HalfKay Bootloader +
-Read "ergodox_ez_bepo_tm_style.hex": 30658 bytes, 95.0% usage +
-Programming................................................................................................................................................................................................................................................ +
-Booting+
 </code> </code>
  
-Maintenant qu'on a compris la procédure pour envoyer un layout choisi sur le clavier, on doit faire le layout qui nous convient et recommencer la procédure.+==== Envoyer la configuration sur le clavier ====
  
-===== Configurer le layout ===== +Enfin, on peut l'envoyer sur le clavier avec [[informatique:teensy-loader-cli]] :
-On commence par faire une copie du layout bepo pour l'ergodox_ez :+
 <code bash> <code bash>
-simon@deb:~/git/qmk_firmwarecp -r keyboards/ergodox_ez/keymaps/bepo_tm_style/ keyboards/ergodox_ez/keymaps/bepo_simon +teensy_loader_cli --mcu=atmega32u4 -v -w ~/qmk_firmware/.build/ergodox_ez_my-ergodox.hex
- +
-simon@deb:~/git/qmk_firmware$ ls -al keyboards/ergodox_ez/keymaps/bepo_simon/ +
-total 32 +
-drwxr-xr-x  2 simon simon  4096 avr 10 20:10 . +
-drwxr-xr-x 25 simon simon  4096 avr 10 20:10 .. +
--rwxr-xr-x  1 simon simon   694 avr 10 20:10 config.h +
--rwxr-xr-x  1 simon simon 12235 avr 10 20:10 keymap.c +
--rwxr-xr-x  1 simon simon   770 avr 10 20:10 readme.md +
--rwxr-xr-x  1 simon simon   646 avr 10 20:10 rules.mk+
 </code> </code>
  
-Keymap WIP ( 10/04/2019 ) : +**__État des lieux le 18/10/2020 :__** Toutes les touches fonctionnes mais je n'ai pas encore modifié la keymap créée par défaut... Il faut que j'attaque ça avant de m'habituer au clavier.
-<hidden> +
-<code> +
-// An Ergodox EZ keymap meant to be used with a bépo layout (FR ergonomic +
-// layout, dvorak style)The overall design is slightly inspired by the +
-// TypeMatrix keyboardSwitching between a TypeMatrix and an Ergodox with this +
-// layout should be relatively easy. +
-// +
-// See the README.md file for an image of this keymap.+
  
-#include QMK_KEYBOARD_H +**__État des lieux le 19/10/2020 :__** J'avance, j'ai un layout à peu près convenable pour le calque de base.
-#include "keymap_bepo.h"+
  
-// The layers that we are defining for this keyboards. +**__État des lieux le 30/11/2020 :__** J'approche d'un layout correct pour la base ainsi que le calque "média" et "symbole".
-#define BASE 0 +
-#define FN 1 +
-#define MOUSE 2 +
-#define NUMS 3 +
-#define SWAP 4 +
-#define SYSLEDS 5+
  
-// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array. +**__État des lieux le 08/02/2021 :__** J'ai corrigé toutes les touches "lettres".
-#define TAP_MACRO 0 +
- +
-// A 'transparent' key code (that falls back to the layers below it). +
-#define ___ KC_TRANSPARENT +
- +
-// A 'blocking' key code. Does nothing but prevent falling back to another layer. +
-#define XXX KC_NO +
- +
-// Some combined keys (one normal keycode when tapped and one modifier or layer +
-// toggle when held). +
-#define ESC_FN    LT(FN, KC_ESC)        // ESC key and FN layer toggle. +
-#define M_RSFT    MT(MOD_RSFT, BP_M)    // 'M' key and right shift modifier. +
-#define W_RCTL    MT(MOD_RCTL, BP_W)    // 'W' key and right control modifier. +
-#define SPC_RALT  MT(MOD_RALT, KC_SPC)  // SPACE key and right alt modifier. +
-#define PERC_FN    LT(FN, BP_PERC)      // '%' key and FN layer toggle. +
- +
-// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). +
-#define MK_CUT    LSFT(KC_DEL)  // shift + delete +
-#define MK_COPY   LCTL(KC_INS)  // ctrl + insert +
-#define MK_PASTE  LSFT(KC_INS)  // shift + insert +
- +
-// Custom keycodes +
-enum { +
-  // SAFE_RANGE must be used to tag the first element of the enum. +
-  // DYNAMIC_MACRO_RANGE must always be the last element of the enum if other +
-  // values are added (as its value is used to create a couple of other keycodes +
-  // after it). +
-  DYNAMIC_MACRO_RANGE = SAFE_RANGE, +
-}; +
- +
-// This file must be included after DYNAMIC_MACRO_RANGE is defined... +
-#include "dynamic_macro.h" +
- +
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +
-/Keymap 0: Basic layer +
- * +
- * ,--------------------------------------------------.          ,--------------------------------------------------. +
- * |        |   "  |   «  |   »  |    |    |    |          |    |    |       |    |    |        | +
- * |--------+------+------+------+------+-------------|          |------+------+------+------+------+------+--------| +
- * |  TAB      |   é  |    |    |   è  |    |          |    |    |    |    |    |    |        | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |  SHIFT |    |    |    |    |   ;  |------|          |------|    |    |    |    |   ç  |        | +
- * |--------+------+------+------+------+------|    |          |    |------+------+------+------+------+--------| +
- * |  CTRL  |   ê  |   à  |    |    |   :  |      |          |      |    |    |    |    |    |        | +
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' +
-   |ESC/FN| HOME | PGDN | PGUP |  END |                                      | LEFT | DOWN |  UP  | RIGHT|ESC/FN| +
-   `----------------------------------'                                      `----------------------------------' +
-                                        ,-------------.      ,-------------. +
-                                        |    |      |      |  ?        | +
-                                 ,------|------|------|      |------+------+------. +
-                                      |      |      |      |      |      |      | +
-                                      |      |------|      |------|      |      | +
-                                      |      |      |      |      |      |      | +
-                                 `--------------------'      `--------------------' +
- */ +
-  [BASE] = LAYOUT_ergodox( +
-    /* left hand */ +
-    ___,      BP_DQOT, BP_LGIL,    BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, +
-    KC_TAB,   BP_B,    BP_ECUT,    BP_P,    BP_O,    BP_EGRV, BP_C, +
-    KC_LSFT,  BP_A,    BP_U,       BP_I,    BP_E,    BP_COMM, +
-    KC_LCTRL, BP_ECRC, BP_A_GRAVE, BP_Y,    BP_X,    BP_DOT,  BP_K, +
-    ESC_FN,   KC_HOME, KC_PGDN,    KC_PGUP, KC_END, +
-                                                               KC_EXLM, ___, +
-                                                                        ___, +
-                                                          ___, ___,     ___, +
-    /* right hand */ +
-        BP_PLUS, BP_MINS, BP_SLSH,  BP_ASTR, BP_EQL, KC_PERCENT, ___, +
-        BP_V,    BP_D,    BP_L,     BP_J,    BP_Z,   BP_W,       ___, +
-                 BP_S,    BP_R,     BP_N,    BP_M,   BP_CCED,    ___, +
-        BP_T,    BP_Q,    BP_G,     BP_H,    BP_F,   BP_DOLLAR,  ___, +
-                          KC_LEFT,  KC_DOWN, KC_UP,  KC_RIGHT,   ESC_FN, +
-    ___, S(KC_SLASH), +
-    ___, +
-    ___, ___,         ___), +
- +
-/* Keymap 1Symbol Layer +
- * +
- ,--------------------------------------------------.          ,--------------------------------------------------. +
- * |        |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |          |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |        | +
- * |--------+------+------+------+------+------+------|          |------+------+------+------+------+------+--------| +
- * |        |      |      |      |      |      |      |          |      |   Up | HOME |  UP  | END  | PGUP |        | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |        |      |      |      |      | LSFT |------|          |------| Down | LEFT | DOWN | RIGHT| PGDW |        | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |        |      | CUT  | COPY | PASTE| LCTRL|      |          |      |      |      |      |      |      |        | +
- * `--------+------+------+------+------+-------------         `-------------+------+------+------+------+--------' +
-        |      |      |      |      |                                      |      |      |      |      |      | +
-   `----------------------------------'                                      `----------------------------------' +
-                                        ,-------------.      ,-------------. +
-                                        |      | VOLU |      | HOME | END  | +
-                                 ,------|------|------|      |------+------+------. +
-                                      |      | VOLD |      | PGUP |      |      | +
-                                      |      |------|      |------|      |      | +
-                                      |      | MUTE |      | PGDW |      |      | +
-                                 `--------------------'      `--------------------' +
- */ +
-  [FN] = LAYOUT_ergodox( +
-    /* left hand */ +
-    ___,   KC_F1,  KC_F2,   KC_F3,    KC_F4,    KC_F5,    KC_F6, +
-    ___,     ___,    ___,     ___,      ___,      ___,      ___, +
-    ___,     ___,    ___,     ___,      ___,  KC_LSFT, +
-    ___,     ___, MK_CUT, MK_COPY, MK_PASTE, KC_LCTRL,      ___, +
-    ___,     ___,    ___,     ___,      ___, +
-                                                     ___, KC_VOLU, +
-                                                          KC_VOLD, +
-                                             ___,    ___, KC_MUTE, +
-    /* right hand */ +
-      KC_F7, KC_F8,   KC_F9,  KC_F10,   KC_F11,  KC_F12,    ___, +
-        ___,   ___, KC_HOME,   KC_UP,   KC_END, KC_PGUP,    ___, +
-               ___, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,    ___, +
-        ___,   ___,     ___,     ___,      ___,     ___,    ___, +
-                        ___,     ___,      ___,     ___,    ___, +
-    KC_HOME, KC_END, +
-    KC_PGUP, +
-    KC_PGDN, ___,    ___), +
-    // Note that any change to the FN layer above must be added to +
-    // the MOUSE layer below (except for the arrow keys). +
- +
-/* Keymap 2: Media and mouse keys +
- * +
- * ,--------------------------------------------------.          ,--------------------------------------------------. +
- * |        |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |          |  F7  |  F8  |  F9  |  F10 |  F11 |  F12 |        | +
- * |--------+------+------+------+------+-------------|          |------+------+------+------+------+------+--------| +
- * |        |      |      | MsUp |      |      |      |          |      |      |      |      |      |      |        | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |        |      |MsLeft|MsDown|MsRght|      |------|          |------|      |      |      |      |      |        | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |        |      |      |      |      |      |      |          |      |      |      |      |      |      |        | +
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' +
-        |      |      |      |      |                                      |      |      |      |      |      | +
-   `----------------------------------'                                      `----------------------------------' +
-                                        ,-------------.      ,-------------. +
-                                        |      |      |      |      |      | +
-                                 ,------|------|------|      |------+------+------. +
-                                      |      |      |      |      |      |      | +
-                                      |      |------|      |------|      |      | +
-                                      |      |      |      |      |      |      | +
-                                 `--------------------'      `--------------------' +
- */ +
-  [MOUSE] = LAYOUT_ergodox( +
-    /* left hand */ +
-    ___,   KC_F1,  KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6, +
-    ___,     ___,    ___, KC_MS_U,     ___,     ___,     ___, +
-    ___,     ___,KC_MS_L, KC_MS_D, KC_MS_R,     ___, +
-    ___,     ___,    ___,     ___,     ___,     ___,     ___, +
-    ___,     ___,    ___,     ___,     ___, +
-                                                  ___, ___, +
-                                                       ___, +
-                                             ___, ___, ___, +
-    /* right hand */ +
-       KC_F7,  KC_F8,  KC_F9,  KC_F10,  KC_F11,  KC_F12,   ___, +
-         ___,  ___,      ___,     ___,     ___,     ___,   ___, +
-               ___,      ___,     ___,     ___,     ___,   ___, +
-         ___,  ___,      ___,     ___,     ___,     ___,   ___, +
-                         ___,     ___,     ___,     ___,   ___, +
-    ___, ___, +
-    ___, +
-    ___, ___, ___), +
- +
-/* Keymap 3: Numeric keypad and system keys. +
- * +
- * ,--------------------------------------------------.          ,--------------------------------------------------. +
- * |PrScreen|INSERT| PAUSE|      |      |      |      |          |      |      |      |      |      |      | NUM LK | +
- * |--------+------+------+------+------+-------------|          |------+------+------+------+------+------+--------| +
- * |        |      |      |      |      |      |      |          |      |   =??   |    |    |  ??  |   ??   | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |        |      |      |      |      |      |------|          |------|   %??   |    |    |  ??  |        | +
- * |--------+------+------+------+------+------|      |          |  ??  |------+------+------+------+------+--------| +
- * |        |      |  CUT | COPY | PASTE|      |      |          |      |    |    |    |    |  ??  |        | +
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' +
-        |      |      |      |      |                                      |      |      |      |  ??  |      | +
-   `----------------------------------'                                      `----------------------------------' +
-                                        ,-------------.      ,-------------. +
-                                        |      |      |      |      |      | +
-                                 ,------|------|------|      |------+------+------. +
-                                      |      |      |      |      |      |      | +
-                                      |      |------|      |------|      |      | +
-                                      |      |      |      |      |      |      | +
-                                 `--------------------'      `--------------------' +
- */ +
-  [NUMS] = LAYOUT_ergodox( +
-    /* left hand */ +
-    KC_PSCR, KC_INS, KC_PAUS,    ___,     ___,      ___, ___, +
-    ___,     ___,    ___,        ___,     ___,      ___, ___, +
-    ___,     ___,    ___,        ___,     ___,      ___, +
-    ___,     ___,    MK_CUT,     MK_COPY, MK_PASTE, ___, ___, +
-    ___,     ___,    ___,        ___,     ___, +
-                                              ___, ___, +
-                                                   ___, +
-                                         ___, ___, ___, +
-    /* right hand */ +
-         ___,     ___,     ___,   ___,   ___,     ___,     KC_NLCK, +
-         ___,     KC_PEQL, KC_P7, KC_P8, KC_P9,   KC_PMNS, KC_SLCK, +
-                  KC_PCMM, KC_P4, KC_P5, KC_P6,   KC_PPLS, ___, +
-         KC_PENT, KC_P0,   KC_P1, KC_P2, KC_P3,   KC_PAST, ___, +
-                           ___,   ___,   ___,     KC_PSLS, ___, +
-    ___, ___, +
-    ___, +
-    ___, ___, ___), +
- +
-  // Layer 4: hand swap, all keys are mirrored to the other side of the keyboard +
-  // except for the layer toggle itself (so there is no right arrow when this +
-  // layer is activated). +
-  [SWAP] = LAYOUT_ergodox( +
-    /* left hand */ +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, +
-                             TT(SWAP), ___, +
-                                       ___, +
-                             ___, ___, ___, +
-    /* right hand */ +
-         ___, ___, ___, ___, ___, ___, ___, +
-         ___, ___, ___, ___, ___, ___, ___, +
-              ___, ___, ___, ___, ___, ___, +
-         ___, ___, ___, ___, ___, ___, ___, +
-                   ___, ___, ___, ___, ___, +
-    ___, TT(SWAP), +
-    ___, +
-    ___, ___,      ___), +
- +
-  // Layer 5: The LEDs are showing the "standardcaps/num/scroll lock indicator +
-  // instead of their default which shows the currently active layers (FN, NUMS, +
-  // and MOUSE in that order). +
-  [SYSLEDS] = LAYOUT_ergodox( +
-    /* left hand */ +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, +
-                                  ___, ___, +
-                                       ___, +
-                             ___, ___, ___, +
-    /* right hand */ +
-         ___, ___, ___, ___, ___,         ___, ___, +
-         ___, ___, ___, ___, ___,         ___, ___, +
-              ___, ___, ___, ___,         ___, ___, +
-         ___, ___, ___, ___, ___,         ___, ___, +
-                   ___, ___, TT(SYSLEDS), ___, ___, +
-    ___, ___, +
-    ___, +
-    ___, ___, ___), +
-}; +
- +
-// Whether the macro 1 is currently being recorded. +
-static bool is_macro1_recording = false; +
- +
-// The current set of active layers (as a bitmask). +
-// There is a global 'layer_state' variable but it is set after the call +
-// to layer_state_set_user(). +
-static uint32_t current_layer_state = 0; +
-uint32_t layer_state_set_user(uint32_t state); +
- +
-// Method called at the end of the tap dance on the TAP_MACRO key. That key is +
-// used to start recording a macro (double tap or more), to stop recording (any +
-// number of tap), or to play the recorded macro (1 tap). +
-void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) { +
-  uint16_t keycode; +
-  keyrecord_t record; +
-  dprintf("macro_tap_dance_fn %d\n", state->count); +
-  if (is_macro1_recording) { +
-    keycode = DYN_REC_STOP; +
-    is_macro1_recording = false; +
-    layer_state_set_user(current_layer_state); +
-  } else if (state->count == 1) { +
-    keycode = DYN_MACRO_PLAY1; +
-  } else { +
-    keycode = DYN_REC_START1; +
-    is_macro1_recording = true; +
-    layer_state_set_user(current_layer_state); +
-  } +
- +
-  record.event.pressed = true; +
-  process_record_dynamic_macro(keycode, &record); +
-  record.event.pressed = false; +
-  process_record_dynamic_macro(keycode, &record); +
-+
- +
-// The definition of the tap dance actions: +
-qk_tap_dance_action_t tap_dance_actions[] = { +
-  // This Tap dance plays the macro 1 on TAP and records it on double tap. +
-  [TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn), +
-}; +
- +
-// Runs for each key down or up event. +
-bool process_record_user(uint16_t keycode, keyrecord_t *record) { +
-  if (keycode != TD(TAP_MACRO)) { +
-    // That key is processed by the macro_tapdance_fn. Not ignoring it here is +
-    // mostly a no-op except that it is recorded in the macros (and uses space). +
-    // We can't just return false when the key is a tap dance, because +
-    // process_record_user, is called before the tap dance processing (and +
-    // returning false would eat the tap dance). +
-    if (!process_record_dynamic_macro(keycode, record)) { +
-      return false; +
-    } +
-  } +
- +
-  return true; // Let QMK send the enter press/release events +
-+
- +
-// Runs just one time when the keyboard initializes. +
-void matrix_init_user(void) { +
-  ergodox_right_led_1_off(); +
-  ergodox_right_led_2_off(); +
-  ergodox_right_led_3_off(); +
-}; +
- +
-// Runs constantly in the background, in a loop. +
-void matrix_scan_user(void) { +
- +
-}; +
- +
-// The state of the LEDs requested by the system, as a bitmask. +
-static uint8_t sys_led_state = 0; +
- +
-// Use these masks to read the system LEDs state. +
-static const uint8_t sys_led_mask_num_lock = 1 << USB_LED_NUM_LOCK; +
-static const uint8_t sys_led_mask_caps_lock = 1 << USB_LED_CAPS_LOCK; +
-static const uint8_t sys_led_mask_scroll_lock = 1 << USB_LED_SCROLL_LOCK; +
- +
-// Value to use to switch LEDs on. The default value of 255 is far too bright. +
-static const uint8_t max_led_value = 20; +
- +
-// Whether the given layer (one of the constant defined at the top) is active. +
-#define LAYER_ON(layer) (current_layer_state & (1<<layer)) +
- +
-void led_1_on(void) { +
-  ergodox_right_led_1_on(); +
-  ergodox_right_led_1_set(max_led_value); +
-+
- +
-void led_2_on(void) { +
-  ergodox_right_led_2_on(); +
-  ergodox_right_led_2_set(max_led_value); +
-+
- +
-void led_3_on(void) { +
-  ergodox_right_led_3_on(); +
-  ergodox_right_led_3_set(max_led_value); +
-+
- +
-void led_1_off(void) { +
-  ergodox_right_led_1_off(); +
-+
- +
-void led_2_off(void) { +
-  ergodox_right_led_2_off(); +
-+
- +
-void led_3_off(void) { +
-  ergodox_right_led_3_off(); +
-+
- +
-// Called when the computer wants to change the state of the keyboard LEDs. +
-void led_set_user(uint8_t usb_led) { +
-  sys_led_state = usb_led; +
-  if (LAYER_ON(SYSLEDS)) { +
-    if (sys_led_state & sys_led_mask_caps_lock) { +
-      led_1_on(); +
-    } else { +
-      led_1_off(); +
-    } +
-    if (sys_led_state & sys_led_mask_num_lock) { +
-      led_2_on(); +
-    } else { +
-      led_2_off(); +
-    } +
-    if (sys_led_state & sys_led_mask_scroll_lock) { +
-      led_3_on(); +
-    } else { +
-      led_3_off(); +
-    } +
-  } +
-+
- +
-uint32_t layer_state_set_user(uint32_t state) { +
-  current_layer_state = state; +
-  swap_hands = LAYER_ON(SWAP); +
- +
-  if (is_macro1_recording) { +
-    led_1_on(); +
-    led_2_on(); +
-    led_3_on(); +
-    return state; +
-  } +
- +
-  if (LAYER_ON(SYSLEDS)) { +
-    led_set_user(sys_led_state); +
-    return state; +
-  } +
- +
-  if (LAYER_ON(FN)) { +
-    led_1_on(); +
-  } else { +
-    led_1_off(); +
-  } +
- +
-  if (LAYER_ON(NUMS)) { +
-    led_2_on(); +
-  } else { +
-    led_2_off(); +
-  } +
- +
-  if (LAYER_ON(MOUSE)) { +
-    led_3_on(); +
-  } else { +
-    led_3_off(); +
-  } +
- +
-  return state; +
-}; +
-</code> +
-</hidden> +
- +
-Keymap WIP2 (12/04/2019) :+
 <hidden> <hidden>
-<code> +<code c>
-// An Ergodox EZ keymap meant to be used with a bépo layout (FR ergonomic +
-// layout, dvorak style). The overall design is slightly inspired by the +
-// TypeMatrix keyboard. Switching between a TypeMatrix and an Ergodox with this +
-// layout should be relatively easy. +
-// +
-// See the README.md file for an image of this keymap. +
 #include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
-#include "keymap_bepo.h"+#include "version.h"
  
-// The layers that we are defining for this keyboards. +enum layers { 
-#define BASE 0 +    BASE, // default layer 
-#define FN 1 +    SYMB, // symbols 
-#define MOUSE 2 +    MDIA, // media keys 
-#define NUMS 3 +};
-#define SWAP 4 +
-#define SYSLEDS 5+
  
-// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array. +enum custom_keycodes { 
-#define TAP_MACRO 0 +#ifdef ORYX_CONFIGURATOR 
- +  VRSN = EZ_SAFE_RANGE
-// A 'transparent' key code (that falls back to the layers below it). +#else 
-#define ___ KC_TRANSPARENT +  VRSN = SAFE_RANGE
- +#endif 
-// A 'blocking' key code. Does nothing but prevent falling back to another layer. +  RGB_SLD
-#define XXX KC_NO +
- +
-// Some combined keys (one normal keycode when tapped and one modifier or layer +
-// toggle when held). +
-#define ESC_FN    LT(FNKC_ESC)        // ESC key and FN layer toggle. +
-#define M_RSFT    MT(MOD_RSFT, BP_M)    // 'M' key and right shift modifier. +
-#define W_RCTL    MT(MOD_RCTL, BP_W)    // 'W' key and right control modifier. +
-#define SPC_RALT  MT(MOD_RALTKC_SPC)  // SPACE key and right alt modifier. +
-#define PERC_FN    LT(FN, BP_PERC)      // '%' key and FN layer toggle. +
- +
-// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). +
-#define MK_CUT    LSFT(KC_DEL)  // shift + delete +
-#define MK_COPY   LCTL(KC_INS)  // ctrl + insert +
-#define MK_PASTE  LSFT(KC_INS)  // shift + insert +
- +
-// Custom keycodes +
-enum { +
-  // SAFE_RANGE must be used to tag the first element of the enum. +
-  // DYNAMIC_MACRO_RANGE must always be the last element of the enum if other +
-  // values are added (as its value is used to create a couple of other keycodes +
-  // after it). +
-  DYNAMIC_MACRO_RANGE = SAFE_RANGE,+
 }; };
- 
-// This file must be included after DYNAMIC_MACRO_RANGE is defined... 
-#include "dynamic_macro.h" 
  
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /* Keymap 0: Basic layer /* Keymap 0: Basic layer
  *  *
- * ,--------------------------------------------------.          ,--------------------------------------------------. + * ,--------------------------------------------------.           ,--------------------------------------------------. 
- * |        |      «    »                    |                          + * | µ      |                             |                    Del   
- * |--------+------+------+------+------+-------------|          |------+------+------+------+------+------+--------| + * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------| 
- * |  TAB   |      é          è              |                   VolUp  | + * | Tab    |                             |                    BkSp  | 
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| + * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------| 
- * |  SHIFT |                |------|          |------|               ç  VolDw  | + * | CapsLk |                |------|           |------|                |  Enter 
- * |--------+------+------+------+------+------|             |    |------+------+------+------+------+--------| + * |--------+------+------+------+------+------|              |    |------+------+------+------+------+--------| 
- * |  CTRL    ê  |   à                |          |      |               $  Mute   + * | LShift |</Ctrl|                  |           |      |             |//CtrlRShift 
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' + * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------' 
-   |ESC/FNHOME PGDN PGUP |  END                                      LEFT | DOWN |  UP  RIGHT|ESC/FN+    L1  Home PgUp PgDn |  End                                       Left |  Up  Down Right|  L2  
-   `----------------------------------'                                      `----------------------------------' +   `----------------------------------'                                       `----------------------------------' 
-                                        ,-------------.      ,-------------. +                                        ,-------------.       ,-------------. 
-                                        |   !  |Delete     |BackSp|   ?  | +                                        | App  Alt        |  App |Ctrl/Esc
-                                 ,------|------|------|      |------+------+------. +                                 ,------|------|------|       |------+--------+------. 
-                                      |      |  Alt      | AltGr|      |      | +                                      |      | Alt        | AltGr|        |      | 
-                                 SPACEENTER|------|      |------| ENTERSPACE+                                 Space|Backsp|------|       |------|  Tab   |Enter 
-                                      |       Fn        Fn2      |      | +                                      |ace   LGui       RGui        |      | 
-                                 `--------------------'      `--------------------'+                                 `--------------------'       `----------------------'
  */  */
-  [BASE] = LAYOUT_ergodox+[BASE] = LAYOUT_ergodox_pretty
-    /* left hand */ +  KC_BSLS        KC_1          KC_2,    KC_3   KC_4   KC_5,    KC_6                KC_7        KC_8,    KC_9,    KC_0,    KC_MINSKC_EQL,            KC_DEL
-    ___     BP_DQOTBP_LGIL,    BP_RGILBP_LPRNBP_RPRNBP_AT, +  KC_TAB         KC_Q          KC_W,    KC_E,    KC_R,    KC_T   KC_H                KC_U        KC_I,    KC_O,    KC_P,    KC_LBRCKC_RBRC          KC_BSPC, 
-    KC_TAB  BP_B   BP_ECUT,    BP_P,    BP_O,    BP_EGRVBP_C+  KC_CAPS        KC_A          KC_S   KC_D   KC_F   KC_G                                       KC_K   KC_L,    KC_SCLNKC_QUOTKC_NUHS          KC_ENT, 
-    KC_LSFT,  BP_A   BP_U      BP_I,    BP_E,    BP_COMM, +  KC_LSFT        CTL_T(KC_NUBS)KC_Z   KC_X,    KC_C,    KC_V,    KC_B,                 KC_J        KC_M,    KC_COMMKC_DOTKC_SLSH CTL_T(KC_GRV),    KC_RSFT, 
-    KC_LCTRLBP_ECRCBP_A_GRAVEBP_Y,    BP_X,    BP_DOT BP_K, +  DF(SYMB)       KC_HOME       KC_PGDNKC_PGUPKC_END                                              KC_LEFT, KC_DOWN, KC_UP,   KC_RIGHT,DF(MDIA)
-    ESC_FN  KC_HOMEKC_PGDN   KC_PGUPKC_END, +                                                           ALT_T(KC_APP)KC_LALT    KC_APP CTL_T(KC_ESC), 
-                                                                 BP_EXLMKC_DEL, +                                                                          KC_LALT    KC_RALT
-                                                                          KC_LALT, +                                                         KC_SPC, KC_BSPC, KC_LGUI,     KC_RGUI, KC_TAB, KC_ENT 
-                                                BP_NBSPKC_ENT TT(FN), +), /*note: KC_GRAVE ? */
-    /* right hand */ +
-        BP_PLUSBP_MINSBP_SLSH,  BP_ASTRBP_EQLBP_PERC  ___, +
-        BP_V,    BP_D,    BP_L,     BP_J,    BP_Z  BP_W,      KC_VOLU, +
-                 BP_S   BP_R,     BP_N,    BP_M  BP_CCED  KC_VOLD, +
-        BP_T,    BP_Q   BP_G    BP_H   BP_F  BP_DOLLARKC_MUTE, +
-                          KC_LEFT,  KC_DOWN, KC_UP,  KC_RIGHT,  ESC_FN+
-    KC_BSPC  BP_QEST, +
-    KC_ALGR, +
-    TT(MOUSE), KC_ENT BP_NBSP)+
 /* Keymap 1: Symbol Layer /* Keymap 1: Symbol Layer
  *  *
- * ,--------------------------------------------------.          ,--------------------------------------------------. + * ,---------------------------------------------------.           ,--------------------------------------------------. 
- * |        |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |         C |  F7  |  F8  |  F9  |  F10 |  F11  F12 |        | + * |         |  F1  |  F2  |  F3  |  F4  |  F5  |  F6  |           |  F7  |  F8  |  F9  |  F10 | F11  F12  |        | 
- * |--------+------+------+------+------+------+------|          |------+------+------+------+------+------+--------| + * |---------+------+------+------+------+------+------|           |------+------+------+------+------+------+--------| 
- * |                                 |      |          |      |   Up HOME |  UP  END  | PGUP |        | + * |           !    @    {    }    |  |      |           |      |    |   7    8  |      *         | 
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| + * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------| 
- * |                            LSFT |------|          |------| Down LEFT DOWN RIGHTPGDW |        | + * |           #    $    (    )    `  |------|           |------|      4    5    6    +  |        | 
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| + * |---------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------| 
- * |             CUT  COPY PASTELCTRL|      |          |      |                          |        | + * |           %    ^    [    ]    ~  |      |           |      |      1    2    3    /  |        | 
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' + * `---------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------' 
-        |      |      |      |      |                                      |      |      |      |      |      +   L0    |      |      |      |      |                                       |      |      |      |      |  L2  
-   `----------------------------------'                                      `----------------------------------' +   `-----------------------------------'                                       `----------------------------------' 
-                                        ,-------------.      ,-------------. +                                        ,-------------.       ,-------------. 
-                                        |      VOLU      HOME | END  | +                                        | App  Alt        |  App |Ctrl/Esc
-                                 ,------|------|------|      |------+------+------. +                                 ,------|------|------|       |------+--------+------. 
-                                      |      | VOLD      PGUP      |      | +                                      |      | Alt        AltGr       |      | 
-                                           |------|      |------|           +                                 Space|Backsp|------|       |------|  Tab   |Enter 
-                                      |      MUTE      PGDW      |      | +                                      |ace   LGui       RGui        |      | 
-                                 `--------------------'      `--------------------'+                                 `--------------------'       `----------------------'
  */  */
-  [FN] = LAYOUT_ergodox+[SYMB] = LAYOUT_ergodox_pretty
-    /* left hand */ +  KC_NO,   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_TRNS
-    ___,   KC_F1,  KC_F2,   KC_F3,    KC_F4,    KC_F5,    KC_F6, +  KC_TRNSKC_EXLMKC_AT  KC_LCBRKC_RCBRKC_PIPEKC_NO      KC_NO  KC_SLSHKC_KP_7KC_KP_8KC_KP_9KC_PASTKC_TRNS
-    ___    ___   ___    ___     ___     ___     ___+  KC_TRNSKC_HASHKC_DLR,  KC_LPRNKC_RPRNKC_GRV                       KC_PDOTKC_KP_4KC_KP_5KC_KP_6KC_PPLSKC_TRNS, 
-    ___,     ___,    ___,     ___,      ___,  KC_LSFT, +  KC_TRNSKC_PERCKC_CIRCKC_LBRCKC_RBRCKC_TILDKC_NO      KC_NO,   KC_KP_0KC_KP_1KC_KP_2KC_KP_3KC_PSLSKC_TRNS
-    ___    ___MK_CUTMK_COPYMK_PASTEKC_LCTRL     ___, +  DF(BASE),KC_TRNSKC_TRNSKC_TRNSKC_TRNS                                        KC_TRNSKC_TRNSKC_TRNSKC_TRNSDF(MDIA),
-    ___    ___   ___    ___     ___, +
-                                                     ___, KC_VOLU+
-                                                          KC_VOLD, +
-                                             ___   ___, KC_MUTE, +
-    /* right hand */ +
-      KC_F7, KC_F8,   KC_F9,  KC_F10  KC_F11 KC_F12   ___, +
-        ___  ___KC_HOME  KC_UP  KC_ENDKC_PGUP   ___, +
-               ___KC_LEFTKC_DOWNKC_RIGHTKC_PGDN   ___, +
-        ___,   ___    ___    ___     ___    ___   ___+
-                        ___    ___     ___    ___   ___, +
-    KC_HOMEKC_END, +
-    KC_PGUP, +
-    KC_PGDN___,    ___), +
-    // Note that any change to the FN layer above must be added to +
-    // the MOUSE layer below (except for the arrow keys).+
  
 +                                         ALT_T(KC_APP), KC_LALT,     KC_APP,  CTL_T(KC_ESC),
 +                                                        KC_LALT,     KC_RALT,
 +                                       KC_SPC, KC_BSPC, KC_LGUI,     KC_RGUI, KC_TAB, KC_ENT
 +
 +),
 /* Keymap 2: Media and mouse keys /* Keymap 2: Media and mouse keys
  *  *
- * ,--------------------------------------------------.          ,--------------------------------------------------. + * ,--------------------------------------------------.           ,--------------------------------------------------. 
- * |        |  F1   F2   F3   F4   F5   F6            F7   F8   F9   F10  F11  F12 |        | + * |        |      MsBt3MsBt4MsBt5                    Mute      MsBt3MsBt4MsBt5     |        | 
- * |--------+------+------+------+------+-------------|          |------+------+------+------+------+------+--------| + * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------| 
- * |        |           | MsUp |                                                              + * |        | WhlLfLclk | MsUp | Rclk |WhlUp |Bright          Vol+ |WhlUp Lclk MsUp Rclk |WhlLf  Prev  
- * |--------+------+------+------+------+------|               |      |------+------+------+------+------+--------| + * |--------+------+------+------+------+------|              |      |------+------+------+------+------+--------| 
- * |        |      |MsLeft|MsDown|MsRght|      |------|          |------|                                 + * |        | WhlRt|MsLeft|MsDown|MsRght|WhlDn |------|           |------|WhlDn |MsLeft|MsDown|MsRght|WhlRt  Next  
- * |--------+------+------+------+------+------|                    |------+------+------+------+------+--------| + * |--------+------+------+------+------+------|Bright          Vol- |------+------+------+------+------+--------| 
- * |        |      |      |      |      |      |               |      |      |      |      |      |      |        + * |        |      |      |      |      |      |              |      |      |      |      |      |      |  Play  
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' + * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------' 
-        |      |      |      |      |                                      |      |      |      |      |      +   L0   |      |      |      |      |                                       |      |      |      |      |  L1  
-   `----------------------------------'                                      `----------------------------------' +   `----------------------------------'                                       `----------------------------------' 
-                                        ,-------------.      ,-------------. +                                        ,-------------.       ,-------------. 
-                                        |                          +                                        | App  Alt         App |Ctrl/Esc
-                                 ,------|------|------|      |------+------+------. +                                 ,------|------|------|       |------+--------+------. 
-                                      |      |                     |      | +                                      |      | Alt        AltGr       |      | 
-                                           |------|      |------|           +                                 Space|Backsp|------|       |------|  Tab   |Enter 
-                                      |                          |      | +                                      |ace   LGui       RGui        |      | 
-                                 `--------------------'      `--------------------'+                                 `--------------------'       `----------------------'
  */  */
-  [MOUSE] = LAYOUT_ergodox+[MDIA] = LAYOUT_ergodox_pretty
-    /* left hand */ +  KC_NO,   KC_NO,   KC_BTN3KC_BTN4KC_BTN5KC_NO  KC_NO      KC_MUTEKC_NO  KC_BTN3KC_BTN4KC_BTN5KC_NO  KC_NO
-    ___,   KC_F1,  KC_F2,   KC_F3,   KC_F4  KC_F5  KC_F6, +  KC_NO  KC_WH_LKC_BTN1KC_MS_UKC_BTN2KC_WH_UKC_BRIU,     KC_VOLUKC_WH_UKC_BTN1KC_MS_UKC_BTN2KC_WH_LKC_MPRV
-    ___    ___   ___KC_MS_U    ___    ___    ___, +  KC_NO,   KC_WH_RKC_MS_LKC_MS_DKC_MS_RKC_WH_D                      KC_WH_DKC_MS_LKC_MS_DKC_MS_RKC_WH_RKC_MNXT
-    ___    ___,KC_MS_L, KC_MS_D, KC_MS_R,     ___+  KC_NO  KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_BRID,     KC_VOLDKC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_NO,   KC_MPLY
-    ___    ___   ___    ___    ___    ___    ___, +  DF(BASE),KC_TRNSKC_TRNSKC_TRNSKC_TRNS                                        KC_TRNSKC_TRNSKC_TRNSKC_TRNSDF(SYMB),
-    ___,     ___   ___    ___    ___, +
-                                                  ______, +
-                                                       ___+
-                                             ___, ___, ___, +
-    /* right hand */ +
-       KC_F7,  KC_F8,  KC_F9,  KC_F10,  KC_F11,  KC_F12,   ___, +
-         ___ ___     ___    ___    ___    ___  ___, +
-               ___     ___    ___,     ___,     ___,   ___+
-         ___,  ___     ___,     ___,     ___,     ___,   ___, +
-                         ___,     ___,     ___,     ___,   ___, +
-    ___, ___, +
-    ___, +
-    ___, ___, ___), +
- +
-/* Keymap 3: Numeric keypad and system keys. +
- * +
- * ,--------------------------------------------------.          ,--------------------------------------------------. +
- * |PrScreen|INSERT| PAUSE|      |      |      |      |          |      |      |      |      |      |      | NUM LK | +
- * |--------+------+------+------+------+-------------|          |------+------+------+------+------+------+--------| +
- * |        |      |      |      |      |      |      |          |      |   =??|    |    |    |  ??  |   ??   | +
- * |--------+------+------+------+------+------|      |          |      |------+------+------+------+------+--------| +
- * |        |      |      |      |      |      |------|          |------|   %??   |    |    |  ??  |        | +
- * |--------+------+------+------+------+------|      |          |  ??  |------+------+------+------+------+--------| +
- * |        |      |  CUT | COPY | PASTE|      |      |          |      |    |    |    |    |  ??  |        | +
- * `--------+------+------+------+------+-------------'          `-------------+------+------+------+------+--------' +
-        |      |      |      |      |                                      |      |      |      |  ??  |      | +
-   `----------------------------------'                                      `----------------------------------' +
-                                        ,-------------.      ,-------------. +
-                                        |      |      |      |      |      | +
-                                 ,------|------|------|      |------+------+------. +
-                                      |      |      |      |      |      |      | +
-                                      |      |------|      |------|      |      | +
-                                      |      |      |      |      |      |      | +
-                                 `--------------------'      `--------------------' +
- */ +
-  [NUMS] = LAYOUT_ergodox( +
-    /* left hand */ +
-    KC_PSCR, KC_INS, KC_PAUS,    ___,     ___,      ___, ___, +
-    ___,     ___,    ___,        ___,     ___,      ___, ___, +
-    ___,     ___,    ___,        ___,     ___,      ___, +
-    ___,     ___,    MK_CUT,     MK_COPY, MK_PASTE, ___, ___, +
-    ___,     ___,    ___,        ___,     ___, +
-                                              ___, ___, +
-                                                   ___, +
-                                         ___, ___, ___, +
-    /* right hand */ +
-         ___,     ___,     ___,   ___,   ___,     ___    KC_NLCK, +
-         ___,     KC_PEQL, KC_P7, KC_P8, KC_P9,   KC_PMNS, KC_SLCK, +
-                  KC_PCMM, KC_P4, KC_P5, KC_P6,   KC_PPLS, ___, +
-         KC_PENT, KC_P0,   KC_P1, KC_P2, KC_P3,   KC_PAST, ___, +
-                           ___,   ___  ___,     KC_PSLS, ___, +
-    ___, ___, +
-    ___, +
-    ___, ___, ___), +
- +
-  // Layer 4: hand swap, all keys are mirrored to the other side of the keyboard +
-  // except for the layer toggle itself (so there is no right arrow when this +
-  // layer is activated)+
-  [SWAP] = LAYOUT_ergodox( +
-    /* left hand */ +
-    _____________________, +
-    _________, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, +
-                             TT(SWAP), ___, +
-                                       ___, +
-                             ___, ___, ___, +
-    /* right hand */ +
-         ___, ___, ___, ___, ___, ___, ___, +
-         ___, ___, ___, ___, ___, ___, ___, +
-              ___, ___, ___, ___, ___, ___, +
-         ___, ___, ___, ___, ___, ___, ___, +
-                   ___, ___, ___, ___, ___, +
-    ___, TT(SWAP), +
-    ___, +
-    ___, ___,      ___),+
  
-  // Layer 5: The LEDs are showing the "standard" caps/num/scroll lock indicator +                                         ALT_T(KC_APP)KC_LALT,     KC_APP,  CTL_T(KC_ESC), 
-  // instead of their default which shows the currently active layers (FNNUMS, +                                                        KC_LALT    KC_RALT
-  // and MOUSE in that order)+                                       KC_SPCKC_BSPCKC_LGUI    KC_RGUIKC_TABKC_ENT 
-  [SYSLEDS] = LAYOUT_ergodox( +),
-    /* left hand */ +
-    ___, ___, ___, ___, ___, ___, ___+
-    ______, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, ___, ___, +
-    ___, ___, ___, ___, ___, +
-                                  ___, ___+
-                                       ___, +
-                             _________, +
-    /* right hand */ +
-         ___, ___, ___, ___, ___,         ___, ___+
-         ___, ___, ___, ___, ___,         ___, ___, +
-              ___, ___, ___, ___,         ___, ___, +
-         ___, ___, ___, ___, ___,         ___, ___, +
-                   ___, ___, TT(SYSLEDS), ___, ___, +
-    ___, ___, +
-    ___, +
-    ___, ___, ___),+
 }; };
  
-// Whether the macro 1 is currently being recorded. 
-static bool is_macro1_recording = false; 
- 
-// The current set of active layers (as a bitmask). 
-// There is a global 'layer_state' variable but it is set after the call 
-// to layer_state_set_user(). 
-static uint32_t current_layer_state = 0; 
-uint32_t layer_state_set_user(uint32_t state); 
- 
-// Method called at the end of the tap dance on the TAP_MACRO key. That key is 
-// used to start recording a macro (double tap or more), to stop recording (any 
-// number of tap), or to play the recorded macro (1 tap). 
-void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) { 
-  uint16_t keycode; 
-  keyrecord_t record; 
-  dprintf("macro_tap_dance_fn %d\n", state->count); 
-  if (is_macro1_recording) { 
-    keycode = DYN_REC_STOP; 
-    is_macro1_recording = false; 
-    layer_state_set_user(current_layer_state); 
-  } else if (state->count == 1) { 
-    keycode = DYN_MACRO_PLAY1; 
-  } else { 
-    keycode = DYN_REC_START1; 
-    is_macro1_recording = true; 
-    layer_state_set_user(current_layer_state); 
-  } 
- 
-  record.event.pressed = true; 
-  process_record_dynamic_macro(keycode, &record); 
-  record.event.pressed = false; 
-  process_record_dynamic_macro(keycode, &record); 
-} 
- 
-// The definition of the tap dance actions: 
-qk_tap_dance_action_t tap_dance_actions[] = { 
-  // This Tap dance plays the macro 1 on TAP and records it on double tap. 
-  [TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn), 
-}; 
- 
-// Runs for each key down or up event. 
 bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-  if (keycode != TD(TAP_MACRO)) { +  if (record->event.pressed) { 
-    // That key is processed by the macro_tapdance_fn. Not ignoring it here is +    switch (keycode) { 
-    // mostly a no-op except that it is recorded in the macros (and uses space). +      case VRSN: 
-    // We can't just return false when the key is a tap dance, because +        SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); 
-    // process_record_user, is called before the tap dance processing (and +        return false; 
-    // returning false would eat the tap dance). +      #ifdef RGBLIGHT_ENABLE 
-    if (!process_record_dynamic_macro(keycode, record)) { +      case RGB_SLD: 
-      return false;+        rgblight_mode(1); 
 +        return false; 
 +      #endif
     }     }
   }   }
- +  return true;
-  return true; // Let QMK send the enter press/release events+
 } }
  
 // Runs just one time when the keyboard initializes. // Runs just one time when the keyboard initializes.
-void matrix_init_user(void) { +void keyboard_post_init_user(void) { 
-  ergodox_right_led_1_off(); +#ifdef RGBLIGHT_COLOR_LAYER_0 
-  ergodox_right_led_2_off(); +  rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); 
-  ergodox_right_led_3_off();+#endif
 }; };
  
-// Runs constantly in the background, in loop+// Runs whenever there is layer state change
-void matrix_scan_user(void) { +layer_state_t layer_state_set_user(layer_state_t state) { 
- +  ergodox_board_led_off();
-}; +
- +
-// The state of the LEDs requested by the system, as a bitmask. +
-static uint8_t sys_led_state = 0; +
- +
-// Use these masks to read the system LEDs state. +
-static const uint8_t sys_led_mask_num_lock = 1 << USB_LED_NUM_LOCK; +
-static const uint8_t sys_led_mask_caps_lock = 1 << USB_LED_CAPS_LOCK; +
-static const uint8_t sys_led_mask_scroll_lock = 1 << USB_LED_SCROLL_LOCK; +
- +
-// Value to use to switch LEDs on. The default value of 255 is far too bright. +
-static const uint8_t max_led_value = 20; +
- +
-// Whether the given layer (one of the constant defined at the top) is active. +
-#define LAYER_ON(layer) (current_layer_state & (1<<layer)) +
- +
-void led_1_on(void) { +
-  ergodox_right_led_1_on(); +
-  ergodox_right_led_1_set(max_led_value); +
-+
- +
-void led_2_on(void) { +
-  ergodox_right_led_2_on(); +
-  ergodox_right_led_2_set(max_led_value); +
-+
- +
-void led_3_on(void) { +
-  ergodox_right_led_3_on(); +
-  ergodox_right_led_3_set(max_led_value); +
-+
- +
-void led_1_off(void) {+
   ergodox_right_led_1_off();   ergodox_right_led_1_off();
-} 
- 
-void led_2_off(void) { 
   ergodox_right_led_2_off();   ergodox_right_led_2_off();
-} 
- 
-void led_3_off(void) { 
   ergodox_right_led_3_off();   ergodox_right_led_3_off();
-} 
  
-// Called when the computer wants to change the state of the keyboard LEDs. +  uint8_t layer = get_highest_layer(state); 
-void led_set_user(uint8_t usb_led) { +  switch (layer) { 
-  sys_led_state = usb_led+      case 0: 
-  if (LAYER_ON(SYSLEDS)) { +        #ifdef RGBLIGHT_COLOR_LAYER_0 
-    if (sys_led_state & sys_led_mask_caps_lock{ +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0)
-      led_1_on(); +        #endif 
-    } else { +        break; 
-      led_1_off();+      case 1: 
 +        ergodox_right_led_1_on(); 
 +        #ifdef RGBLIGHT_COLOR_LAYER_1 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1)
 +        #endif 
 +        break; 
 +      case 2: 
 +        ergodox_right_led_2_on()
 +        #ifdef RGBLIGHT_COLOR_LAYER_2 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2)
 +        #endif 
 +        break; 
 +      case 3: 
 +        ergodox_right_led_3_on(); 
 +        #ifdef RGBLIGHT_COLOR_LAYER_3 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); 
 +        #endif 
 +        break; 
 +      case 4: 
 +        ergodox_right_led_1_on()
 +        ergodox_right_led_2_on(); 
 +        #ifdef RGBLIGHT_COLOR_LAYER_4 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); 
 +        #endif 
 +        break; 
 +      case 5: 
 +        ergodox_right_led_1_on(); 
 +        ergodox_right_led_3_on(); 
 +        #ifdef RGBLIGHT_COLOR_LAYER_5 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); 
 +        #endif 
 +        break; 
 +      case 6: 
 +        ergodox_right_led_2_on(); 
 +        ergodox_right_led_3_on(); 
 +        #ifdef RGBLIGHT_COLOR_LAYER_6 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); 
 +        #endif 
 +        break; 
 +      case 7: 
 +        ergodox_right_led_1_on(); 
 +        ergodox_right_led_2_on(); 
 +        ergodox_right_led_3_on(); 
 +        #ifdef RGBLIGHT_COLOR_LAYER_7 
 +          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7); 
 +        #endif 
 +        break; 
 +      default: 
 +        break;
     }     }
-    if (sys_led_state & sys_led_mask_num_lock) { 
-      led_2_on(); 
-    } else { 
-      led_2_off(); 
-    } 
-    if (sys_led_state & sys_led_mask_scroll_lock) { 
-      led_3_on(); 
-    } else { 
-      led_3_off(); 
-    } 
-  } 
-} 
- 
-uint32_t layer_state_set_user(uint32_t state) { 
-  current_layer_state = state; 
-  swap_hands = LAYER_ON(SWAP); 
- 
-  if (is_macro1_recording) { 
-    led_1_on(); 
-    led_2_on(); 
-    led_3_on(); 
-    return state; 
-  } 
- 
-  if (LAYER_ON(SYSLEDS)) { 
-    led_set_user(sys_led_state); 
-    return state; 
-  } 
- 
-  if (LAYER_ON(FN)) { 
-    led_1_on(); 
-  } else { 
-    led_1_off(); 
-  } 
- 
-  if (LAYER_ON(NUMS)) { 
-    led_2_on(); 
-  } else { 
-    led_2_off(); 
-  } 
- 
-  if (LAYER_ON(MOUSE)) { 
-    led_3_on(); 
-  } else { 
-    led_3_off(); 
-  } 
  
   return state;   return state;
Ligne 1063: Ligne 281:
 </hidden> </hidden>
  
-<code bash> +===== Sources ===== 
-simon@deb:~/git/qmk_firmware$ make ergodox_ez:bepo_simon:all  +  [[https://www.ergodox.io/|ErgoDox]] : Le site de l'ErgoDox "d'origine"
-</code> +  [[https://ergodox-ez.com/|ErgoDox-EZ]] : Une nouvelle version de l'ErgoDox
-<hidden> +  [[https://www.reddit.com/r/MechanicalKeyboards/|MechanicalKeyboards]] : La communauté Reddit autour des claviers mécaniques.
-<code bash> +
-QMK Firmware 0.6.328 +
-Making ergodox_ez with keymap bepo_simon and target all +
- +
-avr-gcc (GCC) 5.4.0 +
-Copyright (C) 2015 Free Software Foundation, Inc. +
-This is free software; see the source for copying conditions.  There is NO +
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +
- +
-Compiling: keyboards/ergodox_ez/keymaps/bepo_simon/keymap.c                                         [OK] +
-Compiling: quantum/quantum.c                                                                        [OK] +
-Compilingquantum/keymap_common.c                                                                  [OK] +
-Compiling: quantum/keycode_config.c                                                                 [OK] +
-Compiling: quantum/debounce/eager_pr.c                                                              [OK] +
-Compiling: quantum/process_keycode/process_tap_dance.c                                              [OK] +
-Compiling: quantum/process_keycode/process_key_lock.c                                               [OK] +
-Compilingtmk_core/common/host.c                                                                   [OK] +
-Compiling: tmk_core/common/keyboard.c                                                               [OK] +
-Compiling: tmk_core/common/action.c                                                                 [OK] +
-Compilingtmk_core/common/action_tapping.c                                                         [OK] +
-Compiling: tmk_core/common/action_macro.c                                                           [OK] +
-Compiling: tmk_core/common/action_layer.c                                                           [OK] +
-Compilingtmk_core/common/action_util.c                                                            [OK] +
-Compiling: tmk_core/common/print.c                                                                  [OK] +
-Compiling: tmk_core/common/debug.c                                                                  [OK] +
-Compiling: tmk_core/common/util.c                                                                   [OK] +
-Compiling: tmk_core/common/eeconfig.c                                                               [OK] +
-Compiling: tmk_core/common/report.c                                                                 [OK] +
-Compiling: tmk_core/common/avr/suspend.c                                                            [OK] +
-Compiling: tmk_core/common/avr/timer.c                                                              [OK] +
-Compiling: tmk_core/common/avr/bootloader.c                                                         [OK] +
-Assembling: tmk_core/common/avr/xprintf.S                                                           [OK] +
-Compiling: tmk_core/common/magic.c                                                                  [OK] +
-Compiling: tmk_core/common/mousekey.c                                                               [OK] +
-Compiling: tmk_core/common/command.c                                                                [OK] +
-Compiling: tmk_core/protocol/lufa/lufa.c                                                            [OK] +
-Compiling: tmk_core/protocol/usb_descriptor.c                                                       [OK] +
-Compiling: tmk_core/protocol/lufa/outputselect.c                                                    [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c                                       [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c                                        [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c                                [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c                                      [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c                                          [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c                                    [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c                                          [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c                                 [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c                                  [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/ConfigDescriptors.c                                       [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/DeviceStandardReq.c                                       [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/Events.c                                                  [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/HostStandardReq.c                                         [OK] +
-Compiling: lib/lufa/LUFA/Drivers/USB/Core/USBTask.c                                                 [OK] +
-Linking: .build/ergodox_ez_bepo_simon.elf                                                           [OK] +
-Creating load file for flashing: .build/ergodox_ez_bepo_simon.hex                                   [OK] +
-Copying ergodox_ez_bepo_simon.hex to qmk_firmware folder                                            [OK] +
-Checking file size of ergodox_ez_bepo_simon.hex                                                     [OK] +
- * The firmware size is fine - 30706/32256 (1550 bytes free) +
-</code> +
-</hidden> +
- +
-<code bash> +
-simon@deb:~/git/qmk_firmware$ teensy_loader_cli --mcu=atmega32u4 -v -w ergodox_ez_bepo_simon.hex  +
-Teensy Loader, Command Line, Version 2.1 +
-Read "ergodox_ez_bepo_simon.hex": 30706 bytes, 95.2% usage +
-Waiting for Teensy device... +
- (hint: press the reset button) +
-Found HalfKay Bootloader +
-Read "ergodox_ez_bepo_simon.hex": 30706 bytes, 95.2% usage +
-Programming................................................................................................................................................................................................................................................ +
-Booting +
-</code> +
- +
-===== Octobre 2020 ===== +
- +
-Il faut que je remette de l'ordre sur cette page parce que j'ai refait les choses assez différemment.  +
- +
-J'ai suivi la [[documentation de QMK|https://docs.qmk.fm/#/]]. Installation avec pip3 :  +
-<code bash> +
-$ python3 -m pip install --user qmk +
-</code> +
- +
ergodox.1603032090.txt.gz · Dernière modification : 2020/10/18 14:41 de simon