Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2021-12-27 10:25:01 +00:00
commit 0709d208db
24 changed files with 1644 additions and 53 deletions

View File

@ -0,0 +1,25 @@
/*
Copyright 2021 Fernando "ManoShu" Rodrigues
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
#include "config_common.h"
/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

View File

@ -0,0 +1,706 @@
{
"manufacturer": "Fernando \"ManoShu\" Rodrigues",
"keyboard_name": "BareDev (rev1)",
"url": "https://github.com/ManoShu/BareDev",
"maintainer": "ManoShu",
"debounce": 5,
"diode_direction": "COL2ROW",
"tapping": {
"term": 175
},
"matrix_pins": {
"unused": [
"F1",
"F4",
"F5",
"F6",
"F7"
],
"cols": [
"B6",
"B7",
"C6",
"C7",
"D0",
"D1",
"D2",
"D3",
"D4",
"D5",
"D6",
"D7",
"E6",
"F0"
],
"rows": [
"B0",
"B1",
"B2",
"B3",
"B4",
"B5"
]
},
"usb": {
"vid": "0xFEED",
"pid": "0x4126",
"device_ver": "0x0001",
"polling_interval": 1,
"shared_endpoint": {
"keyboard": true
}
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"features": {
"audio": false,
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"midi": false,
"mousekey": true,
"nkro": true,
"rgblight": false,
"unicode": false,
"bluetooth": false,
"backlight": false,
"sleep_led": false
},
"layout_aliases": {
"LAYOUT": "LAYOUT_abnt2"
},
"layouts": {
"LAYOUT_abnt2": {
"layout": [
{
"matrix": [
0,
0
],
"x": 0,
"y": 0
},
{
"matrix": [
0,
2
],
"x": 2,
"y": 0
},
{
"matrix": [
0,
3
],
"x": 3,
"y": 0
},
{
"matrix": [
0,
4
],
"x": 4,
"y": 0
},
{
"matrix": [
0,
5
],
"x": 5,
"y": 0
},
{
"matrix": [
0,
6
],
"x": 6.5,
"y": 0
},
{
"matrix": [
0,
7
],
"x": 7.5,
"y": 0
},
{
"matrix": [
0,
8
],
"x": 8.5,
"y": 0
},
{
"matrix": [
0,
9
],
"x": 9.5,
"y": 0
},
{
"matrix": [
0,
10
],
"x": 11,
"y": 0
},
{
"matrix": [
0,
11
],
"x": 12,
"y": 0
},
{
"matrix": [
0,
12
],
"x": 13,
"y": 0
},
{
"matrix": [
0,
13
],
"x": 14,
"y": 0
},
{
"matrix": [
1,
0
],
"x": 0,
"y": 1.25
},
{
"matrix": [
1,
1
],
"x": 1,
"y": 1.25
},
{
"matrix": [
1,
2
],
"x": 2,
"y": 1.25
},
{
"matrix": [
1,
3
],
"x": 3,
"y": 1.25
},
{
"matrix": [
1,
4
],
"x": 4,
"y": 1.25
},
{
"matrix": [
1,
5
],
"x": 5,
"y": 1.25
},
{
"matrix": [
1,
6
],
"x": 6,
"y": 1.25
},
{
"matrix": [
1,
7
],
"x": 7,
"y": 1.25
},
{
"matrix": [
1,
8
],
"x": 8,
"y": 1.25
},
{
"matrix": [
1,
9
],
"x": 9,
"y": 1.25
},
{
"matrix": [
1,
10
],
"x": 10,
"y": 1.25
},
{
"matrix": [
1,
11
],
"x": 11,
"y": 1.25
},
{
"matrix": [
1,
12
],
"x": 12,
"y": 1.25
},
{
"matrix": [
1,
13
],
"x": 13,
"y": 1.25,
"w": 2
},
{
"matrix": [
2,
0
],
"x": 0,
"y": 2.25,
"w": 1.5
},
{
"matrix": [
2,
1
],
"x": 1.5,
"y": 2.25
},
{
"matrix": [
2,
2
],
"x": 2.5,
"y": 2.25
},
{
"matrix": [
2,
3
],
"x": 3.5,
"y": 2.25
},
{
"matrix": [
2,
4
],
"x": 4.5,
"y": 2.25
},
{
"matrix": [
2,
5
],
"x": 5.5,
"y": 2.25
},
{
"matrix": [
2,
6
],
"x": 6.5,
"y": 2.25
},
{
"matrix": [
2,
7
],
"x": 7.5,
"y": 2.25
},
{
"matrix": [
2,
8
],
"x": 8.5,
"y": 2.25
},
{
"matrix": [
2,
9
],
"x": 9.5,
"y": 2.25
},
{
"matrix": [
2,
10
],
"x": 10.5,
"y": 2.25
},
{
"matrix": [
2,
11
],
"x": 11.5,
"y": 2.25
},
{
"matrix": [
2,
12
],
"x": 12.5,
"y": 2.25
},
{
"matrix": [
2,
13
],
"x": 13.75,
"y": 2.25,
"w": 1.25,
"h": 2
},
{
"matrix": [
3,
0
],
"x": 0,
"y": 3.25,
"w": 1.75
},
{
"matrix": [
3,
1
],
"x": 1.75,
"y": 3.25
},
{
"matrix": [
3,
2
],
"x": 2.75,
"y": 3.25
},
{
"matrix": [
3,
3
],
"x": 3.75,
"y": 3.25
},
{
"matrix": [
3,
4
],
"x": 4.75,
"y": 3.25
},
{
"matrix": [
3,
5
],
"x": 5.75,
"y": 3.25
},
{
"matrix": [
3,
6
],
"x": 6.75,
"y": 3.25
},
{
"matrix": [
3,
7
],
"x": 7.75,
"y": 3.25
},
{
"matrix": [
3,
8
],
"x": 8.75,
"y": 3.25
},
{
"matrix": [
3,
9
],
"x": 9.75,
"y": 3.25
},
{
"matrix": [
3,
10
],
"x": 10.75,
"y": 3.25
},
{
"matrix": [
3,
11
],
"x": 11.75,
"y": 3.25
},
{
"matrix": [
3,
12
],
"x": 12.75,
"y": 3.25
},
{
"matrix": [
4,
0
],
"x": 0,
"y": 4.25,
"w": 1.25
},
{
"matrix": [
4,
1
],
"x": 1.25,
"y": 4.25
},
{
"matrix": [
4,
2
],
"x": 2.25,
"y": 4.25
},
{
"matrix": [
4,
3
],
"x": 3.25,
"y": 4.25
},
{
"matrix": [
4,
4
],
"x": 4.25,
"y": 4.25
},
{
"matrix": [
4,
5
],
"x": 5.25,
"y": 4.25
},
{
"matrix": [
4,
6
],
"x": 6.25,
"y": 4.25
},
{
"matrix": [
4,
7
],
"x": 7.25,
"y": 4.25
},
{
"matrix": [
4,
8
],
"x": 8.25,
"y": 4.25
},
{
"matrix": [
4,
9
],
"x": 9.25,
"y": 4.25
},
{
"matrix": [
4,
10
],
"x": 10.25,
"y": 4.25
},
{
"matrix": [
4,
11
],
"x": 11.25,
"y": 4.25
},
{
"matrix": [
4,
12
],
"x": 12.25,
"y": 4.25
},
{
"matrix": [
4,
13
],
"x": 13.25,
"y": 4.25
},
{
"matrix": [
5,
0
],
"x": 0,
"y": 5.25,
"w": 1.25
},
{
"matrix": [
5,
1
],
"x": 1.25,
"y": 5.25,
"w": 1.25
},
{
"matrix": [
5,
2
],
"x": 2.5,
"y": 5.25,
"w": 1.25
},
{
"matrix": [
5,
6
],
"x": 3.75,
"y": 5.25,
"w": 6.25
},
{
"matrix": [
5,
9
],
"x": 10,
"y": 5.25,
"w": 1.25
},
{
"matrix": [
5,
10
],
"x": 11.25,
"y": 5.25
},
{
"matrix": [
5,
11
],
"x": 12.25,
"y": 5.25
},
{
"matrix": [
5,
12
],
"x": 13.25,
"y": 5.25
},
{
"matrix": [
5,
13
],
"x": 14.25,
"y": 5.25
}
]
}
}
}

View File

@ -0,0 +1,56 @@
/* Copyright 2021 Fernando "ManoShu" Rodrigues
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "keymap_br_abnt2.h"
enum {
LAYER_BASE,
LAYER_FUNCTIONS
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = LAYOUT(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┤ */
BR_QUOT, BR_1, BR_2, BR_3, BR_4, BR_5, BR_6, BR_7, BR_8, BR_9, BR_0, BR_MINS, BR_EQL, KC_BSPC,
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┤ */
KC_TAB, BR_Q, BR_W, BR_E, BR_R, BR_T, BR_Y, BR_U, BR_I, BR_O, BR_P, BR_ACUT, BR_LBRC, KC_ENT,
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ┤ */
KC_CAPS, BR_A, BR_S, BR_D, BR_F, BR_G, BR_H, BR_J, BR_K, BR_L, BR_CCED, BR_TILD, BR_RBRC,
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┤ */
KC_LSFT, BR_BSLS, BR_Z, BR_X, BR_C, BR_V, BR_B, BR_N, BR_M, BR_COMM, BR_DOT, BR_SCLN, BR_SLSH, KC_UP,
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┤ */
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
[LAYER_FUNCTIONS] = LAYOUT(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┤ */
_______, KC_MPLY, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ┤ */
_______, KC_MPRV, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┤ */
_______, _______, KC_VOLU, KC_VOLD, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┤ */
_______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGDN, KC_END
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
)
};

