Skip to content

Commit

Permalink
Move entirely to data driven, matching QMK PR
Browse files Browse the repository at this point in the history
Update to match qmk/qmk_firmware#21857
  • Loading branch information
NCKiser committed Aug 29, 2023
1 parent ef38294 commit 609db0b
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 235 deletions.
54 changes: 13 additions & 41 deletions keyboards/kiserdesigns/madeline/config.h
Original file line number Diff line number Diff line change
@@ -1,53 +1,25 @@
/* Copyright TJ Campie
*
* 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

#ifndef CONFIG_H
#define CONFIG_H

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 10

/*
* Keyboard Matrix Assignments
/* Copyright 2021 Noah Kiser (NCKiser)
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* 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/>.
*/
#define MATRIX_ROW_PINS { GP5, GP4, GP12, GP7 }
#define MATRIX_COL_PINS { GP25, GP26, GP27, GP28, GP29, GP9, GP0, GP1, GP2, GP3 }

#define ENCODERS_PAD_A { GP13 }
#define ENCODERS_PAD_B { GP15 }
#define ENCODER_RESOLUTIONS { 4 }
#pragma once

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U

#define RP2040_FLASH_GENERIC_03H

#endif
106 changes: 58 additions & 48 deletions keyboards/kiserdesigns/madeline/info.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
{
"manufacturer": "rubybuilds",
"keyboard_name": "Madeline",
"maintainer": "rossmann360",
"board": "GENERIC_RP_RP2040",
"manufacturer": "rubybuilds",
"maintainer": "NCKiser",
"bootloader": "rp2040",
"bootmagic": {
"enabled": true
},
"debounce": 5,
"diode_direction": "COL2ROW",
"encoder": {
"enabled": true
"enabled": true,
"rotary": [
{ "pin_a": "GP13", "pin_b": "GP15" }
]
},
"mouse_key": {
"enabled": true
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": [ "GP25", "GP26", "GP27", "GP28", "GP29", "GP9", "GP0", "GP1", "GP2", "GP3" ],
"rows": [ "GP5", "GP4", "GP12", "GP7" ]
},
"processor": "RP2040",
"url": "kb.rubybuilds.com",
"qmk": {
"tap_keycode_delay": 10
},
"url": "https://qmk.fm/keyboards",
"usb": {
"device_version": "0.0.1",
"pid": "0x6D64",
Expand All @@ -25,43 +35,43 @@
"layouts": {
"LAYOUT": {
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 6.5, "y": 0},
{"x": 7.5, "y": 0},
{"x": 8.5, "y": 0},
{"x": 9.5, "y": 0},
{"x": 10.5, "y": 0, "w": 1.25},
{"x": 0, "y": 1, "w": 1.25},
{"x": 1.25, "y": 1},
{"x": 2.25, "y": 1},
{"x": 3.25, "y": 1},
{"x": 4.25, "y": 1},
{"x": 6.75, "y": 1},
{"x": 7.75, "y": 1},
{"x": 8.75, "y": 1},
{"x": 9.75, "y": 1},
{"x": 10.75, "y": 1},
{"x": 0, "y": 2, "w": 1.75},
{"x": 1.75, "y": 2},
{"x": 2.75, "y": 2},
{"x": 3.75, "y": 2},
{"x": 4.75, "y": 2},
{"x": 6.25, "y": 2},
{"x": 7.25, "y": 2},
{"x": 8.25, "y": 2},
{"x": 9.25, "y": 2},
{"x": 10.25, "y": 2, "w": 1.5},
{"x": 0, "y": 3},
{"x": 2.5, "y": 3},
{"x": 3.5, "y": 3, "w": 2.25},
{"x": 6.25, "y": 3, "w": 2},
{"x": 8.25, "y": 3},
{"x": 10.75, "y": 3}
{"x": 0, "y": 0, "matrix": [0,0]},
{"x": 1, "y": 0, "matrix": [0,1]},
{"x": 2, "y": 0, "matrix": [0,2]},
{"x": 3, "y": 0, "matrix": [0,3]},
{"x": 4, "y": 0, "matrix": [0,4]},
{"x": 6.5, "y": 0, "matrix": [0,5]},
{"x": 7.5, "y": 0, "matrix": [0,6]},
{"x": 8.5, "y": 0, "matrix": [0,7]},
{"x": 9.5, "y": 0, "matrix": [0,8]},
{"x": 10.5, "y": 0, "w": 1.25, "matrix": [0,9]},
{"x": 0, "y": 1, "w": 1.25, "matrix": [1,0]},
{"x": 1.25, "y": 1, "matrix": [1,1]},
{"x": 2.25, "y": 1, "matrix": [1,2]},
{"x": 3.25, "y": 1, "matrix": [1,3]},
{"x": 4.25, "y": 1, "matrix": [1,4]},
{"x": 6.75, "y": 1, "matrix": [1,5]},
{"x": 7.75, "y": 1, "matrix": [1,6]},
{"x": 8.75, "y": 1, "matrix": [1,7]},
{"x": 9.75, "y": 1, "matrix": [1,8]},
{"x": 10.75, "y": 1, "matrix": [1,9]},
{"x": 0, "y": 2, "w": 1.75, "matrix": [2,0]},
{"x": 1.75, "y": 2, "matrix": [2,1]},
{"x": 2.75, "y": 2, "matrix": [2,2]},
{"x": 3.75, "y": 2, "matrix": [2,3]},
{"x": 4.75, "y": 2, "matrix": [2,4]},
{"x": 6.25, "y": 2, "matrix": [2,5]},
{"x": 7.25, "y": 2, "matrix": [2,6]},
{"x": 8.25, "y": 2, "matrix": [2,7]},
{"x": 9.25, "y": 2, "matrix": [2,8]},
{"x": 10.25, "y": 2, "w": 1.5, "matrix": [2,9]},
{"x": 0, "y": 3, "matrix": [3,0]},
{"x": 2.5, "y": 3, "matrix": [3,1]},
{"x": 3.5, "y": 3, "w": 2.25, "matrix": [3,3]},
{"x": 6.25, "y": 3, "w": 2, "matrix": [3,6]},
{"x": 8.25, "y": 3, "matrix": [3,7]},
{"x": 10.75, "y": 3, "matrix": [3,9]}
]
}
}
}
}
23 changes: 0 additions & 23 deletions keyboards/kiserdesigns/madeline/keymaps/default/config.h

