~ruther/qmk_firmware

509668ca7ce224a389a2caa3ff4df19302d4efc1 — Fabien Culpo 6 years ago d8371b3
[Keymap] add redox/rev1:fculpo keymap (#5491)

A keyboards/redox/keymaps/fculpo/config.h => keyboards/redox/keymaps/fculpo/config.h +34 -0
@@ 0,0 1,34 @@
/*
Copyright 2018 Mattia Dal Ben <matthewdibi@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

/* Use I2C or Serial, not both */
#define USE_SERIAL
// #define USE_I2C

/* Select hand configuration */
#define MASTER_LEFT
//#define MASTER_RIGHT
//#define EE_HANDS

#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 14
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

A keyboards/redox/keymaps/fculpo/keymap.c => keyboards/redox/keymaps/fculpo/keymap.c +92 -0
@@ 0,0 1,92 @@
#include QMK_KEYBOARD_H

extern keymap_config_t keymap_config;

// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _SYMB 1
#define _NAV 2
#define _ADJUST 3

enum custom_keycodes {
  QWERTY = SAFE_RANGE,
  SYMB,
  NAV,
  ADJUST,
};

// Shortcut to make keymap more readable
#define SYM_L   MO(_SYMB)

#define KC_ALAS LALT_T(KC_PAST)
#define KC_CTES LCTL_T(KC_ESC)
#define KC_CTQU RCTL_T(KC_QUOT)

#define KC_NAGR LT(_NAV, KC_GRV)
#define KC_NAMI LT(_NAV, KC_MINS)

#define KC_ADEN LT(_ADJUST, KC_END)
#define KC_ADPU LT(_ADJUST, KC_PGUP)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

  [_QWERTY] = LAYOUT(
  //┌────────┬────────┬────────┬────────┬────────┬────────┐                                           ┌────────┬────────┬────────┬────────┬────────┬────────┐
     KC_NAGR ,KC_1    ,KC_2    ,KC_3    ,KC_4    ,KC_5    ,                                            KC_6    ,KC_7    ,KC_8    ,KC_9    ,KC_0    ,KC_NAMI ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐                         ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     KC_TAB  ,KC_Q    ,KC_W    ,KC_E    ,KC_R    ,KC_T    ,SYM_L   ,                          SYM_L   ,KC_Y    ,KC_U    ,KC_I    ,KC_O    ,KC_P    ,KC_EQL  ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤                         ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     KC_CTES ,KC_A    ,KC_S    ,KC_D    ,KC_F    ,KC_G    ,KC_LBRC ,                          KC_RBRC ,KC_H    ,KC_J    ,KC_K    ,KC_L    ,KC_SCLN ,KC_CTQU ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐       ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     KC_LSFT ,KC_Z    ,KC_X    ,KC_C    ,KC_V    ,KC_B    ,KC_ADPU ,KC_PGDN ,        KC_HOME ,KC_ADEN ,KC_N    ,KC_M    ,KC_COMM ,KC_DOT  ,KC_SLSH ,KC_RSFT ,
  //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤       ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
     KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS ,     KC_LGUI ,    KC_BSPC ,KC_DEL  ,        KC_ENT  ,KC_SPC  ,    KC_RALT ,     KC_LEFT ,KC_DOWN ,KC_UP   ,KC_RGHT
  //└────────┴────────┴────────┴────────┘    └────────┘   └────────┴────────┘       └────────┴────────┘   └────────┘    └────────┴────────┴────────┴────────┘
  ),

  [_SYMB] = LAYOUT(
  //┌────────┬────────┬────────┬────────┬────────┬────────┐                                           ┌────────┬────────┬────────┬────────┬────────┬────────┐
     _______ ,KC_F1   ,KC_F2   ,KC_F3   ,KC_F4   ,KC_F5   ,                                            KC_F8   ,KC_F9   ,KC_F10  ,KC_F11  ,KC_F12  ,_______ ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐                         ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     _______ ,KC_EXLM ,KC_AT   ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_F6   ,                          KC_F7   ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,_______ ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤                         ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     _______ ,KC_HASH ,KC_DLR  ,KC_LBRC ,KC_RBRC ,KC_GRV  ,_______ ,                          _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐       ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ ,        _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤       ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
     _______ ,_______ ,_______ ,_______ ,     _______ ,    _______ ,_______ ,        _______ ,_______ ,    KC_KP_0 ,     KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
  //└────────┴────────┴────────┴────────┘    └────────┘   └────────┴────────┘       └────────┴────────┘   └────────┘    └────────┴────────┴────────┴────────┘
  ),

  [_NAV] = LAYOUT(
  //┌────────┬────────┬────────┬────────┬────────┬────────┐                                           ┌────────┬────────┬────────┬────────┬────────┬────────┐
     _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,                                            _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐                         ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ ,                          _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤                         ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ ,                          _______ ,KC_LEFT ,KC_DOWN ,KC_UP   ,KC_RIGHT,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐       ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ ,        _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤       ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,     KC_BTN1 ,    KC_BTN2 ,_______ ,        _______ ,_______ ,    XXXXXXX ,     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
  //└────────┴────────┴────────┴────────┘    └────────┘   └────────┴────────┘       └────────┴────────┘   └────────┘    └────────┴────────┴────────┴────────┘
  ),

  [_ADJUST] = LAYOUT(
  //┌────────┬────────┬────────┬────────┬────────┬────────┐                                           ┌────────┬────────┬────────┬────────┬────────┬────────┐
     XXXXXXX ,KC_F1   ,KC_F2   ,KC_F3   ,KC_F4   ,KC_F5   ,                                            KC_F6   ,KC_F7   ,KC_F8   ,KC_F9   ,KC_F10  ,KC_F11  ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐                         ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,RESET   ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI ,                          RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12  ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤                         ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,                          XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐       ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,        XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
  //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤       ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,     XXXXXXX ,    XXXXXXX ,XXXXXXX ,        XXXXXXX ,XXXXXXX ,    XXXXXXX ,     XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
  //└────────┴────────┴────────┴────────┘    └────────┘   └────────┴────────┘       └────────┴────────┘   └────────┘    └────────┴────────┴────────┴────────┘
  )

};

