]> git.otsuka.systems Git - qmk-keymaps/commitdiff
update boilerplate
authorCameron Otsuka <cameron@otsuka.haus>
Wed, 12 Feb 2025 00:49:45 +0000 (16:49 -0800)
committerCameron Otsuka <cameron@otsuka.haus>
Wed, 12 Feb 2025 00:49:45 +0000 (16:49 -0800)
.clang-format [deleted file]
.devcontainer/devcontainer.json [deleted file]
.devcontainer/setup.sh [deleted file]
.github/workflows/build_binaries.yaml
.vscode/extensions.json [deleted file]
README.md
keyboards/.keep [deleted file]
keyboards/keychron/q10/ansi_encoder/keymaps/cotsuka/keymap.c [new file with mode: 0644]
keyboards/keychron/q10/ansi_encoder/keymaps/cotsuka/rules.mk [new file with mode: 0644]
qmk.json
users/.keep [deleted file]

diff --git a/.clang-format b/.clang-format
deleted file mode 100644 (file)
index ce145e2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
----
-BasedOnStyle: Google
-AlignAfterOpenBracket: Align
-AlignConsecutiveAssignments: 'true'
-AlignConsecutiveDeclarations: 'true'
-AlignOperands: 'true'
-AllowAllParametersOfDeclarationOnNextLine: 'false'
-AllowShortCaseLabelsOnASingleLine: 'false'
-AllowShortFunctionsOnASingleLine: Empty
-AllowShortLoopsOnASingleLine: 'false'
-AlwaysBreakAfterDefinitionReturnType: None
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: 'false'
-BinPackArguments: 'true'
-BinPackParameters: 'true'
-ColumnLimit: '1000'
-IndentCaseLabels: 'true'
-IndentPPDirectives: AfterHash
-IndentWidth: '4'
-MaxEmptyLinesToKeep: '1'
-PointerAlignment: Right
-SortIncludes: 'false'
-SpaceBeforeAssignmentOperators: 'true'
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: 'false'
-SpacesBeforeTrailingComments: 1
-TabWidth: '4'
-UseTab: Never
-
-...
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
deleted file mode 100644 (file)
index 7aaee1f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the
-// README at: https://github.com/devcontainers/templates/tree/main/src/debian
-{
-    "name": "QMK CLI",
-    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
-    "image": "ghcr.io/qmk/qmk_cli",
-    "customizations": {
-        "vscode": {
-            "extensions": [
-                "amodio.toggle-excluded-files",
-                "EditorConfig.EditorConfig",
-                "xaver.clang-format",
-                "llvm-vs-code-extensions.vscode-clangd",
-                "bierner.github-markdown-preview",
-                "donjayamanne.git-extension-pack",
-                "ms-vscode-remote.remote-containers"
-            ]
-        }
-    },
-    "postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/setup.sh ${containerWorkspaceFolder}"
-
-    // Features to add to the dev container. More info: https://containers.dev/features.
-    // "features": {},
-
-    // Use 'forwardPorts' to make a list of ports inside the container available locally.
-    // "forwardPorts": [],
-
-    // Configure tool-specific properties.
-    // "customizations": {},
-
-    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
-    // "remoteUser": "root"
-}
diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh
deleted file mode 100755 (executable)
index 9155c6c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -eEuo pipefail
-
-wget https://bootstrap.pypa.io/get-pip.py
-python3 get-pip.py
-python3 -m pip install qmk
-rm get-pip.py
-
-python3 -m pip install --upgrade milc
-
-userspacePath="$1"
-
-git config --global --add safe.directory "$userspacePath"
-git submodule update --init --recursive
-
-[ -d /workspaces/qmk_firmware ] || git clone https://github.com/qmk/qmk_firmware.git /workspaces/qmk_firmware
-git config --global --add safe.directory /workspaces/qmk_firmware
-
-qmk config user.qmk_home=/workspaces/qmk_firmware
-qmk config user.overlay_dir="$userspacePath"
-
-qmk git-submodule
index f7908fadb887e19f062f682f26813005063de564..9f5d04d90967ee6a36d6ee2b8919d2ba8fe8e352 100755 (executable)
@@ -10,7 +10,7 @@ jobs:
     name: 'QMK Userspace Build'
     uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@main
     with:
