diff --git a/keyboards/rkb1/info.json b/keyboards/rkb1/info.json index d64c19b4c4..7c0c5fefcc 100644 --- a/keyboards/rkb1/info.json +++ b/keyboards/rkb1/info.json @@ -2,47 +2,66 @@ "manufacturer": "Charlotte \ud83e\udd9d Delenk", "keyboard_name": "rkb1", "maintainer": "DarkKirb", - "bootloader": "custom", + "bootloader": "rp2040", + "build": { + "debounce_type": "sym_eager_pk", + "lto": true + }, "diode_direction": "COL2ROW", "features": { "bootmagic": true, "command": false, - "console": false, + "console": true, "extrakey": true, "mousekey": true, "nkro": true }, "matrix_pins": { - "cols": ["C2", "C2", "C2", "C2"], - "rows": ["D1", "D1", "D1", "D1"] + "cols": ["GP5", "GP6", "GP7", "GP8", "GP9", "GP10"], + "rows": ["GP0", "GP1", "GP2", "GP3", "GP4"] }, "processor": "RP2040", "url": "", "usb": { - "device_version": "1.0.0", + "device_version": "0.0.0", "pid": "0x0000", - "vid": "0xFEED" + "vid": "0xE621" }, "layouts": { - "LAYOUT_ortho_4x4": { + "LAYOUT_ortho_4x6_2x2uc": { "layout": [ { "matrix": [0, 0], "x": 0, "y": 0 }, { "matrix": [0, 1], "x": 1, "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": [1, 0], "x": 0, "y": 1 }, { "matrix": [1, 1], "x": 1, "y": 1 }, { "matrix": [1, 2], "x": 2, "y": 1 }, { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1 }, + { "matrix": [1, 5], "x": 5, "y": 1 }, { "matrix": [2, 0], "x": 0, "y": 2 }, { "matrix": [2, 1], "x": 1, "y": 2 }, { "matrix": [2, 2], "x": 2, "y": 2 }, { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2 }, + { "matrix": [2, 5], "x": 5, "y": 2 }, { "matrix": [3, 0], "x": 0, "y": 3 }, { "matrix": [3, 1], "x": 1, "y": 3 }, { "matrix": [3, 2], "x": 2, "y": 3 }, - { "matrix": [3, 3], "x": 3, "y": 3 } + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3 }, + { "matrix": [3, 5], "x": 5, "y": 3 }, + { "matrix": [4, 2], "x": 2, "y": 4 }, + { "matrix": [4, 3], "x": 3, "y": 4 }, + { "matrix": [4, 4], "x": 4, "y": 4 }, + { "matrix": [4, 5], "x": 5, "y": 4 } ] } + }, + "stenography": { + "enabled": true } -} \ No newline at end of file +} diff --git a/keyboards/rkb1/keymaps/default/keymap.c b/keyboards/rkb1/keymaps/default/keymap.c index 26769e0bee..308eec2899 100644 --- a/keyboards/rkb1/keymaps/default/keymap.c +++ b/keyboards/rkb1/keymaps/default/keymap.c @@ -1,21 +1,30 @@ #include QMK_KEYBOARD_H +enum custom_keycodes { + COMPOSE = SAFE_RANGE +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┬───┬───┬───┐ - * │ 7 │ 8 │ 9 │ / │ - * ├───┼───┼───┼───┤ - * │ 4 │ 5 │ 6 │ * │ - * ├───┼───┼───┼───┤ - * │ 1 │ 2 │ 3 │ - │ - * ├───┼───┼───┼───┤ - * │ 0 │ . │Ent│ + │ - * └───┴───┴───┴───┘ - */ - [0] = LAYOUT_ortho_4x4( - KC_P7, KC_P8, KC_P9, KC_PSLS, - KC_P4, KC_P5, KC_P6, KC_PAST, - KC_P1, KC_P2, KC_P3, KC_PMNS, - KC_P0, KC_PDOT, KC_PENT, KC_PPLS + [0] = LAYOUT_ortho_4x6_2x2uc( + COMPOSE, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_NO,KC_LGUI,KC_LALT,KC_NO,KC_NO, + KC_NO, KC_NO, KC_NO, KC_SPC ) }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case COMPOSE: + if (record->event.pressed) { + register_code(KC_TAB); + register_code(KC_CAPS_LOCK); + } else { + unregister_code(KC_TAB); + unregister_code(KC_CAPS_LOCK); + } + break; + } + return true; +} diff --git a/keyboards/rkb1/rkb1.c b/keyboards/rkb1/rkb1.c new file mode 100644 index 0000000000..21d2513c4a --- /dev/null +++ b/keyboards/rkb1/rkb1.c @@ -0,0 +1,9 @@ +#include "debug.h" + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/shell.nix b/shell.nix index 88822b0b17..a1d670c317 100644 --- a/shell.nix +++ b/shell.nix @@ -5,7 +5,7 @@ in # However, if you want to override Niv's inputs, this will let you do that. { pkgs ? import sources.nixpkgs { } , poetry2nix ? pkgs.callPackage (import sources.poetry2nix) { } -, avr ? true +, avr ? false , arm ? true , teensy ? true }: with pkgs; @@ -59,7 +59,7 @@ mkShell { avrlibc avrdude ] - ++ lib.optional arm [ gcc-arm-embedded ] + ++ lib.optional arm [ gcc-arm-embedded elf2uf2-rs ] ++ lib.optional teensy [ teensy-loader-cli ]; AVR_CFLAGS = lib.optional avr avr_incflags;