View File

@ -0,0 +1,7 @@
![BareDev Layout Image](https://i.imgur.com/uP8Jzvi.png)
# Default BareDev layout
Has all the functions of a ABNT TKL keyboard, sans right shift.
Basic media functions also included.

View File

@ -0,0 +1,99 @@
/* Copyright 2021 Fernando "ManoShu" Rodrigues
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "keymap_br_abnt2.h"
#include "sendstring_br_abnt2.h"
enum {
LAYER_BASE,
LAYER_FUNCTIONS
};
#define L_FUNCT MO(LAYER_FUNCTIONS)
#define W_CHOLD LGUI_T(KC_CAPS)
//Combination keycodes
#define KC_PSBR C(KC_PAUSE) // Ctrl+Pause/Break
#define KC_SNIP SGUI(BR_S) // Screen Snip (GUI + Shift + S)
#define KC_WRUN G(BR_R) // Run (GUI + R)
#define KC_WLCK G(BR_L) // Lock (GUI + L)
#define KC_WDSK G(BR_D) // Desktop (GUI + D)
#define KC_WEXP G(BR_E) // Explorer (GUI + E)
#define KC_WPSE G(KC_PAUSE) // System Properties (GUI + Pause)
#define KC_WMGP G(BR_EQL) // Magnify (+)
#define KC_WMGM G(BR_MINS) // Magnify (-)
enum custom_keycodes {
KC_WPRN = SAFE_RANGE, // Project (P)
KC_WSPC // Input Select (Space)
};
layer_state_t layer_state_set_user(layer_state_t state) {
if (get_highest_layer(state) == LAYER_BASE) {
unregister_mods(MOD_MASK_GUI);
}
return state;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if(keycode == KC_WPRN || keycode == KC_WSPC) {
if (record->event.pressed) {
register_code(KC_LGUI);
if(keycode == KC_WPRN) {
tap_code(KC_P);
} else if (keycode == KC_WSPC) {
tap_code(KC_SPACE);
}
}
}
return true;
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[LAYER_BASE] = LAYOUT(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┤ */
BR_QUOT, BR_1, BR_2, BR_3, BR_4, BR_5, BR_6, BR_7, BR_8, BR_9, BR_0, BR_MINS, BR_EQL, KC_BSPC,
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┤ */
KC_TAB, BR_Q, BR_W, BR_E, BR_R, BR_T, BR_Y, BR_U, BR_I, BR_O, BR_P, BR_ACUT, BR_LBRC, KC_ENT,
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ┤ */
W_CHOLD, BR_A, BR_S, BR_D, BR_F, BR_G, BR_H, BR_J, BR_K, BR_L, BR_CCED, BR_TILD, BR_RBRC,
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┤ */
KC_LSFT, BR_BSLS, BR_Z, BR_X, BR_C, BR_V, BR_B, BR_N, BR_M, BR_COMM, BR_DOT, BR_SCLN, BR_SLSH, KC_UP,
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┤ */
KC_LCTL, L_FUNCT, KC_LALT, KC_SPC, KC_APP, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
[LAYER_FUNCTIONS] = LAYOUT(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSBR, KC_SNIP,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WMGM, KC_WMGP, _______,
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┤ */
_______, KC_MPLY, KC_MUTE, KC_WEXP, KC_WRUN, _______, _______, _______, _______, _______, KC_WPRN, _______, _______, _______,
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ┤ */
_______, KC_MPRV, KC_MNXT, KC_WDSK, _______, _______, _______, _______, _______, KC_WLCK, _______, _______, _______,
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┤ */
_______, _______, KC_VOLU, KC_VOLD, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┤ */
_______, _______, _______, KC_WSPC, _______, KC_INS, KC_HOME, KC_PGDN, KC_END
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
)
};