-      qmk_repo: qmk/qmk_firmware
+      qmk_repo: Keychron/qmk_firmware
       qmk_ref: master
 
   publish:
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
deleted file mode 100644 (file)
index 3984e9b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// Suggested extensions
-{
-    "recommendations": [
-        "amodio.toggle-excluded-files",
-        "EditorConfig.EditorConfig",
-        "xaver.clang-format",
-        "llvm-vs-code-extensions.vscode-clangd",
-        "bierner.github-markdown-preview",
-        "donjayamanne.git-extension-pack",
-        "ms-vscode-remote.remote-containers"
-    ]
-}
index 25208997743f902ccea065978ad942adeaddfbdd..70738656e9c174f24c2d761b6c44a87638674253 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,59 +1,24 @@
-# QMK Userspace
-
-This is a template repository which allows for an external set of QMK keymaps to be defined and compiled. This is useful for users who want to maintain their own keymaps without having to fork the main QMK repository.
-
-## Howto configure your build targets
-
-1. Run the normal `qmk setup` procedure if you haven't already done so -- see [QMK Docs](https://docs.qmk.fm/#/newbs) for details.
-1. Fork this repository
-1. Clone your fork to your local machine
-1. Enable userspace in QMK config using `qmk config user.overlay_dir="$(realpath qmk_userspace)"`
-1. Add a new keymap for your board using `qmk new-keymap`
-    * This will create a new keymap in the `keyboards` directory, in the same location that would normally be used in the main QMK repository. For example, if you wanted to add a keymap for the Planck, it will be created in `keyboards/planck/keymaps/<your keymap name>`
-    * You can also create a new keymap using `qmk new-keymap -kb <your_keyboard> -km <your_keymap>`
-    * Alternatively, add your keymap manually by placing it in the location specified above.
-    * `layouts/<layout name>/<your keymap name>/keymap.*` is also supported if you prefer the layout system
-1. Add your keymap(s) to the build by running `qmk userspace-add -kb <your_keyboard> -km <your_keymap>`
-    * This will automatically update your `qmk.json` file
-    * Corresponding `qmk userspace-remove -kb <your_keyboard> -km <your_keymap>` will delete it
-    * Listing the build targets can be done with `qmk userspace-list`
-1. Commit your changes
-
-## Howto build with GitHub
-
-1. In the GitHub Actions tab, enable workflows
-1. Push your changes above to your forked GitHub repository
-1. Look at the GitHub Actions for a new actions run
-1. Wait for the actions run to complete
-1. Inspect the Releases tab on your repository for the latest firmware build
-
-## Howto build locally
+# qmk-keymaps
+⌨️ qmk external userspace
 
+## Instructions
+### Compiling These Keymaps
 1. Run the normal `qmk setup` procedure if you haven't already done so -- see [QMK Docs](https://docs.qmk.fm/#/newbs) for details.
-1. Fork this repository
-1. Clone your fork to your local machine
+1. Clone this repo.
 1. `cd` into this repository's clone directory
 1. Set global userspace path: `qmk config user.overlay_dir="$(realpath .)"` -- you MUST be located in the cloned userspace location for this to work correctly
-    * This will be automatically detected if you've `cd`ed into your userspace repository, but the above makes your userspace available regardless of your shell location.
+    - This will be automatically detected if you've `cd`ed into your userspace repository, but the above makes your userspace available regardless of your shell location.
 1. Compile normally: `qmk compile -kb your_keyboard -km your_keymap` or `make your_keyboard:your_keymap`
+    - Alternatively, if you configured your build targets above, you can use `qmk userspace-compile` to build all of your userspace targets at once.
 