This file was deleted.

99 changes: 37 additions & 62 deletions keyboards/kiserdesigns/madeline/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
/* 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{
_BASE,
_NUM_SYM,
_NAV
};
enum combo_events {
COMBO_BSPC,
COMBO_NUMBAK,
COMBO_TAB,
COMBO_ESC,
COMBO_DEL,
/* Copyright 2021 Noah Kiser (NCKiser)
*
* 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 {
_BASE,
_NUM_SYM
};

#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC)
Expand All @@ -34,45 +28,26 @@ enum combo_events {
#define KC_SJ RSFT_T(KC_J)
#define KC_CK RCTL_T(KC_K)
#define KC_AL RALT_T(KC_L)
#define KC_GSCLN RGUI_T(KC_SCLN)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_ENT,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,
KC_LCTL, KC_LALT, KC_BSPC, LT(_NUM_SYM,KC_SPACE), KC_RGUI, KC_RCTL
),

[_NUM_SYM] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_NO, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
[_BASE] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_ENT,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,
KC_LCTL, KC_LALT, KC_BSPC, KC_NUM_SPC, KC_RGUI, KC_RCTL
),

[_NUM_SYM] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_ESC, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_BSPC,
KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_NO, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE,
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) }

};
#endif

#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END};
const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END};
const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END};
const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END};
const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END};

combo_t key_combos[COMBO_COUNT] = {
[COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC),
[COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC),
[COMBO_TAB] = COMBO(combo_tab,KC_TAB),
[COMBO_ESC] = COMBO(combo_esc,KC_ESC),
[COMBO_DEL] = COMBO(combo_del,KC_DEL),

};
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) }
};
#endif
1 change: 0 additions & 1 deletion keyboards/kiserdesigns/madeline/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
COMBO_ENABLE = yes
ENCODER_MAP_ENABLE = yes
16 changes: 0 additions & 16 deletions keyboards/kiserdesigns/madeline/madeline.c

This file was deleted.

33 changes: 0 additions & 33 deletions keyboards/kiserdesigns/madeline/madeline.h

This file was deleted.

2 changes: 1 addition & 1 deletion keyboards/kiserdesigns/madeline/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Madeline

![Madeline](https://i.imgur.com/MBT5kg2.jpg)
![Madeline](https://i.imgur.com/MBT5kg2h.jpg)

*A cool QAZ-Alice hybrid designed based on the Adalyn by [Marv](https://github.com/MarvFPV/Adalyn) with a PCB by [Rossman360](https://github.com/Rossman360)*
* Keyboard Maintainer: [NCKiser](https://github.com/NCKiser)
Expand Down
Loading

0 comments on commit 609db0b

Please sign in to comment.