A keyboards/redox/keymaps/fculpo/keymap.json => keyboards/redox/keymaps/fculpo/keymap.json +399 -0
@@ 0,0 1,399 @@
[
  {
    "name": "Redox/rev1",
    "author": "Fabien Culpo",
    "switchMount": "cherry",
    "plate": false,
    "pcb": false
  },
  [
    {
      "x": 3.5
    },
    "#\n3",
    {
      "x": 10.5
    },
    "*\n8"
  ],
  [
    {
      "y": -0.875,
      "x": 2.5
    },
    "@\n2",
    {
      "x": 1
    },
    "$\n4",
    {
      "x": 8.5
    },
    "&\n7",
    {
      "x": 1
    },
    "(\n9"
  ],
  [
    {
      "y": -0.875,
      "x": 5.5
    },
    "%\n5",
    {
      "x": 6.5
    },
    "^\n6"
  ],
  [
    {
      "y": -0.875,
      "x": 0.25,
      "a": 5,
      "w": 1.25
    },
    "`\nLayer 2\n\n\n\n\n~",
    {
      "a": 4
    },
    "!\n1",
    {
      "x": 14.5
    },
    ")\n0",
    {
      "a": 5,
      "w": 1.25
    },
    "_\nLayer 2\n\n\n\n\n-"
  ],
  [
    {
      "y": -0.625,
      "x": 6.5
    },
    "Layer 1",
    {
      "x": 4.5
    },
    "Layer 1"
  ],
  [
    {
      "y": -0.75,
      "x": 3.5,
      "a": 4
    },
    "E",
    {
      "x": 10.5
    },
    "I"
  ],
  [
    {
      "y": -0.875,
      "x": 2.5
    },
    "W",
    {
      "x": 1
    },
    "R",
    {
      "x": 8.5
    },
    "U",
    {
      "x": 1
    },
    "O"
  ],
  [
    {
      "y": -0.875,
      "x": 5.5
    },
    "T",
    {
      "x": 6.5
    },
    "Y"
  ],
  [
    {
      "y": -0.875,
      "x": 0.25,
      "a": 7,
      "w": 1.25
    },
    "TAB",
    {
      "a": 4
    },
    "Q",
    {
      "x": 14.5
    },
    "P",
    {
      "a": 5,
      "w": 1.25
    },
    "+\n="
  ],
  [
    {
      "y": -0.625,
      "x": 6.5,
      "a": 7,
      "h": 1.5
    },
    "[",
    {
      "x": 4.5,
      "h": 1.5
    },
    "]"
  ],
  [
    {
      "y": -0.75,
      "x": 3.5,
      "a": 4
    },
    "D",
    {
      "x": 10.5
    },
    "K"
  ],
  [
    {
      "y": -0.875,
      "x": 2.5
    },
    "S",
    {
      "x": 1,
      "n": true
    },
    "F",
    {
      "x": 8.5,
      "n": true
    },
    "J",
    {
      "x": 1
    },
    "L"
  ],
  [
    {
      "y": -0.875,
      "x": 5.5
    },
    "G",
    {
      "x": 6.5
    },
    "H"
  ],
  [
    {
      "y": -0.875,
      "x": 0.25,
      "a": 5,
      "w": 1.25
    },
    "ESC\nCTRL",
    {
      "a": 4
    },
    "A",
    {
      "x": 14.5
    },
    ":\n;",
    {
      "a": 5,
      "w": 1.25
    },
    "'\nCTRL"
  ],
  [
    {
      "y": -0.375,
      "x": 3.5,
      "a": 4
    },
    "C",
    {
      "x": 10.5
    },
    "<\n,"
  ],
  [
    {
      "y": -0.875,
      "x": 2.5
    },
    "X",
    {
      "x": 1
    },
    "V",
    {
      "x": 8.5
    },
    "M",
    {
      "x": 1
    },
    ">\n."
  ],
  [
    {
      "y": -0.875,
      "x": 5.5
    },
    "B",
    {
      "x": 6.5
    },
    "N"
  ],
  [
    {
      "y": -0.875,
      "x": 0.25,
      "a": 5,
      "w": 1.25
    },
    "SHIFT",
    {
      "a": 4
    },
    "Z",
    {
      "x": 14.5
    },
    "?\n/",
    {
      "a": 5,
      "w": 1.25
    },
    "SHIFT"
  ],
  [
    {
      "y": -0.375,
      "x": 3.5
    },
    "*\nALT",
    {
      "x": 10.5
    },
    "Left"
  ],
  [
    {
      "y": -0.875,
      "x": 2.5
    },
    "-",
    {
      "x": 12.5
    },
    "Down"
  ],
  [
    {
      "y": -0.75,
      "x": 0.5
    },
    "|\n\n\n\n\n\n\\",
    "+",
    {
      "x": 14.5
    },
    "Up",
    {
      "sb": "cherry",
      "st": "MX1A-21xx"
    },
    "Right"
  ],
  [
    {
      "r": 15,
      "y": -2.625,
      "x": 5.75,
      "a": 7,
      "w": 1.25
    },
    "SUPER"
  ],
  [
    {
      "r": 30,
      "rx": 6.5,
      "ry": 4.25,
      "y": -1,
      "a": 5
    },
    "PgUp\nLay. 3",
    {
      "a": 7
    },
    "PgDn"
  ],
  [
    {
      "h": 1.5
    },
    "Bksp",
    {
      "h": 1.5
    },
    "Del"
  ],
  [
    {
      "r": -30,
      "rx": 13,
      "y": -1,
      "x": -2
    },
    "Home",
    {
      "a": 5
    },
    "End\nLay. 3"
  ],
  [
    {
      "x": -2,
      "a": 7,
      "h": 1.5
    },
    "Enter",
    {
      "h": 1.5
    },
    "Space"
  ],
  [
    {
      "r": -15,
      "rx": 0,
      "ry": 0,
      "y": 7.75,
      "x": 11.75,
      "w": 1.25
    },
    "ALT"
  ]
]

A keyboards/redox/keymaps/fculpo/readme.md => keyboards/redox/keymaps/fculpo/readme.md +18 -0
@@ 0,0 1,18 @@
# A tweaked keymap for Redox

This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben.

Also heavily inspired by nrichers layout.

![fculpo Layout Image](https://i.imgur.com/OXT8boJ.png)

## Changes to the default keymap

These keymap changes are meant to improve the usability of the layout in everyday use:

- Move `GUI` (`SUPER`) key to where default left `CTRL` is
- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive
- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?`
- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position
- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes
- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)S

A keyboards/redox/keymaps/fculpo/rules.mk => keyboards/redox/keymaps/fculpo/rules.mk +2 -0
@@ 0,0 1,2 @@
RGBLIGHT_ENABLE = yes