View File

@ -0,0 +1,16 @@
![BareDev Layout Image](https://i.imgur.com/FXye4Hn.png)
# ManoShu's custom layout
Has all the functions of a ABNT TKL keyboard, sans right shift.
Basic media functions also included.
Trying to emulate where notebooks/smaller OEM keyboard put the function key, for this reason the GUI key was moved and it can be used by holding the Caps Lock key.
To not use the new GUI position very often, commonly used GUI + [X] commands are sent using `SEND_STRING()`, `(un)register_code()` and `tap_code()`.
## Why you didn't used `LT(FUNCTIONS, KC_LGUI)` on the GUI/FN key?
Because I don't want rely on the tapping term to determine I will send either KC_HOME or snap the active window to the left.
If there is a better way to solve this, please let me know.

View File

@ -0,0 +1,29 @@
# BareDev (rev1)
![PCB](https://i.imgur.com/byquO5u.png)
![Prototype Build](https://i.imgur.com/fkizunN.png)
An open-source, ABNT2-based 70% keyboard, focusing in a smaller footprint while retaining all the functions found on a TKL (Del and arrow keys doubling as the navigational cluster)
* Keyboard Maintainer: [Fernando "ManoShu" Rodrigues](https://github.com/ManoShu)
* Hardware Supported: BareDev rev1 PCB
* Hardware Availability: Files available on [GitHub](https://github.com/ManoShu/BareDev)
Make example for this keyboard (after setting up your build environment):
make handwired/baredev/rev1:default
Flashing example for this keyboard:
make handwired/baredev/rev1:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `RESET` if it is available

View File

@ -0,0 +1,17 @@
/* Copyright 2021 Fernando "ManoShu" Rodrigues
*
* 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/>.
*/
#include "rev1.h"

View File

@ -0,0 +1,19 @@
/* Copyright 2021 Fernando "ManoShu" Rodrigues
*
* 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
#include "quantum.h"

View File

@ -0,0 +1,176 @@
/* Copyright 2020 Yiancar
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "drivers/issi/is31fl3733.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi( /* Base */
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_65_ansi( /* FN */
KC_GRV, 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_DEL, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
static uint16_t ledTimer;
uint8_t R = 0; /* First led*/
uint8_t G = 0; /* Second led*/
uint8_t B = 0; /* Third led*/
/* Boot animation parameters */
uint8_t bootFirst=3; /* Number of increment slides. */
uint8_t bootSec=3; /* Number of full blink. */
/* Breathing animation parameters */
const uint16_t travelTime = 1000; /* Time the leds take to go from off to on or on to off. */
const uint16_t fadeStep = 5; /* Steps for the fade in and out, 0-255 by steps of 10. */
const uint16_t fadeTime = 20; /* Time between each fade step. */
const uint8_t maxBrightness=255; /* keep them multipliers of fade Step between 0 and 255. */
const uint8_t minBrightness=0;
uint16_t previousTime = 0;
uint16_t time = 0;
bool bootAnimation(void){
if (bootFirst>0 || bootSec>0){
if(bootFirst!=0){
if (timer_elapsed(ledTimer) > 150){
G = 255;
R = 0;
B = 0;
IS31FL3733_set_color( 6+64-1, R, G, B );
}
if (timer_elapsed(ledTimer) > 300){
G = 255;
R = 255;
B = 0;
IS31FL3733_set_color( 6+64-1, R, G, B );
}
if (timer_elapsed(ledTimer) > 400){
G = 255;
R = 255;
B = 255;
IS31FL3733_set_color( 6+64-1, R, G, B );
}
if (timer_elapsed(ledTimer) > 500){
G = 0;
R = 0;
B = 0;
IS31FL3733_set_color( 6+64-1, R, G, B );
ledTimer = timer_read();
bootFirst--;
}
}
if (bootFirst==0 && bootSec!=0){
if (timer_elapsed(ledTimer) > 200) {
G = 255;
R = 255;
B = 255;
IS31FL3733_set_color( 6+64-1, R, G, B );
}
if (timer_elapsed(ledTimer) > 400){
G = 0;
R = 0;
B = 0;
IS31FL3733_set_color( 6+64-1, R, G, B );
ledTimer = timer_read();
bootSec--;
}
}
return false;
}
return true;
}
void breathing(void) {
if(timer_elapsed(ledTimer)<travelTime){
time = timer_elapsed(ledTimer);
if((time - previousTime) > fadeTime && R<maxBrightness){
G+=fadeStep;
R+=fadeStep;
B+=fadeStep;
IS31FL3733_set_color( 6+64-1, R, G, B );
previousTime = time;
}
}
else if(timer_elapsed(ledTimer)<(travelTime * 2)){
time = timer_elapsed(ledTimer);
if((time - previousTime) > fadeTime && R>minBrightness){
G-=fadeStep;
R-=fadeStep;
B-=fadeStep;
IS31FL3733_set_color( 6+64-1, R, G, B );
previousTime = time;
}
}
else {
R=0;
G=0;
B=0;
IS31FL3733_set_color( 6+64-1, R, G, B );
previousTime = 0;
time = 0;
ledTimer=timer_read();
}
}
/* this avoids turning off the led each matrix_scan_user() call */
bool capsState;
bool prevCapsState;
void matrix_scan_user(void){
if(bootAnimation()){
capsState = host_keyboard_led_state().caps_lock;
if (capsState) {
breathing();
prevCapsState = capsState;
}
else if(!capsState && capsState != prevCapsState){
G = 0;
R = 0;
B = 0;
IS31FL3733_set_color( 6+64-1, R, G, B );
prevCapsState = capsState;
}
}
}

View File

@ -0,0 +1,9 @@
# The jesusvallejo keymap for ANSI Keebwerk Mega. VIA support enabled.
![Layer 0](https://i.imgur.com/RcuLofrl.png)
![Layer 1](https://i.imgur.com/NJOORcdl.png)
- Default layer is normal ANSI 65%.
- Leds slide and blink bootup animation.
- Leds fade Caps Lock animation.

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -0,0 +1,154 @@
/* Copyright 2020 Duckle, 2021 Jesús Vallejo
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "analog.h"
#include "qmk_midi.h"
/*
This keymap works with midi2vol: linux version https://github.com/jesusvallejo/Midi2Vol-Linux
and windows version https://github.com/jesusvallejo/Midi2Vol
Enables the user to change the volume on the host computer if running midi2vol software.
Example to extend usability is provided check VLC in: enum custom_keycodes {} and bool process_record_user(uint16_t keycode, keyrecord_t *record) {}
Remember to give allways the new volume control a hex value not used by other volume control,
and add it to the midi2vol software.
Check respective midi2vol readme on how to do so.In linux change config.json,in windows you can use configuration option.
A compiled version of this keymap is provided in here: https://github.com/jesusvallejo/nanokeymaps/
*/
uint8_t midi2vol = 0x3E;
/* Defines names for use in layer keycodes and the keymap */
enum custom_layers {
_MEDIA, /* Controls Pause, Mute , Forward ... */
_NAV, /* Nav arrows, Enter, Space*/
_VOLUME /* Changes midi2vol int to interface with midi2vol program: Chrome Volume, General Volume */
_DISCORD, /* FXX unsused keys to interface with Discord: Mute , Silence */
_LIGHTS, /* Edits underglow and retroilumination */
_EDIT, /* Cut, Copy ,Paste */
_RESET, /* Layer to set nano in bootloader mode */
_TOOGLE, /* Momentary layer to switch between layers */
};
/* Defines the keycodes used by our macros in process_record_user */
enum custom_keycodes { /* In order to add more volume controls, add here a custom keycode, ex: VLC */
DEFAULT= SAFE_RANGE,SPOTIFY,DISCORD,CHROME/*,VLC*/
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_MEDIA] = LAYOUT(
MO(_TOOGLE),
KC_MPLY, KC_MNXT, KC_COPY,
KC_MUTE, KC_MPRV, KC_PASTE, KC_ENTER
),
[_NAV] = LAYOUT(
MO(_TOOGLE),
KC_SPC, KC_UP, KC_BSPACE,
KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENTER
),
[_VOLUME] = LAYOUT(
MO(_TOOGLE),
SPOTIFY, DISCORD, CHROME,
KC_NO, KC_NO, KC_NO, DEFAULT
),
[_DISCORD] = LAYOUT(
MO(_TOOGLE),
KC_F18, KC_F19, KC_F20,
KC_F21, KC_F22, KC_F23, KC_F24
),
[_LIGHTS] = LAYOUT(
MO(_TOOGLE),
RGB_TOG, RGB_MOD, RGB_VAI,
RGB_SAI, BL_BRTG, BL_STEP, KC_LSFT
),
[_EDIT] = LAYOUT(
MO(_TOOGLE),
KC_MENU, KC_CUT, KC_COPY,
KC_FIND, KC_UNDO, KC_PASTE, KC_MPLY
),
[_RESET] = LAYOUT(
MO(_TOOGLE),
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, RESET
),
[_TOOGLE] = LAYOUT(
MO(_TOOGLE),
TO(_MEDIA), TO(_NAV), TO(_VOLUME),
TO(_DISCORD), TO(_LIGHTS), TO(_EDIT), TO(_RESET)
)
};
/* In order to add more volume controls, add here code to detect custom keycode, ex: VLC */
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case DEFAULT:
if (record->event.pressed) {
/* when keycode DEFAULT is pressed */
midi2vol= 0x3E;
} else {
/* when keycode DEFAULT is released */
}
break;
case SPOTIFY:
if (record->event.pressed) {
midi2vol= 0x3F;
}
break;
case DISCORD:
if (record->event.pressed) {
midi2vol= 0x40;
}
break;
case CHROME:
if (record->event.pressed) {
midi2vol= 0x41;
}
break;
/*
case VLC:
if (record->event.pressed) {
midi2vol= 0x42;
}
break;
*/
}
return true;
}
uint8_t divisor = 0;
void slider(void) {
if (divisor++) { /* only run the slider function 1/256 times it's called */
return;
}
midi_send_cc(&midi_device, 2, midi2vol, 0x7F - (analogReadPin(SLIDER_PIN) >> 3));
}
void matrix_scan_user(void) {
slider();
}

View File

@ -0,0 +1,2 @@
# The Midi2Vol keymap for nano_slider
This keymap has the code for the nano_slider to work with [Midi2Vol](https://github.com/jesusvallejo/Midi2Vol).

View File

@ -0,0 +1,69 @@
/* Copyright 2021 @ Victor-Gabriel Savu
*
* 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
// disable all default effects
#undef ENABLE_RGB_MATRIX_BREATHING
#undef ENABLE_RGB_MATRIX_CYCLE_ALL
#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#undef ENABLE_RGB_MATRIX_DUAL_BEACON
#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON
#undef ENABLE_RGB_MATRIX_RAINDROPS
#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP
#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#undef ENABLE_RGB_MATRIX_SPLASH
#undef ENABLE_RGB_MATRIX_MULTISPLASH
#undef ENABLE_RGB_MATRIX_SOLID_SPLASH
#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
// Allow fancy RGB
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// Simple RGB
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
// Reactive RGB
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
// Unicode for Linux
#define UNICODE_SELECTED_MODES UC_LNX
#define UNICODE_KEY_LNX LCTL(LSFT(KC_U))
// Leader config
#define LEADER_PER_KEY_TIMING
#define LEADER_TIMEOUT 500

View File

@ -0,0 +1,152 @@
/* Copyright 2021 @ Victor-Gabriel Savu
*
* 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/>.
*/
#include QMK_KEYBOARD_H
enum layers{
MAC_BASE,
MAC_FN,
WIN_BASE,
WIN_FN
};
#define KC_TASK LGUI(KC_TAB)
#define KC_FLXP LGUI(KC_E)
enum unicode_names {
GRIN,
SAD,
};
const uint32_t PROGMEM unicode_map[] = {
[GRIN] = 0x1F600, // 😀
[SAD] = 0x1F61E, // 😞
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_iso_83(
KC_ESC, KC_BRID, KC_BRIU, KC_F3, KC_F4, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, KC_INS,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(MAC_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[MAC_FN] = LAYOUT_iso_83(
KC_TRNS, 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[WIN_BASE] = LAYOUT_iso_83(
KC_ESC, 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_DEL, X(SAD),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, X(GRIN),
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP,
KC_LEAD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[WIN_FN] = LAYOUT_iso_83(
KC_TRNS, KC_BRID, KC_BRIU, KC_CALC, KC_FLXP, RGB_VAD, RGB_VAI, KC_TRNS, KC_PSCR, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_CAPS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END)
};
static bool wiggle_mouse;
static uint16_t wiggle_timer;
static uint16_t next_wiggle;
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(KC_LEAD) {
tap_code(KC_CAPS);
}
SEQ_FOUR_KEYS(KC_I, KC_D, KC_L, KC_E) {
wiggle_mouse = !wiggle_mouse;
wiggle_timer = timer_read();
}
SEQ_TWO_KEYS(KC_O, KC_K) {
send_unicode_string("👍");
}
SEQ_THREE_KEYS(KC_S, KC_A, KC_D) {
send_unicode_string("😞");
}
SEQ_FIVE_KEYS(KC_C, KC_H, KC_E, KC_C, KC_K) {
send_unicode_string("");
}
SEQ_FIVE_KEYS(KC_C, KC_R, KC_O, KC_S, KC_S) {
send_unicode_string("");
}
SEQ_FIVE_KEYS(KC_T, KC_H, KC_A, KC_N, KC_K) {
send_unicode_string("🙏");
}
SEQ_FIVE_KEYS(KC_S, KC_M, KC_I, KC_L, KC_E) {
send_unicode_string("😊");
}
SEQ_FIVE_KEYS(KC_P, KC_A, KC_R, KC_T, KC_Y) {
send_unicode_string("🎉");
}
SEQ_FOUR_KEYS(KC_E, KC_Y, KC_E, KC_S) {
send_unicode_string("(ಠ_ಠ)");
}
SEQ_FIVE_KEYS(KC_M, KC_A, KC_G, KC_I, KC_C) {
send_unicode_string("(ಠ_ಠ) 🪄 ⠁⭒*.✫.*⭒⠁");
}
SEQ_FIVE_KEYS(KC_T, KC_A, KC_B, KC_L, KC_E) {
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
}
SEQ_FIVE_KEYS(KC_S, KC_H, KC_R, KC_U, KC_G) {
send_unicode_string("¯\\_(ツ)_/¯");
}
}
if (wiggle_mouse && timer_elapsed(wiggle_timer) > next_wiggle) {
wiggle_timer = timer_read();
uint8_t rval = TCNT0 + TCNT1 + TCNT3 + TCNT4;
next_wiggle = rval % 1000;
if (rval & 1) tap_code(KC_MS_UP);
if (rval & 2) tap_code(KC_MS_DOWN);
if (rval & 4) tap_code(KC_MS_LEFT);
if (rval & 8) tap_code(KC_MS_RIGHT);
}
}

View File

@ -0,0 +1,4 @@
# victorsavu3's Keychron Q1 keymap (ISO)
Very similar to the default layout. Enables reactive and framebuffer RGB, but disables most effects enabled by keychron.
Uses Caps Lock as a leader key for emojis and to enable a random mouse wiggler to prevent the system from going to sleep.

View File

@ -0,0 +1,3 @@
MOUSEKEY_ENABLE = yes
UNICODEMAP_ENABLE = yes
LEADER_ENABLE = yes

View File

@ -48,12 +48,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
// Cycle through Tabs
if (clockwise) {
tap_code16(C(KC_TAB));
/* register_code16(G(KC_RCBR)); */
/* unregister_code16(G(KC_RCBR)); */
} else {
tap_code16(S(C(KC_TAB)));
/* register_code16(G(KC_LCBR)); */
/* unregister_code16(G(KC_LCBR)); */
}
} else { // RIGHT
// Scroll up/down
@ -68,11 +64,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
break;
case _FIGMA:
if (index == 0) { // LEFT
// Volume control.
// Cycle through Tabs
if (clockwise) {
tap_code(KC_VOLU);
tap_code16(C(KC_TAB));
} else {
tap_code(KC_VOLD);
tap_code16(S(C(KC_TAB)));
}
} else { // RIGHT
// Zoom in/out
@ -89,7 +85,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
}
break;
case _TERMINAL:
case _BASE:
default:
if (index == 0) { // LEFT
// Volume control.

View File

@ -16,25 +16,73 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "zigotica.h"
#include "raw_hid.h"
#ifdef RAW_ENABLE
void raw_hid_receive(uint8_t* data, uint8_t length) {
layer_clear();
if (data[0] == 99) {
layer_on(_BASE);
}
else {
layer_on(data[0]);
}
}
#endif
// Custom Keycodes
#define MODE_1 TO(_TERMINAL)
#define MODE_1 TO(_BASE)
#define MODE_2 TO(_FIGMA)
#define MODE_3 TO(_BROWSER)
#define MODE_4 TO(_VIM)
enum custom_keycodes {
VIM_SIP = SAFE_RANGE
VIM_SIF = SAFE_RANGE,
VIM_SIP,
VIM_RIF,
VIM_RIP,
VIM_NEW
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case VIM_SIP:
case VIM_SIF:// Search in File
if (record->event.pressed) {
register_code(KC_ESC);
tap_code(KC_SLASH);
} else { // released
unregister_code(KC_ESC);
}
break;
case VIM_SIP:// Search in Project
if (record->event.pressed) {
register_code(KC_ESC);
SEND_STRING(":Ag ");
} else {
// released
} else { // released
unregister_code(KC_ESC);
}
break;
case VIM_RIF:// Replace in File
if (record->event.pressed) {
register_code(KC_ESC);
SEND_STRING(":%s/a/b/g");
} else { // released
unregister_code(KC_ESC);
}
break;
case VIM_RIP:// Replace in Project
if (record->event.pressed) {
register_code(KC_ESC);
SEND_STRING(":cdo %s/a/b/g");
} else { // released
unregister_code(KC_ESC);
}
break;
case VIM_NEW:// New buffer
if (record->event.pressed) {
SEND_STRING("\e:vnew\n");
} else { // released
unregister_code(KC_ENT);
unregister_code(KC_ESC);
}
break;
@ -44,83 +92,83 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* TERMINAL Layer
* BASE Layer
*
* ,-----------------------------.
* | | TERM | FIGM | |
* | | BASE | FIGM | |
* |-------+------+------+-------|
* | VOL | BROW | VIM | SCROLL|
* |VOL/PLY| BROW | VIM | SCROLL|
* |-------+------+------+-------|
* |-------+-------+-------|
* | MEDIA | o | o |
* | o | o | o |
* |-------+-------+-------|
* | o | o | o |
* |-------+-------+-------|
*/
[_TERMINAL] = LAYOUT(
[_BASE] = LAYOUT(
MODE_1, MODE_2,
ZK_MEDIA, MODE_3, MODE_4, _______,
_______, _______, _______,
_______, _______, _______
),
/*
* VIM Layer
*
* ,-----------------------------.
* | | TERM | FIGM | |
* |-------+------+------+-------|
* |BUFFER | BROW | VIM | SCROLL|
* |-------+------+------+-------|
* |-------+-------+-------|
* |SEARCH | o | o |
* |-------+-------+-------|
* | o | o | o |
* |-------+-------+-------|
*/
[_VIM] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
VIM_SIP, _______, _______,
_______, _______, _______
),
/*
* FIGMA Layer
*
* ,-----------------------------.
* | | TERM | FIGM | |
* | | BASE | FIGM | |
* |-------+------+------+-------|
* | VOL | BROW | VIM | ZOOM |
* | TABS | BROW | VIM | ZOOM |
* |-------+------+------+-------|
* |-------+-------+-------|
* | ZOOM | GRIDS | FULL |
* |ZOOMFIT| GRIDS | FULL |
* |-------+-------+-------|
* | o | o | o |
* |ZOOM100| NEXT | COLOR |
* |-------+-------+-------|
*/
[_FIGMA] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
LSFT(KC_1), LCTL(KC_G), LGUI(KC_BSLS),
_______, _______, _______
LSFT(KC_0), KC_N, LCTL(KC_C)
),
/*
* BROWSER Layer
*
* ,-----------------------------.
* | | TERM | FIGM | |
* | | BASE | FIGM | |
* |-------+------+------+-------|
* | TABS | BROW | VIM | SCROLL|
* |-------+------+------+-------|
* |-------+-------+-------|
* |SEARCH | BOOKM | DEVTL |
* |-------+-------+-------|
* | o | o | o |
* |ZOOM100| MUTE | READ |
* |-------+-------+-------|
*/
[_BROWSER] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
G(KC_F), G(KC_D), G(A(KC_I)),
_______, _______, _______
G(KC_F), G(KC_D), G(A(KC_I)),
G(KC_0), C(KC_M), G(A(KC_R))
),
/*
* VIM Layer
*
* ,-----------------------------.
* | | BASE | FIGM | |
* |-------+------+------+-------|
* |BUFFER | BROW | VIM | SCROLL|
* |-------+------+------+-------|
* |-------+-------+-------|
* |SRCH FL|REPL FL|NEW BUF|
* |-------+-------+-------|
* |SRCH PR|REPL PR| o |
* |-------+-------+-------|
*/
[_VIM] = LAYOUT(
_______, _______,
_______, _______, _______, _______,
VIM_SIF, VIM_RIF, VIM_NEW,
VIM_SIP, VIM_RIP, _______
),
};

View File

@ -21,16 +21,16 @@ static void render_status(void) {
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _VIM:
oled_write_P(PSTR("VIM\n\nBUFFER SCROLL"), false);
oled_write_P(PSTR("VIM \n\nBUFFER SCROLL"), false);
break;
case _FIGMA:
oled_write_P(PSTR("FIGMA\n\nVOLUME ZOOM"), false);
oled_write_P(PSTR("FIGMA \n\nTABS ZOOM"), false);
break;
case _BROWSER:
oled_write_P(PSTR("BROWSER\n\nTABS SCROLL"), false);
oled_write_P(PSTR("BROWSER \n\nTABS SCROLL"), false);
break;
case _TERMINAL:
oled_write_P(PSTR("TERMINAL\n\nVOLUME SCROLL"), false);
case _BASE:
oled_write_P(PSTR("BASE \n\nVOLUME SCROLL"), false);
break;
default:
oled_write_P(PSTR("Undef\n"), false);

View File

@ -0,0 +1,3 @@
# zigotica's z12 Layout
This layout uses `RAW_ENABLE = yes`, and benefits from [active-app-qmk-layer-updater](https://github.com/zigotica/active-app-qmk-layer-updater) node script (run by the host system) to change layers programmatically depending on the current active app.

View File

@ -26,7 +26,7 @@ enum userspace_layers {
};
#else
enum userspace_layers {
_TERMINAL = 0,
_BASE = 0,
_FIGMA,
_BROWSER,
_VIM,