Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  implement rgb matrix for momokai keyboards (qmk#19904)
  [Keymap] Smooted's BM80v2 keymap (qmk#19873)
  [Keyboard] Add Karn Keyboard (qmk#19846)
  Add disable git safe directory check step (qmk#20040)
  [Keyboard] Sejin EAT-1010R2 keyboard (qmk#19809)
  [Docs] Discuss layout macro (qmk#19803)
  [Keyboard] Add gummykey (qmk#19695)
  keyboards/anavi: Add ANAVI Knobs 3 (qmk#18624)
  Reject VIA keys within info.json (qmk#20026)
  Unbreak switchplate/southpaw_65 after qmk#16277 (qmk#20015)
  • Loading branch information
sudish committed Mar 7, 2023
2 parents c18a271 + 3d0f03f commit 39cc6bf
Show file tree
Hide file tree
Showing 45 changed files with 1,238 additions and 184 deletions.
1 change: 1 addition & 0 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
}
},
"type": "object",
"not": { "required": [ "vendorId", "productId" ] }, // reject via keys...
"properties": {
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keyboard_folder": {"$ref": "qmk.definitions.v1#/keyboard"},
Expand Down
10 changes: 10 additions & 0 deletions docs/feature_split_keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ If you're using a custom transport (communication method), then you will also ne
SPLIT_TRANSPORT = custom
```

### Layout Macro

Configuring your layout in a split keyboard works slightly differently to a non-split keyboard. Take for example the following layout. The top left numbers refer to the matrix row and column, and the bottom right are the order of the keys in the layout:

![Physical layout](https://i.imgur.com/QeY6kMQ.png)

Since the matrix scanning procedure operates on entire rows, it first populates the left half's rows, then the right half's. Thus, the matrix as QMK views it has double the rows instead of double the columns:

![Matrix](https://i.imgur.com/4wjJzBU.png)

### Setting Handedness

By default, the firmware does not know which side is which; it needs some help to determine that. There are several ways to do this, listed in order of precedence.
Expand Down
3 changes: 3 additions & 0 deletions docs/newbs_building_firmware_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ jobs:

steps:

- name: Disable git safe directory checks
run : git config --global --add safe.directory '*'

- name: Checkout QMK
uses: actions/checkout@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions docs/porting_your_keyboard_to_qmk.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ In the above example,
* It must conform to the [layout guidelines](hardware_keyboard_guidelines.md#ltkeyboard_namehgt)
* `"matrix": [0, 0]` defines the electrical position

?> See also: [Split Keyboard Layout Macro](https://docs.qmk.fm/#/feature_split_keyboard?id=layout-macro) and [Matrix to Physical Layout](https://docs.qmk.fm/#/understanding_qmk?id=matrix-to-physical-layout-map).

## Additional Configuration

There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config.md). The following sections cover the process for when an `info.json` option is unavailable.
Expand Down
76 changes: 76 additions & 0 deletions keyboards/anavi/knobs3/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"keyboard_name": "Knobs 3",
"manufacturer": "ANAVI",
"url": "https://github.com/AnaviTechnology/anavi-knobs-3",
"maintainer": "leon-anavi",
"processor": "RP2040",
"bootloader": "rp2040",
"matrix_pins": {
"direct": [
["GP26", "GP29", "GP0"]
]
},
"features": {
"bootmagic": false,
"command": false,
"console": false,
"extrakey": true,
"mousekey": false,
"nkro": true,
"rgblight": true
},
"rgblight": {
"pin": "GP12",
"led_count": 1,
"hue_steps": 10,
"saturation_steps": 17,
"brightness_steps": 17,
"max_brightness": 255,
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
}
},
"encoder": {
"enabled": true,
"rotary": [
{
"pin_a": "GP27",
"pin_b": "GP28",
"resolution": 2
},
{
"pin_a": "GP4",
"pin_b": "GP3",
"resolution": 2
},
{
"pin_a": "GP1",
"pin_b": "GP2",
"resolution": 2
}
]
},
"layouts": {
"LAYOUT": {
"layout": [
{ "label":"Mute", "x": 0, "y": 0, "matrix": [0, 0] },
{ "label":"RGB", "x": 0, "y": 1, "matrix": [0, 1] },
{ "label":"Animation", "x": 0, "y": 2, "matrix": [0, 2] }
]
}
},
"usb": {
"device_version": "1.0.0",
"pid": "0x9A25",
"vid": "0xFEED"
}
}
10 changes: 10 additions & 0 deletions keyboards/anavi/knobs3/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2022 Leon Anavi <leon@anavi.org>
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_MUTE, RGB_TOG, RGB_MOD
)
};
73 changes: 73 additions & 0 deletions keyboards/anavi/knobs3/knobs3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2022 Leon Anavi <leon@anavi.org>
// SPDX-License-Identifier: GPL-2.0-or-later

#include "quantum.h"
#include <stdio.h>

void keyboard_post_init_kb(void) {
// Enable RGB LED
setPinOutput(GP11);
writePinHigh(GP11);
rgblight_enable();

// Offload to the user func
keyboard_post_init_user();
}

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (0 == index) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (1 == index) {
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
} else if (2 == index) {
if (clockwise) {
tap_code(KC_LEFT);
} else {
tap_code(KC_RIGHT);
}
}
return true;
}
#endif

#ifdef OLED_ENABLE

bool oled_task_kb(void) {

if (!oled_task_user()) {
return false;
}

// Host Keyboard Layer Status
oled_write_ln_P(PSTR("ANAVI Knobs 3"), false);
oled_write_ln_P(PSTR("Keymap: Default"), false);

// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(PSTR("Num Lock: "), false);
oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false);
oled_write_P(PSTR("Caps Lock: "), false);
oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false);
oled_write_P(PSTR("Scroll Lock: "), false);
oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false);
#ifdef RGBLIGHT_ENABLE
static char rgbStatusLine1[26] = {0};
snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode());
oled_write_ln(rgbStatusLine1, false);
static char rgbStatusLine2[26] = {0};
snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val());
oled_write_ln(rgbStatusLine2, false);
#endif
return false;
}
#endif
12 changes: 12 additions & 0 deletions keyboards/anavi/knobs3/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2022 Leon Anavi (@leon-anavi)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <mcuconf.h>

#undef RP_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 FALSE

#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
25 changes: 25 additions & 0 deletions keyboards/anavi/knobs3/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ANAVI Knobs 3

Mini mechanical keyboard with 3 clickable rotary encoders, USB-C, RP2040 microcontroller and I2C slot for mini OLED display.

* Keyboard Maintainer: [Leon Anavi](https://github.com/leon-anavi)
* Hardware Supported: ANAVI Knobs 3
* Hardware Availability: [Crowd Supply](https://www.crowdsupply.com/anavi-technology/anavi-macro-pad-10), [GitHub repository](https://github.com/AnaviTechnology/anavi-knobs-3)

Make example for this keyboard (after setting up your build environment):

make anavi/knobs3:default

Flashing example for this keyboard:

make anavi/knobs3: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 top left key on the left half, or top right key on the right half, and then plug in the USB cable on that keyboard half.
* **Physical reset button**: Double tap the reset button on the XIAO RP2040.
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available.
6 changes: 6 additions & 0 deletions keyboards/anavi/knobs3/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
WS2812_DRIVER = vendor

OLED_ENABLE = yes
OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C

OPT_DEFS += -DHAL_USE_I2C=TRUE
26 changes: 26 additions & 0 deletions keyboards/gummykey/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2023 Gummor (@gumorr)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once


#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 }

#define USE_I2C

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
4 changes: 4 additions & 0 deletions keyboards/gummykey/gummykey.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright 2023 Gummor (@gumorr)
// SPDX-License-Identifier: GPL-2.0-or-later

#include "gummykey.h"
28 changes: 28 additions & 0 deletions keyboards/gummykey/gummykey.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2023 Gummor (@gumorr)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "quantum.h"

#define ___ KC_NO

#define LAYOUT_split_4x6_5( \
L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \
L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \
L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \
L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \
L40, L41, L42, L44, L45, R45, R44, R42, R41, R40 \
) \
{ \
{ L00, L01, L02, L03, L04, L05 }, \
{ L10, L11, L12, L13, L14, L15 }, \
{ L20, L21, L22, L23, L24, L25 }, \
{ L30, L31, L32, L33, L34, L35 }, \
{ L40, L41, L42, ___, L44, L45 }, \
{ R00, R01, R02, R03, R04, R05 }, \
{ R10, R11, R12, R13, R14, R15 }, \
{ R20, R21, R22, R23, R24, R25 }, \
{ R30, R31, R32, R33, R34, R35 }, \
{ R40, R41, R42, ___, R44, R45 } \
}
Loading

0 comments on commit 39cc6bf

Please sign in to comment.