-Alternatively, if you configured your build targets above, you can use `qmk userspace-compile` to build all of your userspace targets at once.
-
-## Extra info
-
-If you wish to point GitHub actions to a different repository, a different branch, or even a different keymap name, you can modify `.github/workflows/build_binaries.yml` to suit your needs.
-
-To override the `build` job, you can change the following parameters to use a different QMK repository or branch:
-```
-    with:
-      qmk_repo: qmk/qmk_firmware
-      qmk_ref: master
-```
-
-If you wish to manually manage `qmk_firmware` using git within the userspace repository, you can add `qmk_firmware` as a submodule in the userspace directory instead. GitHub Actions will automatically use the submodule at the pinned revision if it exists, otherwise it will use the default latest revision of `qmk_firmware` from the main repository.
-
-This can also be used to control which fork is used, though only upstream `qmk_firmware` will have support for external userspace until other manufacturers update their forks.
-
-1. (First time only) `git submodule add https://github.com/qmk/qmk_firmware.git`
-1. (To update) `git submodule update --init --recursive`
-1. Commit your changes to your userspace repository
+## Creating New Keymaps
+1. Add a new keymap for your board using `qmk new-keymap`
+    - This will create a new keymap in the `keyboards` directory, in the same location that would normally be used in the main QMK repository. For example, if you wanted to add a keymap for the Planck, it will be created in `keyboards/planck/keymaps/<your keymap name>`
+    - You can also create a new keymap using `qmk new-keymap -kb <your_keyboard> -km <your_keymap>`
+    - Alternatively, add your keymap manually by placing it in the location specified above.
+    - `layouts/<layout name>/<your keymap name>/keymap.*` is also supported if you prefer the layout system
+1. Add your keymap(s) to the build by running `qmk userspace-add -kb <your_keyboard> -km <your_keymap>`
+    - This will automatically update your `qmk.json` file
+    - Corresponding `qmk userspace-remove -kb <your_keyboard> -km <your_keymap>` will delete it
+    - Listing the build targets can be done with `qmk userspace-list`
+1. Commit your changes
diff --git a/keyboards/.keep b/keyboards/.keep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/keyboards/keychron/q10/ansi_encoder/keymaps/cotsuka/keymap.c b/keyboards/keychron/q10/ansi_encoder/keymaps/cotsuka/keymap.c
new file mode 100644 (file)
index 0000000..2cabbaf
--- /dev/null
@@ -0,0 +1,72 @@
+/* Copyright 2022 @ Keychron (https://www.keychron.com)
+ *
+ * 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
+
+// clang-format off
+
+enum layers{
+    MAC_BASE,
+    MAC_FN,
+    WIN_BASE,
+    WIN_FN
+};
+
+#define KC_TASK LGUI(KC_TAB)
+#define KC_FLXP LGUI(KC_E)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [MAC_BASE] = LAYOUT_ansi_89(
+        KC_MUTE,  KC_ESC,   KC_BRID,  KC_BRIU,  KC_NO,    KC_NO,    RM_VALD,   RM_VALU,  KC_MPRV,  KC_MPLY,  KC_MNXT,  KC_MUTE,  KC_VOLD,  KC_VOLU,  KC_INS,             KC_DEL,
+        _______,  KC_GRV,   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_BSPC,            KC_PGUP,
+        _______,  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_PGDN,
+        _______,  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_ENT,             KC_HOME,
+        _______,  KC_LSFT,            KC_Z,     KC_X,     KC_C,     KC_V,      KC_B,     KC_B,     KC_N,     KC_M,     KC_COMM,  KC_DOT,   KC_SLSH,  KC_RSFT,  KC_UP,
+        _______,  KC_LCTL,  KC_LOPT,            KC_LCMD,  KC_SPC,  MO(MAC_FN),                     KC_SPC,             KC_RCMD,                      KC_LEFT,  KC_DOWN,  KC_RGHT),
+
+    [MAC_FN] = LAYOUT_ansi_89(
+        RM_TOGG,  _______,  KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,     KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   _______,            _______,
+        _______,  _______,  _______,  _______,  _______,  _______,  _______,   _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,            _______,
+        _______,  RM_TOGG,  RM_NEXT,  RM_VALU,  RM_HUEU,  RM_SATU,  RM_SPDU,   _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,            _______,
+        _______,  _______,  RM_PREV,  RM_VALD,  RM_HUED,  RM_SATD,  RM_SPDD,   _______,  _______,  _______,  _______,  _______,  _______,            _______,            _______,
+        _______,  _______,            _______,  _______,  _______,  _______,   _______,  _______,  NK_TOGG,  _______,  _______,  _______,  _______,  _______,  _______,
+        _______,  _______,  _______,            _______,  _______,  _______,                       _______,            _______,                      _______,  _______,  _______),
+
+    [WIN_BASE] = LAYOUT_ansi_89(
+        KC_MUTE,  KC_ESC,   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_INS,             KC_DEL,
+        _______,  KC_GRV,   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_BSPC,            KC_PGUP,
+        _______,  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_PGDN,
+        _______,  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_ENT,             KC_HOME,
+        _______,  KC_LSFT,            KC_Z,     KC_X,     KC_C,     KC_V,      KC_B,     KC_B,     KC_N,     KC_M,     KC_COMM,  KC_DOT,   KC_SLSH,  KC_RSFT,  KC_UP,
+        _______,  KC_LCTL,  KC_LWIN,            KC_LALT,  KC_SPC,  MO(WIN_FN),                     KC_SPC,             KC_RALT,                      KC_LEFT,  KC_DOWN,  KC_RGHT),
+
+    [WIN_FN] = LAYOUT_ansi_89(
+        RM_TOGG,  _______,  KC_BRID,  KC_BRIU,  KC_TASK,  KC_FLXP,  RM_VALD,   RM_VALU,  KC_MPRV,  KC_MPLY,  KC_MNXT,  KC_MUTE,  KC_VOLD,   KC_VOLU,  _______,            _______,
+        _______,  _______,  _______,  _______,  _______,  _______,  _______,   _______,  _______,  _______,  _______,  _______,  _______,   _______,  _______,            _______,
+        _______,  RM_TOGG,  RM_NEXT,  RM_VALU,  RM_HUEU,  RM_SATU,  RM_SPDU,   _______,  _______,  _______,  _______,  _______,  _______,   _______,  _______,            _______,
+        _______,  _______,  RM_PREV,  RM_VALD,  RM_HUED,  RM_SATD,  RM_SPDD,   _______,  _______,  _______,  _______,  _______,  _______,             _______,            _______,
+        _______,  _______,            _______,  _______,  _______,  _______,   _______,  _______,  NK_TOGG,  _______,  _______,  _______,   _______,  _______,  _______,
+        _______,  _______,  _______,            _______,  _______,  _______,                       _______,            _______,                       _______,  _______,  _______),
+};
+
+#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+    [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+    [MAC_FN]   = { ENCODER_CCW_CW(RM_VALD, RM_VALU) },
+    [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+    [WIN_FN]   = { ENCODER_CCW_CW(RM_VALD, RM_VALU) }
+};
+#endif // ENCODER_MAP_ENABLE
diff --git a/keyboards/keychron/q10/ansi_encoder/keymaps/cotsuka/rules.mk b/keyboards/keychron/q10/ansi_encoder/keymaps/cotsuka/rules.mk
new file mode 100644 (file)
index 0000000..ee32568
--- /dev/null
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
index 3afc389f424d90096ab252a322cdd3a89f42e219..7cc798406ee3ffb65c5ffec06e99814dd046ddc7 100644 (file)
--- a/qmk.json
+++ b/qmk.json
@@ -1,4 +1,6 @@
 {
-    "userspace_version": "1.0",
-    "build_targets": []
+    "userspace_version": "1.1",
+    "build_targets": [
+        ["keychron/q10/ansi_encoder", "cotsuka"]
+    ]
 }
\ No newline at end of file
diff --git a/users/.keep b/users/.keep
deleted file mode 100644 (file)
index e69de29..0000000