mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-25 09:56:54 +06:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
80661e5f19
23
keyboards/cannonkeys/ortho48v2/config.h
Normal file
23
keyboards/cannonkeys/ortho48v2/config.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
Copyright 2022 CannonKeys
|
||||
|
||||
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
|
||||
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET // Activates the double-tap behavior
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U // Timeout window in ms in which the double tap can occur.
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD6
|
||||
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A
|
8
keyboards/cannonkeys/ortho48v2/halconf.h
Normal file
8
keyboards/cannonkeys/ortho48v2/halconf.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2022 Andrew Kannan
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
95
keyboards/cannonkeys/ortho48v2/info.json
Normal file
95
keyboards/cannonkeys/ortho48v2/info.json
Normal file
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"keyboard_name": "Ortho48 v2",
|
||||
"maintainer": "awkannan",
|
||||
"manufacturer": "CannonKeys",
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"usb": {
|
||||
"vid": "0xCA04",
|
||||
"pid": "0x0018",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"url": "https://cannonkeys.com",
|
||||
"diode_direction": "COL2ROW",
|
||||
"matrix_pins": {
|
||||
"cols": ["GP7", "GP6", "GP5", "GP4", "GP3", "GP2", "GP1", "GP0", "GP13", "GP24", "GP23", "GP22"],
|
||||
"rows": ["GP18", "GP19", "GP25", "GP26"]
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true,
|
||||
"backlight": true,
|
||||
"encoder": true
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{ "pin_a": "GP28", "pin_b": "GP29" }
|
||||
]
|
||||
},
|
||||
"backlight": {
|
||||
"breathing": true,
|
||||
"breathing_period": 5,
|
||||
"levels": 15,
|
||||
"pin": "GP12"
|
||||
},
|
||||
"community_layouts": [
|
||||
"ortho_4x12"
|
||||
],
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_4x12": {
|
||||
"layout": [
|
||||
{"label":"Tab", "x":0, "y":0, "matrix": [0,0]},
|
||||
{"label":"Q", "x":1, "y":0, "matrix": [0,1]},
|
||||
{"label":"W", "x":2, "y":0, "matrix": [0,2]},
|
||||
{"label":"E", "x":3, "y":0, "matrix": [0,3]},
|
||||
{"label":"R", "x":4, "y":0, "matrix": [0,4]},
|
||||
{"label":"T", "x":5, "y":0, "matrix": [0,5]},
|
||||
{"label":"Y", "x":6, "y":0, "matrix": [0,6]},
|
||||
{"label":"U", "x":7, "y":0, "matrix": [0,7]},
|
||||
{"label":"I", "x":8, "y":0, "matrix": [0,8]},
|
||||
{"label":"O", "x":9, "y":0, "matrix": [0,9]},
|
||||
{"label":"P", "x":10, "y":0, "matrix": [0,10]},
|
||||
{"label":"Back Space", "x":11, "y":0, "matrix": [0,11]},
|
||||
{"label":"Esc", "x":0, "y":1, "matrix": [1,0]},
|
||||
{"label":"A", "x":1, "y":1, "matrix": [1,1]},
|
||||
{"label":"S", "x":2, "y":1, "matrix": [1,2]},
|
||||
{"label":"D", "x":3, "y":1, "matrix": [1,3]},
|
||||
{"label":"F", "x":4, "y":1, "matrix": [1,4]},
|
||||
{"label":"G", "x":5, "y":1, "matrix": [1,5]},
|
||||
{"label":"H", "x":6, "y":1, "matrix": [1,6]},
|
||||
{"label":"J", "x":7, "y":1, "matrix": [1,7]},
|
||||
{"label":"K", "x":8, "y":1, "matrix": [1,8]},
|
||||
{"label":"L", "x":9, "y":1, "matrix": [1,9]},
|
||||
{"label":";", "x":10, "y":1, "matrix": [1,10]},
|
||||
{"label":"'", "x":11, "y":1, "matrix": [1,11]},
|
||||
{"label":"Shift", "x":0, "y":2, "matrix": [2,0]},
|
||||
{"label":"Z", "x":1, "y":2, "matrix": [2,1]},
|
||||
{"label":"X", "x":2, "y":2, "matrix": [2,2]},
|
||||
{"label":"C", "x":3, "y":2, "matrix": [2,3]},
|
||||
{"label":"V", "x":4, "y":2, "matrix": [2,4]},
|
||||
{"label":"B", "x":5, "y":2, "matrix": [2,5]},
|
||||
{"label":"N", "x":6, "y":2, "matrix": [2,6]},
|
||||
{"label":"M", "x":7, "y":2, "matrix": [2,7]},
|
||||
{"label":",", "x":8, "y":2, "matrix": [2,8]},
|
||||
{"label":".", "x":9, "y":2, "matrix": [2,9]},
|
||||
{"label":"/", "x":10, "y":2, "matrix": [2,10]},
|
||||
{"label":"Return", "x":11, "y":2, "matrix": [2,11]},
|
||||
{"label":"", "x":0, "y":3, "matrix": [3,0]},
|
||||
{"label":"Ctrl", "x":1, "y":3, "matrix": [3,1]},
|
||||
{"label":"Alt", "x":2, "y":3, "matrix": [3,2]},
|
||||
{"label":"Super", "x":3, "y":3, "matrix": [3,3]},
|
||||
{"label":"⇓", "x":4, "y":3, "matrix": [3,4]},
|
||||
{"label":"", "x":5, "y":3, "matrix": [3,5]},
|
||||
{"label":"", "x":6, "y":3, "matrix": [3,6]},
|
||||
{"label":"⇑", "x":7, "y":3, "matrix": [3,7]},
|
||||
{"label":"←", "x":8, "y":3, "matrix": [3,8]},
|
||||
{"label":"↓", "x":9, "y":3, "matrix": [3,9]},
|
||||
{"label":"↑", "x":10, "y":3, "matrix": [3,10]},
|
||||
{"label":"→", "x":11, "y":3, "matrix": [3,11]}]
|
||||
}
|
||||
}
|
||||
}
|
92
keyboards/cannonkeys/ortho48v2/keymaps/default/keymap.c
Normal file
92
keyboards/cannonkeys/ortho48v2/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
Copyright 2012,2013 Jun Wako <wakojun@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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
// 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.
|
||||
enum custom_layers {
|
||||
_BASE,
|
||||
_RAISE,
|
||||
_LOWER,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BASE] = LAYOUT_ortho_4x12(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
RGB_TOG, RGB_MOD, BL_UP , BL_DOWN, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_LOWER] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
|
||||
[_RAISE] = { ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT) },
|
||||
};
|
||||
#endif
|
1
keyboards/cannonkeys/ortho48v2/keymaps/default/rules.mk
Normal file
1
keyboards/cannonkeys/ortho48v2/keymaps/default/rules.mk
Normal file
|
@ -0,0 +1 @@
|
|||
ENCODER_MAP_ENABLE = yes
|
58
keyboards/cannonkeys/ortho48v2/keymaps/via/keymap.c
Normal file
58
keyboards/cannonkeys/ortho48v2/keymaps/via/keymap.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
Copyright 2012,2013 Jun Wako <wakojun@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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_ortho_4x12(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_ortho_4x12(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
[2] = LAYOUT_ortho_4x12(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
RGB_TOG, RGB_MOD, BL_UP , BL_DOWN, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
[3] = LAYOUT_ortho_4x12(
|
||||
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
|
||||
)
|
||||
};
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[1] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
|
||||
[2] = { ENCODER_CCW_CW(KC_MS_WH_LEFT, KC_MS_WH_RIGHT) },
|
||||
[3] = { ENCODER_CCW_CW(QK_BACKLIGHT_DOWN, QK_BACKLIGHT_UP) },
|
||||
};
|
||||
#endif
|
2
keyboards/cannonkeys/ortho48v2/keymaps/via/rules.mk
Normal file
2
keyboards/cannonkeys/ortho48v2/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1,2 @@
|
|||
VIA_ENABLE = yes
|
||||
ENCODER_MAP_ENABLE = yes
|
9
keyboards/cannonkeys/ortho48v2/mcuconf.h
Normal file
9
keyboards/cannonkeys/ortho48v2/mcuconf.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Copyright 2022 Andrew Kannan
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_PWM_USE_PWM6
|
||||
#define RP_PWM_USE_PWM6 TRUE
|
22
keyboards/cannonkeys/ortho48v2/readme.md
Normal file
22
keyboards/cannonkeys/ortho48v2/readme.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Ortho 48 v2
|
||||
|
||||
A 4x12 Ortholinear keyboard powered by an onboard RP2040
|
||||
|
||||
* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan)
|
||||
* Hardware Supported: RP2040
|
||||
* Hardware Availability: [CannonKeys](https://cannonkeys.com)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make cannonkeys/ortho48v2:default
|
||||
|
||||
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**: Swap the boot switch on the back of the PCB to "1" and hit the reset button. Or double tap the reset button quickly while the boot switch is set to "0".
|
||||
* **Keycode in layout**: Press the key mapped to `RESET` if it is available
|
2
keyboards/cannonkeys/ortho48v2/rules.mk
Normal file
2
keyboards/cannonkeys/ortho48v2/rules.mk
Normal file
|
@ -0,0 +1,2 @@
|
|||
EEPROM_DRIVER = wear_leveling
|
||||
WEAR_LEVELING_DRIVER = rp2040_flash
|
Loading…
Reference in New Issue
Block a user