Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
le4ker committed Oct 30, 2024
2 parents f027f1b + 6693a30 commit e69d183
Show file tree
Hide file tree
Showing 7 changed files with 830 additions and 7 deletions.
20 changes: 20 additions & 0 deletions keyboards/zeix/singa/kohaku/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2023 zeix (@itsme-zeix)
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
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
698 changes: 698 additions & 0 deletions keyboards/zeix/singa/kohaku/keyboard.json

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions keyboards/zeix/singa/kohaku/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Copyright 2024 zeix (@itsme-zeix)
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_all(
KC_ESC, 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_BSLS, KC_BSPC, KC_INS,
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_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, MO(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),

[1] = LAYOUT_all(
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_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, 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
),
};
30 changes: 30 additions & 0 deletions keyboards/zeix/singa/kohaku/matrix_diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Matrix Diagram for Singa Kohaku (Designed by Zeix)

```
┌───┬───┐
Split Backspace │16 │07 │
└───┴───┘
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
│00 │10 │01 │11 │02 │12 │03 │13 │04 │14 │05 │15 │06 │07 │17 │
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ ┌─────┐
│20 │30 │21 │31 │22 │32 │23 │33 │24 │34 │25 │35 │26 │36 │37 │ │ │
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ ┌──┴┐56 │ ISO Enter
│40 │50 │41 │51 │42 │52 │43 │53 │44 │54 │45 │55 │56 │57 │ │46 │ │
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ └───┴────┘
│60 │61 │71 │62 │72 │63 │73 │64 │74 │65 │75 │66 │76 │77 │
├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤
│80 │90 │81 │83 │95 │ │86 │96 │97 │
└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘
┌────┬───┐
│60 │70 │ Split Left Shift
└────┴───┘
┌────┬────┬────┬────────────────────────┬────┬────┐
│80 │90 │81 │83 │85 │95 │ 6.25u
└────┴────┴────┴────────────────────────┴────┴────┘
┌────┬────┬────┬───────────┬────┬───────┬────┬────┐
│80 │90 │81 │92 │83 │94 │85 │95 │ Split Space (Left 2.75u)
└────┴────┴────┴───────────┴────┴───────┴────┴────┘
┌────┬────┬────┬───────┬────┬───────────┬────┬────┐
│80 │90 │81 │92 │83 │94 │85 │95 │ Split Space (Left 2.25u)
└────┴────┴────┴───────┴────┴───────────┴────┴────┘
```
27 changes: 27 additions & 0 deletions keyboards/zeix/singa/kohaku/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SINGA Kohaku R2 (PCB designed by Zeix)

![Layout Compatibility](https://i.imgur.com/2RaSZxG.png)

65% PCB designed to support Kohaku R2.

- Keyboard Maintainer: [Zeix](https://github.com/itsme-zeix)
- Hardware Supported: Singa Kohaku R2 (PCB designed by Zeix)
- Hardware Availability: https://singakbd.com/

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

make zeix/singa/kohaku:default

Flashing example for this keyboard:

make zeix/singa/kohaku: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 and plug in the keyboard.
- **Physical reset button**: Briefly press the `RESET` button twice or short the 'USB_BOOT' and `GND` pads and plug in the keyboard.
- **Keycode in layout**: Press the key mapped to `QK_BOOT`.
25 changes: 19 additions & 6 deletions lib/python/qmk/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,31 @@
from qmk.keymap import find_keymap_from_dir


def _get_subcommand_name():
"""Handle missing cli.subcommand_name on older versions of milc
"""
try:
return cli.subcommand_name
except AttributeError:
return cli._subcommand.__name__


def automagic_keyboard(func):
"""Sets `cli.config.<subcommand>.keyboard` based on environment.
This will rewrite cli.config.<subcommand>.keyboard if the user did not pass `--keyboard` and the directory they are currently in is a keyboard or keymap directory.
"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
cmd = _get_subcommand_name()

# Ensure that `--keyboard` was not passed and CWD is under `qmk_firmware/keyboards`
if cli.config_source[cli._subcommand.__name__]['keyboard'] != 'argument':
if cli.config_source[cmd]['keyboard'] != 'argument':
keyboard = find_keyboard_from_dir()

if keyboard:
cli.config[cli._subcommand.__name__]['keyboard'] = keyboard
cli.config_source[cli._subcommand.__name__]['keyboard'] = 'keyboard_directory'
cli.config[cmd]['keyboard'] = keyboard
cli.config_source[cmd]['keyboard'] = 'keyboard_directory'

return func(*args, **kwargs)

Expand All @@ -36,13 +47,15 @@ def automagic_keymap(func):
"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
cmd = _get_subcommand_name()

# Ensure that `--keymap` was not passed and that we're under `qmk_firmware`
if cli.config_source[cli._subcommand.__name__]['keymap'] != 'argument':
if cli.config_source[cmd]['keymap'] != 'argument':
keymap_name, keymap_type = find_keymap_from_dir()

if keymap_name:
cli.config[cli._subcommand.__name__]['keymap'] = keymap_name
cli.config_source[cli._subcommand.__name__]['keymap'] = keymap_type
cli.config[cmd]['keymap'] = keymap_name
cli.config_source[cmd]['keymap'] = keymap_type

return func(*args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python requirements
appdirs
# platformdirs
argcomplete
colorama
dotty-dict
Expand Down

0 comments on commit e69d183

Please sign in to comment.