From eb37d1fffc9cbfc103f9ec3ed811986ba288f57e Mon Sep 17 00:00:00 2001 From: brian cully Date: Tue, 13 Jan 2026 10:16:26 -0500 Subject: add my ploopy adept keymap --- .dir-locals.el | 4 +++ .envrc | 1 + .gitignore | 1 + flake.lock | 27 ++++++++++++++++++++ flake.nix | 17 +++++++++++++ keyboards/ploopyco/madromys/keymaps/bjc/keymap.c | 32 ++++++++++++++++++++++++ 6 files changed, 82 insertions(+) create mode 100644 .dir-locals.el create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 keyboards/ploopyco/madromys/keymaps/bjc/keymap.c diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 0000000..de93d2a --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,4 @@ +;;; Directory Local Variables -*- no-byte-compile: t -*- +;;; For more information see (info "(emacs) Directory Variables") + +((nil . ((compile-command . "qmk compile -kb ploopyco/madromys/rev1_001 -km via -km bjc")))) diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 800a4e2..1cedac0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *~ .DS_Store ._* +.direnv # Firmware files *.hex diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ef4f71a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768028080, + "narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d03088749a110d52a4739348f39a63f84bb0be14", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2488b5e --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + description = "qmk dev env"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + }; + + outputs = { self , nixpkgs ,... }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShells."${system}".default = pkgs.mkShell { + packages = [ pkgs.qmk ]; + }; + }; +} diff --git a/keyboards/ploopyco/madromys/keymaps/bjc/keymap.c b/keyboards/ploopyco/madromys/keymaps/bjc/keymap.c new file mode 100644 index 0000000..126d7d3 --- /dev/null +++ b/keyboards/ploopyco/madromys/keymaps/bjc/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2023 Colin Lam (Ploopy Corporation) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define PLOOPY_DPI_OPTIONS { 2400, 4800, 12000 } +#define PLOOPY_DPI_DEFAULT 2 + +enum { + DEFAULT = 0, + FN1 = 1, +}; + +// top left left, top left, top right, top right right, bottom left, bottom right +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT] = LAYOUT(MS_BTN4, LT(FN1, MS_BTN5), MS_BTN3, MS_BTN2, MS_BTN1, DRAG_SCROLL), + [FN1] = LAYOUT(KC_MISSION_CONTROL, KC_TRNS, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, KC_MEDIA_PLAY_PAUSE, QK_BOOT) +}; -- cgit v1.3