diff --git a/qmk/.github/ISSUE_TEMPLATE/bug_report.md b/qmk/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..57b415f7 --- /dev/null +++ b/qmk/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: Create a report to help us improve QMK Firmware. +title: "[Bug] " +labels: bug, help wanted +assignees: '' + +--- + + + + + + +## Describe the Bug + + + +## System Information + + - Keyboard: + - Revision (if applicable): + - Operating system: + - AVR GCC version: + + - ARM GCC version: + + - QMK Firmware version: + + - Any keyboard related software installed? + - [ ] AutoHotKey + - [ ] Karabiner + - [ ] Other: + +## Additional Context + + diff --git a/qmk/.github/ISSUE_TEMPLATE/config.yml b/qmk/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..0d4ca035 --- /dev/null +++ b/qmk/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: QMK Discord + url: https://discord.gg/Uq7gcHh + about: Ask questions, discuss issues and features. Chill. + - name: OLKB Subreddit + url: https://www.reddit.com/r/olkb + about: All things OLKB and QMK. diff --git a/qmk/.github/ISSUE_TEMPLATE/feature_request.md b/qmk/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..18768342 --- /dev/null +++ b/qmk/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,24 @@ +--- +name: Feature request +about: Suggest a new feature or changes to existing features. +title: "[Feature Request] " +labels: enhancement, help wanted +assignees: '' + +--- + + + + + + +## Feature Request Type + +- [ ] Core functionality +- [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.) +- [ ] Alteration (enhancement/optimization) of existing feature(s) +- [ ] New behavior + +## Description + + diff --git a/qmk/.github/ISSUE_TEMPLATE/other_issues.md b/qmk/.github/ISSUE_TEMPLATE/other_issues.md new file mode 100644 index 00000000..befeeb16 --- /dev/null +++ b/qmk/.github/ISSUE_TEMPLATE/other_issues.md @@ -0,0 +1,14 @@ +--- +name: Other issues +about: Anything else that doesn't fall into the above categories. +title: '' +labels: help wanted, question +assignees: '' + +--- + + + + + + diff --git a/qmk/.github/ISSUE_TEMPLATE/zzz_blank.md b/qmk/.github/ISSUE_TEMPLATE/zzz_blank.md new file mode 100644 index 00000000..5644802e --- /dev/null +++ b/qmk/.github/ISSUE_TEMPLATE/zzz_blank.md @@ -0,0 +1,11 @@ +--- +name: Blank issue +about: If you're 100% sure that you don't need one of the other issue templates, use + this one instead. +title: '' +labels: help wanted, question +assignees: '' + +--- + + diff --git a/qmk/.github/PULL_REQUEST_TEMPLATE.md b/qmk/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..d402488d --- /dev/null +++ b/qmk/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,35 @@ + + + + + +## Description + + + +## Types of Changes + + +- [ ] Core +- [ ] Bugfix +- [ ] New feature +- [ ] Enhancement/optimization +- [ ] Keyboard (addition or update) +- [ ] Keymap/layout/userspace (addition or update) +- [ ] Documentation + +## Issues Fixed or Closed by This PR + +* + +## Checklist + + + +- [ ] My code follows the code style of this project: [**C**](https://docs.qmk.fm/#/coding_conventions_c), [**Python**](https://docs.qmk.fm/#/coding_conventions_python) +- [ ] I have read the [**PR Checklist** document](https://docs.qmk.fm/#/pr_checklist) and have made the appropriate changes. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. +- [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing). +- [ ] I have added tests to cover my changes. +- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage). diff --git a/qmk/.github/labeler.yml b/qmk/.github/labeler.yml new file mode 100644 index 00000000..53921f7f --- /dev/null +++ b/qmk/.github/labeler.yml @@ -0,0 +1,42 @@ +core: + - quantum/**/* + - tmk_core/**/* + - drivers/**/* + - tests/**/* + - util/**/* + - platforms/**/* + - Makefile + - '*.mk' +dependencies: + - any: + - 'lib/**/*' + - '!lib/python/**/*' +keyboard: + - any: + - 'keyboards/**/*' + - '!keyboards/**/keymaps/**/*' +keymap: + - users/**/* + - layouts/**/* + - keyboards/**/keymaps/**/* +via: + - keyboards/**/keymaps/via/* +cli: + - bin/qmk + - requirements.txt + - lib/python/**/* +python: + - '**/*.py' +documentation: + - docs/**/* +translation: + - docs/fr-fr/**/* + - docs/es/**/* + - docs/ja/**/* + - docs/he-il/**/* + - docs/pt-br/**/* + - docs/zh-cn/**/* + - docs/de/**/* + - docs/ru-ru/**/* +CI: + - .github/**/* diff --git a/qmk/.github/stale.yml b/qmk/.github/stale.yml new file mode 100644 index 00000000..eb498881 --- /dev/null +++ b/qmk/.github/stale.yml @@ -0,0 +1,58 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# General configuration + +# Pull request specific configuration +pulls: + staleLabel: awaiting changes + # Number of days of inactivity before an Issue or Pull Request becomes stale + daysUntilStale: 45 + # Number of days of inactivity before a stale Issue or Pull Request is closed. + # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. + daysUntilClose: 30 + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + Thank you for your contribution! + + This pull request has been automatically marked as stale because it has not had + activity in the last 45 days. It will be closed in 30 days if no further activity occurs. + Please feel free to give a status update now, or re-open when it's ready. + + For maintainers: Please label with `awaiting review`, `breaking_change`, `in progress`, or `on hold` to prevent + the issue from being re-flagged. + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Thank you for your contribution! + + This pull request has been automatically closed because it has not had activity in the last 30 days. + Please feel free to give a status update now, ping for review, or re-open when it's ready. + # Limit the number of actions per hour, from 1-30. Default is 30 + limitPerRun: 30 + exemptLabels: + - awaiting review + - breaking_change + - in progress + - on hold + +# Issue specific configuration +issues: + staleLabel: stale + limitPerRun: 10 + daysUntilStale: 90 + daysUntilClose: 30 + markComment: > + This issue has been automatically marked as stale because it has not had activity in the + last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity + occurs. + + For maintainers: Please label with `bug`, `in progress`, `on hold`, `discussion` or `to do` to prevent + the issue from being re-flagged. + closeComment: > + This issue has been automatically closed because it has not had activity in the last 30 days. + If this issue is still valid, re-open the issue and let us know. + exemptLabels: + - bug + - in progress + - on hold + - discussion + - to do diff --git a/qmk/.github/workflows/api.yml b/qmk/.github/workflows/api.yml new file mode 100644 index 00000000..2d09089b --- /dev/null +++ b/qmk/.github/workflows/api.yml @@ -0,0 +1,39 @@ +name: Update API Data + +on: + push: + branches: + - master + paths: + - 'keyboards/**' + - 'layouts/community/**' + +jobs: + api_data: + runs-on: ubuntu-latest + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + persist-credentials: false + + - name: Generate API Data + run: qmk generate-api + + - name: Install rsync + run: | + apt-get update && apt-get install -y rsync + + - name: Upload API Data + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: main + FOLDER: api_data/v1 + CLEAN: true + GIT_CONFIG_EMAIL: hello@qmk.fm + REPOSITORY_NAME: qmk/qmk_keyboards + TARGET_FOLDER: v1 diff --git a/qmk/.github/workflows/cli.yml b/qmk/.github/workflows/cli.yml new file mode 100644 index 00000000..28c6bb36 --- /dev/null +++ b/qmk/.github/workflows/cli.yml @@ -0,0 +1,28 @@ +name: CLI CI + +on: + push: + branches: + - master + - future + pull_request: + paths: + - 'lib/python/**' + - 'bin/qmk' + - 'requirements.txt' + - '.github/workflows/cli.yml' + +jobs: + test: + runs-on: ubuntu-latest + + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Install dependencies + run: pip3 install -r requirements.txt + - name: Run tests + run: bin/qmk pytest diff --git a/qmk/.github/workflows/info.yml b/qmk/.github/workflows/info.yml new file mode 100644 index 00000000..bb3a5084 --- /dev/null +++ b/qmk/.github/workflows/info.yml @@ -0,0 +1,54 @@ +name: PR Lint keyboards + +on: + pull_request: + paths: + - 'keyboards/**' + +jobs: + info: + runs-on: ubuntu-latest + + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: trilom/file-changes-action@v1.2.4 + id: file_changes + with: + output: '\n' + + - name: Print info + run: | + git rev-parse --short HEAD + echo ${{ github.event.pull_request.base.sha }} + echo '${{ steps.file_changes.outputs.files}}' + + - name: Run qmk info + shell: 'bash {0}' + run: | + QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') + QMK_KEYBOARDS=$(qmk list-keyboards) + + exit_code=0 + for KB in $QMK_KEYBOARDS; do + KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)') + if [[ -z "$KEYBOARD_CHANGES" ]]; then + # skip as no changes for this keyboard + continue + fi + + KEYMAP_ONLY=$(echo "$KEYBOARD_CHANGES" | grep -cv /keymaps/) + if [[ $KEYMAP_ONLY -gt 0 ]]; then + echo "linting ${KB}" + + # TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines + qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$ + !(grep -cq ☒ /tmp/$$) + : $((exit_code = $exit_code + $?)) + fi + done + exit $exit_code diff --git a/qmk/.github/workflows/labeler.yml b/qmk/.github/workflows/labeler.yml new file mode 100644 index 00000000..3b99a8f4 --- /dev/null +++ b/qmk/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "Pull Request Labeler" + +on: + pull_request_target: + types: [opened, synchronize, reopened, ready_for_review, locked] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@main + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: '.github/labeler.yml' diff --git a/qmk/.gitignore b/qmk/.gitignore index 91d283e6..d6846cf6 100644 --- a/qmk/.gitignore +++ b/qmk/.gitignore @@ -16,6 +16,7 @@ *.swp tags *~ +api_data/v1 build/ .build/ *.bak diff --git a/qmk/.gitmodules b/qmk/.gitmodules new file mode 100644 index 00000000..324ef790 --- /dev/null +++ b/qmk/.gitmodules @@ -0,0 +1,24 @@ +[submodule "lib/chibios"] + path = lib/chibios + url = https://github.com/qmk/ChibiOS + branch = master +[submodule "lib/chibios-contrib"] + path = lib/chibios-contrib + url = https://github.com/qmk/ChibiOS-Contrib + branch = master +[submodule "lib/ugfx"] + path = lib/ugfx + url = https://github.com/qmk/uGFX + branch = master +[submodule "lib/googletest"] + path = lib/googletest + url = https://github.com/qmk/googletest +[submodule "lib/lufa"] + path = lib/lufa + url = https://github.com/qmk/lufa +[submodule "lib/vusb"] + path = lib/vusb + url = https://github.com/qmk/v-usb +[submodule "lib/printf"] + path = lib/printf + url = https://github.com/qmk/printf diff --git a/qmk/api_data/_config.yml b/qmk/api_data/_config.yml new file mode 100644 index 00000000..277f1f2c --- /dev/null +++ b/qmk/api_data/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman diff --git a/qmk/api_data/readme.md b/qmk/api_data/readme.md new file mode 100644 index 00000000..a4b2c6bc --- /dev/null +++ b/qmk/api_data/readme.md @@ -0,0 +1,5 @@ +# QMK Keyboard Metadata + +This directory contains machine parsable data about keyboards supported by QMK. The latest version is always available online at . + +Do not edit anything here by hand. It is generated with the `qmk generate-api` command. diff --git a/qmk/bootloader.mk b/qmk/bootloader.mk index d5f803f8..5487f9ec 100644 --- a/qmk/bootloader.mk +++ b/qmk/bootloader.mk @@ -28,6 +28,7 @@ # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) # kiibohd Input:Club Kiibohd bootloader (only used on their boards) +# stm32duino STM32Duino (STM32F103x8) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -35,30 +36,30 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif @@ -106,3 +107,14 @@ ifeq ($(strip $(BOOTLOADER)), kiibohd) DFU_ARGS = -d 1C11:B007 DFU_SUFFIX_ARGS = -v 1C11 -p B007 endif + +ifeq ($(strip $(BOOTLOADER)), stm32duino) + OPT_DEFS += -DBOOTLOADER_STM32DUINO + MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader + BOARD = STM32_F103_STM32DUINO + # STM32F103 does NOT have an USB bootloader in ROM (only serial), so setting anything here does not make much sense + STM32_BOOTLOADER_ADDRESS = 0x80000000 + + DFU_ARGS = -d 1EAF:0003 -a2 -R + DFU_SUFFIX_ARGS = -v 1EAF -p 0003 +endif diff --git a/qmk/common_features.mk b/qmk/common_features.mk index ed6908f4..5f232d5f 100644 --- a/qmk/common_features.mk +++ b/qmk/common_features.mk @@ -114,6 +114,17 @@ else SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c OPT_DEFS += -DEEPROM_EMU_STM32F072xB OPT_DEFS += -DSTM32_EEPROM_ENABLE + else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6) + + # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced. + # This ensures that the EEPROM page buffer fits into RAM + USE_PROCESS_STACKSIZE = 0x600 + USE_EXCEPTIONS_STACKSIZE = 0x300 + + SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + OPT_DEFS += -DEEPROM_EMU_STM32F042x6 + OPT_DEFS += -DSTM32_EEPROM_ENABLE else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) OPT_DEFS += -DEEPROM_DRIVER COMMON_VPATH += $(DRIVER_PATH)/eeprom @@ -173,6 +184,10 @@ ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type) endif OPT_DEFS += -DRGB_MATRIX_ENABLE +ifneq (,$(filter $(MCU), atmega16u2 atmega32u2)) + # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines + OPT_DEFS += -DLIB8_ATTINY +endif SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgb_matrix.c SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c diff --git a/qmk/docs/_summary.md b/qmk/docs/_summary.md index 0c437121..2e874fb1 100644 --- a/qmk/docs/_summary.md +++ b/qmk/docs/_summary.md @@ -23,6 +23,7 @@ * [Overview](api_overview.md) * [API Documentation](api_docs.md) * [Keyboard Support](reference_configurator_support.md) + * [Adding Default Keymaps](configurator_default_keymaps.md) * CLI * [Overview](cli.md) @@ -117,6 +118,7 @@ * [Overview](breaking_changes.md) * [My Pull Request Was Flagged](breaking_changes_instructions.md) * History + * [2020 Aug 29](ChangeLog/20200829.md) * [2020 May 30](ChangeLog/20200530.md) * [2020 Feb 29](ChangeLog/20200229.md) * [2019 Aug 30](ChangeLog/20190830.md) diff --git a/qmk/docs/cli_commands.md b/qmk/docs/cli_commands.md index bb0de3c0..fe6f0663 100644 --- a/qmk/docs/cli_commands.md +++ b/qmk/docs/cli_commands.md @@ -167,6 +167,17 @@ Creates a keymap.c from a QMK Configurator export. qmk json2c [-o OUTPUT] filename ``` +## `qmk c2json` + +Creates a keymap.json from a keymap.c. +**Note:** Parsing C source files is not easy, therefore this subcommand may not work your keymap. In some cases not using the C pre-processor helps. + +**Usage**: + +``` +qmk c2json [--no-cpp] [-o OUTPUT] filename +``` + ## `qmk list-keyboards` This command lists all the keyboards currently defined in `qmk_firmware` diff --git a/qmk/docs/configurator_default_keymaps.md b/qmk/docs/configurator_default_keymaps.md new file mode 100644 index 00000000..30f9fa72 --- /dev/null +++ b/qmk/docs/configurator_default_keymaps.md @@ -0,0 +1,193 @@ +# Adding Default Keymaps to QMK Configurator :id=adding-default-keymaps + +This page covers how to add a default keymap for a keyboard to QMK Configurator. + + +## Technical Information :id=technical-information + +QMK Configurator uses JSON as its native file format for keymaps. As much as possible, these should be kept such that they behave the same as running `make :default` from `qmk_firmware`. + +Keymaps in this directory require four key-value pairs: + +* `keyboard` (string) + * This is the name of the keyboard, the same as would be used when running a compile job through `make` (e.g. `make 1upkeyboards/1up60rgb:default`). +* `keymap` (string) + * Should be set to `default`. +* `layout` (string) + * This is the layout macro used by the default keymap. +* `layers` (array) + * The keymap itself. This key should contain one array per layer, which themselves should contain the keycodes that make up that layer. + +Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards//keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to: + +```shell +f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625) +``` + +In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that should be used for `commit`. + + +## Example :id=example + +If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`: + +```shell +user ~/qmk_firmware (master) +$ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c +ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) +``` + +Now that we have the commit hash, we need the keymap (edited for readability): + +```c +... +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_BSPC, KC_INS, KC_HOME, 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_DEL, KC_END, 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_NUHS, KC_ENT, + 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_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD, + 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), + +}; +``` + +The default keymap uses the `LAYOUT_all` macro, so that will be the value of the `layout` key. Compiled to a QMK Configurator JSON keymap, our resulting file should be: + +```json +{ + "keyboard": "hineybush/h87a", + "keymap": "default", + "commit": "ef8878fba5d3786e3f9c66436da63a560cd36ac9", + "layout": "LAYOUT_all", + "layers": [ + [ + "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_PSCR", "KC_SLCK", "KC_PAUS", + "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_BSPC", "KC_INS", "KC_HOME", "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_DEL", "KC_END", "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_NUHS", "KC_ENT", + "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_TRNS", "KC_UP", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_HUD", "RGB_HUI", "RGB_SAD", "RGB_SAI", "RGB_VAD", "RGB_VAI", "BL_TOGG", "BL_DEC", "BL_INC", + "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_VOLU", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RESET", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MPLY", "KC_MNXT", "KC_VOLD", + "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" + ] + ] +} +``` + +The white space in the `layers` arrays have no effect on the functionality of the keymap, but are used to make these files easier for humans to read. + + +## Caveats :id=caveats + +### Layers can only be referenced by number :id=layer-references + +A common QMK convention is to name layers using a series of `#define`s, or an `enum` statement: + +```c +enum layer_names { + _BASE, + _MEDIA, + _FN +}; +``` + +This works in C, but for Configurator, you *must* use the layer's numeric index – `MO(_FN)` would need to be `MO(2)` in the above example. + +### No support for custom code of any kind :id=custom-code + +Features that require adding functions to the keymap.c file, such as Tap Dance or Unicode, can not be compiled in Configurator **at all**. Even setting `TAP_DANCE_ENABLE = yes` in the `qmk_firmware` repository at the keyboard level will prevent Configurator from compiling **any** firmware for that keyboard. This is limited both by the API and the current spec of our JSON keymap format. + +### Limited Support for Custom keycodes :id=custom-keycodes + +There is a way to support custom keycodes: if the logic for a custom keycode is implemented at the keyboard level instead of the keymap level in qmk_firmware, that keycode *can* be used in Configurator and it *will* compile and work. Instead of using the following in your `keymap.c`: + +```c +enum custom_keycodes { + MACRO_1 = SAFE_RANGE, + MACRO_2, + MACRO_3 +}; +... +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case MACRO_1: + if (record->event.pressed) { + SEND_STRING("This is macro #1."); + } + return false; + case MACRO_2: + if (record->event.pressed) { + SEND_STRING("This is macro #2."); + } + return false; + case MACRO_3: + if (record->event.pressed) { + SEND_STRING("This is macro #3."); + } + return false; + } + return true; +}; +``` + +... add the keycode `enum` block to your keyboard's header file (`.h`) as follows (note that the `enum` is named `keyboard_keycodes` here): + +```c +enum keyboard_keycodes { + MACRO_1 = SAFE_RANGE, + MACRO_2, + MACRO_3, + NEW_SAFE_RANGE // Important! +}; +``` + +... then the logic to your `.c` through `process_record_kb()`: + +```c +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case MACRO_1: + if (record->event.pressed) { + SEND_STRING("This is macro #1."); + } + return false; + case MACRO_2: + if (record->event.pressed) { + SEND_STRING("This is macro #2."); + } + return false; + case MACRO_3: + if (record->event.pressed) { + SEND_STRING("This is macro #3."); + } + return false; + } + return process_record_user(keycode, record); +}; +``` + +Note the call to `process_record_user()` at the end. Additionally, users of the keyboard will need to use `NEW_SAFE_RANGE` instead of `SAFE_RANGE` if they wish to add their own custom keycodes at keymap level, beyond what is provided by the keyboard. + + +## Additional Reading :id=additional-reading + +For QMK Configurator to support your keyboard, your keyboard must be present in the `master` branch of the `qmk_firmware` repository. For instructions on this, please see [Supporting Your Keyboard in QMK Configurator](reference_configurator_support.md). diff --git a/qmk/docs/driver_installation_zadig.md b/qmk/docs/driver_installation_zadig.md index 403b78da..4519a21e 100644 --- a/qmk/docs/driver_installation_zadig.md +++ b/qmk/docs/driver_installation_zadig.md @@ -4,7 +4,7 @@ QMK presents itself to the host as a regular HID keyboard device, and as such re There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver. -We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you. +We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the `qmk_install.sh` script will have already installed the drivers for you. ## Installation diff --git a/qmk/docs/faq_build.md b/qmk/docs/faq_build.md index e2d0f9b2..e64c0353 100644 --- a/qmk/docs/faq_build.md +++ b/qmk/docs/faq_build.md @@ -13,65 +13,29 @@ An example of using `sudo`, when your controller is ATMega32u4: or just: - $ sudo make ::dfu + $ sudo make ::flash Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible. ### Linux `udev` Rules -On Linux, you'll need proper privileges to access the MCU. You can either use -`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following: -```console + +On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware (not recommended), or place [this file](https://github.com/qmk/qmk_firmware/tree/master/util/udev/50-qmk.rules) into `/etc/udev/rules.d/`. + +Once added, run the following: + +``` sudo udevadm control --reload-rules sudo udevadm trigger ``` -**/etc/udev/rules.d/50-atmel-dfu.rules:** -``` -# Atmel ATMega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel USBKEY AT90USB1287 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel ATMega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/54-input-club-keyboard.rules:** +**Note:** With older versions of ModemManager (< 1.12), filtering only works when not in strict mode. The following commands can update that setting: ``` -# Input Club keyboard bootloader -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/55-caterina.rules:** -``` -# ModemManager should ignore the following devices -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -``` - -**Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings: -```console printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf sudo systemctl daemon-reload sudo systemctl restart ModemManager ``` -**/etc/udev/rules.d/56-dfu-util.rules:** -``` -# stm32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" -# Generic stm32 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/57-bootloadhid.rules:** -``` -# bootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - ### Serial device is not detected in bootloader mode on Linux Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. @@ -96,46 +60,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person - http://www.obdev.at/products/vusb/license.html - http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 -## BOOTLOADER_SIZE for AVR -Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment. - -``` -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 2048 -# Atmel DFU loader 4096 (TMK Alt Controller) -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 -``` - -## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS - -This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. - -The solution is to remove and reinstall all affected modules. - -``` -brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk -brew install qmk/qmk/qmk -brew link --force avr-gcc@8 -brew link --force arm-gcc-bin@8 -``` - -### `avr-gcc` and LUFA - -If you updated your `avr-gcc` and you see errors involving LUFA, for example: - -`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` - -For now, you need to rollback `avr-gcc` to 8 in Homebrew. - -``` -brew uninstall --force avr-gcc -brew install avr-gcc@8 -brew link --force avr-gcc@8 -``` - ### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this. diff --git a/qmk/docs/faq_debug.md b/qmk/docs/faq_debug.md index 08c84fe4..7d547367 100644 --- a/qmk/docs/faq_debug.md +++ b/qmk/docs/faq_debug.md @@ -31,20 +31,6 @@ Check: - try using 'print' function instead of debug print. See **common/print.h**. - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). -## Linux or UNIX Like System Requires Super User Privilege -Just use 'sudo' to execute *hid_listen* with privilege. -``` -$ sudo hid_listen -``` - -Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. - -File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) -``` -# tmk keyboard products https://github.com/tmk/tmk_keyboard -SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" -``` - *** # Miscellaneous diff --git a/qmk/docs/feature_advanced_keycodes.md b/qmk/docs/feature_advanced_keycodes.md index b8664074..745308b2 100644 --- a/qmk/docs/feature_advanced_keycodes.md +++ b/qmk/docs/feature_advanced_keycodes.md @@ -2,21 +2,24 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent. -|Key |Aliases |Description | -|----------|-------------------------------|----------------------------------------------------| -|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| +|Key |Aliases |Description | +|----------|-------------------------------|------------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | +|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | +|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. diff --git a/qmk/docs/feature_bluetooth.md b/qmk/docs/feature_bluetooth.md index 7b450b1a..08e5f24a 100644 --- a/qmk/docs/feature_bluetooth.md +++ b/qmk/docs/feature_bluetooth.md @@ -26,7 +26,10 @@ A Bluefruit UART friend can be converted to an SPI friend, however this [require ## Bluetooth Rules.mk Options -Use only one of these + +The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. + +Use only one of these to enable Bluetooth: * BLUETOOTH_ENABLE = yes (Legacy Option) * BLUETOOTH = RN42 * BLUETOOTH = AdafruitBLE diff --git a/qmk/docs/feature_combo.md b/qmk/docs/feature_combo.md index d3eb896b..d831328f 100644 --- a/qmk/docs/feature_combo.md +++ b/qmk/docs/feature_combo.md @@ -55,7 +55,7 @@ combo_t key_combos[COMBO_COUNT] = { [XV_PASTE] = COMBO_ACTION(paste_combo), }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case ZC_COPY: if (pressed) { diff --git a/qmk/docs/feature_debounce_type.md b/qmk/docs/feature_debounce_type.md index 83ebafe6..966e75ac 100644 --- a/qmk/docs/feature_debounce_type.md +++ b/qmk/docs/feature_debounce_type.md @@ -76,8 +76,8 @@ susceptible to noise, you must choose a debounce method that will also mitigate * Defer algorithms are noise-resistant * Recommended naming conventions: * ```sym_defer_*``` - * ```asym_defer_*_*```: key-down is using eager algorithm - * ```asym_*_defer_*```: key-up is using eager algorithm + * ```asym_defer_*_*```: key-down is using defer algorithm + * ```asym_*_defer_*```: key-up is using defer algorithm 4) Global vs Per-Key vs Per-Row * Global - one timer for all keys. Any key change state affects global timer diff --git a/qmk/docs/feature_oled_driver.md b/qmk/docs/feature_oled_driver.md index d106d3d1..9f0ef166 100644 --- a/qmk/docs/feature_oled_driver.md +++ b/qmk/docs/feature_oled_driver.md @@ -140,8 +140,8 @@ void oled_task_user(void) { |---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------| |`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | |`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | -|`OLED_FONT_START` |`0` |The starting characer index for custom fonts | -|`OLED_FONT_END` |`223` |The ending characer index for custom fonts | +|`OLED_FONT_START` |`0` |The starting character index for custom fonts | +|`OLED_FONT_END` |`223` |The ending character index for custom fonts | |`OLED_FONT_WIDTH` |`6` |The font width | |`OLED_FONT_HEIGHT` |`8` |The font height (untested) | |`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | @@ -149,6 +149,7 @@ void oled_task_user(void) { |`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. | |`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | |`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC.| +|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. | ## 128x64 & Custom sized OLED Displays @@ -300,6 +301,16 @@ bool oled_on(void); // Returns true if the screen was off or turns off bool oled_off(void); +// Returns true if the oled is currently on, false if it is +// not +bool is_oled_on(void); + +// Sets the brightness level of the display +uint8_t oled_set_brightness(uint8_t level); + +// Gets the current brightness level of the display +uint8_t oled_get_brightness(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); diff --git a/qmk/docs/hardware_keyboard_guidelines.md b/qmk/docs/hardware_keyboard_guidelines.md index a862bc0c..d49d0d09 100644 --- a/qmk/docs/hardware_keyboard_guidelines.md +++ b/qmk/docs/hardware_keyboard_guidelines.md @@ -192,7 +192,7 @@ When developing your keyboard, keep in mind that all warnings will be treated as ## Copyright Blurb -If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format: +If you're adapting your keyboard's setup from another project, but not using the same code, be sure to update the copyright header at the top of the files to show your name, in this format: Copyright 2017 Your Name diff --git a/qmk/docs/ja/_summary.md b/qmk/docs/ja/_summary.md index b44b76ab..cf2e37aa 100644 --- a/qmk/docs/ja/_summary.md +++ b/qmk/docs/ja/_summary.md @@ -116,6 +116,7 @@ * [概要](ja/breaking_changes.md) * [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md) * 履歴 + * [2020年8月29日](ja/ChangeLog/20200829.md) * [2020年5月30日](ja/ChangeLog/20200530.md) * [2020年2月29日](ja/ChangeLog/20200229.md) * [2019年8月30日](ja/ChangeLog/20190830.md) diff --git a/qmk/docs/ja/breaking_changes.md b/qmk/docs/ja/breaking_changes.md index 936d0a47..0f7256e6 100644 --- a/qmk/docs/ja/breaking_changes.md +++ b/qmk/docs/ja/breaking_changes.md @@ -2,8 +2,8 @@ このドキュメントは QMK の互換性を破る変更(Breaking change) のプロセスについて説明します。 @@ -15,22 +15,23 @@ Breaking change ピリオドとは、危険な変更、または予想外の変 ## 過去の Breaking change には何が含まれますか? +* [2020年8月29日](ja/ChangeLog/20200829.md) * [2020年5月30日](ja/ChangeLog/20200530.md) * [2020年2月29日](ja/ChangeLog/20200229.md) * [2019年8月30日](ja/ChangeLog/20190830.md) ## 次の Breaking change はいつですか? -次の Breaking change は2020年8月29日に予定されています。 +次の Breaking change は2020年11月28日に予定されています。 ### 重要な日付 -* [x] 2020年 5月30日 - `develop` が作成されました。毎週リベースされます。 -* [ ] 2020年 8月 1日 - `develop` は新しいPRを取り込みません。 -* [ ] 2020年 8月 1日 - テスターの募集。 -* [ ] 2020年 8月27日 - `master`がロックされ、PR はマージされません。 -* [ ] 2020年 8月29日 - `develop` を `master` にマージします。 -* [ ] 2020年 8月29日 - `master` のロックが解除されます。PR を再びマージすることができます。 +* [x] 2020年 8月29日 - `develop` が作成されました。毎週リベースされます。 +* [ ] 2020年10月31日 - `develop` は新しいPRを取り込みません。 +* [ ] 2020年10月31日 - テスターの募集。 +* [ ] 2020年11月26日 - `master`がロックされ、PR はマージされません。 +* [ ] 2020年11月28日 - `develop` を `master` にマージします。 +* [ ] 2020年11月28日 - `master` のロックが解除されます。PR を再びマージすることができます。 ## どのような変更が含まれますか? diff --git a/qmk/docs/ja/config_options.md b/qmk/docs/ja/config_options.md index 2a64f2ba..67e97303 100644 --- a/qmk/docs/ja/config_options.md +++ b/qmk/docs/ja/config_options.md @@ -1,8 +1,8 @@ # QMK の設定 QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。 diff --git a/qmk/docs/ja/custom_matrix.md b/qmk/docs/ja/custom_matrix.md index f333711e..277fc658 100644 --- a/qmk/docs/ja/custom_matrix.md +++ b/qmk/docs/ja/custom_matrix.md @@ -31,7 +31,7 @@ keyboards//matrix.c SRC += matrix.c ``` -## マトリックスコードの部分置き換え +## マトリックスコードの部分置き換え :id=lite カスタムマトリックスを実装する際、定型コードを書かなくてすむように、さまざまなスキャン関数のデフォルト実装を提供しています。 diff --git a/qmk/docs/ja/custom_quantum_functions.md b/qmk/docs/ja/custom_quantum_functions.md index 161d7e4b..952b5d8a 100644 --- a/qmk/docs/ja/custom_quantum_functions.md +++ b/qmk/docs/ja/custom_quantum_functions.md @@ -1,8 +1,8 @@ # キーボードの挙動をカスタマイズする方法 多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。 @@ -232,7 +232,7 @@ void keyboard_pre_init_user(void) { } ``` -### `keyboard_pre_init_*` 関数のドキュメント +### `keyboard_pre_init_*` 関数のドキュメント :id=keyboard_pre_init_-function-documentation * キーボード/リビジョン: `void keyboard_pre_init_kb(void)` * キーマップ: `void keyboard_pre_init_user(void)` diff --git a/qmk/docs/ja/documentation_best_practices.md b/qmk/docs/ja/documentation_best_practices.md index 50ec4ea6..c866d395 100644 --- a/qmk/docs/ja/documentation_best_practices.md +++ b/qmk/docs/ja/documentation_best_practices.md @@ -1,8 +1,8 @@ # ドキュメントベストプラクティス このページは QMK のためのドキュメントを作成する時のベストプラクティスを文章化するためのものです。これらのガイドラインに従うことで、一貫したトーンとスタイルを維持することでき、他の人が QMK をより理解しやすくすることができます。 diff --git a/qmk/docs/ja/faq_build.md b/qmk/docs/ja/faq_build.md index 62c36f24..3c93c078 100644 --- a/qmk/docs/ja/faq_build.md +++ b/qmk/docs/ja/faq_build.md @@ -1,8 +1,8 @@ # よくあるビルドの質問 このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。 @@ -18,64 +18,93 @@ あるいは、単純に: - $ sudo make ::dfu + $ sudo make ::flash `make` を `sudo` で実行することは一般的には良い考えでは***なく***、可能であれば前者の方法のいずれかを使うべきです。 ### Linux の `udev` ルール -Linux では、MCU にアクセスするには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか、`/etc/udev/rules.d/` にこれらのファイルを配置することで、アクセスすることができます。権限の追加が完了したら、以下を実行します: -```console + +Linux では、ブートローダデバイスと通信するには適切な権限が必要です。ファームウェアを書き込む時に `sudo` を使うか、`/etc/udev/rules.d/` にこのファイルを配置することで、通信することができます。 + +**/etc/udev/rules.d/50-qmk.rules:** +``` +# Atmel DFU +### ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" +### ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" +### ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" +### ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" +### AT90USB64 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" +### AT90USB128 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" + +# Input Club +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" + +# STM32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" +# STM32 DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess" + +# BootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess" + +# USBAspLoader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess" + +# ModemManager should ignore the following devices +# Atmel SAM-BA (Massdrop) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Caterina (Pro Micro) +## Spark Fun Electronics +### Pro Micro 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Pro Micro 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### LilyPad 3V3/8MHz (and some Pro Micro clones) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Pololu Electronics +### A-Star 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Arduino SA +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Adafruit Industries LLC +### Feather 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## dog hunter AG +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +``` + +追加が完了したら、以下を実行します: + +``` sudo udevadm control --reload-rules sudo udevadm trigger ``` -**/etc/udev/rules.d/50-atmel-dfu.rules:** -``` -# Atmel ATMega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel USBKEY AT90USB1287 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel ATMega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/54-input-club-keyboard.rules:** - -``` -# Input Club keyboard bootloader -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/55-caterina.rules:** -``` -# ModemManager should ignore the following devices -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -``` - **注意:** 古い(1.12以前の) ModemManager では、フィルタリングは厳密なモードではない場合にのみ動作し、以下のコマンドはその設定を更新することができます。 -```console + +``` printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf sudo systemctl daemon-reload sudo systemctl restart ModemManager ``` -**/etc/udev/rules.d/56-dfu-util.rules:** -``` -# stm32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" -# Generic stm32 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/57-bootloadhid.rules:** -``` -# bootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - ### Linux のブートローダモードで Serial デバイスが検知されない カーネルがデバイスを適切にサポートしていることを確認してください。デバイスが、Pro Micro (Atmega32u4) のように USB ACM を使う場合、`CONFIG_USB_ACM=y` を含めるようにしてください。他のデバイスは `USB_SERIAL` およびそのサブオプションを必要とするかもしれません。 @@ -99,46 +128,6 @@ https://github.com/tmk/tmk_keyboard/issues/150 - http://www.obdev.at/products/vusb/license.html - http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 -## AVR のための BOOTLOADER_SIZE -Teensy2.0++ ブートローダのサイズは 2048 バイトであることに注意してください。一部の Makefile には間違ったコメントがあります。 - -``` -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 2048 -# Atmel DFU loader 4096 (TMK Alt Controller) -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 -``` - -## MacOS での `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` - -これは brew での更新に関する問題で、avr-gcc が依存するシンボリックリンクを壊します。 - -解決法は全ての影響を受けたモジュールを削除し再インストールすることです。 - -``` -brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk -brew install qmk/qmk/qmk -brew link --force avr-gcc@8 -brew link --force arm-gcc-bin@8 -``` - -### `avr-gcc` と LUFA - -`avr-gcc` を更新し、LUFA に関連するエラーが表示された場合、例えば: - -`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` - -今のところ、Homebrew で `avr-gcc` を 8 にロールバックする必要があります。 - -``` -brew uninstall --force avr-gcc -brew install avr-gcc@8 -brew link --force avr-gcc@8 -``` - ### キーボードに書き込んだが何も起こらない、あるいはキーの押下が登録されない - ARM (rev6 planck、clueboard 60、hs60v2 など) でも同じ (Feb 2019) ARM ベースのチップ上での EEPROM の動作によって、保存された設定が無効になる場合があります。これはデフォルトレイヤに影響し、まだ調査中の特定の環境下でキーボードが使えなくなる*しれません*。EEPROM のリセットでこれが修正されます。 diff --git a/qmk/docs/ja/faq_debug.md b/qmk/docs/ja/faq_debug.md index b70edf63..39965b67 100644 --- a/qmk/docs/ja/faq_debug.md +++ b/qmk/docs/ja/faq_debug.md @@ -1,8 +1,8 @@ # デバッグの FAQ このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。 @@ -36,20 +36,6 @@ Linux のような OS でデバイスにアクセスするには、権限が必 - デバッグ print の代わりに 'print' 関数を使ってみてください。**common/print.h** を見てください。 - コンソール機能を持つ他のデバイスを切断します。[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97) を見てください。 -## Linux あるいは UNIX のようなシステムはスーパーユーザ権限を必要とします -権限付きで *hid_listen* を実行するために 'sudo' を使ってください。 -``` -$ sudo hid_listen -``` - -または rules ディレクトリにファイルを置いて、TMK デバイスのための *udev rule* を追加します。ディレクトリは各システムで異なるかもしれません。 - -File: /etc/udev/rules.d/52-tmk-keyboard.rules (Ubuntu の場合) -``` -# tmk keyboard products https://github.com/tmk/tmk_keyboard -SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" -``` - *** # 雑多なこと diff --git a/qmk/docs/ja/feature_auto_shift.md b/qmk/docs/ja/feature_auto_shift.md index 50d40b17..cf67b339 100644 --- a/qmk/docs/ja/feature_auto_shift.md +++ b/qmk/docs/ja/feature_auto_shift.md @@ -1,8 +1,8 @@ # 自動シフト: なぜシフトキーが必要ですか? キーをタップすると、その文字を取得します。キーをタップするが、*わずかに*長く押し続けると、シフト状態になります。ほら!シフトキーは必要ありません! @@ -109,7 +109,7 @@ AからZを含むアルファベット文字を自動シフトしません。 5. タイムアウトを増やすことに決めた場合は、`KC_ASUP` にマップしたキーを押し、ステップ1に戻ります。 6. 結果に満足したら、`KC_ASRP` にマップしたキーを押します。キーボードは `AUTO_SHIFT_TIMEOUT` の値を自動的に入力します。 7. 報告された値で `config.h` の `AUTO_SHIFT_TIMEOUT` を更新します。 -8. `config.h` から `AUTO_SHIFT_SETUP` を削除します。 +8. `config.h` に `AUTO_SHIFT_NO_SETUP` を追加します。 9. `KC_ASDN`、`KC_ASUP` および `KC_ASRP` のキーバインディングを削除します。 10. 新しいファームウェアをコンパイルしてアップロードします。 diff --git a/qmk/docs/ja/feature_backlight.md b/qmk/docs/ja/feature_backlight.md index 9647f215..88afa6c5 100644 --- a/qmk/docs/ja/feature_backlight.md +++ b/qmk/docs/ja/feature_backlight.md @@ -1,8 +1,8 @@ # バックライト :id=backlighting 多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。 @@ -165,8 +165,6 @@ BACKLIGHT_DRIVER = pwm 現在のところ、ハードウェア PWM のみがサポートされ、タイマー支援はなく、自動設定は提供されません。 -?> STM32F072 のバックライトサポートのテストは制限されています。人によって違うかもしれません。不明な場合は、`rules.mk` で `BACKLIGHT_ENABLE = no` を設定します。 - ### ソフトウェア PWM ドライバ :id=software-pwm-driver このモードでは、他のキーボードのタスクを実行中に PWM は「エミュレート」されます。追加のプラットフォーム設定なしで最大のハードウェア互換性を提供します。トレードオフは、キーボードが忙しい時にバックライトが揺れる可能性があることです。有効にするには、`rules.mk` に以下を追加します: diff --git a/qmk/docs/ja/feature_bluetooth.md b/qmk/docs/ja/feature_bluetooth.md index f7835dd5..3c71a18e 100644 --- a/qmk/docs/ja/feature_bluetooth.md +++ b/qmk/docs/ja/feature_bluetooth.md @@ -1,18 +1,18 @@ # Bluetooth ## Bluetooth の既知のサポートハードウェア 現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールをサポートします。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。 -| ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ | -|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -| Roving Networks RN-42 (Sparkfun Bluesmirf) | Bluetooth Classic | UART | `BLUETOOTH = RN42` | RN-42 | -| [Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633) | Bluetooth Low Energy | SPI | `BLUETOOTH = AdafruitBLE` | nRF51822 | +| ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ | +| ---------------------------------------------------------------- | -------------------- | ---------- | ------------------------- | ---------------- | +| Roving Networks RN-42 (Sparkfun Bluesmirf) | Bluetooth Classic | UART | `BLUETOOTH = RN42` | RN-42 | +| [Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633) | Bluetooth Low Energy | SPI | `BLUETOOTH = AdafruitBLE` | nRF51822 | まだサポートされていませんが、可能性のあるもの: * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479)。[tmk 実装がおそらく見つかります](https://github.com/tmk/tmk_keyboard/issues/514) @@ -30,7 +30,10 @@ Bluefruit UART friend は SPI friend に変換することができますが、 ## Bluetooth の Rules.mk オプション -これらのうちの1つだけを使ってください + +現在サポートされている Bluetooth チップセットは [N-キーロールオーバー (NKRO)](ja/reference_glossary.md#n-key-rollover-nkro) をサポートしていません。そのため、`rules.mk` に `NKRO_ENABLE = no` を含めなければなりません。 + +Bluetooth を有効にするには、以下のうちの1つだけを使ってください: * BLUETOOTH_ENABLE = yes (レガシーオプション) * BLUETOOTH = RN42 * BLUETOOTH = AdafruitBLE @@ -39,8 +42,8 @@ Bluefruit UART friend は SPI friend に変換することができますが、 これは複数のキーボードの出力が選択できる場合に使われます。現在のところ、これは USB と Bluetooth の両方をサポートするキーボードで、それらの間の切り替えのみが可能です。 -| 名前 | 説明 | -|----------|----------------------------------------------| +| 名前 | 説明 | +| ---------- | ------------------------------------- | | `OUT_AUTO` | USB と Bluetooth を自動的に切り替える | -| `OUT_USB` | USB のみ | -| `OUT_BT` | Bluetooth のみ | +| `OUT_USB` | USB のみ | +| `OUT_BT` | Bluetooth のみ | diff --git a/qmk/docs/ja/feature_combo.md b/qmk/docs/ja/feature_combo.md index 4fbd6847..bd46e88b 100644 --- a/qmk/docs/ja/feature_combo.md +++ b/qmk/docs/ja/feature_combo.md @@ -1,8 +1,8 @@ # コンボ コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。 @@ -60,7 +60,7 @@ combo_t key_combos[COMBO_COUNT] = { [XV_PASTE] = COMBO_ACTION(paste_combo), }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case ZC_COPY: if (pressed) { diff --git a/qmk/docs/ja/feature_dynamic_macros.md b/qmk/docs/ja/feature_dynamic_macros.md index f3e58713..951b9031 100644 --- a/qmk/docs/ja/feature_dynamic_macros.md +++ b/qmk/docs/ja/feature_dynamic_macros.md @@ -1,8 +1,8 @@ # 動的マクロ: ランタイムでのマクロの記録および再生 QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。 diff --git a/qmk/docs/ja/feature_leader_key.md b/qmk/docs/ja/feature_leader_key.md index 538358a6..61d6f5a8 100644 --- a/qmk/docs/ja/feature_leader_key.md +++ b/qmk/docs/ja/feature_leader_key.md @@ -1,8 +1,8 @@ # リーダーキー: 新しい種類のモディファイア もしあなたが Vim を使ったことがある場合、リーダーキーは何であるかを知っています。そうでなければ、素晴らしい概念を発見しようとしています。:) 例えば、Alt+Shift+W を押す(3つのキーを同時に押す)代わりに、キーの_シーケンス_を押すことができたらどうでしょう?つまり、特別なモディファイア (リーダーキー)を押して、続けて W と C を押すと (単純にキーを高速に繋げます)、何かが起こります。 diff --git a/qmk/docs/ja/feature_stenography.md b/qmk/docs/ja/feature_stenography.md index faed0ee1..45a799be 100644 --- a/qmk/docs/ja/feature_stenography.md +++ b/qmk/docs/ja/feature_stenography.md @@ -1,8 +1,8 @@ # QMK での速記 :id=stenography-in-qmk [速記](https://en.wikipedia.org/wiki/Stenotype)は裁判所のレポート、字幕および耳が不自由な人のためのリアルタイムの文字起こしで最もよく使われる記述方法です。速記では単語はスペル、音声およびショートカット(短い)ストロークが混在する音節ごとに音節化されます。プロの速記者は、標準的なタイピングで通常見られる負担を掛けずに、はるかに少ないエラー(99.9%より高い精度)で、200-300 WPM に到達できます。 diff --git a/qmk/docs/ja/feature_tap_dance.md b/qmk/docs/ja/feature_tap_dance.md index 01d06075..3d9d30ec 100644 --- a/qmk/docs/ja/feature_tap_dance.md +++ b/qmk/docs/ja/feature_tap_dance.md @@ -1,9 +1,9 @@ # タップダンス: 1つのキーが3つ、5つまたは100の異なる動作をします + original document: 0.10.33:docs/feature_tap_dance.md + git diff 0.10.33 HEAD -- docs/feature_tap_dance.md | cat +--> ## イントロダクション :id=introduction @@ -32,7 +32,9 @@ * `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: 1回タップすると `kc` キーコードが送信され、2回タップすると `layer` の状態をトグルします(これは `TG` レイヤーキーコードのように機能します)。 * `ACTION_TAP_DANCE_FN(fn)`: ユーザーキーマップに定義した指定の関数が呼び出されます。タップダンス実行の回数分タップすると、最後の時点で呼び出されます。 * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: タップする度にユーザーキーマップに定義した最初の関数が呼び出されます。タップダンスの実行が終わった時点で2番目の関数が呼び出され、タップダンスの実行をリセットするときに最後の関数が呼び出されます。 -* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: これは `ACTION_TAP_DANCE_FN_ADVANCED` と同じように機能します。しかし、`TAPPING_TERM` で事前に定義した時間に代えて、カスタマイズしたタップ時間を使えます。 +* ~~`ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`~~: これは `ACTION_TAP_DANCE_FN_ADVANCED` 関数と同じように機能します。しかし、`TAPPING_TERM` で事前に定義した時間の代わりに、カスタマイズしたタップ時間を使います。 + * [ここ](ja/custom_quantum_functions.md#Custom_Tapping_Term)で概説するように、これはキーごとのタッピング時間機能を優先して非推奨になりました。この特定のタップダンス機能を使う代わりに、使いたい特定の `TD()` マクロ(`TD(TD_ESC_CAPS)` のような)を確認する必要があります。 + 最初のオプションで、1つのキーに2つの役割を持たせる大抵のケースには十分です。例えば、`ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` は、1回タップすると `Space` を送信し、2回タップすると `Enter` を送信します。 @@ -55,7 +57,7 @@ 異なる場合、まず、古いタップダンスを処理し、続いて新しいタップダンスを登録します。 同じ場合、カウンタの値を増やし、タイマーをリセットします。 -このことは、あなたは再びキーをタップするまでの時間として `TAPPING_TERM` の時間を持っていることを意味します。そのため、あなたは1つの `TAPPING_TERM` の時間内に全てのタップを行う必要はありません。これにより、キーの反応への影響を最小限に抑えながら、より長いタップ回数を可能にします。 +このことは、あなたは再びキーをタップするまでの時間として `TAPPING_TERM` の時間を持っていることを意味します。そのため、あなたは1つの `TAPPING_TERM` の時間内に全てのタップを行う必要はありません。これにより、キーの反応への影響を最小限に抑えながら、より長いタップ回数を可能にします。 次は `matrix_scan_tap_dance()` です。この関数はタップダンスキーのタイムアウトを制御します。 diff --git a/qmk/docs/ja/flashing.md b/qmk/docs/ja/flashing.md index 15828514..b2c0dcd8 100644 --- a/qmk/docs/ja/flashing.md +++ b/qmk/docs/ja/flashing.md @@ -1,8 +1,8 @@ # 書き込みの手順とブートローダ情報 キーボードが使用するブートローダにはかなり多くの種類があり、ほぼ全てが異なる書き込みの方法を使います。幸いなことに、[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) のようなプロジェクトは、あまり深く考える必要無しに様々なタイプと互換性を持つことを目指していますが、この文章では様々なタイプのブートローダとそれらを書き込むために利用可能な方法について説明します。 @@ -244,3 +244,4 @@ BOOTLOADER = bootloadHID * `:dfu-util-split-left` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM の設定も行われます。 * `:dfu-util-split-right` - デフォルトのオプション (`:dfu-util`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」 EEPROM の設定も行われます。 * `:st-link-cli` - dfu-util ではなく、ST-LINK の CLI ユーティリティを介してファームウェアを書き込めます。 +* `:st-flash` - dfu-util ではなく、[STLink Tools](https://github.com/stlink-org/stlink) の `st-flash` ユーティリティを介してファームウェアを書き込めます。 diff --git a/qmk/docs/ja/getting_started_make_guide.md b/qmk/docs/ja/getting_started_make_guide.md index cbc824de..08005877 100644 --- a/qmk/docs/ja/getting_started_make_guide.md +++ b/qmk/docs/ja/getting_started_make_guide.md @@ -1,8 +1,8 @@ # より詳細な `make` 手順 `make` コマンドの完全な構文は `::` です: diff --git a/qmk/docs/ja/hardware_avr.md b/qmk/docs/ja/hardware_avr.md index 0cba943c..1308c3fd 100644 --- a/qmk/docs/ja/hardware_avr.md +++ b/qmk/docs/ja/hardware_avr.md @@ -2,8 +2,8 @@ このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。 diff --git a/qmk/docs/ja/hardware_keyboard_guidelines.md b/qmk/docs/ja/hardware_keyboard_guidelines.md index ebcbb155..2be09998 100644 --- a/qmk/docs/ja/hardware_keyboard_guidelines.md +++ b/qmk/docs/ja/hardware_keyboard_guidelines.md @@ -2,8 +2,8 @@ QMK は開始以来、コミュニティにおけるキーボードの作成や保守に貢献しているあなたのような人たちのおかげで飛躍的に成長しました。私たちが成長するにつれて、うまくやるためのいくつかのパターンを発見しました。他の人たちがあなたの苦労の恩恵を受けやすくするため、それにあわせてもらえるようお願いします。 diff --git a/qmk/docs/ja/i2c_driver.md b/qmk/docs/ja/i2c_driver.md index 56425a2f..9d348d58 100644 --- a/qmk/docs/ja/i2c_driver.md +++ b/qmk/docs/ja/i2c_driver.md @@ -2,8 +2,8 @@ QMK で使われる I2C マスタドライバには、MCU 間のポータビリティを提供するための一連の関数が用意されています。 @@ -83,8 +83,8 @@ STM32 MCU では、使用するハードウェアドライバにより、さま |-----------------------|--------------------------------------------------------------------------------------------------|---------| | `I2C1_SCL_BANK` | SCL に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | | `I2C1_SDA_BANK` | SDA に使うピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | -| `I2C1_SCL` | SCL のピン番号 (0-9) | `6` | -| `I2C1_SDA` | SDA のピン番号 (0-9) | `7` | +| `I2C1_SCL` | SCL のピン番号 (0-15) | `6` | +| `I2C1_SDA` | SDA のピン番号 (0-15) | `7` | | `I2C1_BANK`(非推奨) | 使用するピンのバンク (`GPIOA`, `GPIOB`, `GPIOC`)。後継は `I2C1_SCL_BANK`, `I2C1_SDA_BANK` です。 | `GPIOB` | ChibiOS I2C ドライバの設定項目は STM32 MCU の種類に依存します。 diff --git a/qmk/docs/ja/isp_flashing_guide.md b/qmk/docs/ja/isp_flashing_guide.md new file mode 100644 index 00000000..ae391813 --- /dev/null +++ b/qmk/docs/ja/isp_flashing_guide.md @@ -0,0 +1,284 @@ +# ISP 書き込みガイド + + + +ISP 書き込み(ICSP 書き込みと呼ぶ場合もあります)とは、マイクロコントローラーを直接プログラミングするプロセスです。 +これにより、ブートローダを交換したり、コントローラの「ヒューズ」を変更することができ、コントローラの速度や起動方法、その他のオプションなど、多くのハードウェアおよびソフトウェア関連の機能を制御します。 + +QMK の ISP 書き込みの主な用途は、AVRベースのコントローラ(Pro Micro、または V-USB チップ)のブートローダの書き込みまたは交換です。 + +?> これは Pro Micro や他の ATmega コントローラなどの AVR ベースのボードをプログラミングするためだけのものです。 Proton C などの Arm コントローラには使用できません。 + +## 破損したブートローダーの取り扱い + +ボードの書き込み/消去で問題が発生し、DFU ベースのコントローラで次のような不可解なエラーメッセージが表示される場合: + + libusb: warning [darwin_transfer_status] transfer error: timed out + dfu.c:844: -ETIMEDOUT: Transfer timed out, NAK 0xffffffc4 (-60) + atmel.c:1627: atmel_flash: flash data dfu_download failed. + atmel.c:1629: Expected message length of 1072, got -60. + atmel.c:1434: Error flashing the block: err -2. + ERROR + Memory write error, use debug for more info. + commands.c:360: Error writing memory data. (err -4) + + dfu.c:844: -EPIPE: a) Babble detect or b) Endpoint stalled 0xffffffe0 (-32) + Device is write protected. + dfu.c:252: dfu_clear_status( 0x7fff4fc2ea80 ) + atmel.c:1434: Error flashing the block: err -2. + ERROR + Memory write error, use debug for more info. + commands.c:360: Error writing memory data. (err -4) + +または、Pro Micro ベースのコントローラに対して次のようなメッセージが表示された場合: + + avrdude: butterfly_recv(): programmer is not responding + avrdude: butterfly_recv(): programmer is not responding + avrdude: verification error, first mismatch at byte 0x002a + 0x2b != 0x75 + avrdude: verification error; content mismatch + avrdude: verification error; content mismatch + + +あなたのボード/デバイスを再び動作させるには、ISP 書き込みが必要になるかもしれません。 + +## 必要なハードウェア + +実際に ISP の書き込みを行うには、以下のいずれか(その後に使用するプロトコルが続きます)が必要になります。 + +* [SparkFun PocketAVR](https://www.sparkfun.com/products/9825) - (USB Tiny) +* [USBtinyISP AVR Programmer Kit](https://www.adafruit.com/product/46) - (USB Tiny) +* [Teensy 2.0](https://www.pjrc.com/store/teensy.html) - (avrisp) +* [Pro Micro](https://www.sparkfun.com/products/12640) - (avrisp) +* [Bus Pirate](https://www.adafruit.com/product/237) - (buspirate) + +ISP 書き込みに使用できるデバイスは他にもありますが、これらが主なものです。 +また、すべての製品リンクは公式バージョンへのものです。他の場所で入手することもできます。 + +また、「ISP プログラマ」をプログラミングするデバイスに配線するためのものも必要になります。 +PCB の中には直接使用できる ISP ヘッダがあるものもありますが、そうではない場合が多いので、コントローラ自体にハンダ付けするか、別のスイッチや他のコンポーネントにハンダ付けする必要があるでしょう。 + +### ISP ファームウェア + +Teensy と Pro Micro のコントローラを ISP プログラマとして使用するには、コントローラに ISP ファームウェアを書き込む必要があります。 +それ以外のハードウェアは、あらかじめプログラムされているはずです。 +そのため、これらのコントローラの場合は、正しい hex ファイルをダウンロードしてから書き込んでください。 + +* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`) +* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`10/B6`) + +コントローラに書き込んだら、この hex ファイルはもう必要ありません。 + +## 必要なソフトウェア + +QMK ツールボックスは、このほとんど(すべて)に使用することができます。 + +ただし、Teensy 2.0 ボードを使っている場合は、[Teensy Loader](https:/www.pjrc.comteensyloader.html) を使えば、Teensy 2.0 ボードに書き込むことができます。 +あるいは、`avrdude` (`qmk_install.sh` の一部としてインストールされています) や、[AVRDUDESS](https:/blog.zakkemble.netavrdudess-a-gui-for-avrdude)(Windows 用) を使って、Pro Micro に書き込んだり、ISP を書き込んだりすることができます。 + +## 配線 + +これは非常に簡単です。次のようにして、相互に対応するものを接続します。 + +### SparkFun Pocket AVR + + PocketAVR RST <-> Keyboard RESET + PocketAVR SCLK <-> Keyboard B1 (SCLK) + PocketAVR MOSI <-> Keyboard B2 (MOSI) + PocketAVR MISO <-> Keyboard B3 (MISO) + PocketAVR VCC <-> Keyboard VCC + PocketAVR GND <-> Keyboard GND + +### Teensy 2.0 + + Teensy B0 <-> Keyboard RESET + Teensy B1 <-> Keyboard B1 (SCLK) + Teensy B2 <-> Keyboard B2 (MOSI) + Teensy B3 <-> Keyboard B3 (MISO) + Teensy VCC <-> Keyboard VCC + Teensy GND <-> Keyboard GND + +!> Teensy の B0 ピンはキーボードのコントローラの RESET/RST ピンと配線されています。 Teensy の RESET ピンをキーボードの RESET に配線しないでください。 + +### Pro Micro + + Pro Micro 10 (B6) <-> Keyboard RESET + Pro Micro 15 (B1) <-> Keyboard B1 (SCLK) + Pro Micro 16 (B2) <-> Keyboard B2 (MOSI) + Pro Micro 14 (B3) <-> Keyboard B3 (MISO) + Pro Micro VCC <-> Keyboard VCC + Pro Micro GND <-> Keyboard GND + +!> Pro Micro の 10/B6 ピンはキーボードのコントローラの RESET/RST ピンに配線されています。 Pro Micro の RESET ピンをキーボードの RESET に配線 ***しないでください***。 + +## キーボードへの書き込み + +ISP プログラマをセットアップして、キーボードに接続したら、キーボードに書き込みをします。 + +### ブートローダファイル + +普通の状態に戻す一番簡単で手っ取り早い方法は、キーボードにブートローダだけ書き込むことです。 +これが終れば、普通にキーボードを接続して、普通にキーボードに書き込みできるようになります。 + +標準のブートローダは[`util/` フォルダー](https://github.com/qmk/qmk_firmware/tree/master/util) にあります。 +チップの正しいブートローダを書き込んでください: + +* **Atmel DFU** + * [ATmega16U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega16u4_1.0.1.hex) + * [ATmega32U4](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1.0.0.hex) + * [AT90USB64](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb64_1.0.0.hex) + * [AT90USB128](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128_1.0.1.hex) +* **Caterina** + * [Pro Micro (5V/16MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro16.hex) + * [Pro Micro (3.3V/8MHz)](https://github.com/sparkfun/Arduino_Boards/blob/master/sparkfun/avr/bootloaders/caterina/Caterina-promicro8.hex) +* **BootloadHID (PS2AVRGB)** + * [ATmega32A](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_ps2avrgb_bootloadhid_1.0.1.hex) + +お使いのボードが何を使っているかわからない場合は、QMK のキーボード用の `rules.mk` ファイルを見てください。 +`MCU` と `BOOTLOADER` の行には必要な値が書かれています。これはボードのバージョンによって異なるかもしれません。 + +### 製造手法 + +ブートローダと通常のファームウェアを同時に書き込みたい場合、2つの方法があります。 +手動で行うか、コンパイル時に `:production` ターゲットを使って行うかです。 + +手動で行うには: + +1. オリジナルのファームウェアの .hex ファイルをテキストエディタで開きます +2. 最後の行を削除してください。(`:00000001FF`になっているはずです - これは EOF メッセージです) +3. ブートローダの内容全体を新しい行にコピーして(行間に空行を入れないように)、元のファイルの最後に貼り付けてください。 +4. これを新しいファイルとして `__production.hex` という名前で保存します。 + +?> ここでは他のブートローダも同じように使うことができますが、__ブートローダが必要で__、そうしないとまた ISP を使ってキーボードに新しいファームウェアを書き込まなければならなくなります。 + +#### QMK DFU ブートローダとプロダクションイメージの作成 + +コンパイル時に `:production` ターゲットを使用して、ボード用のファームウェア、QMK DFU ブートローダ、プロダクションファームウェアイメージを作成することができます。 +これが完了すると、3つのファイルが表示されます: + +* `_.hex` +* `__bootloader.hex` +* `__production.hex` + +QMK DFU ブートローダは `atmega32u4` コントローラ (AVR ベースの Planck ボードや Pro Micro など) でしかテストされておらず、他のコントローラではテストされていません。 +しかし、`atmega32a` や `atmega328p` のような V-USB コントローラでは間違いなく動作しません。 + +ブートローダかプロダクションファームウェアファイルのどちらかを書き込むことができます。 +プロダクションファームウェアファイルの方が、より多くのデータを書き込むので、書き込みに時間がかかります。 + +?> 注意:同じブートローダを使用しつづけるべきです。すでに DFU を使用している場合は、QMK DFU に切り替えても問題ありません。しかし、例えば Pro Micro に QMK DFU を書き込むには、追加の手順が必要になります。 + +## ブートローダ/プロダクションファイルの書き込み + +キーボードがどのデバイスにも接続されていないことを確認し、ISP プログラマを接続してください。 + +ブートローダの種類を変更したい場合は、コマンドラインを使用する必要があります。 + +### QMK Toolbox + +1. 'AVRISP device connected' または `USB Tiny device connected` が黄色で表示されます。 +2. `Open` ダイアログで正しいブートローダー/プロダクションの .hex ファイルを選択します(パスにスペースを含めることはできません) +3. 書きこもうとしているキーボード(ISP プログラマではなく)のための正しい `Microcontroller` オプションが選択されていることを確認してください。 +4. `Flash` を押します +5. 特にプロダクションファイルの場合、しばらくは何も出力されませんが、待ちましょう。 + +検証とヒューズのチェックに問題がなければ、完了です。 +ボードが自動的に再起動する場合があります。 +それ以外の場合は、Teensy のプラグを抜いて、キーボードを接続します。 +テスト中は、Teensy をキーボードに接続したままにすることができますが、すべてが正常に機能することを確認したら、はんだを外すか、配線を外すことをお勧めします。 + +### コマンドライン + +ターミナル(Windows の場合は `cmd`)を開いて、修正した .hex ファイルがある場所に移動します。 +ここでは、このファイルを `main.hex` と呼び、Teensy 2.0 が `COM3` ポートに接続されていると仮定します。 +よくわからない場合は、デバイスマネージャを開いて、`Ports > USB Serial Device` を探してください。ここにある COM ポートを使ってください。 +あなたはそれが正しいポートであることを確認することができます: + + avrdude -c avrisp -P COM3 -p atmega32u4 + +次のような出力が得られるはずです: + + avrdude: AVR device initialized and ready to accept instructions + + Reading | ################################################## | 100% 0.02s + + avrdude: Device signature = 0x1e9587 + + avrdude: safemode: Fuses OK + + avrdude done. Thank you. + +私たちのキーボードは `atmega32u4`(共通)を使用しているので、これが指定するチップです。 +以下が完全なコマンドです: + + avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i + +ボードが `atmega32a`(jj40 など)を使用している場合、コマンドは次のとおりです(最後の追加コードによりヒューズが正しく設定されます)。 + + avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m + +プログレスバーが表示されてから、以下が表示されるはずです。 + + avrdude: verifying ... + avrdude: 32768 bytes of flash verified + + avrdude: safemode: Fuses OK + + avrdude done. Thank you. + +これは全てうまく動作したことを示しています。 +ボードが自動的に再起動する場合もありますが、そうでない場合は、Teensy のプラグを抜いてキーボードを接続してください。 +テスト中は、Teensy をキーボードに接続したままにすることができますが、すべてが正常に機能することを確認したら、はんだを外すか、配線を外すことをお勧めします。 + +SparkFun PocketAVR Programmer や、他の USB Tiny ベースの ISP プログラマを使用している場合は、次のようなものを使用すると良いでしょう。 + + avrdude -c usbtiny -P usb -p atmega32u4 + +#### 上級者向け: ヒューズの変更 + +Pro Micro に QMK DFU を書き込むなど、ブートローダを切り替える場合は、ブートローダの hex ファイルの書き込みに加えて、ヒューズを変更する必要があります。 +これは、`caterina` (Pro Micro ブートローダ) と `dfu` では起動ルーチンの扱いが異なり、その動作はヒューズによって制御されるからです。 + +!> これは、ヒューズを変更することは、永久にあなたのコントローラをレンガ化(訳注:日本では文鎮化と呼ぶことが多い、コントローラがまったく無反応になる状態)することができる方法の1つであるため、それは非常に注意が必要な1つの領域です。 + +以下は、`atmega32u4`の 5V 16MHz 版(5V Pro Micro など)を想定しています。 + +`atmega32u4`の DFU の場合、必要なヒューズ設定は次のとおりです: + +| ヒューズ | 設定 | +|----------|------------------| +| Low | `0x5E` | +| High | `0xD9` or `0x99` | +| Extended | `0xC3` | + +High ヒューズは 0xD9 か 0x99 のどちらかになります。 +違いは、0xD9 は QMK Firmware がソフトウェアでも無効化している JTAG を無効化しているのに対し、0x99 は JTAG を無効化していないことです。 + +これを設定するには、`-U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m` をコマンドに追加します。 +そうすると、最終的なコマンドは次のようになります。 + + avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m + +`atmega32u4`の Caterina では、以下があなたに必要なヒューズの設定です。 + +| ヒューズ | 設定 | +|----------|--------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xCB` | + +これを設定するには、コマンドに `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m` を追加します。 +これで、最終的なコマンドは次のようになるはずです。 + + avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m + + +別のコントローラーを使用している場合や、別の設定を希望する場合は、この[AVR ヒューズ計算機](http:/www.engbedded.comfusecalc)を使用して、より適切な値を見つけることができます。 + +## ヘルプ + +ご質問・ご不明な点がありましたら、お気軽に[issue を開いてください](https://github.com/qmk/qmk_firmware/issues/new)! diff --git a/qmk/docs/ja/other_vscode.md b/qmk/docs/ja/other_vscode.md index d4137ca4..e786b08f 100644 --- a/qmk/docs/ja/other_vscode.md +++ b/qmk/docs/ja/other_vscode.md @@ -1,8 +1,8 @@ # QMK 開発用の Visual Studio Code のセットアップ [Visual Studio Code](https://code.visualstudio.com/) (VS Code) は多くの異なるプログラミング言語をサポートするオープンソースのコードエディタです。 @@ -53,7 +53,7 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ ### VS Code の設定 -最初に、IntelliSense をセットアップする必要があります。これは厳密には必要ではありませんが、あなたの人生をずっと楽にします。これを行うには、QMK ファームウェアフォルダに `.vscode/c_cpp_properies.json` ファイルを作成する必要があります。これは全て手動で行うことができますが、ほとんどの作業は既に完了しています。 +最初に、IntelliSense をセットアップする必要があります。これは厳密には必要ではありませんが、あなたの人生をずっと楽にします。これを行うには、QMK ファームウェアフォルダに `.vscode/c_cpp_properties.json` ファイルを作成する必要があります。これは全て手動で行うことができますが、ほとんどの作業は既に完了しています。 [このファイル](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) を取得して保存します。MSYS2 をデフォルトの場所にインストールしなかった、または WSL か LxSS を使っている場合、このファイルを編集する必要があります。 @@ -64,7 +64,7 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ 次に、VSCode に統合ターミナルとして表示されるように、MSYS2 ウィンドウを設定します。これには多くの利点があります。ほとんどの場合で、エラー上で Ctrl + クリックするとこれらのファイルにジャンプできます。これによりデバッグがはるかに簡単になります。また、他のウィンドウへジャンプする必要が無いという点でも優れています。 -1. File > Preferences > > Settings をクリックします。 +1. ファイル > ユーザー設定 > > 設定 をクリックします。 2. 右上の {} ボタンをクリックし、`settings.json` ファイルを開きます。 3. ファイルの内容を以下のように設定します: @@ -82,11 +82,11 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ } ``` - ここに既に設定がある場合は、最初と最後の波括弧の間に全てを追加します。 + ここに既に設定がある場合は、最初と最後の波括弧の間に全てを追加し、既存の設定を新しく追加された設定とカンマで区切ります。 ?> MSYS2 を別のフォルダにインストールした場合は、`terminal.integrated.shell.windows` のパスをシステムの正しいパスに変更する必要があります。 -4. Ctrl-` (grave) を押して、ターミナルを起動します。 +4. Ctrl-` (Grave) を押して、ターミナルを起動するか、表示 > ターミナル (コマンド `workbench.action.terminal.toggleTerminal`)に進みます。まだターミナルが開いていない場合は、新しいターミナルが開きます。 これにより、ワークスペースフォルダ(つまり `qmk_firmware` フォルダ)でターミナルが起動し、キーボードをコンパイルすることができます。 @@ -115,8 +115,8 @@ VS Code のようなフル機能のエディタの使用は、プレーンテキ いずれかの拡張機能をインストールしたら、再起動します。 # QMK 用の VS Code の設定 -1. File > Open Folder をクリックします +1. ファイル > フォルダーを開く をクリックします 2. GitHub からクローンした QMK ファームウェアフォルダを開きます。 -3. File > Save Workspace As... をクリックします +3. ファイル > 名前を付けてワークスペースを保存... をクリックします これで、VS Code で QMK ファームウェアをコーディングする準備ができました。 diff --git a/qmk/docs/ja/pr_checklist.md b/qmk/docs/ja/pr_checklist.md new file mode 100644 index 00000000..9026ac48 --- /dev/null +++ b/qmk/docs/ja/pr_checklist.md @@ -0,0 +1,134 @@ +# PR チェックリスト + + + +これは、提出された PR を QMK の協力者がレビューする際に何をチェックするのかの非網羅的なチェックリストです。 + +これらの推奨事項に矛盾がある場合は、このドキュメントに対して [issue を開く](https://github.com/qmk/qmk_firmware/issues/new)か、[Discord](https://discord.gg/Uq7gcHh) の QMK コラボレータに連絡することをお勧めします。 + +## 一般的な PR + +- PRは、ソースリポジトリ上の `master` ではないブランチを使って提出する必要があります + - これは、あなたの PR にとって別のブランチをターゲットにするという意味ではなく、むしろ自分の master ブランチで作業をしていないという意味です + - もし PR の提出者が自分の `master` ブランチを使っている場合は、マージ後に ["git の使い方"](https://docs.qmk.fm/#/ja/newbs_git_using_your_master_branch) ページへのリンクが表示されます - (このドキュメントの最後にはメッセージの内容が含まれます) +- 新しく追加されたディレクトリとファイル名は小文字でなければなりません + - 上流のソースが元々大文字を使っていた場合 (ChibiOS や他のリポジトリからインポートしたファイルなど)、このルールは緩和されるかもしれません + - 十分な正当性がある場合 (既存のコアファイルとの整合性など) は、このルールを緩和することができます。 + - ボードデザイナーがキーボードの名前を大文字にした場合は、十分な正当性とはみとめられません +- すべての `*.c` および `*.h` ソースファイルの有効なライセンスヘッダ + - 一貫性のために GPL2/GPL3 が推奨されています + - 他のライセンスも許可されていますが、GPL と互換性があり、再配布が許可されていなければなりません。異なるライセンスを使うと、PR がマージされるのをほぼ確実に遅らせることになります +- QMK コードベースの「ベストプラクティス」に従う + - これは網羅的なリストではありませんし、時間が経つにつれて修正される可能性が高いです + - ヘッダファイルでは、`#ifndef` インクルードガードの代わりに `#pragma once` を使います + - 「旧式の」 GPIO/I2C/SPI 関数を使用しない - 正当な理由がない限り、QMK の抽象化を使用しなければなりません (怠惰は正当な理由にはなりません) + - タイミングの抽象化にも従う必要があります: + - `_delay_ms()` のかわりに `wait_ms()` を。(`#include ` も消します) + - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) を参照してください + - 新しい抽象化が有用だと思う場合は、次のことをお勧めします: + - 機能が完成するまで自分のキーボードでプロトタイプを作成する + - Discord の QMK コラボレータと話し合う + - 個別のコア変更としてそれをリファクタリングする + - あなたのキーボードからそのコピーを削除する +- PR を開く前にリベースしてマージの競合をすべて修正します (ヘルプやアドバイスが必要な場合は、Discord で QMK コラボレータに連絡してください)。 + +## キーマップの PR + +- 特定のボードファイルをインクルードするよりも `#include QMK_KEYBOARD_H` を推奨します +- レイヤーは `#define` よりも `enum` が好まれます +- カスタムキーコードは `#define` ではなく `enum` が必要です。最初のエントリには `= SAFE_RANGE` が必要です +- LAYOUT マクロ呼び出しのパラメータの途中の改行ではバックスラッシュ(`\`)は不要です +- スペーシング(コンマまたはキーコードの最初の文字の配置など)に注意を払うと、見栄えの良いキーマップになります + +## キーボードの PR + +終了した PR(インスピレーションを得るために、以前のレビューコメントセットは、自分のレビューのピンポンをなくすのに役立ちます): +https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard + +- `info.json` + - 有効な URL + - 有効なメンテナ + - Configurator で正しく表示されること(Ctrl + Shift + I を押してローカルファイルをプレビューし、高速入力をオンにして順序を確認する) +- `readme.md` + - 標準テンプレートがあること + - 書き込みコマンドが `:flash` で終わっていること + - 有効なハードウェアの入手方法へのリンク (手配線の場合を除く) -- プライベートな共同購入は問題ありませんが、一回限りのプロトタイプは疑問視されます。オープンソースの場合は、ファイルへのリンクを提供してください + - ボードをブートローダーモードにリセットする方法を明確に説明してください + - キーボードの写真、できれば PCB の写真も添付してください +- `rules.mk` + - `MIDI_ENABLE`、`FAUXCLICKY_ENABLE`、`HD44780_ENABLE` は削除されました + - `# Enable Bluetooth with the Adafruit EZ-Key HID` は `# Enable Bluetooth` に変更されました + - 機能の有効化に関する `(-/+サイズ)` コメントはなくなりました + - ブートローダが指定されている場合は、代替ブートローダのリストを削除します + - [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk)の同等の MCU と比較した場合、同じ値の場合、デフォルトの MCU パラメータの再定義がないこと +- キーボードの `config.h` + - `PRODUCT` 値に `MANUFACTURER` を繰り返さないでください + - `#define DESCRIPTION` は要りません + - マジックキーオプション、 MIDI オプション、HD44780 コンフィギュレーションは要りません + - ユーザー設定の設定可能な `#define` はキーマップ `config.h` に移動する必要があります + - "`DEBOUNCING_DELAY`" の代りに "`DEBOUNCE`" を使います + - キーボードが QMK で起動するために最低限必要なコードが存在する必要があります + - マトリックスと重要なデバイスの初期化コード + - (カスタムキーコードや特別なアニメーションなど)商用キーボードの既存の機能をミラーリングする場合は、`default` ではないキーマップを使って処理する必要があります +- `keyboard.c` + - 空の `xxxx_xxxx_kb()` または他の weak-define のデフォルト実装関数が削除されていること + - コメントアウトされた関数も削除されていること + - `matrix_init_board()` などが `keyboard_pre_init_kb()` に移行されました。[keyboard_pre_init*](https://docs.qmk.fm/#/ja/custom_quantum_functions?id=keyboard_pre_init_-function-documentation) を参照してください + - カスタムマトリックスを使用する場合は、`CUSTOM_MATRIX = lite` を選択し、標準のデバウンスを許可します。[マトリックスコードの部分置き換え](https://docs.qmk.fm/#/ja/custom_matrix?id=lite) を参照してください +- `keyboard.h` + - 先頭に `#include "quantum.h"` を置きます + - `LAYOUT` マクロは、該当する場合は標準の定義を使用してください + - 該当する場合はコミュニティレイアウトマクロ名を使用します (`LAYOUT`/`LAYOUT_all`よりも優先されます) +- キーマップの `config.h` + - キーボードから `rules.mk` や `config.h` が重複していないこと +- `keymaps/default/keymap.c` + - `QMKBEST`/`QMKURL` が削除されていること + - `MO(_LOWER)`および `MO(_RAISE)`キーコードまたは同等のものを使用していて、キーマップに両方のキーを押したときに adjust レイヤーがある場合 - キーマップに直接 adjust レイヤーに入るキーコードがない場合(`MO(_ADJUST)`のように)次のように記述します... + ``` + layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + } + ``` + ...キーマップの `process_record_user()` 内で `layer_on()`、 `update_tri_layer()` を手動で処理する代わりに。 +- default (および via) のキーマップは「素朴」でなければなりません。 + - 他のユーザーが独自のユーザー固有のキーマップを開発するための「クリーンな状態」として使用するための最低限のもの。 + - これらのキーマップで推奨される標準レイアウト(可能な場合) +- PR の提出者は、同じ PR に機能を紹介する個人的な(または豪華な)キーマップを持たせることができますが、「デフォルト」のキーマップに埋め込むべきではありません +- PR の提出者はまた、既存の商用キーボードへ QMK を移植する場合、その商用製品の既存の機能を反映する「製造業者に一致する」キーマップを持つことができます + +さらに、ChibiOS に固有で: +- 既存の ChibiOS ボード定義を使用することを**強く**推奨します。 + - 多くの場合、同等の Nucleo ボードは、同じファミリの異なるフラッシュサイズまたはわずかに異なるモデルで使用できます。 + - 例:STM32L082KZ の場合、STM32L073RZ に類似しているため、rules.mkで `BOARD = ST_NUCLEO64_L073RZ` を使用できます。 + - QMK は ChibiOS のアップグレード時のメンテナンス負担が継続的に発生するため、可能な限りカスタムボード定義を持たないように移行しています。 +- ボードの定義が避けられない場合、`board.c` には標準の `__early_init()` (通常の ChibiOS ボードの定義と同じ) と空の `boardInit()` を実装しなければなりません。 + - Arm/ChibiOS [早期初期化](https:/docs.qmk.fm/#/ja/platformdev_chibios_earlyinit?id=board-init)を参照してください + - `__early_init()`は、`early_hardware_init_pre()` または `early_hardware_init_post()` で適切に置き換える必要があります + - `boardInit()` は `board_init()` に移行する必要があります + +## コアの PR + +- `develop` ブランチをターゲットにする必要があります。これは、その後、breaking change のタイムラインで `master` にマージされます。 +- その他の注意事項 TBD + - 投稿された変更の幅を考えると、コアはもっと主観的です + +--- + +## 注意事項 + +人々が自分の `master` ブランチを使用する場合、マージ後に以下を投稿します: + +``` +For future reference, we recommend against committing to your `master` branch as you've done here, because pull requests from modified `master` branches can make it more difficult to keep your QMK fork updated. It is highly recommended for QMK development – regardless of what is being done or where – to keep your master updated, but **NEVER** commit to it. Instead, do all your changes in a branch (branches are basically free in Git) and issue PRs from your branches when you're developing. + +There are instructions on how to keep your fork updated here: + +[**Best Practices: Your Fork's Master: Update Often, Commit Never**](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) + +[Fixing Your Branch](https://docs.qmk.fm/#/newbs_git_resynchronize_a_branch) will walk you through fixing up your `master` branch moving forward. If you need any help with this just ask. + +Thanks for contributing! +``` diff --git a/qmk/docs/ja/ref_functions.md b/qmk/docs/ja/ref_functions.md index e9c45fde..029797ff 100644 --- a/qmk/docs/ja/ref_functions.md +++ b/qmk/docs/ja/ref_functions.md @@ -1,8 +1,8 @@ # キーボードをより良くするための便利なコア関数のリスト QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。 @@ -48,7 +48,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ### `update_tri_layer_state(state, x, y, z)` もう1つの関数は `update_tri_layer_state(state, x, y, z)` です。この関数は [`layer_state_set_*` 関数](ja/custom_quantum_functions.md#layer-change-code)から呼び出されることを意図しています。これは、キーコードを使ってレイヤーを変更するたびに、これがチェックされることを意味します。したがって、`LT(layer, kc)` を使ってレイヤーを変更すると、同じレイヤーチェックが引き起こされます。 -このメソッドの注意点は、`x` および `y` レイヤーをオンにしないと、`z` レイヤーにアクセスできないことです。レイヤー `z` のみをアクティブにしようとすると、このコードが実行され、使用前にレイヤー `z` がオフになるからです。 +このメソッドの注意点は2つあります: +1. `x` および `y` レイヤーをオンにしないと、`z` レイヤーにアクセスできません。これは、レイヤー `z` のみをアクティブにしようとすると、このコードが実行され、使用前にレイヤー `z` がオフになるからです。 +2. レイヤーは最上位の番号から処理されるので、`z` は `x` や `y` よりも上位のレイヤーでなければなりません。そうでなければアクセスできない場合があります。 #### 例 diff --git a/qmk/docs/ja/reference_info_json.md b/qmk/docs/ja/reference_info_json.md index 708f7c19..f5889a10 100644 --- a/qmk/docs/ja/reference_info_json.md +++ b/qmk/docs/ja/reference_info_json.md @@ -1,8 +1,8 @@ # `info.json` このファイルは [QMK API](https://github.com/qmk/qmk_api) によって使われます。このファイルは [QMK Configurator](https://config.qmk.fm/) がキーボードの画像を表示するために必要な情報を含んでいます。ここにメタデータを設定することもできます。 @@ -36,7 +36,7 @@ * `height` * オプション: キー単位でのレイアウトの高さ * `key_count` - * **必須**: このレイアウトのキーの数 + * オプション: このレイアウトのキーの数 * `layout` * 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。 diff --git a/qmk/docs/ja/tap_hold.md b/qmk/docs/ja/tap_hold.md new file mode 100644 index 00000000..bf23ae4a --- /dev/null +++ b/qmk/docs/ja/tap_hold.md @@ -0,0 +1,196 @@ +# タップホールド設定オプション + + + +タップホールドオプションは素晴らしいものですが、問題が無いわけではありません。デフォルト設定を適切なものにしようとしましたが、一部の人にとってまだ問題を引き起こすかもしれません。 + +次のオプションによりタップホールドキーの挙動を変更することができます。 + +## タッピング時間 + +以下の機能の全ての核心は、タッピング時間の設定です。これにより、何をタップとし、何をホールドとするかが決まります。これが自然に感じられるぴったりのタイミングは、キーボードごと、スイッチごと、あるいはキーごとに異ることもありえます。 + +`config.h` に以下の設定を追加することで、この時間を全体的に設定することができます: + +```c +#define TAPPING_TERM 200 +``` + +この設定はミリ秒で定義され、デフォルトは 200ms です。これは大多数の人にとっての適切な平均値です。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: +```c +#define TAPPING_TERM_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; + } +} +``` + + +## 許容ホールド + +[PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/) 以降、新しい `config.h` オプションがあります: + +```c +#define PERMISSIVE_HOLD +``` + +これは高速なタイピストや高い `TAPPING_TERM` 設定に対して、タップとホールドキー(モッドタップのような)の動作を向上させます。 + +モッドタップキーを押し、他のキーをタップ(押して放す)して、モッドタップキーを放すという動作の全てをタッピング時間内に行うと、両方のキーのタッピング機能が出力されます。 + +例えば: + +- `SFT_T(KC_A)` を押す +- `KC_X` を押す +- `KC_X` を放す +- `SFT_T(KC_A)` を放す + +通常、これら全てを `TAPPING_TERM` (デフォルト: 200ms) 内で行うと、ファームウェアとホストシステムによって `ax` として登録されます。許容ホールドを有効にすると、別のキーがタップされた場合にモッドタップキーを修飾キーと見なすように処理を変更し、 `X` (`SHIFT`+`x`) と登録されます。 + +?> `モッドタップ割り込みの無視`を有効にしている場合、これにより両方の動きが変更されます。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define PERMISSIVE_HOLD_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + +## モッドタップ割り込みの無視 + +この設定を有効にするには、これを `config.h` に追加してください: + +```c +#define IGNORE_MOD_TAP_INTERRUPT +``` + +許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、通常は両方のキーのタッピング機能が出力されます。これはローリングコンボキーには望ましくないかもしれません。 + +`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。 + +例えば: + +- `SFT_T(KC_A)` を押す +- `KC_X` を押す +- `SFT_T(KC_A)` を放す +- `KC_X` を放す + +通常、これは `X` (`SHIFT`+`x`) を送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、`X` (`SHIFT`+`x`) を出力します。 + + +?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。 + +?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return true; + default: + return false; + } +} +``` + +## タッピング強制ホールド + +`タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します: + +```c +#define TAPPING_FORCE_HOLD +``` + +タップの後でユーザがキーをホールドすると、ホールド機能がアクティブになるのではなく、デフォルトでタッピング機能が繰り返されます。これにより、デュアルロールキーのタッピング機能を自動繰り返しする機能を維持することができます。 +`TAPPING_FORCE_HOLD` は、デュアルロールキーをタップした後ホールドした場合、ユーザがホールド機能をアクティブにする機能を削除します。 + +例: + +- `SFT_T(KC_A)` を押す +- `SFT_T(KC_A)` を放す +- `SFT_T(KC_A)` を押す +- タッピング時間が終了するまで待ちます... +- `SFT_T(KC_A)` を放す + +デフォルトの設定では、最初に放したときに `a` が送信され、2回目の押下で `a` が送信され、コンピュータに自動リピート機能を作動させることができます。 + +`TAPPING_FORCE_HOLD` を使うと、2回目の押下は Shift として解釈され、それをタップして使った後ですぐに修飾キーとして使うことができます。 + +!> `TAPPING_FORCE_HOLD` はタッピングトグル(`TT` レイヤーキーコード、ワンショットタップトグルなど)を使うものをすべて破壊します。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define TAPPING_FORCE_HOLD_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + +## レトロタッピング + +`レトロタッピング`を有効にするには、以下を `config.h` に追加してください: + +```c +#define RETRO_TAPPING +``` + +他のキーを押さずにデュアルファンクションキーを押して放しても何も起こりません。レトロタッピングを有効にすると、他のキーを押さずにキーを放すと、元のキーコードがタッピング時間外であっても送信されます。 + +例えば、他のキーを押すことなく `LT(2, KC_SPACE)` を押したり放したりしても何も起こりません。これを有効にすると、代わりに `KC_SPACE` を送信します。 + +## キー別の関数にキーレコードを含めるのはなぜですか? + +「キー別」の関数全てにキーレコードを含んでいることに気付いたかもしれません。そしてなぜそうしたのか不思議に思っているかもしれません。 + +まぁ、それは単純に本当にカスタマイズのためです。ただし、具体的には、それはキーボードの配線方法によって異なります。例えば、各行が実際にキーボードのマトリックスの1行を使っている場合、キーコード全体をチェックする代わりに、`if (record->event.row == 3)` を使うほうが簡単かもしれません。これは、ホームキー行でタップホールドタイプのキーを使っている人にとって特に便利です。そのため、通常のタイピングを妨げないように微調整することができるのではないでしょうか。 + +## `*_kb` や `*_user` 関数が無いのはなぜですか? + +QMK にある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。 diff --git a/qmk/docs/ja/understanding_qmk.md b/qmk/docs/ja/understanding_qmk.md new file mode 100644 index 00000000..74b37398 --- /dev/null +++ b/qmk/docs/ja/understanding_qmk.md @@ -0,0 +1,195 @@ +# QMK のコードの理解 + + + +このドキュメントでは、QMK ファームウェアがどのように機能するかを非常に高いレベルから説明しようとしています。基本的なプログラミングの概念を理解していることを前提としていますが、(実例を示す必要がある場合を除き) C に精通していることを前提にはしていません。以下のドキュメントの基本的な知識があることを前提としています。 + +* [入門](ja/getting_started_introduction.md) +* [キーボードがどのように動作するか](ja/how_keyboards_work.md) +* [FAQ](ja/faq.md) + +## スタートアップ + +QMK は他のコンピュータプログラムと何ら変わりないと考えることができます。開始され、タスクを実行し、そして終了します。プログラムのエントリーポイントは、他の C プログラムと同様に、`main()` 関数です。ただし、QMK を初めて触る人は、`main()` 関数が複数の場所に現れるため、混乱するかもしれません。また、どれを見ればよいか分かりにくいかもしれません。 + +複数ある理由は、QMK は様々なプラットフォームをサポートするからです。最も一般的なプラットフォームは `lufa` です。これは atmega32u4 のような AVR プロセッサ上で実行されます。また、`chibios` および `vusb` もサポートします。 + +ここでは AVR プロセッサに焦点を当てます。これは `lufa` プラットフォームを使います。`main()` 関数は [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028) にあります。関数にざっと目を通すと、(ホストへの USB も含めて)設定された全てのハードウェアが初期化され、プログラムのコア部分が [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069) で開始されることが分かります。これが[メインループ](#the-main-loop)です。 + +## メインループ + +コードのこの部分は、同じ命令セットを永久にループ処理するため、「メインループ」と呼ばれます。ここはキーボードに必要なことを実行させる関数を QMK が呼び出す場所です。一見、多くの機能を持つように見えるかもしれませんが、大抵の場合、コードは `#define` によって無効にされます。 + +``` + keyboard_task(); +``` + +ここで、全てのキーボードの固有の機能が実行されます。`keyboard_task()` のソースコードは [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216) にあり、マトリックスの変化を検知し、LED の状態をオンオフする責任があります。 + +`keyboard_task()` に以下を処理するコードがあります: + +* [マトリックスのスキャン](#matrix-scanning) +* マウスの処理 +* シリアルリンク +* ビジュアライザ +* キーボードの状態の LED (Caps Lock, Num Lock, Scroll Lock) + +#### マトリックスのスキャン + +マトリックスのスキャンはキーボードファームウェアのコアの機能です。これは今どのキーが押されているかを検知するプロセスであり、キーボードはこの機能を1秒間に何度も何度も実行します。ファームウェアの CPU 時間の 99% はマトリックスのスキャンに費やされていると言っても過言ではありません。 + +実際のマトリックスの検知には様々な方法がありますが、それはこのドキュメントの対象外です。マトリックスのスキャンをブラックボックスとして扱っても問題ありません。マトリックスの現在の状態を求めると、以下のようなデータ構造を取得します: + + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +これは 4行x5列のテンキー(訳注: 5行x4列の間違いと思われます)のマトリックスを表す直接的な表現のデータ構造です。キーが押されると、マトリックス内のそのキーの位置が、 `0` ではなく `1` として返されます。 + +マトリックスのスキャンは1秒間に何度も実行されます。正確なレートは様々ですが、知覚できるような遅延を避けるために、秒間に少なくとも10回実行します。 + +##### マトリックスから物理的なレイアウトへのマップ + +キーボード上の各スイッチの状態が分かると、それをキーコードへマップする必要があります。QMK ではキーコードへのマップは C マクロを使うことで行われ、C マクロにより物理的なレイアウトの定義はキーコードの定義から分離されています。(訳注:「キーコードの定義」は「キーコードのマトリクス配列による定義」と思われる) + +キーボードレベルで、キーボードのマトリックスを物理キーにマップする C マクロ (一般的には、`LAYOUT()` という名前)を定義します。マトリックスにスイッチがない場所がある場合、このマクロを使って KC_NO を事前に埋め込むことができ、キーマップの定義を扱いやすくすることができます。以下は、テンキー用の `LAYOUT()` マクロです: + +```c +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k42 \ +) { \ + { k00, k01, k02, k03, }, \ + { k10, k11, k12, k13, }, \ + { k20, k21, k22, KC_NO, }, \ + { k30, k31, k32, k33, }, \ + { k40, KC_NO, k42, KC_NO } \ +} +``` + +`LAYOUT()` マクロの2つ目のブロックが、上記のマトリックススキャン配列とどのように一致しているかに注目してください。このマクロはマトリックスのスキャン配列をキーコードにマップするものです。ただし、17キーのテンキーを見ると、マトリックスにはスイッチが置けるが、キーが大きいために実際にはスイッチが無い箇所が3つあることが分かります。これらのスペースに `KC_NO` を設定したので、キーマップ定義には必要ありません。 + +このマクロを使って、少し変わったマトリックスのレイアウト、例えば [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h) を扱うこともできます。その説明はこのドキュメントの範囲外です。 + +##### キーコードの割り当て + +キーマップレべルでは、上記の `LAYOUT()` マクロを使って、物理的な場所からマトリックスの場所にマッピングします。以下のようになります: + +``` +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT) +} +``` + +これら全ての引数が、前のセクションの `LAYOUT()` マクロの前半とどのように一致しているかについて注目してください。このようにして、キーコードを取得して、それを前述のマトリックススキャンにマップします。 + +##### 状態変更の検知 + +上記のマトリックススキャンはある時点のマトリックスの状態を伝えますが、コンピュータは変更のみを知りたいだけで、現在の状態を気にしません。QMK は最後のマトリックススキャンの結果を格納し、このマトリックスから結果を比較して、いつキーが押されたか放されたかを決定します。 + +例を見てみましょう。キーボードスキャンループの途中に移動して、前のスキャンが以下のようになっていることがわかったとします: + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +現在のスキャンが完了すると、以下のように見えるとします: + +``` +{ + {1,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +キーマップと比較すると、押されたキーが KC_NLCK であることが分かります。ここから、`process_record` 関数群を呼び出します。 + + + +##### Process Record + +`process_record()` 関数自体は一見簡単に見えますが、その内部は QMK の様々なレベルで機能を上書きするためのゲートウェイが隠されています。キーボード/キーマップレベルの機能について調べる必要があるときは、以下に列挙した一連のイベントを手引帳として使います。`rules.mk` またはほかの場所で設定されたオプションに応じて、最終的なファームウェアに以下の関数のサブセットのみが含まれます。 + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206) + * [このレコードをキーコードにマップする](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226) + * [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27) + * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119) + * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62) + * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79) + * [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58) + * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19) + * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141) + * [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) は、以下のいずれかを呼び出します: + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20) + * [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77) + * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94) + * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264) + * [Quantum 固有のキーコードを識別して処理する](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291) + +この一連のイベントの中の任意のステップで (`process_record_kb()` のような)関数は `false` を返して、以降の処理を停止することができます。 + +この呼び出しの後で、`post_process_record()` が呼ばれます。これはキーコードが通常処理された後に実行する必要がある追加のクリーンアップを処理するために使うことができます。 + +* [`void post_process_record(keyrecord_t *record)`]() + * [`void post_process_record_quantum(keyrecord_t *record)`]() + * [このレコードをキーコードにマップする]() + * [`void post_process_clicky(uint16_t keycode, keyrecord_t *record)`]() + * [`void post_process_record_kb(uint16_t keycode, keyrecord_t *record)`]() + * [`void post_process_record_user(uint16_t keycode, keyrecord_t *record)`]() + + diff --git a/qmk/docs/mod_tap.md b/qmk/docs/mod_tap.md index ced0beba..0dc35ff0 100644 --- a/qmk/docs/mod_tap.md +++ b/qmk/docs/mod_tap.md @@ -27,22 +27,25 @@ This key would activate Left Control and Left Shift when held, and send Escape w For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap: -|Key |Aliases |Description | -|------------|-----------------------------------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|--------------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped | +|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | +|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped | +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped | |`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| ## Caveats @@ -52,3 +55,7 @@ Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since an Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes. To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly. + +## Other Resources + +See the [Tap-Hold Configuration Options](tap_hold.md) for additional flags that tweak Mod-Tap behavior. diff --git a/qmk/docs/other_vscode.md b/qmk/docs/other_vscode.md index d132afaa..823f8b49 100644 --- a/qmk/docs/other_vscode.md +++ b/qmk/docs/other_vscode.md @@ -81,7 +81,7 @@ Now, we will set up the MSYS2 window to show up in VSCode as the integrated term ?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system. -4. Hit Ctrl-`\`` (Grave) to bring up the terminal or go to View > Terminal (command `workbench.action.terminal.toggleTerminal`). A new terminal will be opened if there isn‘t one already. +4. Hit Ctrl-` (Grave) to bring up the terminal or go to View > Terminal (command `workbench.action.terminal.toggleTerminal`). A new terminal will be opened if there isn‘t one already. This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard. diff --git a/qmk/docs/ref_functions.md b/qmk/docs/ref_functions.md index 997c3fa2..17609507 100644 --- a/qmk/docs/ref_functions.md +++ b/qmk/docs/ref_functions.md @@ -43,7 +43,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ### `update_tri_layer_state(state, x, y, z)` The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check. -The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. +There are a couple of caveats to this method: +1. You cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. +2. Because layers are processed from the highest number `z` should be a higher layer than `x` and `y` or you may not be able to access it. #### Example @@ -97,7 +99,7 @@ To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset m ## Tap random key -If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`). +If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`). ?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords. diff --git a/qmk/docs/reference_info_json.md b/qmk/docs/reference_info_json.md index badfabd9..3ca62c71 100644 --- a/qmk/docs/reference_info_json.md +++ b/qmk/docs/reference_info_json.md @@ -31,7 +31,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev * `height` * Optional: The height of the layout in Key Units * `key_count` - * **Required**: The number of keys in this layout + * Optional: The number of keys in this layout * `layout` * A list of Key Dictionaries describing the physical layout. See the next section for more details. diff --git a/qmk/docs/tap_hold.md b/qmk/docs/tap_hold.md index 589ec318..9ffbfde8 100644 --- a/qmk/docs/tap_hold.md +++ b/qmk/docs/tap_hold.md @@ -1,22 +1,22 @@ # Tap-Hold Configuration Options -While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people. +While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people. These options let you modify the behavior of the Tap-Hold keys. ## Tapping Term -The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. +The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. -You can set the global time for this by adding the following setting to your `config.h`: +You can set the global time for this by adding the following setting to your `config.h`: ```c #define TAPPING_TERM 200 ``` -This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. +This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. -For more granular control of this feature, you can add the following to your `config.h`: +For more granular control of this feature, you can add the following to your `config.h`: ```c #define TAPPING_TERM_PER_KEY ``` @@ -45,9 +45,9 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new #define PERMISSIVE_HOLD ``` -This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. +This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. -If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys. +If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the tapping function for both keys. For Instance: @@ -56,7 +56,7 @@ For Instance: - `KC_X` Up - `SFT_T(KC_A)` Up -Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). +Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). ?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. @@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`: #define IGNORE_MOD_TAP_INTERRUPT ``` -Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys. +Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the tapping function for both keys. This may not be desirable for rolling combo keys. Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod). @@ -126,27 +126,27 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { ## Tapping Force Hold -To enable `tapping force hold`, add the following to your `config.h`: +To enable `tapping force hold`, add the following to your `config.h`: ```c #define TAPPING_FORCE_HOLD ``` -When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key. +When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `TAPPING_FORCE_HOLD` removes that ability to let the user activate the hold function instead, in the case of holding the dual-role key after having tapped it. Example: -- SFT_T(KC_A) Down -- SFT_T(KC_A) Up -- SFT_T(KC_A) Down -- wait more than tapping term... -- SFT_T(KC_A) Up +- `SFT_T(KC_A)` Down +- `SFT_T(KC_A)` Up +- `SFT_T(KC_A)` Down +- wait until the tapping term expires... +- `SFT_T(KC_A)` Up With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function. With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap. -!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle). +!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle). For more granular control of this feature, you can add the following to your `config.h`: @@ -169,7 +169,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { ## Retro Tapping -To enable `retro tapping`, add the following to your `config.h`: +To enable `retro tapping`, add the following to your `config.h`: ```c #define RETRO_TAPPING @@ -179,11 +179,11 @@ Holding and releasing a dual function key without pressing another key will resu For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. -## Why do we include the key record for the per key functions? +## Why do we include the key record for the per key functions? -One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. +One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. -Well, it's simply really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. +Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. ## Why is there no `*_kb` or `*_user` functions?! diff --git a/qmk/drivers/issi/is31fl3731.c b/qmk/drivers/issi/is31fl3731.c index ef9e9162..110bdc1b 100644 --- a/qmk/drivers/issi/is31fl3731.c +++ b/qmk/drivers/issi/is31fl3731.c @@ -233,4 +233,5 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) { IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]); } } + g_led_control_registers_update_required[index] = false; } diff --git a/qmk/drivers/issi/is31fl3736.c b/qmk/drivers/issi/is31fl3736.c index 9bd8fecf..7dece1b1 100644 --- a/qmk/drivers/issi/is31fl3736.c +++ b/qmk/drivers/issi/is31fl3736.c @@ -264,5 +264,6 @@ void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) { IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]); // IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i]); } + g_led_control_registers_update_required = false; } } diff --git a/qmk/drivers/issi/is31fl3737.c b/qmk/drivers/issi/is31fl3737.c index 37c5c58e..8647c93c 100644 --- a/qmk/drivers/issi/is31fl3737.c +++ b/qmk/drivers/issi/is31fl3737.c @@ -218,5 +218,6 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) { IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]); // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]); } + g_led_control_registers_update_required = false; } } diff --git a/qmk/drivers/issi/is31fl3741.c b/qmk/drivers/issi/is31fl3741.c index bc434fb2..1b533c9b 100644 --- a/qmk/drivers/issi/is31fl3741.c +++ b/qmk/drivers/issi/is31fl3741.c @@ -97,14 +97,13 @@ bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0); for (int i = 0; i < 342; i += 18) { - g_twi_transfer_buffer[0] = i % 180; - if (i == 180) { // unlock the command register and select PG2 IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1); } + g_twi_transfer_buffer[0] = i % 180; memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18); #if ISSI_PERSISTENCE > 0 @@ -251,4 +250,6 @@ void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t g_scaling_registers[pled->driver][pled->r] = red; g_scaling_registers[pled->driver][pled->g] = green; g_scaling_registers[pled->driver][pled->b] = blue; + + g_scaling_registers_update_required[pled->driver] = true; } diff --git a/qmk/drivers/issi/is31fl3741.h b/qmk/drivers/issi/is31fl3741.h index ed535093..2df0c5b1 100644 --- a/qmk/drivers/issi/is31fl3741.h +++ b/qmk/drivers/issi/is31fl3741.h @@ -23,14 +23,13 @@ #include typedef struct is31_led { - uint8_t driver : 2; - uint16_t r; - uint16_t g; - uint16_t b; + uint32_t driver : 2; + uint32_t r : 10; + uint32_t g : 10; + uint32_t b : 10; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -extern const is31_led g_is31_indicator_leds[DRIVER_INDICATOR_LED_TOTAL]; void IS31FL3741_init(uint8_t addr); void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); diff --git a/qmk/drivers/oled/oled_driver.c b/qmk/drivers/oled/oled_driver.c index 9ae737ca..ba11db1d 100644 --- a/qmk/drivers/oled/oled_driver.c +++ b/qmk/drivers/oled/oled_driver.c @@ -75,8 +75,14 @@ along with this program. If not, see . #define CHARGE_PUMP 0x8D // Misc defines -#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) -#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) +#ifndef OLED_BLOCK_COUNT +# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) +#endif +#ifndef OLED_BLOCK_SIZE +# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) +#endif + +#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) // i2c defines #define I2C_CMD 0x00 @@ -101,6 +107,7 @@ OLED_BLOCK_TYPE oled_dirty = 0; bool oled_initialized = false; bool oled_active = false; bool oled_scrolling = false; +uint8_t oled_brightness = OLED_BRIGHTNESS; uint8_t oled_rotation = 0; uint8_t oled_rotation_width = 0; uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values @@ -187,7 +194,7 @@ bool oled_init(uint8_t rotation) { } } - static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, 0x8F, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x40, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON}; + static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, OLED_BRIGHTNESS, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x20, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON}; if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { print("display_setup2 failed\n"); return false; @@ -212,7 +219,7 @@ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { void oled_clear(void) { memset(oled_buffer, 0, sizeof(oled_buffer)); oled_cursor = &oled_buffer[0]; - oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type + oled_dirty = OLED_ALL_BLOCKS_MASK; } static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { @@ -262,13 +269,14 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) { void oled_render(void) { // Do we have work to do? + oled_dirty &= OLED_ALL_BLOCKS_MASK; if (!oled_dirty || oled_scrolling) { return; } // Find first dirty block uint8_t update_start = 0; - while (!(oled_dirty & (1 << update_start))) { + while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) { ++update_start; } @@ -314,7 +322,7 @@ void oled_render(void) { oled_on(); // Clear dirty flag - oled_dirty &= ~(1 << update_start); + oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start); } void oled_set_cursor(uint8_t col, uint8_t line) { @@ -404,9 +412,9 @@ void oled_write_char(const char data, bool invert) { // Dirty check if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { uint16_t index = oled_cursor - &oled_buffer[0]; - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); // Edgecase check if the written data spans the 2 chunks - oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE)); } // Finally move to the next char @@ -441,7 +449,7 @@ void oled_pan(bool left) { } } } - oled_dirty = ~((OLED_BLOCK_TYPE)0); + oled_dirty = OLED_ALL_BLOCKS_MASK; } oled_buffer_reader_t oled_read_raw(uint16_t start_index) { @@ -456,7 +464,7 @@ void oled_write_raw_byte(const char data, uint16_t index) { if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; if (oled_buffer[index] == data) return; oled_buffer[index] = data; - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); } void oled_write_raw(const char *data, uint16_t size) { @@ -464,21 +472,28 @@ void oled_write_raw(const char *data, uint16_t size) { for (uint16_t i = 0; i < size; i++) { if (oled_buffer[i] == data[i]) continue; oled_buffer[i] = data[i]; - oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); } } void oled_write_pixel(uint8_t x, uint8_t y, bool on) { - if (x >= OLED_DISPLAY_WIDTH || y >= OLED_DISPLAY_HEIGHT) { + if (x >= oled_rotation_width) { return; } - uint16_t index = x + (y / 8) * OLED_DISPLAY_WIDTH; - if (on) { - oled_buffer[index] |= (1 << (y % 8)); - } else { - oled_buffer[index] &= ~(1 << (y % 8)); + uint16_t index = x + (y / 8) * oled_rotation_width; + if (index >= OLED_MATRIX_SIZE) { + return; + } + uint8_t data = oled_buffer[index]; + if (on) { + data |= (1 << (y % 8)); + } else { + data &= ~(1 << (y % 8)); + } + if (oled_buffer[index] != data) { + oled_buffer[index] = data; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); } - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); } #if defined(__AVR__) @@ -501,7 +516,7 @@ void oled_write_raw_P(const char *data, uint16_t size) { uint8_t c = pgm_read_byte(data++); if (oled_buffer[i] == c) continue; oled_buffer[i] = c; - oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); } } #endif // defined(__AVR__) @@ -534,6 +549,22 @@ bool oled_off(void) { return !oled_active; } +bool is_oled_on(void) { return oled_active; } + +uint8_t oled_set_brightness(uint8_t level) { + uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level}; + if (oled_brightness != level) { + if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) { + print("set_brightness cmd failed\n"); + return oled_brightness; + } + oled_brightness = level; + } + return oled_brightness; +} + +uint8_t oled_get_brightness(void) { return oled_brightness; } + // Set the specific 8 lines rows of the screen to scroll. // 0 is the default for start, and 7 for end, which is the entire // height of the screen. For 128x32 screens, rows 4-7 are not used. @@ -595,7 +626,7 @@ bool oled_scroll_off(void) { return oled_scrolling; } oled_scrolling = false; - oled_dirty = -1; + oled_dirty = OLED_ALL_BLOCKS_MASK; } return !oled_scrolling; } diff --git a/qmk/drivers/oled/oled_driver.h b/qmk/drivers/oled/oled_driver.h index 9a4b98d2..72ab2124 100644 --- a/qmk/drivers/oled/oled_driver.h +++ b/qmk/drivers/oled/oled_driver.h @@ -141,6 +141,10 @@ along with this program. If not, see . #if !defined(OLED_FONT_HEIGHT) # define OLED_FONT_HEIGHT 8 #endif +// Default brightness level +#if !defined(OLED_BRIGHTNESS) +# define OLED_BRIGHTNESS 255 +#endif #if !defined(OLED_TIMEOUT) # if defined(OLED_DISABLE_TIMEOUT) @@ -257,6 +261,16 @@ bool oled_on(void); // Returns true if the screen was off or turns off bool oled_off(void); +// Returns true if the oled is currently on, false if it is +// not +bool is_oled_on(void); + +// Sets the brightness of the display +uint8_t oled_set_brightness(uint8_t level); + +// Gets the current brightness of the display +uint8_t oled_get_brightness(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); diff --git a/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/config.h b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/config.h new file mode 100644 index 00000000..7ae88057 --- /dev/null +++ b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/config.h @@ -0,0 +1,42 @@ +/* + * Dan's Magicforce 68 (MF68) QMK Keyboard + * Copyright (C) Dan + * + * This file is part of Dan's MF68 QMK Keyboard. + * + * Dan's MF68 QMK Keyboard 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 3 of the License, or + * (at your option) any later version. + * + * Dan's MF68 QMK Keyboard 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 Dan's MF68 QMK Keyboard. If not, see . + */ + +#pragma once + +#undef MANUFACTURER +#define MANUFACTURER Dan + +#undef PRODUCT +#define PRODUCT Magicforce 68 QMK + +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 20 + +// Disable backlight breathing +#undef BACKLIGHT_BREATHING + +// Set USB polling rate to 1000 Hz +#define USB_POLLING_INTERVAL_MS 1 + +// Enable NKRO on boot +#define FORCE_NKRO + +// Backlight idle timeout in seconds +#define BACKLIGHT_IDLE_TIMEOUT 1200 \ No newline at end of file diff --git a/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c new file mode 100644 index 00000000..6f917992 --- /dev/null +++ b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c @@ -0,0 +1,232 @@ +/* + * Dan's Magicforce 68 (MF68) QMK Keyboard + * Copyright (C) Dan + * + * This file is part of Dan's MF68 QMK Keyboard. + * + * Dan's MF68 QMK Keyboard 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 3 of the License, or + * (at your option) any later version. + * + * Dan's MF68 QMK Keyboard 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 Dan's MF68 QMK Keyboard. If not, see . + */ + +#include QMK_KEYBOARD_H + +#define KC_ KC_TRNS + +#define KC_FN1 MO(_FN) +#define KC_FN2 LT(_FN, KC_CAPS) + +#define KC_BLUP BL_INC // Backlight increase +#define KC_BLDN BL_DEC // Backlight decrease +#define KC_BLTOG BL_TOGG // Backlight toggle +#define KC_TERM TERM_ON // Terminal mode on +#define KC_REC1 DM_REC1 // Record macro 1 +#define KC_PLY1 DM_PLY1 // Play macro 1 +#define KC_REC2 DM_REC2 // Record macro 2 +#define KC_PLY2 DM_PLY2 // Play macro 1 +#define KC_RSTP DM_RSTP // Stop macro recording + +enum { + _QWERTY, + _FN +}; + +/* ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ + ┃Esc ┃ 1! ┃ 2@ ┃ 3# ┃ 4$ ┃ 5% ┃ 6^ ┃ 7& ┃ 8* ┃ 9( ┃ 0) ┃ -_ ┃ =+ ┃ ←─ ┃ ┃Ins ┃PgUp┃ + ┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ + ┃ Tab ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ \| ┃ ┃Del ┃PgDn┃ + ┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ + ┃ Caps ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ;: ┃ '" ┃ Enter ┃ Magicforce + ┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ + ┃ Shift ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ ,< ┃ .> ┃ /? ┃ Shift ┃ ┃ ↑ ┃ Dan + ┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ + ┃Ctrl ┃ GUI ┃ Alt ┃ ━━━━━ ┃ Alt ┃ Fn ┃Ctrl ┃ ┃ ← ┃ ↓ ┃ → ┃ + ┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ */ + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_kc( /* Default layer + ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ */ + GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, /* + ┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, /* + ┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ */ + FN2 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , /* + ┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , /* + ┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ */ + LCTL ,LGUI ,LALT , SPACE ,RALT , FN1 ,RCTL , LEFT,DOWN,RGHT /* + ┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ */), + +[_FN] = LAYOUT_kc( /* FN & CAPS layer + ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11, F12, RSTP , PSCR,HOME, /* + ┣Esc ┻ 1! ┻ 2@ ┻ 3# ┻ 4$ ┻ 5% ┻ 6^ ┻ 7& ┻ 8* ┻ 9( ┻ 0) ┻ -_ ┻ =+ ┻━┳━ ←─ ━┫ ┣Ins ╋PgUp┫ */ + ,PLY1,PLY2, , , , , , 7 , 8 , 9 ,BLDN,BLUP,BLTOG , ,END , /* + ┣ Tab ━┻ Q ━┻ W ━┻ E ━┻ R ━┻ T ━┻ Y ━┻ U ━┻ I ━┻ O ━┻ P ━┻ [{ ┻ ]} ┻━ \| ━┫ ┗Del ┻PgDn┛ */ + , , , , , , , , 4 , 5 , 6 , , TERM , /* + ┣━ Caps ━┻ A ━┻ S ━┻ D ━┻ F ━┻ G ━┻ H ━┻ J ━┻ K ━┻ L ━┻ ;: ┻ '" ┻━ Enter ━┫ ┏━━━━┓ */ + ,REC1,REC2, , ,MSTP, ,MUTE, 1 , 2 , 3 , , VOLU, /* + ┣━━ Shift ━┻ Z ━┻ X ━┻ C ━┻ V ━┻ B ━┻ N ━┻ M ━┻ ,< ┻ .> ╋ /? ┻┳━━ Shift ━━┻━╋ ↑ ━╋━━━━┓ */ + , , , MPLY , 0 , , , MPRV,VOLD,MNXT /* + ┗Ctrl ┻ GUI ┻ Alt ┻━━━━━━━━━━━━ Space ━━━━━━━━━━━━┻ Alt ┻ Fn ━┻Ctrl ┛ ┗ ← ━┻ ↓ ━┻ → ━┛ */) +}; +// clang-format on + +// Initialization code +// ------------------- + +void keyboard_post_init_user(void) { + backlight_level(2); +} + +// Custom backlight driver +// ----------------------- + +// http://jared.geek.nz/2013/feb/linear-led-pwm +float cie1931(float x) { + x *= 100.0 / BACKLIGHT_LEVELS; + float y; + + if (x < 8) { + y = x / 902.3; + } else { + y = (x + 16.0) / 116.0; + y = y * y * y; + } + + return round(y * 255); +} + +void backlight_init_ports(void) { + setPinOutput(BACKLIGHT_PIN); + writePinLow(BACKLIGHT_PIN); + + TCCR1A = _BV(COM1A1) | _BV(WGM11); + TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); + + ICR1 = 0xFFU; // Set PWM levels to 255 (enables high-frequency PWM) +} + +void backlight_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + if (level == 0) { + TCCR1A &= ~(_BV(COM1A1)); // Disable PWM + } else { + TCCR1A |= _BV(COM1A1); // Enable PWM + } + + OCR1A = cie1931(level); +} + +// Custom macro hooks +// ------------------ + +// Redefine with lower delay +void led_blink(void) { + backlight_toggle(); + wait_ms(25); + backlight_toggle(); +} + +void dynamic_macro_record_start_user(void) { + led_blink(); +} + +void dynamic_macro_play_user(int8_t direction) { + led_blink(); +} + +void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { + led_blink(); +} + +void dynamic_macro_record_end_user(int8_t direction) { + led_blink(); +} + +// Custom Caps Lock backlight behaviour +// ------------------------------------ + +void led_set_user(uint8_t usb_led) { + // This exists because I don't like the backlight to turn OFF when the Caps Lock is ON. + // That is, this will turn the backlight ON (at half the brightness) when the Caps Lock is ON as well. + static bool prev_is_caps_on; + bool is_caps_on = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK); + + if (prev_is_caps_on != is_caps_on) { + prev_is_caps_on = is_caps_on; + + if (is_caps_on) { + backlight_set(BACKLIGHT_LEVELS / 2); + } else { + if (is_backlight_enabled()) { + backlight_set(get_backlight_level()); + } else { + backlight_set(0); + } + } + } + + // Turn on the Pro Micro's on-board LEDs for Caps Lock + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Set to low + setPinOutput(B0); + writePinLow(B0); + setPinOutput(D5); + writePinLow(D5); + } else { + // Set to Hi-Z + setPinInput(B0); + setPinInput(D5); + } +} + +// Backlight idle timeout feature +// ------------------------------ + +static uint32_t timer; +static bool is_idle; + +void matrix_scan_user() { + // Check the timer only if the keyboard is not idle + if (!is_idle) { + if (timer_elapsed32(timer) >= (uint32_t) BACKLIGHT_IDLE_TIMEOUT * 1000) { + is_idle = true; + + // Both backlight_level and backlight_level_noeeprom modify the global backlight config (not useful) + // Instead, use backlight_set in order to restore the current backlight level later on + backlight_set(0); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Reset timer on each keypress + timer = timer_read32(); + + // Enable backlight back only when keyboard is idling (which implies the backlight was turned off previously) + if (is_idle) { + is_idle = false; + + // Set back the original backlight level only if it is actually enabled globally + if (is_backlight_enabled()) { + // The current backlight level can be obtained with get_backlight_level + backlight_set(get_backlight_level()); + } + } + + return true; +} diff --git a/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md new file mode 100644 index 00000000..158235b5 --- /dev/null +++ b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md @@ -0,0 +1,38 @@ +# Dan's Magicforce 68 (MF68) QMK Keyboard + +> https://github.com/delivrance + +``` +┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ +┃Esc ┃ 1! ┃ 2@ ┃ 3# ┃ 4$ ┃ 5% ┃ 6^ ┃ 7& ┃ 8* ┃ 9( ┃ 0) ┃ -_ ┃ =+ ┃ ←─ ┃ ┃Ins ┃PgUp┃ +┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ +┃ Tab ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ \| ┃ ┃Del ┃PgDn┃ +┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ +┃ Caps ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ;: ┃ '" ┃ Enter ┃ Magicforce +┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ +┃ Shift ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ ,< ┃ .> ┃ /? ┃ Shift ┃ ┃ ↑ ┃ Dan +┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ +┃Ctrl ┃ GUI ┃ Alt ┃ ━━━━━ ┃ Alt ┃ Fn ┃Ctrl ┃ ┃ ← ┃ ↓ ┃ → ┃ +┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ +``` + +## Features + +- Right ALT and FN keys swapped. +- USB Polling rate set to 1000 Hz (1 ms). +- Dynamic macros enabled (2 macros). +- Transient EEPROM to avoid wearing (r/w from/to RAM). +- NKRO enabled on boot (up to 248 keys at once). +- CAPS LOCK key used as alias to the FN key. +- Pro Micro's on-board LEDs used for CAPS LOCK status. +- Backlight also used as CAPS LOCK status indicator. +- Both Grave and Tilde characters embedded in ESC. +- Media control keys and extra number keys (numpad). +- Flicker-free backlight thanks to high-frequency PWM mode. +- Linear backlight brightness intensity (better for human eyes). +- Backlight turns off automatically after 20 minutes idle. +- Backlight brightness levels set to 20 (5% steps) + 1 (off). +- Backlight breathing completely disabled. +- Link Time Optimizations to reduce compiled size. +- QMK Terminal enabled for fun (pretty useless in practice). +- Performing ~1550 matrix scans per second. diff --git a/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk new file mode 100644 index 00000000..5ac2ce5c --- /dev/null +++ b/qmk/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_DRIVER = custom +NKRO_ENABLE = yes +TERMINAL_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes + +# Use RAM (fake EEPROM, transient) instead of real EEPROM +EEPROM_DRIVER = transient + +# LTO: Link Time Optimizations. Reduce compiled size +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/qmk/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index f5d0787e..b8947cce 100644 --- a/qmk/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/qmk/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" #include "analog.h" #include "pointing_device.h" diff --git a/qmk/keyboards/40percentclub/nein/config.h b/qmk/keyboards/40percentclub/nein/config.h index e053b487..b96f5fbe 100644 --- a/qmk/keyboards/40percentclub/nein/config.h +++ b/qmk/keyboards/40percentclub/nein/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0A0C +#define VENDOR_ID 0x3430 // "40" +#define PRODUCT_ID 0x9999 #define DEVICE_VER 0x9999 #define MANUFACTURER di0ib #define PRODUCT The nein Keyboard diff --git a/qmk/keyboards/40percentclub/nein/info.json b/qmk/keyboards/40percentclub/nein/info.json index aaadc718..2a28ffc0 100644 --- a/qmk/keyboards/40percentclub/nein/info.json +++ b/qmk/keyboards/40percentclub/nein/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "nein", - "url": "", + "url": "http://www.40percent.club/2019/04/nein.html", "maintainer": "qmk", "width": 3, "height": 3, diff --git a/qmk/keyboards/40percentclub/nein/keymaps/via/keymap.c b/qmk/keyboards/40percentclub/nein/keymaps/via/keymap.c new file mode 100644 index 00000000..528de824 --- /dev/null +++ b/qmk/keyboards/40percentclub/nein/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x3( + KC_MUTE, KC_HOME, KC_MPLY, + MO(1), KC_UP, KC_END, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, + _______, _______, RGB_MOD, + KC_MPRV, _______, KC_MNXT + ), + [2] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/40percentclub/nein/keymaps/via/rules.mk b/qmk/keyboards/40percentclub/nein/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/40percentclub/nein/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/45_ats/45_ats.c b/qmk/keyboards/45_ats/45_ats.c new file mode 100644 index 00000000..0a2c069a --- /dev/null +++ b/qmk/keyboards/45_ats/45_ats.c @@ -0,0 +1,19 @@ + /* + Copyright 2020 Alec Penland + Copyright 2020 Garret Gartner + + 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 "45_ats.h" diff --git a/qmk/keyboards/45_ats/45_ats.h b/qmk/keyboards/45_ats/45_ats.h new file mode 100644 index 00000000..42d1940e --- /dev/null +++ b/qmk/keyboards/45_ats/45_ats.h @@ -0,0 +1,59 @@ + /* + Copyright 2020 Alec Penland + Copyright 2020 Garret Gartner + + 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 . + */ + +#pragma once + +#include "quantum.h" + +#define xxx KC_NO + +#define LAYOUT_split_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k36, k38, k39, k3A, k3B, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, xxx, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, xxx, k2D }, \ + { k30, k31, k32, k33, xxx, xxx, k36, xxx, k38, k39, k3A, k3B, xxx, k3D } \ +} + +#define LAYOUT_625_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k36, k39, k3A, k3B, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, xxx, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, xxx, k2D }, \ + { k30, k31, k32, xxx, xxx, xxx, k36, xxx, xxx, k39, k3A, k3B, xxx, k3D } \ +} + +#define LAYOUT_600_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k36, k38, k39, k3A, k3B, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, xxx, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, xxx, k2D }, \ + { k30, k31, k32, xxx, xxx, xxx, k36, xxx, k38, k39, k3A, k3B, xxx, k3D } \ +} diff --git a/qmk/keyboards/45_ats/config.h b/qmk/keyboards/45_ats/config.h new file mode 100644 index 00000000..4733095b --- /dev/null +++ b/qmk/keyboards/45_ats/config.h @@ -0,0 +1,52 @@ + /* + Copyright 2020 Alec Penland + Copyright 2020 Garret Gartner + + 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xAB13 +#define PRODUCT_ID 0x4511 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Abec13 +#define PRODUCT 45ATS + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +#define ENCODERS_PAD_A { B4 } +#define ENCODERS_PAD_B { B5 } + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D3, D5, D7, D6 } +#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, B7, F6, F5, F4, C7, F7, C6, B6, D4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 diff --git a/qmk/keyboards/45_ats/info.json b/qmk/keyboards/45_ats/info.json new file mode 100644 index 00000000..ead5090a --- /dev/null +++ b/qmk/keyboards/45_ats/info.json @@ -0,0 +1,169 @@ +{ + "keyboard_name": "45-ATS", + "url": "", + "maintainer": "The-Royal", + "width": 14.25, + "height": 4.25, + "layouts": { + "LAYOUT_split_space": { + "layout": [ + {"label":"", "x":0, "y":0}, + {"label":"", "x":1, "y":0}, + {"label":"", "x":2, "y":0}, + {"label":"", "x":3, "y":0}, + {"label":"", "x":4, "y":0}, + {"label":"", "x":5, "y":0}, + {"label":"", "x":6, "y":0}, + {"label":"", "x":7, "y":0}, + {"label":"", "x":8, "y":0}, + {"label":"", "x":9, "y":0}, + {"label":"", "x":10, "y":0}, + {"label":"", "x":11, "y":0}, + {"label":"", "x":12, "y":0}, + {"label":"", "x":13.5, "y":0}, + {"label":"", "x":0, "y":1, "w":1.25}, + {"label":"", "x":1.25, "y":1}, + {"label":"", "x":2.25, "y":1}, + {"label":"", "x":3.25, "y":1}, + {"label":"", "x":4.25, "y":1}, + {"label":"", "x":5.25, "y":1}, + {"label":"", "x":6.25, "y":1}, + {"label":"", "x":7.25, "y":1}, + {"label":"", "x":8.25, "y":1}, + {"label":"", "x":9.25, "y":1}, + {"label":"", "x":10.25, "y":1}, + {"label":"", "x":11.25, "y":1, "w":1.75}, + {"label":"", "x":13.5, "y":1}, + {"label":"", "x":0, "y":2, "w":1.75}, + {"label":"", "x":1.75, "y":2}, + {"label":"", "x":2.75, "y":2}, + {"label":"", "x":3.75, "y":2}, + {"label":"", "x":4.75, "y":2}, + {"label":"", "x":5.75, "y":2}, + {"label":"", "x":6.75, "y":2}, + {"label":"", "x":7.75, "y":2}, + {"label":"", "x":8.75, "y":2}, + {"label":"", "x":9.75, "y":2}, + {"label":"", "x":10.75, "y":2, "w":1.25}, + {"label":"", "x":12.25, "y":2.25}, + {"label":"", "x":13.5, "y":2}, + {"label":"", "x":0, "y":3, "w":1.25}, + {"label":"", "x":1.25, "y":3}, + {"label":"", "x":2.25, "y":3, "w":1.25}, + {"label":"", "x":3.5, "y":3, "w":2.75}, + {"label":"", "x":6.25, "y":3, "w":2.25}, + {"label":"", "x":8.5, "y":3, "w":1.25}, + {"label":"", "x":9.75, "y":3, "w":1.25}, + {"label":"", "x":11.25, "y":3.25}, + {"label":"", "x":12.25, "y":3.25}, + {"label":"", "x":13.25, "y":3.25} + ] + }, + "LAYOUT_625_space": { + "layout": [ + {"label":"", "x":0, "y":0}, + {"label":"", "x":1, "y":0}, + {"label":"", "x":2, "y":0}, + {"label":"", "x":3, "y":0}, + {"label":"", "x":4, "y":0}, + {"label":"", "x":5, "y":0}, + {"label":"", "x":6, "y":0}, + {"label":"", "x":7, "y":0}, + {"label":"", "x":8, "y":0}, + {"label":"", "x":9, "y":0}, + {"label":"", "x":10, "y":0}, + {"label":"", "x":11, "y":0}, + {"label":"", "x":12, "y":0}, + {"label":"", "x":13.5, "y":0}, + {"label":"", "x":0, "y":1, "w":1.25}, + {"label":"", "x":1.25, "y":1}, + {"label":"", "x":2.25, "y":1}, + {"label":"", "x":3.25, "y":1}, + {"label":"", "x":4.25, "y":1}, + {"label":"", "x":5.25, "y":1}, + {"label":"", "x":6.25, "y":1}, + {"label":"", "x":7.25, "y":1}, + {"label":"", "x":8.25, "y":1}, + {"label":"", "x":9.25, "y":1}, + {"label":"", "x":10.25, "y":1}, + {"label":"", "x":11.25, "y":1, "w":1.75}, + {"label":"", "x":13.5, "y":1}, + {"label":"", "x":0, "y":2, "w":1.75}, + {"label":"", "x":1.75, "y":2}, + {"label":"", "x":2.75, "y":2}, + {"label":"", "x":3.75, "y":2}, + {"label":"", "x":4.75, "y":2}, + {"label":"", "x":5.75, "y":2}, + {"label":"", "x":6.75, "y":2}, + {"label":"", "x":7.75, "y":2}, + {"label":"", "x":8.75, "y":2}, + {"label":"", "x":9.75, "y":2}, + {"label":"", "x":10.75, "y":2, "w":1.25}, + {"label":"", "x":12.25, "y":2.25}, + {"label":"K", "x":13.5, "y":2}, + {"label":"", "x":0, "y":3, "w":1.25}, + {"label":"", "x":1.25, "y":3}, + {"label":"", "x":2.25, "y":3, "w":1.25}, + {"label":"", "x":3.5, "y":3, "w":6.25}, + {"label":"", "x":9.75, "y":3, "w":1.25}, + {"label":"", "x":11.25, "y":3.25}, + {"label":"", "x":12.25, "y":3.25}, + {"label":"", "x":13.25, "y":3.25} + ] + }, + "LAYOUT_600_space": { + "layout": [ + {"label":"", "x":0, "y":0}, + {"label":"", "x":1, "y":0}, + {"label":"", "x":2, "y":0}, + {"label":"", "x":3, "y":0}, + {"label":"", "x":4, "y":0}, + {"label":"", "x":5, "y":0}, + {"label":"", "x":6, "y":0}, + {"label":"", "x":7, "y":0}, + {"label":"", "x":8, "y":0}, + {"label":"", "x":9, "y":0}, + {"label":"", "x":10, "y":0}, + {"label":"", "x":11, "y":0}, + {"label":"", "x":12, "y":0}, + {"label":"", "x":13.5, "y":0}, + {"label":"", "x":0, "y":1, "w":1.25}, + {"label":"", "x":1.25, "y":1}, + {"label":"", "x":2.25, "y":1}, + {"label":"", "x":3.25, "y":1}, + {"label":"", "x":4.25, "y":1}, + {"label":"", "x":5.25, "y":1}, + {"label":"", "x":6.25, "y":1}, + {"label":"", "x":7.25, "y":1}, + {"label":"", "x":8.25, "y":1}, + {"label":"", "x":9.25, "y":1}, + {"label":"", "x":10.25, "y":1}, + {"label":"", "x":11.25, "y":1, "w":1.75}, + {"label":"", "x":13.5, "y":1}, + {"label":"", "x":0, "y":2, "w":1.75}, + {"label":"", "x":1.75, "y":2}, + {"label":"", "x":2.75, "y":2}, + {"label":"", "x":3.75, "y":2}, + {"label":"", "x":4.75, "y":2}, + {"label":"", "x":5.75, "y":2}, + {"label":"", "x":6.75, "y":2}, + {"label":"", "x":7.75, "y":2}, + {"label":"", "x":8.75, "y":2}, + {"label":"", "x":9.75, "y":2}, + {"label":"", "x":10.75, "y":2, "w":1.25}, + {"label":"", "x":12.25, "y":2.25}, + {"label":"", "x":13.5, "y":2}, + {"label":"", "x":0, "y":3}, + {"label":"", "x":1, "y":3}, + {"label":"", "x":2, "y":3}, + {"label":"", "x":3, "y":3, "w":6.00}, + {"label":"", "x":9, "y":3}, + {"label":"", "x":10, "y":3}, + {"label":"", "x":11.25, "y":3.25}, + {"label":"", "x":12.25, "y":3.25}, + {"label":"", "x":13.25, "y":3.25} + ] + } + } + } + diff --git a/qmk/keyboards/45_ats/keymaps/default/config.h b/qmk/keyboards/45_ats/keymaps/default/config.h new file mode 100644 index 00000000..faba80d2 --- /dev/null +++ b/qmk/keyboards/45_ats/keymaps/default/config.h @@ -0,0 +1,25 @@ + /* + Copyright 2020 Alec Penland + Copyright 2020 Garret Gartner + + 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 . + */ + +#pragma once + +#define TAPPING_TERM 175 + +#define PERMISSIVE_HOLD + +#define MOD_TAP_INTERUPT diff --git a/qmk/keyboards/45_ats/keymaps/default/keymap.c b/qmk/keyboards/45_ats/keymaps/default/keymap.c new file mode 100644 index 00000000..28941b17 --- /dev/null +++ b/qmk/keyboards/45_ats/keymaps/default/keymap.c @@ -0,0 +1,107 @@ + /* + Copyright 2020 Alec Penland + Copyright 2020 Garret Gartner + + 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 + +// Layer names +enum ats_layers{ + // - Base layer: + _BASE, + // - Symbols, numbers, and functions: + _FN, + // - Alternate Function layer: + _LN +}; + +#define RS_SLS RSFT_T(KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default QWERTY layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Del│BkS│ │PgU│ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤ + * │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ' │Enter │ │PgD│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤ + * │LShift│ Z │ X │ C │ V │ B │ N │ M │ , │ . │Sft/│ ┌───┐ │CAP│ + * ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ ↑ │ └───┘ + * │LCtl│OS │LAlt│ Fn │ Space │RAlt│ Ln │ ┌───┼───┼───┐ + * └────┴───┴────┴──────────┴────────┴────┴────┘ │ ← │ ↓ │ → │ + * └───┴───┴───┘ + */ + [_BASE] = LAYOUT_split_space( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_PGUP, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RS_SLS, KC_UP, KC_CAPS, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPACE, KC_RALT, MO(_LN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + /* Main Numbers, Symbols & Function Layer (MOMENTARY) + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ [ │ ] │ \ │ │ │Hme│ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │End│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤ + * │ │ ( │ ) │ ; │ . │ │ - │ + │ * │ / │ = │ ┌───┐ │ │ + * ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘ + * │ │ │ │ │ │ │ │ ┌───┼───┼───┐ + * └────┴───┴────┴──────────┴────────┴────┴────┘ │ │ │ │ + * └───┴───┴───┘ + */ + [_FN] = LAYOUT_split_space( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_HOME, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER, KC_END, + _______, KC_LPRN, KC_RPRN, KC_SCLN, KC_DOT, _______, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_EQL, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* ALTERNATE Function layer (MOMENTARY) + * ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │ PWR│F1 │F2 │F3 │F4 │F5 │F6 │ │ │ │ │PRV│NXT│ │VL+│ + * ├────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤ + * │ SLP │F7 │F8 │F9 │F10│F11│F12│ │ │ │ │ PLAY │ │VL-│ + * ├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤ + * │ WAKE │ │ │ │ │ │ │ │ │ │ │ ┌───┐ │ │ + * ├────┬──┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘ + * │RSET│ │ │ │ │ │ │ ┌───┼───┼───┐ + * └────┴────┴────┴──────────┴────────┴────┴────┘ │ │ │ │ + * └───┴───┴───┘ + */ + [_LN] = LAYOUT_split_space( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLU, + KC_SLEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_MPLY, KC_VOLD, + KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +//function for layer indicator LED +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D0, layer_state_cmp(state, 0)); + writePin(D1, layer_state_cmp(state, 1)); + writePin(D2, layer_state_cmp(state, 2)); + return state; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/qmk/keyboards/45_ats/keymaps/via/keymap.c b/qmk/keyboards/45_ats/keymaps/via/keymap.c new file mode 100644 index 00000000..28941b17 --- /dev/null +++ b/qmk/keyboards/45_ats/keymaps/via/keymap.c @@ -0,0 +1,107 @@ + /* + Copyright 2020 Alec Penland + Copyright 2020 Garret Gartner + + 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 + +// Layer names +enum ats_layers{ + // - Base layer: + _BASE, + // - Symbols, numbers, and functions: + _FN, + // - Alternate Function layer: + _LN +}; + +#define RS_SLS RSFT_T(KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default QWERTY layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Del│BkS│ │PgU│ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤ + * │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ' │Enter │ │PgD│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤ + * │LShift│ Z │ X │ C │ V │ B │ N │ M │ , │ . │Sft/│ ┌───┐ │CAP│ + * ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ ↑ │ └───┘ + * │LCtl│OS │LAlt│ Fn │ Space │RAlt│ Ln │ ┌───┼───┼───┐ + * └────┴───┴────┴──────────┴────────┴────┴────┘ │ ← │ ↓ │ → │ + * └───┴───┴───┘ + */ + [_BASE] = LAYOUT_split_space( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_PGUP, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RS_SLS, KC_UP, KC_CAPS, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPACE, KC_RALT, MO(_LN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + /* Main Numbers, Symbols & Function Layer (MOMENTARY) + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ [ │ ] │ \ │ │ │Hme│ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │End│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤ + * │ │ ( │ ) │ ; │ . │ │ - │ + │ * │ / │ = │ ┌───┐ │ │ + * ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘ + * │ │ │ │ │ │ │ │ ┌───┼───┼───┐ + * └────┴───┴────┴──────────┴────────┴────┴────┘ │ │ │ │ + * └───┴───┴───┘ + */ + [_FN] = LAYOUT_split_space( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_HOME, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER, KC_END, + _______, KC_LPRN, KC_RPRN, KC_SCLN, KC_DOT, _______, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_EQL, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* ALTERNATE Function layer (MOMENTARY) + * ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐ + * │ PWR│F1 │F2 │F3 │F4 │F5 │F6 │ │ │ │ │PRV│NXT│ │VL+│ + * ├────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤ + * │ SLP │F7 │F8 │F9 │F10│F11│F12│ │ │ │ │ PLAY │ │VL-│ + * ├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤ + * │ WAKE │ │ │ │ │ │ │ │ │ │ │ ┌───┐ │ │ + * ├────┬──┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘ + * │RSET│ │ │ │ │ │ │ ┌───┼───┼───┐ + * └────┴────┴────┴──────────┴────────┴────┴────┘ │ │ │ │ + * └───┴───┴───┘ + */ + [_LN] = LAYOUT_split_space( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLU, + KC_SLEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_MPLY, KC_VOLD, + KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +//function for layer indicator LED +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D0, layer_state_cmp(state, 0)); + writePin(D1, layer_state_cmp(state, 1)); + writePin(D2, layer_state_cmp(state, 2)); + return state; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/qmk/keyboards/45_ats/keymaps/via/readme.md b/qmk/keyboards/45_ats/keymaps/via/readme.md new file mode 100644 index 00000000..702a497d --- /dev/null +++ b/qmk/keyboards/45_ats/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# 45-ATS VIA Firmware + +This keymap is to enable the use of VIA on the 45-ATS Keyboard. diff --git a/qmk/keyboards/45_ats/keymaps/via/rules.mk b/qmk/keyboards/45_ats/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/45_ats/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/45_ats/readme.md b/qmk/keyboards/45_ats/readme.md new file mode 100644 index 00000000..7d778df0 --- /dev/null +++ b/qmk/keyboards/45_ats/readme.md @@ -0,0 +1,16 @@ +# 45-ATS + +![45ats](https://i.imgur.com/Paqx5zGl.png) + +A Premium and Beautiful 45% (And-Then-Some) Keyboard. Concept and Design by [Abec13](https://www.reddit.com/user/abec13). + +- Keyboard Designer: [Abec13](https://reddit.com/u/abec13/) +- Keyboard Maintainer: [The-Royal](https://github.com/the-royal) +- Hardware Supported: 45-ATS v1.0 PCB +- Hardware Availability: Through Group Buy - Dec. 2019 + +Make example for this keyboard (after setting up your build environment): + + make 45_ats:default + +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). diff --git a/qmk/keyboards/45_ats/rules.mk b/qmk/keyboards/45_ats/rules.mk new file mode 100644 index 00000000..db96f0af --- /dev/null +++ b/qmk/keyboards/45_ats/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/7splus/7splus.c b/qmk/keyboards/7splus/7splus.c new file mode 100644 index 00000000..ca94ab0e --- /dev/null +++ b/qmk/keyboards/7splus/7splus.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Salicylic_Acid + +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 "7splus.h" diff --git a/qmk/keyboards/7splus/7splus.h b/qmk/keyboards/7splus/7splus.h new file mode 100644 index 00000000..55b9c24f --- /dev/null +++ b/qmk/keyboards/7splus/7splus.h @@ -0,0 +1,61 @@ +/* +Copyright 2020 Salicylic_Acid + +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 . +*/ + +#pragma once + +#include "quantum.h" + +/* + * ,-------------------------------------- ----------------------------------------------------------. + * | L00 | L01 | L02 | L03 | L04 | L05 | | R00 | R01 | R02 | R03 | R04 | R05 | R06 | R07 | R60 | + * |-------------------------------------- ------------------------------------------------------------+ + * | L10 | L11 | L12 | L13 | L14 | L15 | | R10 | R11 | R12 | R13 | R14 | R15 | R16 | R17 | R62 | + * |---------------------------------------------------------------------------------------------------+ + * | L20 | L21 | L22 | L23 | L24 | L25 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 | R27 | R63 | + * |---------------------------------------- ---------------------------------------------------------+ + * | L30 | L31 | L32 | L33 | L34 | L35 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 | R37 | + * |---------------------------------------------------------------------------------------------------+ + * | L40 | L41 | L42 | L43 | L44 | L45 | | R40 | R41 | R42 | R43 | R44 | R45 | R47 | R57 | + * |---------------------------------------------------------------------------------------------------+ + * | L50 | L51 | L52 | L53 | L54 | L55 | | R50 | R51 | R53 | R54 | R55 | R56 | R64 | + * |---------------------------------------- ------------------------------------------------------' + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R60, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, R62, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, R27, R63, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, R37, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, R47, R57, \ + L50, L51, L52, L54, L55, R50, R51, R53, R54, R55, R56, R64 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, KC_NO, KC_NO }, \ + { L50, L51, L52, KC_NO, L54, L55, KC_NO, KC_NO }, \ + {KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37 }, \ + { R40, R41, R42, R43, R44, R45, KC_NO, R47 }, \ + { R50, R51, KC_NO, R53, R54, R55, R56, R57 }, \ + { R60, KC_NO, R62, R63, R64, KC_NO, KC_NO, KC_NO } \ + } diff --git a/qmk/keyboards/7splus/config.h b/qmk/keyboards/7splus/config.h new file mode 100644 index 00000000..8f3e32a5 --- /dev/null +++ b/qmk/keyboards/7splus/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2020 Salicylic_acid3 + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEAE7 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT 7splus + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 } + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 +#define SPLIT_HAND_PIN B6 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifndef RGBLED_NUM + #define RGBLED_NUM 31 + #define RGBLIGHT_SPLIT + #define RGBLED_SPLIT { 11, 20 } +#endif + +#define RGBLIGHT_ANIMATIONS + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/qmk/keyboards/7splus/info.json b/qmk/keyboards/7splus/info.json new file mode 100644 index 00000000..55ead997 --- /dev/null +++ b/qmk/keyboards/7splus/info.json @@ -0,0 +1,98 @@ +{ + "keyboard_name": "7splus", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 17, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":10.75, "y":0}, + {"label":"F10", "x":11.75, "y":0}, + {"label":"F11", "x":12.75, "y":0}, + {"label":"F12", "x":13.75, "y":0}, + {"label":"PrtScr", "x":15, "y":0}, + {"label":"Delete", "x":16, "y":0}, + {"label":"~", "x":0, "y":1.25}, + {"label":"1", "x":1, "y":1.25}, + {"label":"2", "x":2, "y":1.25}, + {"label":"3", "x":3, "y":1.25}, + {"label":"4", "x":4, "y":1.25}, + {"label":"5", "x":5, "y":1.25}, + {"label":"6", "x":7, "y":1.25}, + {"label":"7", "x":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Back Space", "x":14, "y":1.25, "w":2}, + {"label":"Home", "x":16, "y":1.25}, + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":7.5, "y":2.25}, + {"label":"U", "x":8.5, "y":2.25}, + {"label":"I", "x":9.5, "y":2.25}, + {"label":"O", "x":10.5, "y":2.25}, + {"label":"P", "x":11.5, "y":2.25}, + {"label":"[", "x":12.5, "y":2.25}, + {"label":"]", "x":13.5, "y":2.25}, + {"label":"\"", "x":14.5, "y":2.25, "w":1.5}, + {"label":"Page Up", "x":16, "y":2.25}, + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":7.75, "y":3.25}, + {"label":"J", "x":8.75, "y":3.25}, + {"label":"K", "x":9.75, "y":3.25}, + {"label":"L", "x":10.75, "y":3.25}, + {"label":":", "x":11.75, "y":3.25}, + {"label":"'", "x":12.75, "y":3.25}, + {"label":"Enter", "x":13.75, "y":3.25, "w":2.25}, + {"label":"Page Down", "x":16, "y":3.25}, + {"label":"Shift", "x":0, "y":4.25, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":8.25, "y":4.25}, + {"label":"M", "x":9.25, "y":4.25}, + {"label":"<", "x":10.25, "y":4.25}, + {"label":">", "x":11.25, "y":4.25}, + {"label":"?", "x":12.25, "y":4.25}, + {"label":"Shift","x":13.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":15, "y":4.25}, + {"label":"End", "x":16, "y":4.25}, + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":2}, + {"x":5.75, "y":5.25}, + {"x":7.75, "y":5.25}, + {"x":8.75, "y":5.25, "w":2.75}, + {"label":"Alt", "x":11.5, "y":5.25, "w":1.25}, + {"label":"App", "x":12.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":14, "y":5.25}, + {"label":"Down", "x":15, "y":5.25}, + {"label":"Right", "x":16, "y":5.25} + ] + } + } +} diff --git a/qmk/keyboards/7splus/keymaps/default/keymap.c b/qmk/keyboards/7splus/keymaps/default/keymap.c new file mode 100644 index 00000000..282bfaf6 --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* +Copyright 2020 Salicylic_Acid + +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 + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + 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_PSCR, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +LT(_ADJUST,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_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + 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_ENT, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + MO(_ADJUST), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef RGBLIGHT_ENABLE + case RGB_RST: + if (record->event.pressed) { + uint8_t mode = rgblight_get_mode(); + eeconfig_update_rgblight_default(); + rgblight_enable(); + rgblight_mode(mode); + } + break; +#endif + } + + return true; +} diff --git a/qmk/keyboards/7splus/keymaps/salicylic/config.h b/qmk/keyboards/7splus/keymaps/salicylic/config.h new file mode 100644 index 00000000..81ee8ef7 --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/salicylic/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/qmk/keyboards/7splus/keymaps/salicylic/keymap.c b/qmk/keyboards/7splus/keymaps/salicylic/keymap.c new file mode 100644 index 00000000..4435bf98 --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/salicylic/keymap.c @@ -0,0 +1,147 @@ +/* +Copyright 2020 Salicylic_Acid + +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 +#include "keymap_jp.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _MOUSE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +enum tapdances{ + TD_ESMS = 0, + TD_ESAR, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ESMS] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _MOUSE), + [TD_ESAR] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + TD(TD_ESMS), 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_PSCR, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, KC_BSPC, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, JP_BSLS, KC_PGUP, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_QUOT, KC_ENT, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, KC_LGUI,ALT_T(KC_MHEN),LT(_LOWER,KC_ENT),KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC), ALT_T(KC_HENK), KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_MOUSE] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + TD(TD_ESAR), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_W), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LSFT(KC_T)), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +LCTL_T(JP_QUOT),JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +SFT_T(JP_CIRC),JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, KC_UP, KC_PGUP, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, MO(_LOWER), _______, _______,MO(_RAISE), _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +LCTL_T(KC_F11),XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, KC_UP, KC_PGUP, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef RGBLIGHT_ENABLE + case RGB_RST: + if (record->event.pressed) { + uint8_t mode = rgblight_get_mode(); + eeconfig_update_rgblight_default(); + rgblight_enable(); + rgblight_mode(mode); + } + break; +#endif + } + return true; +} diff --git a/qmk/keyboards/7splus/keymaps/salicylic/rules.mk b/qmk/keyboards/7splus/keymaps/salicylic/rules.mk new file mode 100644 index 00000000..0bcbf86d --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/salicylic/rules.mk @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/7splus/keymaps/via/config.h b/qmk/keyboards/7splus/keymaps/via/config.h new file mode 100644 index 00000000..8a89da2e --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/via/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/qmk/keyboards/7splus/keymaps/via/keymap.c b/qmk/keyboards/7splus/keymaps/via/keymap.c new file mode 100644 index 00000000..c17e1ce4 --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* +Copyright 2020 Salicylic_Acid + +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 + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + 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_PSCR, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + LT(1,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_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + 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_ENT, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + [1] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + MO(1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + [2] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; diff --git a/qmk/keyboards/7splus/keymaps/via/rules.mk b/qmk/keyboards/7splus/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/7splus/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/7splus/readme.md b/qmk/keyboards/7splus/readme.md new file mode 100644 index 00000000..a7335952 --- /dev/null +++ b/qmk/keyboards/7splus/readme.md @@ -0,0 +1,17 @@ +# 7sPlus + +![7splus](https://s2.booth.pm/1d33594d-0c5f-4f93-baf5-2e89e0d99afc/i/2425503/044ca31d-6715-475c-b8c4-1dfdeb57b682_base_resized.jpg) + +This is 85 keys Custom keyboard. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: 7sPlus PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/2425503) + +Make example for this keyboard (after setting up your build environment): + + make 7splus:default + +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). + +[Build guide](https://salicylic-acid3.hatenablog.com/entry/7splus-build-guide) diff --git a/qmk/keyboards/7splus/rules.mk b/qmk/keyboards/7splus/rules.mk new file mode 100644 index 00000000..52da9f00 --- /dev/null +++ b/qmk/keyboards/7splus/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes diff --git a/qmk/keyboards/ai03/soyuz/config.h b/qmk/keyboards/ai03/soyuz/config.h index 213b6509..feb55107 100644 --- a/qmk/keyboards/ai03/soyuz/config.h +++ b/qmk/keyboards/ai03/soyuz/config.h @@ -21,11 +21,10 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xA103 -#define PRODUCT_ID 0x0004 +#define PRODUCT_ID 0x0018 #define DEVICE_VER 0x0001 #define MANUFACTURER ai03 Design Studio #define PRODUCT Soyuz -#define DESCRIPTION Single-PCB Numpad Kit /* key matrix size */ #define MATRIX_ROWS 5 @@ -118,59 +117,6 @@ along with this program. If not, see . */ //#define FORCE_NKRO -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP H -//#define MAGIC_KEY_HELP_ALT SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -189,29 +135,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/ai03/soyuz/keymaps/via/keymap.c b/qmk/keyboards/ai03/soyuz/keymaps/via/keymap.c new file mode 100644 index 00000000..c516d2b4 --- /dev/null +++ b/qmk/keyboards/ai03/soyuz/keymaps/via/keymap.c @@ -0,0 +1,62 @@ +/* + * ai03 Soyuz VIA Keymap + * + * Copyright (C) 2020 Sendy YK + * + * 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 3 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 + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + // Fn Layer 1 + [_FN] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + // Fn Layer 2 + [_FN2] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + // Fn Layer 3 + [_FN3] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/ai03/soyuz/keymaps/via/rules.mk b/qmk/keyboards/ai03/soyuz/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/ai03/soyuz/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/ai03/soyuz/soyuz.h b/qmk/keyboards/ai03/soyuz/soyuz.h index 05c42a6d..c7f15866 100644 --- a/qmk/keyboards/ai03/soyuz/soyuz.h +++ b/qmk/keyboards/ai03/soyuz/soyuz.h @@ -52,7 +52,7 @@ * ├───┴───┼───┤43 │ * │41 │42 │ │ * └───────┴───┴───┘ -*/ + */ #define LAYOUT_numpad_5x4( \ k00, k01, k02, k03, \ diff --git a/qmk/keyboards/ai03/voyager60_alps/config.h b/qmk/keyboards/ai03/voyager60_alps/config.h new file mode 100644 index 00000000..98f37e8c --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2020 +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x060A +#define DEVICE_VER 0x0001 +#define MANUFACTURER ai03 +#define PRODUCT Voyager60-Alps + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } +#define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// define BACKLIGHT_PIN B7 +// define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 14 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/ai03/voyager60_alps/info.json b/qmk/keyboards/ai03/voyager60_alps/info.json new file mode 100644 index 00000000..96d5fcfb --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Voyager60-Alps", + "url": "https://github.com/ai03-2725/Voyager60/tree/alps", + "maintainer": "ai03", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/ai03/voyager60_alps/keymaps/default/keymap.c b/qmk/keyboards/ai03/voyager60_alps/keymaps/default/keymap.c new file mode 100644 index 00000000..171f0c7f --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* +Copyright 2020 +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + 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_BSPC, KC_BSPC, + 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_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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_NO, MO(1), KC_RALT, KC_RCTL + ), + [1] = LAYOUT( /* Fn */ + KC_GRV, 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_DEL, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/ai03/voyager60_alps/keymaps/default/readme.md b/qmk/keyboards/ai03/voyager60_alps/keymaps/default/readme.md new file mode 100644 index 00000000..1a787926 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/keymaps/default/readme.md @@ -0,0 +1 @@ +# Default keymap diff --git a/qmk/keyboards/ai03/voyager60_alps/keymaps/via/keymap.c b/qmk/keyboards/ai03/voyager60_alps/keymaps/via/keymap.c new file mode 100644 index 00000000..1a5e74c4 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* +Copyright 2020 +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( /* Base */ + 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_BSPC, KC_BSPC, + 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_LCTL, 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_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, _______, KC_RGUI, KC_RALT, KC_RCTL + ), + [1] = LAYOUT( /* FN */ + RESET, 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_DEL, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( /* Blank. For VIA compatibility */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( /* Blank. For VIA compatibility */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/ai03/voyager60_alps/keymaps/via/readme.md b/qmk/keyboards/ai03/voyager60_alps/keymaps/via/readme.md new file mode 100644 index 00000000..cb1709f7 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA Keymap diff --git a/qmk/keyboards/ai03/voyager60_alps/keymaps/via/rules.mk b/qmk/keyboards/ai03/voyager60_alps/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/ai03/voyager60_alps/readme.md b/qmk/keyboards/ai03/voyager60_alps/readme.md new file mode 100644 index 00000000..f67b2f19 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/readme.md @@ -0,0 +1,25 @@ +# Voyager60-Alps +A fully featured Alps-specific 60% PCB + +![Render](https://raw.githubusercontent.com/ai03-2725/Voyager60/alps/Renders/Front.png) + +### Features +* RGB underglow +* Decent amount of layout compatibility - [View supported layouts](http://www.keyboard-layout-editor.com/#/gists/c867bdba7e5ae8be282f77a242bacf66) +* Slot cutout for maximum flexibility and typing comfort +* Over-current and static discharge protection +* Fully open-source + +### Additional Information + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: Voyager60-Alps PCB +* Hardware Availability: [Gerbers](https://github.com/ai03-2725/Voyager60/tree/alps) + +### Building the Firmware + +Make example for this keyboard (after setting up your build environment): + + make ai03/voyager60_alps:default + +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). diff --git a/qmk/keyboards/ai03/voyager60_alps/rules.mk b/qmk/keyboards/ai03/voyager60_alps/rules.mk new file mode 100644 index 00000000..f49426d5 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/ai03/voyager60_alps/voyager60_alps.c b/qmk/keyboards/ai03/voyager60_alps/voyager60_alps.c new file mode 100644 index 00000000..251198c4 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/voyager60_alps.c @@ -0,0 +1,15 @@ +/* +Copyright 2020 +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 "voyager60_alps.h" diff --git a/qmk/keyboards/ai03/voyager60_alps/voyager60_alps.h b/qmk/keyboards/ai03/voyager60_alps/voyager60_alps.h new file mode 100644 index 00000000..fa178316 --- /dev/null +++ b/qmk/keyboards/ai03/voyager60_alps/voyager60_alps.h @@ -0,0 +1,32 @@ +/* +Copyright 2020 +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 } \ +} diff --git a/qmk/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/qmk/keyboards/anavi/macropad8/keymaps/kicad/keymap.c new file mode 100644 index 00000000..938d0d53 --- /dev/null +++ b/qmk/keyboards/anavi/macropad8/keymaps/kicad/keymap.c @@ -0,0 +1,117 @@ + /* Copyright 2020 Leon Anavi + * + * 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 _SCH 0 +#define _PCB 1 +#define _FN 2 + +#define KC_X0 LT(_FN, KC_ESC) + +#ifdef RGBLIGHT_ENABLE +// How long (in ms) to wait between animation steps for the rainbow mode +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; +// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; +#endif + +/* + * The keymap contains 2 layers for KiCad hotkeys and a 3rd layer + * for controlling the backlighting and the underlighting. + * + * - Layer for KiCad Schematic hotkeys: + * m - to move selected component + * r - to rotate selected component + * w - to wire components + * v - to edit component value + * F1 - zoom in + * F2 - zoom out + * F4 - zoom center + * + * - Layer for KiCad PCB layout hotkets: + * m - to move selected component + * r - to rotate selected component + * x - to route a new track + * v - to add a via + * F1 - zoom in + * F2 - zoom out + * F4 - zoom center + * + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_SCH] = LAYOUT_ortho_2x4( + KC_M, KC_R, KC_W, KC_V, + KC_F1, KC_F2, KC_F4, TO(_PCB) + ), + + [_PCB] = LAYOUT_ortho_2x4( + KC_M, KC_R, KC_X, KC_V, + KC_F1, KC_F2, KC_F4, TO(_FN) + ), + + [_FN] = LAYOUT_ortho_2x4( + RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, + BL_TOGG, BL_STEP, BL_BRTG, TO(_SCH) + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _SCH: + oled_write_ln_P(PSTR("KiCad Schema"), false); + break; + case _PCB: + oled_write_ln_P(PSTR("KiCad PCB"), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN "), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("N/A"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("Num Lock: "), false); + oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Caps Lock: "), false); + oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Scroll Lock: "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Backlit: "), false); + oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); +#ifdef RGBLIGHT_ENABLE + static char rgbStatusLine1[26] = {0}; + snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); + oled_write_ln(rgbStatusLine1, false); + static char rgbStatusLine2[26] = {0}; + snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); + oled_write_ln(rgbStatusLine2, false); +#endif +} +#endif diff --git a/qmk/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/qmk/keyboards/anavi/macropad8/keymaps/obs/keymap.c new file mode 100644 index 00000000..0c78883c --- /dev/null +++ b/qmk/keyboards/anavi/macropad8/keymaps/obs/keymap.c @@ -0,0 +1,97 @@ + /* Copyright 2020 Leon Anavi + * + * 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 _MAIN 0 +#define _FN 1 + +#define KC_X0 LT(_FN, KC_ESC) + +#ifdef RGBLIGHT_ENABLE +// How long (in ms) to wait between animation steps for the rainbow mode +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; +// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; +#endif + +/* + * This keymap contains the following shortcuts for OBS: + * + * - Shortcuts useful for switching scenes on the 1st row: + * Hold Left Control, Shift, Alt and GUI and press F9 + * Hold Left Control, Shift, Alt and GUI and press F10 + * Hold Left Control, Shift, Alt and GUI and press F11 + * Hold Left Control, Shift, Alt and GUI and press F12 + * - Center to screen: Ctrl+D + * - Fit to screen: Ctrl+F + * - Move source to top of sources list: Ctrl+Home + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_ortho_2x4( + HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12), + LCTL(KC_D), LCTL(KC_F), LCTL(KC_HOME), MO(_FN) + ), + + [_FN] = LAYOUT_ortho_2x4( + RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, + BL_TOGG, BL_STEP, BL_BRTG, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); + oled_write_P(PSTR("Active layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _MAIN: + oled_write_ln_P(PSTR("OBS"), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("N/A"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("Num Lock: "), false); + oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Caps Lock: "), false); + oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Scroll Lock: "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Backlit: "), false); + oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); +#ifdef RGBLIGHT_ENABLE + static char rgbStatusLine1[26] = {0}; + snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); + oled_write_ln(rgbStatusLine1, false); + static char rgbStatusLine2[26] = {0}; + snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); + oled_write_ln(rgbStatusLine2, false); +#endif +} +#endif diff --git a/qmk/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/qmk/keyboards/anavi/macropad8/keymaps/zoom/keymap.c new file mode 100644 index 00000000..64f4f5b0 --- /dev/null +++ b/qmk/keyboards/anavi/macropad8/keymaps/zoom/keymap.c @@ -0,0 +1,96 @@ + /* Copyright 2020 Leon Anavi + * + * 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 _MAIN 0 +#define _FN 1 + +#define KC_X0 LT(_FN, KC_ESC) + +#ifdef RGBLIGHT_ENABLE +// How long (in ms) to wait between animation steps for the rainbow mode +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; +// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; +#endif + +/* + * The keymap contains the following shortcuts for Zoom meeting: + * + * Alt+V: Start/stop video + * Alt+A: Mute/unmute my audio + * Alt+M: Mute/unmute audio for everyone except the host + * Alt+S: Start/stop screen sharing + * Alt+R: Start/stop local recording + * Alt+P: Pause/resume recording + * Alt+C: Start/stop cloud recording + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_ortho_2x4( + LALT(KC_V), LALT(KC_A), LALT(KC_M), LALT(KC_S), + LALT(KC_R), LALT(KC_P), LALT(KC_C), MO(_FN) + ), + + [_FN] = LAYOUT_ortho_2x4( + RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, + BL_TOGG, BL_STEP, BL_BRTG, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); + oled_write_P(PSTR("Active layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _MAIN: + oled_write_ln_P(PSTR("Zoom"), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("N/A"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("Num Lock: "), false); + oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Caps Lock: "), false); + oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Scroll Lock: "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Backlit: "), false); + oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); +#ifdef RGBLIGHT_ENABLE + static char rgbStatusLine1[26] = {0}; + snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); + oled_write_ln(rgbStatusLine1, false); + static char rgbStatusLine2[26] = {0}; + snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); + oled_write_ln(rgbStatusLine2, false); +#endif +} +#endif diff --git a/qmk/keyboards/barleycorn/keymaps/via/readme.md b/qmk/keyboards/barleycorn/keymaps/via/readme.md index a49e2c05..b82bc8e7 100644 --- a/qmk/keyboards/barleycorn/keymaps/via/readme.md +++ b/qmk/keyboards/barleycorn/keymaps/via/readme.md @@ -1,3 +1 @@ # Compile with this keymap to use VIA - -Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/qmk/keyboards/barleycorn/keymaps/via/rules.mk b/qmk/keyboards/barleycorn/keymaps/via/rules.mk index 930e3552..1e5b9980 100644 --- a/qmk/keyboards/barleycorn/keymaps/via/rules.mk +++ b/qmk/keyboards/barleycorn/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/qmk/keyboards/basekeys/slice/config.h b/qmk/keyboards/basekeys/slice/config.h index cfb6bf4f..e7e65de3 100644 --- a/qmk/keyboards/basekeys/slice/config.h +++ b/qmk/keyboards/basekeys/slice/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons 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 @@ -15,7 +14,6 @@ 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 . */ - #pragma once #include "config_common.h" diff --git a/qmk/keyboards/basekeys/slice/keymaps/default/config.h b/qmk/keyboards/basekeys/slice/keymaps/default/config.h index d3acebb7..3dc07fda 100644 --- a/qmk/keyboards/basekeys/slice/keymaps/default/config.h +++ b/qmk/keyboards/basekeys/slice/keymaps/default/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/qmk/keyboards/basekeys/slice/keymaps/default/keymap.c b/qmk/keyboards/basekeys/slice/keymaps/default/keymap.c index d6e5cefa..ffb64998 100644 --- a/qmk/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/qmk/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 #include "split_util.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h b/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h index d3acebb7..3dc07fda 100644 --- a/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h +++ b/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 40d55bdc..331dfc0f 100644 --- a/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/qmk/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 #include "split_util.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/qmk/keyboards/basekeys/slice/rev1/config.h b/qmk/keyboards/basekeys/slice/rev1/config.h index d151d587..ea4d5d3d 100644 --- a/qmk/keyboards/basekeys/slice/rev1/config.h +++ b/qmk/keyboards/basekeys/slice/rev1/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons 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 diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h b/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h index 62ee1d1a..8f38938b 100644 --- a/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c b/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c index 5a9b1460..97f7039a 100644 --- a/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 #include "keymap_jp.h" diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h index d3acebb7..3dc07fda 100644 --- a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c index 198c449b..34e1b7c4 100644 --- a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 extern uint8_t is_master; diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h index d3acebb7..3dc07fda 100644 --- a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c index b1423378..772f9f6f 100644 --- a/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 extern uint8_t is_master; diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/via/config.h b/qmk/keyboards/basekeys/slice/rev1/keymaps/via/config.h new file mode 100644 index 00000000..3dc07fda --- /dev/null +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2020 2Moons + +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 . +*/ +#pragma once + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c b/qmk/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c new file mode 100644 index 00000000..900f1b3b --- /dev/null +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 2Moons + * + * 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 +#include "keymap_jp.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FN, + _LOWER, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_FN] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_DEL, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ) +}; diff --git a/qmk/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk b/qmk/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk new file mode 100644 index 00000000..fe10d4e0 --- /dev/null +++ b/qmk/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = no +VIA_ENABLE = yes +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/qmk/keyboards/basekeys/slice/rev1/rev1.c b/qmk/keyboards/basekeys/slice/rev1/rev1.c index 520a869e..a3c8f66f 100644 --- a/qmk/keyboards/basekeys/slice/rev1/rev1.c +++ b/qmk/keyboards/basekeys/slice/rev1/rev1.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * 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 "rev1.h" diff --git a/qmk/keyboards/basekeys/slice/rev1/rev1.h b/qmk/keyboards/basekeys/slice/rev1/rev1.h index ae417d99..26a5da31 100644 --- a/qmk/keyboards/basekeys/slice/rev1/rev1.h +++ b/qmk/keyboards/basekeys/slice/rev1/rev1.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ #pragma once #include "slice.h" diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/config.h b/qmk/keyboards/basekeys/slice/rev1_rgb/config.h index 1145d086..08afff76 100644 --- a/qmk/keyboards/basekeys/slice/rev1_rgb/config.h +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons 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 @@ -15,7 +14,6 @@ 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 . */ - #pragma once /* USB Device descriptor parameter */ diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/info.json b/qmk/keyboards/basekeys/slice/rev1_rgb/info.json index 101da975..08ffb969 100644 --- a/qmk/keyboards/basekeys/slice/rev1_rgb/info.json +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/info.json @@ -1,15 +1,18 @@ { - "keyboard_name": "slice", - "url": "https://www.basekeys.com", - "maintainer": "2Moons", - "width": 17.72, - "height": 5, + "keyboard_name": "slice", + "url": "https://www.basekeys.com", + "maintainer": "2Moons", + "width": 17.72, + "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] }, - "LAYOUT_split_left_space": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "LAYOUT_split_left_space": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":0.917}, {"x":6.667, "y":4, "w":0.916}, {"x":7.583, "y":4, "w":0.917}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] } } -} \ No newline at end of file +} diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h index 62ee1d1a..8f38938b 100644 --- a/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index d9e5808a..36bfb79a 100644 --- a/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 #include "keymap_jp.h" #include "split_util.h" diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c new file mode 100644 index 00000000..5670f275 --- /dev/null +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2020 2Moons + * + * 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 +#include "split_util.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY, + _FN, + _LOWER, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_FN] = LAYOUT_all( + //,-------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`-------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(qmk_logo, false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _FN: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + render_qmk_logo(); + } +} +#endif diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c b/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c index 3cdec58c..9ab3d253 100644 --- a/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * 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 "rev1_rgb.h" diff --git a/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h b/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h index 809c278d..fdc53315 100644 --- a/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h +++ b/qmk/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ #pragma once #include "slice.h" @@ -61,5 +76,23 @@ { R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ } - +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, R37,\ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, KC_NO, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, KC_NO }, \ + { R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ + } diff --git a/qmk/keyboards/basekeys/slice/slice.c b/qmk/keyboards/basekeys/slice/slice.c index 6aaf7217..2d7d111f 100644 --- a/qmk/keyboards/basekeys/slice/slice.c +++ b/qmk/keyboards/basekeys/slice/slice.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * 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 "slice.h" diff --git a/qmk/keyboards/basekeys/slice/slice.h b/qmk/keyboards/basekeys/slice/slice.h index 7d4f7ee5..bc3eb813 100644 --- a/qmk/keyboards/basekeys/slice/slice.h +++ b/qmk/keyboards/basekeys/slice/slice.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ #pragma once #include "quantum.h" diff --git a/qmk/keyboards/basekeys/slice/slice_font.c b/qmk/keyboards/basekeys/slice/slice_font.c index f969f85c..b59fbcf5 100644 --- a/qmk/keyboards/basekeys/slice/slice_font.c +++ b/qmk/keyboards/basekeys/slice/slice_font.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. diff --git a/qmk/keyboards/basekeys/trifecta/config.h b/qmk/keyboards/basekeys/trifecta/config.h new file mode 100644 index 00000000..8a952912 --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/config.h @@ -0,0 +1,123 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEAF3 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Trifecta + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { B0, B7, F7, B1, B6, C6, C7, B5, F6, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, D1, B2, D0, B3 } + + +#define ENCODERS_PAD_A { D4, D6, D7 } +#define ENCODERS_PAD_B { B4, D3, D5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN E6 +#define DRIVER_LED_TOTAL 80 + +/* RGB LED */ +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E6 +#define RGBLED_NUM 80 // Number of LEDs. backlight x69 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_ANIMATIONS +#endif +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Limits the brightness of the LEDS range of 255-0 (255 is default)*/ +#define RGBLIGHT_LIMIT_VAL 128 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* EEPROM for via */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +//# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS +// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// # define DISABLE_RGB_MATRIX_BREATHING +// # define DISABLE_RGB_MATRIX_CYCLE_ALL +// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define DISABLE_RGB_MATRIX_DUAL_BEACON +// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON +// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH +// # define DISABLE_RGB_MATRIX_SOLID_SPLASH +// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/qmk/keyboards/basekeys/trifecta/info.json b/qmk/keyboards/basekeys/trifecta/info.json new file mode 100644 index 00000000..3badb40d --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Trifecta", + "url": "https://www.basekeys.com", + "maintainer": "Swiftrax", + "width": 18, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.75, "y":0}, {"label":"*", "x":9.75, "y":0}, {"label":"(", "x":10.75, "y":0}, {"label":")", "x":11.75, "y":0}, {"label":"_", "x":12.75, "y":0}, {"label":"+", "x":13.75, "y":0}, {"label":"BS", "x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":17, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8.25, "y":1}, {"label":"U", "x":9.25, "y":1}, {"label":"I", "x":10.25, "y":1}, {"label":"O", "x":11.25, "y":1}, {"label":"P", "x":12.25, "y":1}, {"label":"{", "x":13.25, "y":1}, {"label":"}", "x":14.25, "y":1}, {"label":"|", "x":15.25, "y":1, "w":1.5}, {"x":17, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.5, "y":2}, {"label":"J", "x":9.5, "y":2}, {"label":"K", "x":10.5, "y":2}, {"label":"L", "x":11.5, "y":2}, {"label":":", "x":12.5, "y":2}, {"label":"\"", "x":13.5, "y":2}, {"label":"Enter", "x":14.5, "y":2, "w":2.25}, {"x":17, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":"<", "x":11, "y":3}, {"label":">", "x":12, "y":3}, {"label":"?", "x":13, "y":3}, {"label":"Shift", "x":14, "y":3, "w":1.75}, {"x":16, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3, "y":4, "w":1.5}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4}, {"x":8.5, "y":4, "w":2.75}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Win", "x":13.5, "y":4, "w":1.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}] + } + } +} diff --git a/qmk/keyboards/basekeys/trifecta/keymaps/default/keymap.c b/qmk/keyboards/basekeys/trifecta/keymaps/default/keymap.c new file mode 100644 index 00000000..727ebf38 --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 . + */ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_BSPC, KC_DEL, KC_DEL, + 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_END, + 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, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_MEDIA] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_MNXT); + } else { + tap_code(KC_MPRV); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } +} diff --git a/qmk/keyboards/basekeys/trifecta/keymaps/default/rules.mk b/qmk/keyboards/basekeys/trifecta/keymaps/default/rules.mk new file mode 100644 index 00000000..910bd64a --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/qmk/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/qmk/keyboards/basekeys/trifecta/keymaps/via/keymap.c new file mode 100644 index 00000000..e1f401bc --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 . + */ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_BSPC, KC_DEL, KC_DEL, + 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_END, + 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, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_MEDIA] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + rgblight_step(); + } else { + rgblight_step_reverse(); + } + } +} diff --git a/qmk/keyboards/basekeys/trifecta/keymaps/via/rules.mk b/qmk/keyboards/basekeys/trifecta/keymaps/via/rules.mk new file mode 100644 index 00000000..32f462d0 --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/qmk/keyboards/basekeys/trifecta/readme.md b/qmk/keyboards/basekeys/trifecta/readme.md new file mode 100644 index 00000000..efe6fb0a --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/readme.md @@ -0,0 +1,17 @@ +# Trifecta + +![Trifecta](https://i.imgur.com/tlIwQowl.jpeg) + +An Alice style board with arrowkeys, based on the Fate Arisu layout. + +* Keyboard Maintainer: [swiftrax](https://github.com/swiftrax) +* Hardware Supported: Trifecta PCB, ATMEGA32U4-AU +* Hardware Availability: [Website](https://mykeyboard.eu/catalogue/) + +Make example for this keyboard (after setting up your build environment): + + make basekeys/trifecta:default + +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) + +[Build guide](https://www.basekeys.com/category/build-guides/) diff --git a/qmk/keyboards/basekeys/trifecta/rules.mk b/qmk/keyboards/basekeys/trifecta/rules.mk new file mode 100644 index 00000000..975fe846 --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes diff --git a/qmk/keyboards/basekeys/trifecta/trifecta.c b/qmk/keyboards/basekeys/trifecta/trifecta.c new file mode 100644 index 00000000..e7aca201 --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/trifecta.c @@ -0,0 +1,61 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 . + */ + +#include "trifecta.h" + +#ifdef RGB_MATRIX_ENABLE + +led_config_t g_led_config = { { + { NO_LED, 70, 61, 52, 43, 34, 24, 14 }, + { 79, 69, 60, 51, 42, 33, 23, NO_LED }, + { NO_LED, 71, 62, 53, 44, 35, 25, 15 }, + { 78, 68, 59, 50, 41, 32, 22, NO_LED }, + { 77, 67, 58, 49, 40, 31, NO_LED, 16 }, + { NO_LED, 72, 63, 54, 45, 36, 26, NO_LED }, + { NO_LED, 73, 64, 55, 46, 37, 27, 17 }, + { 76, 66, 57, 48, 39, 30, 21, NO_LED }, + { NO_LED, 74, 56, NO_LED, NO_LED, 38, 28, 18 }, + { 75, 65, NO_LED, NO_LED, 47, 29, 20, 19 } +}, { + // Underglow + { 218, 7 }, { 214, 45 }, { 180, 47 }, { 147, 50 }, { 94, 62 }, { 37, 51 }, { 4, 8 }, { 36, 15 }, + { 62, 18 }, { 78, 5 }, { 119, 7 }, { 145, 16 }, { 166, 3 }, { 200, 16 }, + + //Per Key + { 185, 11 }, { 191, 22 }, { 188, 33 }, { 200, 46 }, { 200, 57 }, { 212, 57 }, { 188, 57 }, { 181, 44 }, + { 176, 22 }, { 168, 11 }, { 155, 11 }, { 164, 22 }, { 169, 32 }, { 165, 44 }, { 172, 55 }, { 157, 54 }, + { 153, 44 }, { 156, 33 }, { 153, 22 }, { 142, 12 }, { 130, 13 }, { 138, 23 }, { 143, 33 }, { 140, 45 }, + { 137, 56 }, { 128, 47 }, { 132, 35 }, { 127, 25 }, { 119, 16 }, { 107, 17 }, { 115, 27 }, { 120, 37 }, + { 116, 48 }, { 117, 59 }, { 104, 51 }, { 109, 39 }, { 104, 29 }, { 86, 19 }, { 74, 16 }, { 78, 28 }, + { 79, 39 }, { 82, 50 }, { 73, 60 }, { 71, 48 }, { 67, 37 }, { 66, 26 }, { 63, 15 }, { 50, 12 }, + { 55, 24 }, { 55, 35 }, { 59, 47 }, { 50, 56 }, { 47, 45 }, { 43, 33 }, { 43, 22 }, { 39, 10 }, + { 25, 11 }, { 29, 22 }, { 30, 33 }, { 34, 44 }, { 24, 54 }, { 9, 55 }, { 15, 44 }, { 14, 33 }, + { 14, 22 }, { 14, 11 } +}, { + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, + + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4 +} }; +#endif \ No newline at end of file diff --git a/qmk/keyboards/basekeys/trifecta/trifecta.h b/qmk/keyboards/basekeys/trifecta/trifecta.h new file mode 100644 index 00000000..ed337813 --- /dev/null +++ b/qmk/keyboards/basekeys/trifecta/trifecta.h @@ -0,0 +1,48 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO//readabilty + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k37, \ + k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k57, \ + k40, k51, k41, k52, k42, k53, k43, k54, k44, k55, k45, k56, k47, k77, \ + k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, \ + k90, k81, k91, k82, k94, k85, k95, k86, k96, k87, k97 \ +) \ +{ \ + { XXX, k01, k02, k03, k04, k05, k06, k07}, \ + { k10, k11, k12, k13, k14, k15, k16, k17}, \ + { XXX, k21, k22, k23, k24, k25, k26, k27}, \ + { k30, k31, k32, k33, k34, k35, k36, k37}, \ + { k40, k41, k42, k43, k44, k45, XXX, k47}, \ + { XXX, k51, k52, k53, k54, k55, k56, k57}, \ + { XXX, k61, k62, k63, k64, k65, k66, k67}, \ + { k70, k71, k72, k73, k74, k75, k76, k77}, \ + { XXX, k81, k82, XXX, XXX, k85, k86, k87}, \ + { k90, k91, XXX, XXX, k94, k95, k96, k97} \ +} diff --git a/qmk/keyboards/basketweave/basketweave.c b/qmk/keyboards/basketweave/basketweave.c new file mode 100644 index 00000000..388810c9 --- /dev/null +++ b/qmk/keyboards/basketweave/basketweave.c @@ -0,0 +1,17 @@ +/* Copyright 2020 null-ll + * + * 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 "basketweave.h" diff --git a/qmk/keyboards/basketweave/basketweave.h b/qmk/keyboards/basketweave/basketweave.h new file mode 100644 index 00000000..abceef76 --- /dev/null +++ b/qmk/keyboards/basketweave/basketweave.h @@ -0,0 +1,35 @@ +/* Copyright 2020 null-ll + * + * 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 . + */ + +#pragma once + +#define ____ KC_NO + +#include "quantum.h" + +#define LAYOUT_default( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K401, K402, K404, K406, K408, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { ____, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { ____, K401, K402, ____, K404, ____, K406, ____, K408, ____, K410, K411, K412, K413, K414 } \ +} diff --git a/qmk/keyboards/basketweave/config.h b/qmk/keyboards/basketweave/config.h new file mode 100644 index 00000000..dcc4b2fe --- /dev/null +++ b/qmk/keyboards/basketweave/config.h @@ -0,0 +1,62 @@ +/* Copyright 2020 null-ll + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x6B62 +#define PRODUCT_ID 0x6869 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Clackery +#define PRODUCT Basketweave + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { A6, C6, C7, A7, A5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, B0, B1, B2, D5, D6, C5, C4, C3, C2, C1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +#define ENCODERS_PAD_A { D7 } +#define ENCODERS_PAD_B { C0 } +#define ENCODER_RESOLUTION 4 +#define ENCODER_DIRECTION_FLIP +#define TAP_CODE_DELAY 10 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + diff --git a/qmk/keyboards/basketweave/info.json b/qmk/keyboards/basketweave/info.json new file mode 100644 index 00000000..436823b7 --- /dev/null +++ b/qmk/keyboards/basketweave/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Basketweave", + "url": "https://github.com/null-ll/basketweave", + "maintainer": "null-ll", + "width": 20, + "height": 5, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":10.5, "y":0}, {"label":"*", "x":11.5, "y":0}, {"label":"(", "x":12.5, "y":0}, {"label":")", "x":13.5, "y":0}, {"label":"_", "x":14.5, "y":0}, {"label":"+", "x":15.5, "y":0}, {"label":"Backspace", "x":16.5, "y":0, "w":2}, {"label":"Mute", "x":19, "y":0.5}, {"label":"Delete", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":10, "y":1}, {"label":"U", "x":11, "y":1}, {"label":"I", "x":12, "y":1}, {"label":"O", "x":13, "y":1}, {"label":"P", "x":14, "y":1}, {"label":"{", "x":15, "y":1}, {"label":"}", "x":16, "y":1}, {"label":"|", "x":17, "y":1, "w":1.5}, {"label":"Insert", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":10.25, "y":2}, {"label":"J", "x":11.25, "y":2}, {"label":"K", "x":12.25, "y":2}, {"label":"L", "x":13.25, "y":2}, {"label":":", "x":14.25, "y":2}, {"label":"\"", "x":15.25, "y":2}, {"label":"Enter", "x":16.25, "y":2, "w":2.25}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"B", "x":9.75, "y":3}, {"label":"N", "x":10.75, "y":3}, {"label":"M", "x":11.75, "y":3}, {"label":"<", "x":12.75, "y":3}, {"label":">", "x":13.75, "y":3}, {"label":"?", "x":14.75, "y":3}, {"label":"Shift", "x":15.75, "y":3, "w":1.75}, {"label":"\u2191", "x":17.75, "y":3}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.5}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, {"x":6, "y":4, "w":2}, {"label":"Fn", "x":8, "y":4, "w":1.25}, {"x":9.75, "y":4, "w":2.75}, {"label":"Alt", "x":12.5, "y":4, "w":1.5}, {"label":"Ctrl", "x":15, "y":4, "w":1.5}, {"label":"\u2190", "x":16.75, "y":4}, {"label":"\u2193", "x":17.75, "y":4}, {"label":"\u2192", "x":18.75, "y":4}] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/basketweave/keymaps/default/keymap.c b/qmk/keyboards/basketweave/keymaps/default/keymap.c new file mode 100644 index 00000000..56bc4cbf --- /dev/null +++ b/qmk/keyboards/basketweave/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 null-ll + * + * 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 "basketweave.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_default( /* base */ + KC_GESC, 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_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_DEL, 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_UP, + 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_RIGHT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_MUTE), + + + [1] = LAYOUT_default( /* fn */ + /* esc ` 1 2 3 4 5 6 7 8 9 0 - = bspc */ + KC_TRNS, 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, + /* ins tab Q W E R T Y U I O P [ ] \ */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, + /* del caps A S D F G H J K L ; ' enter up */ + 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_INS, KC_TRNS, KC_PGUP, + /* shift Z X C V B B N M , . / shift right */ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_END, + /* ctrl alt space fn space alt ctrl left down rotary */ + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_MPLY) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/qmk/keyboards/basketweave/readme.md b/qmk/keyboards/basketweave/readme.md new file mode 100644 index 00000000..4523f043 --- /dev/null +++ b/qmk/keyboards/basketweave/readme.md @@ -0,0 +1,15 @@ +# Basketweave + +![Basketweave](https://i.imgur.com/lXhMxQUl.jpg) + +A through-hole Alice style keyboard with arrow keys and a rotary encoder + +* Keyboard Maintainer: [null-ll](https://github.com/null-ll) +* Hardware Supported: atmega32a +* Hardware Availability: [Clackery](https://clackery.com), [Github](https://github.com/null-ll/basketweave) + +Make example for this keyboard (after setting up your build environment): + + make basketweave:default + +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). diff --git a/qmk/keyboards/basketweave/rules.mk b/qmk/keyboards/basketweave/rules.mk new file mode 100644 index 00000000..1dfab079 --- /dev/null +++ b/qmk/keyboards/basketweave/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/qmk/keyboards/bear_65/bear_65.c b/qmk/keyboards/bear_65/bear_65.c new file mode 100644 index 00000000..a2ae572b --- /dev/null +++ b/qmk/keyboards/bear_65/bear_65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 MudkipMao + * + * 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 "bear_65.h" diff --git a/qmk/keyboards/bear_65/bear_65.h b/qmk/keyboards/bear_65/bear_65.h new file mode 100644 index 00000000..94ec89c8 --- /dev/null +++ b/qmk/keyboards/bear_65/bear_65.h @@ -0,0 +1,46 @@ +/* Copyright 2020 MudkipMao + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + K1E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K2E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K43, K45, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, KC_NO, K43, KC_NO, K45, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_full_bs( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K4E, \ + K1E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K2E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K43, K45, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, KC_NO, K43, KC_NO, K45, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/qmk/keyboards/bear_65/config.h b/qmk/keyboards/bear_65/config.h new file mode 100644 index 00000000..1b7524f0 --- /dev/null +++ b/qmk/keyboards/bear_65/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2020 MudkipMao + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA13B // Jacky's vendor ID, arbitrarily selected by MudkipMao +#define PRODUCT_ID 0x000A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jacky +#define PRODUCT Jacky Bear 65 Ergo + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } + +/* Setting the matrix value of top left key for bootmagic lite */ +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 1 + +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 15 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 139 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/qmk/keyboards/bear_65/info.json b/qmk/keyboards/bear_65/info.json new file mode 100644 index 00000000..67fc090a --- /dev/null +++ b/qmk/keyboards/bear_65/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Bear 65", + "url": "https://qmk.fm/keyboards", + "maintainer": "qmk", + "width": 20.75, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":11.25, "y":0}, {"label":"*", "x":12.25, "y":0}, {"label":"(", "x":13.25, "y":0}, {"label":")", "x":14.25, "y":0}, {"label":"_", "x":15.25, "y":0}, {"label":"+", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"~", "x":18.25, "y":0}, {"label":"Del", "x":19.75, "y":0}, {"label":"PgUp", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"{", "x":15.75, "y":1}, {"label":"}", "x":16.75, "y":1}, {"label":"Backspace", "x":17.75, "y":1, "w":1.5}, {"label":"PgDn", "x":0, "y":2}, {"label":"Caps Lock", "x":1.75, "y":2, "w":1.75}, {"label":"A", "x":3.5, "y":2}, {"label":"S", "x":4.5, "y":2}, {"label":"D", "x":5.5, "y":2}, {"label":"F", "x":6.5, "y":2}, {"label":"G", "x":7.5, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"\"", "x":16, "y":2}, {"label":"Enter", "x":17, "y":2, "w":2.25}, {"label":"Shift", "x":1.75, "y":3, "w":2.25}, {"label":"Z", "x":4, "y":3}, {"label":"X", "x":5, "y":3}, {"label":"C", "x":6, "y":3}, {"label":"V", "x":7, "y":3}, {"label":"B", "x":8, "y":3}, {"label":"B", "x":10.5, "y":3}, {"label":"N", "x":11.5, "y":3}, {"label":"M", "x":12.5, "y":3}, {"label":"<", "x":13.5, "y":3}, {"label":">", "x":14.5, "y":3}, {"label":"?", "x":15.5, "y":3}, {"label":"Shift", "x":16.5, "y":3, "w":1.75}, {"label":"Up", "x":18.25, "y":3}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.5}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"label":"Win", "x":8.25, "y":4}, {"x":10.5, "y":4, "w":2.75}, {"label":"Alt", "x":13.25, "y":4, "w":1.5}, {"label":"Left", "x":17.25, "y":4}, {"label":"Down", "x":18.25, "y":4}, {"label":"Right", "x":19.25, "y":4}] + }, + "LAYOUT_full_bs": { + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":11.25, "y":0}, {"label":"*", "x":12.25, "y":0}, {"label":"(", "x":13.25, "y":0}, {"label":")", "x":14.25, "y":0}, {"label":"_", "x":15.25, "y":0}, {"label":"+", "x":16.25, "y":0}, {"label":"Backspace", "x":17.25, "y":0, "w":2}, {"label":"Del", "x":19.75, "y":0}, {"label":"PgUp", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"{", "x":15.75, "y":1}, {"label":"}", "x":16.75, "y":1}, {"label":"|", "x":17.75, "y":1, "w":1.5}, {"label":"PgDn", "x":0, "y":2}, {"label":"Caps Lock", "x":1.75, "y":2, "w":1.75}, {"label":"A", "x":3.5, "y":2}, {"label":"S", "x":4.5, "y":2}, {"label":"D", "x":5.5, "y":2}, {"label":"F", "x":6.5, "y":2}, {"label":"G", "x":7.5, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"\"", "x":16, "y":2}, {"label":"Enter", "x":17, "y":2, "w":2.25}, {"label":"Shift", "x":1.75, "y":3, "w":2.25}, {"label":"Z", "x":4, "y":3}, {"label":"X", "x":5, "y":3}, {"label":"C", "x":6, "y":3}, {"label":"V", "x":7, "y":3}, {"label":"B", "x":8, "y":3}, {"label":"B", "x":10.5, "y":3}, {"label":"N", "x":11.5, "y":3}, {"label":"M", "x":12.5, "y":3}, {"label":"<", "x":13.5, "y":3}, {"label":">", "x":14.5, "y":3}, {"label":"?", "x":15.5, "y":3}, {"label":"Shift", "x":16.5, "y":3, "w":1.75}, {"label":"Up", "x":18.25, "y":3}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.5}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"label":"Win", "x":8.25, "y":4}, {"x":10.5, "y":4, "w":2.75}, {"label":"Alt", "x":13.25, "y":4, "w":1.5}, {"label":"Left", "x":17.25, "y":4}, {"label":"Down", "x":18.25, "y":4}, {"label":"Right", "x":19.25, "y":4}] + } + } +} diff --git a/qmk/keyboards/bear_65/keymaps/default/keymap.c b/qmk/keyboards/bear_65/keymaps/default/keymap.c new file mode 100644 index 00000000..b7d5cdf6 --- /dev/null +++ b/qmk/keyboards/bear_65/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 MudkipMao + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_ESC, 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_GRV, KC_DEL, + 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_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_LALT, KC_SPC, KC_LGUI, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_all( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + RGB_MOD, _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + RGB_TOG, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ) +}; diff --git a/qmk/keyboards/bear_65/keymaps/default/readme.md b/qmk/keyboards/bear_65/keymaps/default/readme.md new file mode 100644 index 00000000..d5173485 --- /dev/null +++ b/qmk/keyboards/bear_65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bear_65 diff --git a/qmk/keyboards/bear_65/keymaps/via/keymap.c b/qmk/keyboards/bear_65/keymaps/via/keymap.c new file mode 100644 index 00000000..2ddc5b43 --- /dev/null +++ b/qmk/keyboards/bear_65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 MudkipMao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_full_bs( + KC_ESC, 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_DEL, + 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_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_LALT, KC_SPC, KC_LGUI, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_full_bs( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + RGB_MOD, _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + RGB_TOG, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ), + [2] = LAYOUT_full_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ), + [3] = LAYOUT_full_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ) +}; diff --git a/qmk/keyboards/bear_65/keymaps/via/readme.md b/qmk/keyboards/bear_65/keymaps/via/readme.md new file mode 100644 index 00000000..5cb67ab2 --- /dev/null +++ b/qmk/keyboards/bear_65/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for bear_65 diff --git a/qmk/keyboards/bear_65/keymaps/via/rules.mk b/qmk/keyboards/bear_65/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/bear_65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/bear_65/readme.md b/qmk/keyboards/bear_65/readme.md new file mode 100644 index 00000000..44a5e955 --- /dev/null +++ b/qmk/keyboards/bear_65/readme.md @@ -0,0 +1,19 @@ +# Bear 65 + +![Bear 65](https://i.imgur.com/W1sVP1Tl.jpg) + +A gasket-mounted 65% keyboard inspired by the [TGR Alice](https://github.com/qmk/qmk_firmware/tree/master/keyboards/tgr/alice). Designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Bear 65 +* Hardware Availability: The GB happened July 15th 2020, units are still in production + +Make example for this keyboard (after setting up your build environment): + + make bear_65:default + +Flashing example for this keyboard: + + make bear_65: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). diff --git a/qmk/keyboards/bear_65/rules.mk b/qmk/keyboards/bear_65/rules.mk new file mode 100644 index 00000000..339c37c7 --- /dev/null +++ b/qmk/keyboards/bear_65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes # Use LTO flags to reduce firmware size diff --git a/qmk/keyboards/bm40hsrgb/config.h b/qmk/keyboards/bm40hsrgb/config.h index 53ef086d..5c1ee062 100644 --- a/qmk/keyboards/bm40hsrgb/config.h +++ b/qmk/keyboards/bm40hsrgb/config.h @@ -18,8 +18,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x3430 // "40" #define DEVICE_VER 0x0001 #define MANUFACTURER KPRepublic #define PRODUCT BM40 Hotswap RGB diff --git a/qmk/keyboards/bm40hsrgb/keymaps/via/keymap.c b/qmk/keyboards/bm40hsrgb/keymaps/via/keymap.c new file mode 100644 index 00000000..60faf17e --- /dev/null +++ b/qmk/keyboards/bm40hsrgb/keymaps/via/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2020 tominabox1 + * + * 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 + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BLTog| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_mit( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/qmk/keyboards/bm40hsrgb/keymaps/via/readme.md b/qmk/keyboards/bm40hsrgb/keymaps/via/readme.md new file mode 100644 index 00000000..bff946f3 --- /dev/null +++ b/qmk/keyboards/bm40hsrgb/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for bm40hsrgb diff --git a/qmk/keyboards/bm40hsrgb/keymaps/via/rules.mk b/qmk/keyboards/bm40hsrgb/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/bm40hsrgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/bm60poker/bm60poker.c b/qmk/keyboards/bm60poker/bm60poker.c new file mode 100644 index 00000000..a7a33520 --- /dev/null +++ b/qmk/keyboards/bm60poker/bm60poker.c @@ -0,0 +1,52 @@ +/* Copyright 2020 ipetepete + * + * 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 "bm60poker.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 }, + { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/qmk/keyboards/bm60poker/bm60poker.h b/qmk/keyboards/bm60poker/bm60poker.h new file mode 100644 index 00000000..02a28377 --- /dev/null +++ b/qmk/keyboards/bm60poker/bm60poker.h @@ -0,0 +1,32 @@ +/* Copyright 2020 ipetepete + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K49, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \ +} diff --git a/qmk/keyboards/bm60poker/config.h b/qmk/keyboards/bm60poker/config.h new file mode 100644 index 00000000..5eb4ad2a --- /dev/null +++ b/qmk/keyboards/bm60poker/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2020 ipetepete + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM60POKER + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 67 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 67 + #define RGB_MATRIX_KEYPRESSES + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 5 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/qmk/keyboards/bm60poker/info.json b/qmk/keyboards/bm60poker/info.json new file mode 100644 index 00000000..d2e13ca4 --- /dev/null +++ b/qmk/keyboards/bm60poker/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "BM60POKER", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3D (B3,F7)", "x":12.25, "y":3, "w":2.75}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (E6,C7)", "x":12.5, "y":4, "w":1.25}, + {"label":"K4D (E6,F7)", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/qmk/keyboards/bm60poker/keymaps/default/keymap.c b/qmk/keyboards/bm60poker/keymaps/default/keymap.c new file mode 100644 index 00000000..efd74ad1 --- /dev/null +++ b/qmk/keyboards/bm60poker/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 ipetepete + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + 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_BSPC, + 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + RESET, 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_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/qmk/keyboards/bm60poker/keymaps/ipetepete/keymap.c b/qmk/keyboards/bm60poker/keymaps/ipetepete/keymap.c new file mode 100644 index 00000000..e5966024 --- /dev/null +++ b/qmk/keyboards/bm60poker/keymaps/ipetepete/keymap.c @@ -0,0 +1,144 @@ +/* Copyright 2020 ipetepete + * + * 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 + +enum layers { +_qwerty, +_gamer, +_colemak, +_fn, +_rgb, +_spcfn +}; + + +enum keycodes { +gamer = SAFE_RANGE, +qwerty, +colemak +}; + +#define KC_SPFN LT(_spcfn, KC_SPC) // press for space, hold for function layer (aka spacefn) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_qwerty] = LAYOUT_60_ansi( + 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_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, + CTL_T(KC_ESC), 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPFN, KC_RALT, KC_RCTL, MO(_fn), MO(_rgb) + ), + // Gamer standard qwerty layout but with normal space for jumping etc + [_gamer] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPACE, _______, _______, _______, _______ + ), + [_colemak] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______, + _______, _______, _______, KC_SPFN, _______, _______, _______, _______ + ), + [_fn] = LAYOUT_60_ansi( + KC_GESC, 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_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, + KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + qwerty, colemak, gamer, _______, _______, _______, _______, _______ + ), + [_rgb] = LAYOUT_60_ansi( + _______, 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_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_spcfn] = LAYOUT_60_ansi( + _______, SGUI(1), SGUI(2), SGUI(3), SGUI(4), SGUI(5), SGUI(6), SGUI(7), SGUI(8), SGUI(9), SGUI(0), _______, _______, KC_DEL, + _______, _______, _______, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, KC_PGDN, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case qwerty: + if (record->event.pressed) { + layer_clear(); + layer_on(_qwerty); + set_single_persistent_default_layer(_qwerty); + } + return false; + break; + case colemak: + if (record->event.pressed) { + layer_clear(); + layer_on(_colemak); + } + return false; + break; + case gamer: + if (record->event.pressed) { + layer_clear(); + layer_on(_gamer); + } + return false; + break; + + } + return true; +} + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + + +void rgb_matrix_indicators_kb(void) +{ + if (!g_suspend_state && rgb_matrix_config.enable) { + switch (get_highest_layer(layer_state)) { + //case _qwerty: + // rgb_matrix_set_color(26, 0xFF, 0x00, 0x00); + // break; + case _colemak: + rgb_matrix_set_color(55, 0xFF, 0xFF, 0xFF); + break; + case _spcfn: + rgb_matrix_set_color(22, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(35, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(36, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(37, 0xFF, 0x00, 0x00); + break; + case _gamer: + rgb_matrix_set_color(16, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(29, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(30, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(31, 0xFF, 0x00, 0xFF); + break; + } + } +} diff --git a/qmk/keyboards/bm60poker/keymaps/ipetepete/readme.md b/qmk/keyboards/bm60poker/keymaps/ipetepete/readme.md new file mode 100644 index 00000000..7d381ff1 --- /dev/null +++ b/qmk/keyboards/bm60poker/keymaps/ipetepete/readme.md @@ -0,0 +1 @@ +# Simple 60% for coding diff --git a/qmk/keyboards/bm60poker/keymaps/ipetepete/rules.mk b/qmk/keyboards/bm60poker/keymaps/ipetepete/rules.mk new file mode 100644 index 00000000..3a025ba3 --- /dev/null +++ b/qmk/keyboards/bm60poker/keymaps/ipetepete/rules.mk @@ -0,0 +1 @@ +NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/qmk/keyboards/bm60poker/readme.md b/qmk/keyboards/bm60poker/readme.md new file mode 100644 index 00000000..62dde405 --- /dev/null +++ b/qmk/keyboards/bm60poker/readme.md @@ -0,0 +1,15 @@ +# BM60 Poker 60% Mechanical Keyboard RGB PCB + +A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. + +* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) +* Hardware Supported: BM60 POKER RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make bm60poker:default + +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). + +Video tutorials for customizing the layout: [QMK Tutorials](https://www.youtube.com/playlist?list=PLZlceRZZjRugJFL-vnenYnDrbMc6wu_e_) - By MechMerlin diff --git a/qmk/keyboards/bm60poker/rules.mk b/qmk/keyboards/bm60poker/rules.mk new file mode 100644 index 00000000..3f4a00ea --- /dev/null +++ b/qmk/keyboards/bm60poker/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 +LAYOUTS = 60_ansi diff --git a/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.c b/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.c index 3fa1bc89..4e292bc5 100644 --- a/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.c +++ b/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.c @@ -32,7 +32,9 @@ led_config_t g_led_config = { { // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 48 }, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } }, { // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, @@ -43,6 +45,8 @@ led_config_t g_led_config = { { // LShift,<, Z, X, C, V, B, N, M, ,, ., Shift, Up, / 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 } }; #endif diff --git a/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.h b/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.h index f5216108..fce8925a 100644 --- a/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.h +++ b/qmk/keyboards/bm60rgb_iso/bm60rgb_iso.h @@ -17,7 +17,7 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_60_iso_arrow( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1D, \ @@ -30,3 +30,5 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D }, \ } + +#define LAYOUT LAYOUT_60_iso_arrow diff --git a/qmk/keyboards/bm60rgb_iso/keymaps/default/keymap.c b/qmk/keyboards/bm60rgb_iso/keymaps/default/keymap.c index 1cf1804b..9eca076d 100644 --- a/qmk/keyboards/bm60rgb_iso/keymaps/default/keymap.c +++ b/qmk/keyboards/bm60rgb_iso/keymaps/default/keymap.c @@ -16,19 +16,18 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - 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_BSPC, - 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + [0] = LAYOUT_60_iso_arrow( + KC_GESC, 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_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_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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ + [1] = LAYOUT_60_iso_arrow( + RESET, 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_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), - }; diff --git a/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h b/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h new file mode 100644 index 00000000..a1bb75eb --- /dev/null +++ b/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h @@ -0,0 +1,34 @@ +/* Copyright 2020 jakobst1n + * + * 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 . + */ + +#pragma once + +/***************************** + * SLEEPMODE CONFIG + *****************************/ +#define SLEEPMODE_ENABLE // see keymap readme for info about this function. + +/* How long the backlight should stay on + without any interaction before turning off. */ +#define SLEEPMODE_TIMEOUT 10 // in minutes +/* Which mode we should enter after the timeout, + RGB_MATRIX_NONE to turn off. + I thinks RGB_MATRIX_DIGITAL RAIN is pretty :) */ +#define SLEEPMODE_RGB_MODE RGB_MATRIX_NONE +/* The desired animation speed when in "sleep mode" */ +#define SLEEPMODE_RGB_ANIMATION_SPEED 10 +/* The desired brightness when in "sleep mode" */ +#define SLEEPMODE_RGB_VAL 10 diff --git a/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c b/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c new file mode 100644 index 00000000..4e874b26 --- /dev/null +++ b/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c @@ -0,0 +1,116 @@ +/* Copyright 2020 jakobst1n + * + * 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 + +#ifdef RGB_MATRIX_ENABLE +#ifdef SLEEPMODE_ENABLE + /* A bunch of vars to keep track of the rgb states + before sleepmode is turned on */ + static bool sleepmode_on = false; + static uint8_t sleepmode_before_mode = -1; + static uint8_t sleepmode_before_brightness = -1; + static uint8_t sleepmode_before_anim_speed = -1; + static uint8_t halfmin_counter = 0; + static uint16_t idle_timer = 0; +#endif +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* ,-----------------------------------------------------------. + * |ESC| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | ´ | BACK | + * |-----------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | Å | ¨ | RET | + * |------------------------------------------------------\ | + * | CAPS | A | S | D | F | G | H | J | K | L | Ø | Æ | @ | | + * |-----------------------------------------------------------| + * | ^ | < | Z | X | C | V | B | N | M | , | . | ^/- | U | - | + * |-----------------------------------------------------------| + * |ctrl| win| alt| |alt| fn| L | D | R | + * `-----------------------------------------------------------' */ + [0] = LAYOUT( + 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_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH), KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, OSL(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* ,-----------------------------------------------------------. + * |GRA| f1| f2| f3| f4| f5| f6| f7| f8| f9|f10|f11|f12| DEL | + * |-----------------------------------------------------------| + * | | R | R | R | R | R | R | R | R | | | | | | + * |------------------------------------------------------\ | + * | | | | | | | H |PGD|PGU| E | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | |V_D|V_U| + * |-----------------------------------------------------------| + * | | | | | |PRE|PLA|NEX| + * `-----------------------------------------------------------' */ + [1] = LAYOUT( + KC_GRV, 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_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ), +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#if defined(RGB_MATRIX_ENABLE) && defined(SLEEPMODE_ENABLE) + if (record->event.pressed) { + if (sleepmode_before_mode == -1) { sleepmode_before_mode = rgb_matrix_get_mode(); } + if (sleepmode_before_brightness == -1) { sleepmode_before_brightness = rgb_matrix_get_val(); } + if (sleepmode_before_anim_speed == -1) { sleepmode_before_anim_speed = rgb_matrix_get_speed(); } + + if (sleepmode_on == true) { + // rgb_matrix_enable_noeeprom(); + rgb_matrix_mode_noeeprom(sleepmode_before_mode); + rgb_matrix_set_speed_noeeprom(sleepmode_before_anim_speed); + rgb_matrix_sethsv_noeeprom(rgb_matrix_get_hue(), rgb_matrix_get_sat(), sleepmode_before_brightness); + sleepmode_on = false; + } + idle_timer = timer_read(); + halfmin_counter = 0; + } +#endif + return true; + } + + void matrix_scan_user(void) { +#if defined(RGB_MATRIX_ENABLE) && defined(SLEEPMODE_ENABLE) + /* idle_timer needs to be set one time */ + if (idle_timer == 0) idle_timer = timer_read(); + + if ( !sleepmode_on && timer_elapsed(idle_timer) > 30000) { + halfmin_counter++; + idle_timer = timer_read(); + } + + if ( !sleepmode_on && halfmin_counter >= SLEEPMODE_TIMEOUT * 2) {// * 2) { + layer_clear(); + sleepmode_before_anim_speed = rgb_matrix_get_speed(); + sleepmode_before_brightness = rgb_matrix_get_val(); + sleepmode_before_mode = rgb_matrix_get_mode(); + //rgb_matrix_disable_noeeprom(); + + rgb_matrix_mode_noeeprom(SLEEPMODE_RGB_MODE); + rgb_matrix_set_speed_noeeprom(SLEEPMODE_RGB_ANIMATION_SPEED); + rgb_matrix_sethsv_noeeprom(rgb_matrix_get_hue(), rgb_matrix_get_sat(), SLEEPMODE_RGB_VAL); + sleepmode_on = true; + halfmin_counter = 0; + } +#endif +} diff --git a/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md b/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md new file mode 100644 index 00000000..af5b29da --- /dev/null +++ b/qmk/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md @@ -0,0 +1,17 @@ +# Nordic keymap for BM60rgb_iso +Very few changes from default keyboard, apart from the button right of leftshift, +and adding some more buttons on the second layer (function keys, home/end, pg up/down and media keys). + +On the default layout, the top left button is RESET on the second layer, +this board has a reset button on the back. So I feel like it serves a better +purpose as the grave key (because grave-escape doesn't really +work with mac and norwegian layout). It could of course also be on the base layer. +But as a regular vim user I use escape more than the grave key. + +I have also added mod-tap to the right shift, with the "default" position for +`KC_SLSH` beeing on the far right, that works fine. + +There is also a "sleep-mode" function added, +this can be enabled defining `SLEEPMODE_ENABLE` in `config.h`. +This makes the keyboard backlight turn off after 10 minutes without any +keypresses, and turn on again on keypress. (This is something different than `USB_SUSPEND`) diff --git a/qmk/keyboards/boardsource/4x12/config.h b/qmk/keyboards/boardsource/4x12/config.h index e8f85858..b1314ca7 100644 --- a/qmk/keyboards/boardsource/4x12/config.h +++ b/qmk/keyboards/boardsource/4x12/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xF7E0 +#define VENDOR_ID 0x4273 // "Bs" - Boardsource #define PRODUCT_ID 0x0412 #define DEVICE_VER 0x0000 #define MANUFACTURER Boardsource diff --git a/qmk/keyboards/boardsource/5x12/keymaps/via/keymap.c b/qmk/keyboards/boardsource/5x12/keymaps/via/keymap.c index 5b97e995..8601fa37 100644 --- a/qmk/keyboards/boardsource/5x12/keymaps/via/keymap.c +++ b/qmk/keyboards/boardsource/5x12/keymaps/via/keymap.c @@ -35,12 +35,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), + [3] = LAYOUT_ortho_5x12( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/qmk/keyboards/boardsource/holiday/spooky/config.h b/qmk/keyboards/boardsource/holiday/spooky/config.h new file mode 100644 index 00000000..92eb4c32 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/config.h @@ -0,0 +1,133 @@ +/* +Copyright 2020 boardsource + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4273 +#define PRODUCT_ID 0x1031 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Boardsource +#define PRODUCT spooky + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +#define DIRECT_PINS { {E6,B4,B5}, {B3,B2,B6}} + +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 5 // Number of LEDs +#endif + + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +//#define RGB_DI_PIN E2 +//#ifdef RGB_DI_PIN +//# define RGBLED_NUM 16 +//# define RGBLIGHT_HUE_STEP 8 +//# define RGBLIGHT_SAT_STEP 8 +//# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/boardsource/holiday/spooky/info.json b/qmk/keyboards/boardsource/holiday/spooky/info.json new file mode 100644 index 00000000..a39b45b7 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "spooky", + "url": "https://boardsource.xyz/store/5f783f6da2c1b43e37ca0795", + "maintainer": "boardsource", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "k00", "x": 0, "y": 0 }, + { "label": "k01", "x": 1, "y": 0 }, + { "label": "k02", "x": 2, "y": 0 }, + + { "label": "k10", "x": 0, "y": 1 }, + { "label": "k11", "x": 1, "y": 1 }, + { "label": "k12", "x": 2, "y": 1 } + ] + } + } +} diff --git a/qmk/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c b/qmk/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c new file mode 100644 index 00000000..b4fcfc1b --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2020 boardsource + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_ortho_2x3( + KC_F1, KC_F2, KC_F3, + KC_F4, KC_F5,KC_F6 + ), + }; + diff --git a/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c new file mode 100644 index 00000000..44b234e4 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2020 boardsource + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_ortho_2x3( + RGB_TOG, KC_VOLU, KC_F2, + RGB_MOD, KC_VOLD, KC_F1 + ), +}; +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_RIP(void) { + static const char PROGMEM my_logo[] = { +0xff, 0xff, 0x07, 0x1e, 0x70, 0xc0, 0x00, 0x00, 0xe0, 0x78, 0x1e, 0x07, 0xff, 0xfe, 0x00, 0x00, +0x00, 0x00, 0x03, 0x06, 0x1c, 0xb8, 0xf0, 0xe0, 0xb8, 0x1c, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x66, 0x63, 0x63, 0x43, 0x43, 0xc3, 0xc2, 0x82, +0x00, 0x00, 0x00, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0xc0, 0xf0, 0x30, 0xf0, 0x80, 0x00, 0x00, 0xc0, +0xf0, 0x10, 0x00, 0x00, 0x00, 0xf3, 0xf3, 0x00, 0x00, 0x10, 0x18, 0xfe, 0x18, 0x10, 0x10, 0x10, +0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, +0x30, 0x10, 0x18, 0x18, 0x18, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0x90, 0x90, 0x98, +0x98, 0x98, 0xb0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x90, 0x98, 0x98, 0x18, 0x18, 0x10, 0x00, +0x1f, 0x1f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, +0x00, 0x10, 0x1c, 0x0e, 0x07, 0x01, 0x00, 0x00, 0x01, 0x07, 0x0e, 0x1c, 0x18, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x18, 0x18, 0x10, 0x10, 0x18, 0x18, 0x0d, 0x0f, +0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x1e, 0x1e, 0x07, 0x00, 0x00, 0x01, 0x0f, 0x1c, 0x1e, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x18, 0x18, 0x18, +0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x10, 0x10, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x1f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x18, 0x10, +0x10, 0x10, 0x18, 0x18, 0x08, 0x00, 0x00, 0x08, 0x18, 0x10, 0x11, 0x11, 0x11, 0x19, 0x0f, 0x0e, +0x00, 0x30, 0x30, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, +0x30, 0x10, 0x18, 0x18, 0x10, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x40, 0xf0, 0xb0, 0x10, 0x18, +0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x70, 0x10, 0x18, 0x18, 0x10, 0x30, +0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x18, +0x10, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x30, 0x10, 0x18, 0x10, 0x30, 0xf0, +0xe0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, +0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x10, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc7, +0xc4, 0x8c, 0x8c, 0xcc, 0xc4, 0x77, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x7d, 0xc7, 0xc3, 0x82, +0x82, 0xc3, 0xc7, 0x7d, 0x7c, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0x80, 0x80, 0xc0, 0xc0, +0x7f, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf0, 0xd8, 0xcc, +0xc6, 0xc3, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0x70, +0x3f, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xcc, 0xc7, 0xc3, 0xc1, 0x00, 0x00, +0x00, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0x60, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(my_logo, sizeof(my_logo)); +} + +void oled_task_user(void) { + render_RIP(); + } + +#endif diff --git a/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk new file mode 100644 index 00000000..c5826621 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c new file mode 100644 index 00000000..88fc47a1 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2020 boardsource + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_ortho_2x3( + RGB_TOG, KC_1, KC_2, + RGB_MOD, KC_3,KC_4 + ), +}; +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_RIP(void) { + static const char PROGMEM my_logo[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x04, +0x04, 0x7c, 0xfc, 0xf0, 0x00, 0x00, 0x40, 0x20, 0xf0, 0x7c, 0x06, 0x00, 0x41, 0xc0, 0x00, 0x00, +0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0xc0, 0x00, +0x00, 0x00, 0xe0, 0x60, 0x00, 0x80, 0x40, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x02, +0x01, 0xc1, 0xf8, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, +0x03, 0x00, 0x00, 0x0f, 0x06, 0x01, 0x00, 0x1e, 0x1f, 0x10, 0x00, 0x00, 0x1e, 0x1f, 0x08, 0xc0, +0x3e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x11, 0x08, 0x04, 0x1e, 0x11, 0x00, +0x08, 0x06, 0x01, 0x00, 0x1e, 0x19, 0x08, 0x00, 0x1e, 0x0b, 0x08, 0x00, 0x1f, 0x1b, 0x08, 0x00, +0x18, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x19, 0x08, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, +0x84, 0x84, 0x84, 0xcc, 0x38, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x04, 0x05, 0x0f, 0x79, 0xe1, 0x00, +0x00, 0x00, 0xc0, 0x78, 0x0c, 0x00, 0x00, 0x0c, 0x84, 0x84, 0xcc, 0xf8, 0x30, 0x00, 0x00, 0xe0, +0xf8, 0x0c, 0x04, 0x04, 0x0c, 0xf8, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x08, 0x0c, +0x04, 0x04, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x0c, 0x04, 0x0c, 0x18, 0xf0, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0x10, 0x10, 0x10, 0x19, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x07, 0x00, +0x20, 0x1e, 0x03, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x1d, 0x0f, 0x00, 0x00, 0x03, +0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x00, 0x00, 0x38, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x18, 0x1c, +0x16, 0x13, 0x10, 0x10, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(my_logo, sizeof(my_logo)); +} + +void oled_task_user(void) { + render_RIP(); + } + +#endif diff --git a/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk new file mode 100644 index 00000000..c5826621 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/boardsource/holiday/spooky/readme.md b/qmk/keyboards/boardsource/holiday/spooky/readme.md new file mode 100644 index 00000000..a4b16595 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/readme.md @@ -0,0 +1,15 @@ +# spooky + +![spooky](https://i.imgur.com/qAeA66wl.jpg) + +this is a limited edition macro pad for the spookiest time of year + +* Keyboard Maintainer: [boardsource](https://github.com/boardsource) +* Hardware Supported: spooky v1 PCB +* Hardware Availability: [From Boardsource store around halloween time](https://boardsource.xyz/store/5f783f6da2c1b43e37ca0795) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/holiday/spooky:default + +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). diff --git a/qmk/keyboards/boardsource/holiday/spooky/rules.mk b/qmk/keyboards/boardsource/holiday/spooky/rules.mk new file mode 100644 index 00000000..d23e9551 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/boardsource/holiday/spooky/spooky.c b/qmk/keyboards/boardsource/holiday/spooky/spooky.c new file mode 100644 index 00000000..87fe02c1 --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/spooky.c @@ -0,0 +1,17 @@ +/* Copyright 2020 boardsource + * + * 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 "spooky.h" diff --git a/qmk/keyboards/boardsource/holiday/spooky/spooky.h b/qmk/keyboards/boardsource/holiday/spooky/spooky.h new file mode 100644 index 00000000..42127b8f --- /dev/null +++ b/qmk/keyboards/boardsource/holiday/spooky/spooky.h @@ -0,0 +1,35 @@ +/* Copyright 2020 boardsource + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_2x3( \ + k00, k01, k02, \ + k10, k11, k12 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 } \ +} diff --git a/qmk/keyboards/boardwalk/keymaps/default_2x2u/keymap.c b/qmk/keyboards/boardwalk/keymaps/default_2x2u/keymap.c new file mode 100644 index 00000000..f30d15c0 --- /dev/null +++ b/qmk/keyboards/boardwalk/keymaps/default_2x2u/keymap.c @@ -0,0 +1,90 @@ +/* + * 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 + +// Layer shorthand +enum layer_names { + _BASE, + _FN, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | RAISE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_2x2u( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, MO(_RAISE), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_2x2u( + KC_GRV, 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_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Raise Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_2x2u( + KC_GRV, 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_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/qmk/keyboards/boardwalk/keymaps/default_2x2u/readme.md b/qmk/keyboards/boardwalk/keymaps/default_2x2u/readme.md new file mode 100644 index 00000000..94a68e74 --- /dev/null +++ b/qmk/keyboards/boardwalk/keymaps/default_2x2u/readme.md @@ -0,0 +1 @@ +# The default_2x2u keymap for Boardwalk diff --git a/qmk/keyboards/boardwalk/keymaps/niclake/config.h b/qmk/keyboards/boardwalk/keymaps/niclake/config.h new file mode 100644 index 00000000..9028fcf9 --- /dev/null +++ b/qmk/keyboards/boardwalk/keymaps/niclake/config.h @@ -0,0 +1,18 @@ +/* + * 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 . + */ + +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/qmk/keyboards/boardwalk/keymaps/niclake/keymap.c b/qmk/keyboards/boardwalk/keymaps/niclake/keymap.c new file mode 100644 index 00000000..2188660d --- /dev/null +++ b/qmk/keyboards/boardwalk/keymaps/niclake/keymap.c @@ -0,0 +1,150 @@ +/* + * 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 + +enum layer_names { + _BASE, + _QWERTY, + _FN, + _NUM, + _ADJ, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + NUM, + ADJ, + MACWIN +}; + +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_BASE) +#define FN MO(_FN) +#define NUM TT(_NUM) +#define ADJ MO(_ADJ) +#define MACWIN AG_TOGG +#define RGB_ON RGB_MODE_PLAIN + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer (Colemak) + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | [ | ] | J | L | U | Y | ; | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _FN | A | R | S | T | D | HOME | PG UP | H | N | E | I | O | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | K | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_hhkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + FN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _FN | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_hhkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + FN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* FN + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F11 | F12 | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | Prev | Play | Next | | | | | | Pg Up | Up | Pg Dn | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | XXXXXX | | Mute | Vol Dn | Vol Up | | | | | Left | Down | Right | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | Home | | End | | CapsLk | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | _ADJ | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_hhkb( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END, _______, KC_CAPS, + _______, _______, _______, ADJ, _______, _______, _______, _______, _______, _______ + ), + + /* Num Pad (NUM) + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | Num Lk | KP / | KP * | KP - | Scr Lk | Pause | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _ADJ | | | | | | | | KP 4 | KP 5 | KP 6 | KP + | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | XXXXXX | | KP 0 | KP 0 | KP . | KP Ent | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______, + ADJ, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, + _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______ + ), + + /* ADJUST + RGB Control + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | Static | Breath | Rainbw | Swirl | Gradnt | Test | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | On/Off | ModeUp | Hue Up | Sat Up | Val Up | | | | | | | RESET | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | XXXXXX | MACWIN | | Hue Dn | Sat Dn | Val Dn | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | Colemak| QWERTY | | | | | | | | | | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | XXXXXX | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_ADJ] = LAYOUT_ortho_hhkb( + _______, RGB_ON, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_G, RGB_M_T, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, MACWIN, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/qmk/keyboards/boardwalk/keymaps/niclake/readme.md b/qmk/keyboards/boardwalk/keymaps/niclake/readme.md new file mode 100644 index 00000000..fb772a9a --- /dev/null +++ b/qmk/keyboards/boardwalk/keymaps/niclake/readme.md @@ -0,0 +1,8 @@ +# Nic Lake's Boardwalk Layout + +This is Nic's Boardwalk layout, which is based off of the default Pok3r layout. + +- Colemak base layer w/ QWERTY support +- Bottom row set up for Mac usage (use `MACWIN`/`AG_TOGG` to toggle) +- Latching Numpad layer for data entry +- Uses [Space Cadet shift keys](https://docs.qmk.fm/#/feature_space_cadet?id=usage) \ No newline at end of file diff --git a/qmk/keyboards/boardwalk/keymaps/niclake/rules.mk b/qmk/keyboards/boardwalk/keymaps/niclake/rules.mk new file mode 100644 index 00000000..000a2e12 --- /dev/null +++ b/qmk/keyboards/boardwalk/keymaps/niclake/rules.mk @@ -0,0 +1,3 @@ +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes +BOOTMAGIC_ENABLE = full diff --git a/qmk/keyboards/c39/keymaps/drashna/config.h b/qmk/keyboards/c39/keymaps/drashna/config.h index 789b7cc1..73b0b8ac 100644 --- a/qmk/keyboards/c39/keymaps/drashna/config.h +++ b/qmk/keyboards/c39/keymaps/drashna/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once // place overrides here diff --git a/qmk/keyboards/c39/keymaps/drashna/keymap.c b/qmk/keyboards/c39/keymaps/drashna/keymap.c index 88293813..3fd3ef35 100644 --- a/qmk/keyboards/c39/keymaps/drashna/keymap.c +++ b/qmk/keyboards/c39/keymaps/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" /* diff --git a/qmk/keyboards/cannonkeys/ortho48/rules.mk b/qmk/keyboards/cannonkeys/ortho48/rules.mk index 5e18d91c..6e468c49 100644 --- a/qmk/keyboards/cannonkeys/ortho48/rules.mk +++ b/qmk/keyboards/cannonkeys/ortho48/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/qmk/keyboards/cannonkeys/ortho60/rules.mk b/qmk/keyboards/cannonkeys/ortho60/rules.mk index 80b31a12..ea9bd6b2 100644 --- a/qmk/keyboards/cannonkeys/ortho60/rules.mk +++ b/qmk/keyboards/cannonkeys/ortho60/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/qmk/keyboards/cannonkeys/ortho75/rules.mk b/qmk/keyboards/cannonkeys/ortho75/rules.mk index ae196fd8..e132ccaf 100644 --- a/qmk/keyboards/cannonkeys/ortho75/rules.mk +++ b/qmk/keyboards/cannonkeys/ortho75/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/qmk/keyboards/cannonkeys/practice60/rules.mk b/qmk/keyboards/cannonkeys/practice60/rules.mk index 3713b607..3f9ca144 100644 --- a/qmk/keyboards/cannonkeys/practice60/rules.mk +++ b/qmk/keyboards/cannonkeys/practice60/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/qmk/keyboards/cannonkeys/practice65/rules.mk b/qmk/keyboards/cannonkeys/practice65/rules.mk index 5fd4892d..344844b0 100644 --- a/qmk/keyboards/cannonkeys/practice65/rules.mk +++ b/qmk/keyboards/cannonkeys/practice65/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # project specific files VPATH += keyboards/cannonkeys/bluepill diff --git a/qmk/keyboards/clawsome/fightpad/config.h b/qmk/keyboards/clawsome/fightpad/config.h new file mode 100644 index 00000000..6f2e78b6 --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7767 +#define PRODUCT_ID 0x481C +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT FightPad +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B5, B6 } +#define MATRIX_COL_PINS { D7, E6, B4, B2, B3, B1, F7 } + +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/clawsome/fightpad/fightpad.c b/qmk/keyboards/clawsome/fightpad/fightpad.c new file mode 100644 index 00000000..f0dae8ea --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/fightpad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 "fightpad.h" \ No newline at end of file diff --git a/qmk/keyboards/clawsome/fightpad/fightpad.h b/qmk/keyboards/clawsome/fightpad/fightpad.h new file mode 100644 index 00000000..ff92afd6 --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/fightpad.h @@ -0,0 +1,26 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K01, K03, K04, K05, K06, \ + K10, K11, K12, K13, K14, K15, K16 \ +) { \ + { KC_NO, K01, KC_NO, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ +} diff --git a/qmk/keyboards/clawsome/fightpad/info.json b/qmk/keyboards/clawsome/fightpad/info.json new file mode 100644 index 00000000..b5ad80ef --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "FightPad", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 8, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K01 (B5,E6)", "x":1, "y":0}, + {"label":"K03 (B5,B2)", "x":4, "y":0}, + {"label":"K04 (B5,B3)", "x":5, "y":0}, + {"label":"K05 (B5,B1)", "x":6, "y":0}, + {"label":"K06 (B5,F7)", "x":7, "y":0}, + {"label":"K10 (B6,D7)", "x":0, "y":1}, + {"label":"K11 (B6,E6)", "x":1, "y":1}, + {"label":"K12 (B6,B4)", "x":2, "y":1}, + {"label":"K13 (B6,B2)", "x":4, "y":1}, + {"label":"K14 (B6,B3)", "x":5, "y":1}, + {"label":"K15 (B6,B1)", "x":6, "y":1}, + {"label":"K16 (B6,F7)", "x":7, "y":1} + ] + } + } +} diff --git a/qmk/keyboards/clawsome/fightpad/keymaps/default/keymap.c b/qmk/keyboards/clawsome/fightpad/keymaps/default/keymap.c new file mode 100644 index 00000000..88db84c7 --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 REPLACE_WITH_YOUR_NAME + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_W, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_H, KC_J, KC_K, KC_L + ), + +}; + diff --git a/qmk/keyboards/clawsome/fightpad/readme.md b/qmk/keyboards/clawsome/fightpad/readme.md new file mode 100644 index 00000000..eaca1535 --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/readme.md @@ -0,0 +1,13 @@ +# FightPad + +This is a 2x7 macropad. + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: FightPad; Pro Micro or Elite-C +* Hardware Availability: [Clawsome Boards](https://www.clawboards.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make clawsome/fightpad:default + +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). diff --git a/qmk/keyboards/clawsome/fightpad/rules.mk b/qmk/keyboards/clawsome/fightpad/rules.mk new file mode 100644 index 00000000..fd76a524 --- /dev/null +++ b/qmk/keyboards/clawsome/fightpad/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/clawsome/roadster/config.h b/qmk/keyboards/clawsome/roadster/config.h new file mode 100644 index 00000000..85f94421 --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7767 +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT Roadster + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D2, D3, D0, D1 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6 } + +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/clawsome/roadster/info.json b/qmk/keyboards/clawsome/roadster/info.json new file mode 100644 index 00000000..93b5f11f --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "Roadster", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (D2,D4)", "x":0, "y":0}, + {"label":"K01 (D2,C6)", "x":1, "y":0}, + {"label":"K02 (D2,D7)", "x":2, "y":0}, + {"label":"K03 (D2,E6)", "x":3, "y":0}, + {"label":"K04 (D2,B4)", "x":4, "y":0}, + {"label":"K05 (D2,B5)", "x":5, "y":0}, + {"label":"K06 (D2,B6)", "x":6, "y":0}, + {"label":"K07 (D2,B2)", "x":7, "y":0}, + {"label":"K08 (D2,B3)", "x":8, "y":0}, + {"label":"K09 (D2,B1)", "x":9, "y":0}, + {"label":"K0A (D2,F7)", "x":10, "y":0}, + {"label":"K0B (D2,F6)", "x":11, "y":0}, + {"label":"K10 (D3,D4)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (D3,C6)", "x":1.5, "y":1}, + {"label":"K12 (D3,D7)", "x":2.5, "y":1}, + {"label":"K13 (D3,E6)", "x":3.5, "y":1}, + {"label":"K14 (D3,B4)", "x":4.5, "y":1}, + {"label":"K15 (D3,B5)", "x":5.5, "y":1}, + {"label":"K16 (D3,B6)", "x":6.5, "y":1}, + {"label":"K17 (D3,B2)", "x":7.5, "y":1}, + {"label":"K18 (D3,B3)", "x":8.5, "y":1}, + {"label":"K19 (D3,B1)", "x":9.5, "y":1}, + {"label":"K1B (D3,F6)", "x":10.5, "y":1, "w":1.5}, + {"label":"K20 (D0,D4)", "x":0, "y":2}, + {"label":"K21 (D0,C6)", "x":1, "y":2}, + {"label":"K22 (D0,D7)", "x":2, "y":2}, + {"label":"K23 (D0,E6)", "x":3, "y":2}, + {"label":"K24 (D0,B4)", "x":4, "y":2}, + {"label":"K25 (D0,B5)", "x":5, "y":2}, + {"label":"K26 (D0,B6)", "x":6, "y":2}, + {"label":"K27 (D0,B2)", "x":7, "y":2}, + {"label":"K28 (D0,B3)", "x":8, "y":2}, + {"label":"K29 (D0,B1)", "x":9, "y":2}, + {"label":"K2A (D0,F7)", "x":10, "y":2}, + {"label":"K2B (D0,F6)", "x":11, "y":2}, + {"label":"K30 (D1,D4)", "x":0, "y":3}, + {"label":"K31 (D1,C6)", "x":1, "y":3}, + {"label":"K32 (D1,D7)", "x":2, "y":3}, + {"label":"K34 (D1,B4)", "x":3, "y":3, "w":2}, + {"label":"K36 (D1,B6)", "x":5, "y":3, "w":2}, + {"label":"K38 (D1,B3)", "x":7, "y":3, "w":2}, + {"label":"K39 (D1,B1)", "x":9, "y":3}, + {"label":"K3A (D1,F7)", "x":10, "y":3}, + {"label":"K3B (D1,F6)", "x":11, "y":3} + ] + } + } +} + diff --git a/qmk/keyboards/clawsome/roadster/keymaps/default/keymap.c b/qmk/keyboards/clawsome/roadster/keymaps/default/keymap.c new file mode 100644 index 00000000..55e12131 --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_UP, KC_LSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + +}; + diff --git a/qmk/keyboards/clawsome/roadster/readme.md b/qmk/keyboards/clawsome/roadster/readme.md new file mode 100644 index 00000000..20c0f0ad --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/readme.md @@ -0,0 +1,13 @@ +# Roadster + +This is a 4x12 keyboard. + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: Roaster; Pro Micro or Elite-C +* Hardware Availability: [Clawsome Boards](https://www.clawboards.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make clawsome/roadster:default + +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). diff --git a/qmk/keyboards/clawsome/roadster/roadster.c b/qmk/keyboards/clawsome/roadster/roadster.c new file mode 100644 index 00000000..be57d7c2 --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/roadster.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 "roadster.h" \ No newline at end of file diff --git a/qmk/keyboards/clawsome/roadster/roadster.h b/qmk/keyboards/clawsome/roadster/roadster.h new file mode 100644 index 00000000..a3060851 --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/roadster.h @@ -0,0 +1,30 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K34, K36, K38, K39, K3A, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, KC_NO, K34, KC_NO, K36, KC_NO, K38, K39, K3A, K3B }, \ +} diff --git a/qmk/keyboards/clawsome/roadster/rules.mk b/qmk/keyboards/clawsome/roadster/rules.mk new file mode 100644 index 00000000..6b8d1b5f --- /dev/null +++ b/qmk/keyboards/clawsome/roadster/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/coarse/cordillera/chconf.h b/qmk/keyboards/coarse/cordillera/chconf.h new file mode 100644 index 00000000..4640ff53 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE FALSE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/coarse/cordillera/config.h b/qmk/keyboards/coarse/cordillera/config.h new file mode 100644 index 00000000..ac636d5d --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2020 coarse + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x434B // CK for Coarse Keys +#define PRODUCT_ID 0x1401 // '20 - 001 +#define DEVICE_VER 0x0001 // Revision prototype +#define MANUFACTURER Coarse +#define PRODUCT Cordillera + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { A13, B9, F1, A10, A9 } +#define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B8, B7, B6, B5, B4, B3, A15, A14 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A8 +#define BACKLIGHT_PWM_DRIVER PWMD1 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/coarse/cordillera/cordillera.c b/qmk/keyboards/coarse/cordillera/cordillera.c new file mode 100644 index 00000000..5bf07740 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/cordillera.c @@ -0,0 +1,38 @@ +/* +Copyright 2020 coarse + +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 "cordillera.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(B0); + setPinOutput(A1); + setPinOutput(A0); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B0, led_state.num_lock); + writePin(A1, led_state.caps_lock); + writePin(A0, led_state.scroll_lock); + } + return true; +} diff --git a/qmk/keyboards/coarse/cordillera/cordillera.h b/qmk/keyboards/coarse/cordillera/cordillera.h new file mode 100644 index 00000000..01ae781c --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/cordillera.h @@ -0,0 +1,90 @@ +/* +Copyright 2020 coarse + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +// Full backspace +// Split right shift +#define LAYOUT_alice( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \ + k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \ + k41, k43, k45, k46, k49, k4b, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \ +} + +// Split backspace +// Split right shift +#define LAYOUT_alice_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \ + k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \ + k41, k43, k45, k46, k49, k4b, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \ +} + +// Split backspace +// Full right shift +#define LAYOUT_alice_split_bs_full_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \ + k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k41, k43, k45, k46, k49, k4b, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \ +} + +// Full backspace +// Full right shift +#define LAYOUT_alice_full_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \ + k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k41, k43, k45, k46, k49, k4b, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { XXX, k41, XXX, k43, XXX, k45, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \ +} diff --git a/qmk/keyboards/coarse/cordillera/halconf.h b/qmk/keyboards/coarse/cordillera/halconf.h new file mode 100644 index 00000000..ff5ae7e8 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/coarse/cordillera/info.json b/qmk/keyboards/coarse/cordillera/info.json new file mode 100644 index 00000000..e6bc8322 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/info.json @@ -0,0 +1,301 @@ +{ + "keyboard_name": "Cordillera", + "url": "https://keyboard.coarse.tech/Cordillera-Alice-like-PCB-b34d95777ea44249bad3271b01d7838a", + "maintainer": "coarse", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT_alice": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"Backspace", "x":17, "y":0.25, "w":2}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"{", "x":15.75, "y":1.25}, + {"label":"}", "x":16.75, "y":1.25}, + {"label":"|", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2.25, "w":1.75}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":":", "x":15.25, "y":2.25}, + {"label":"\"", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"Fn", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":"<", "x":13.25, "y":3.25}, + {"label":">", "x":15, "y":3.25}, + {"label":"?", "x":16, "y":3.25}, + {"label":"Shift", "x":17, "y":3.25, "w":1.75}, + {"label":"Fn", "x":18.75, "y":3.25}, + + {"label":"Ctrl", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + }, + "LAYOUT_alice_split_bs": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"Del", "x":17, "y":0.25}, + {"label":"Backspace", "x":18, "y":0.25}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"{", "x":15.75, "y":1.25}, + {"label":"}", "x":16.75, "y":1.25}, + {"label":"|", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2.25, "w":1.75}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":":", "x":15.25, "y":2.25}, + {"label":"\"", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"Fn", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":"<", "x":13.25, "y":3.25}, + {"label":">", "x":15, "y":3.25}, + {"label":"?", "x":16, "y":3.25}, + {"label":"Shift", "x":17, "y":3.25, "w":1.75}, + {"label":"Fn", "x":18.75, "y":3.25}, + + {"label":"Ctrl", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + }, + "LAYOUT_alice_split_bs_full_rshift": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"Del", "x":17, "y":0.25}, + {"label":"Backspace", "x":18, "y":0.25}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"{", "x":15.75, "y":1.25}, + {"label":"}", "x":16.75, "y":1.25}, + {"label":"|", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2.25, "w":1.75}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":":", "x":15.25, "y":2.25}, + {"label":"\"", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"Fn", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":"<", "x":13.25, "y":3.25}, + {"label":">", "x":15, "y":3.25}, + {"label":"?", "x":16, "y":3.25}, + {"label":"Shift", "x":17, "y":3.25, "w":2.75}, + + {"label":"Ctrl", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + }, + "LAYOUT_alice_full_rshift": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"`", "x":1.75, "y":0.25}, + {"label":"1", "x":2.75, "y":0.25}, + {"label":"2", "x":3.75, "y":0}, + {"label":"3", "x":4.75, "y":0.25}, + {"label":"4", "x":5.75, "y":0.25}, + {"label":"5", "x":6.75, "y":0.25}, + {"label":"6", "x":7.75, "y":0.25}, + {"label":"7", "x":11, "y":0.25}, + {"label":"8", "x":12, "y":0.25}, + {"label":"9", "x":13, "y":0.25}, + {"label":"0", "x":14, "y":0.25}, + {"label":"-", "x":15, "y":0}, + {"label":"=", "x":16, "y":0.25}, + {"label":"Backspace", "x":17, "y":0.25, "w":2}, + + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1.25, "w":1.5}, + {"label":"Q", "x":3, "y":1.25}, + {"label":"W", "x":4.25, "y":1.25}, + {"label":"E", "x":5.25, "y":1.25}, + {"label":"R", "x":6.25, "y":1.25}, + {"label":"T", "x":7.25, "y":1.25}, + {"label":"Y", "x":10.5, "y":1.25}, + {"label":"U", "x":11.5, "y":1.25}, + {"label":"I", "x":12.5, "y":1.25}, + {"label":"O", "x":13.5, "y":1.25}, + {"label":"P", "x":14.75, "y":1.25}, + {"label":"{", "x":15.75, "y":1.25}, + {"label":"}", "x":16.75, "y":1.25}, + {"label":"|", "x":17.75, "y":1.25, "w":1.5}, + + {"label":"PgDn", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2.25, "w":1.75}, + {"label":"A", "x":3.25, "y":2.25}, + {"label":"S", "x":4.5, "y":2.25}, + {"label":"D", "x":5.5, "y":2.25}, + {"label":"F", "x":6.5, "y":2.25}, + {"label":"G", "x":7.5, "y":2.25}, + {"label":"H", "x":10.75, "y":2.25}, + {"label":"J", "x":11.75, "y":2.25}, + {"label":"K", "x":12.75, "y":2.25}, + {"label":"L", "x":13.75, "y":2.25}, + {"label":":", "x":15.25, "y":2.25}, + {"label":"\"", "x":16.25, "y":2.25}, + {"label":"Enter", "x":17.25, "y":2.25, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":3.25}, + {"label":"X", "x":5, "y":3.25}, + {"label":"C", "x":6, "y":3.25}, + {"label":"V", "x":7, "y":3.25}, + {"label":"B", "x":8, "y":3.25}, + {"label":"Fn", "x":10.25, "y":3.25}, + {"label":"N", "x":11.25, "y":3.25}, + {"label":"M", "x":12.25, "y":3.25}, + {"label":"<", "x":13.25, "y":3.25}, + {"label":">", "x":15, "y":3.25}, + {"label":"?", "x":16, "y":3.25}, + {"label":"Shift", "x":17, "y":3.25, "w":2.75}, + + {"label":"Ctrl", "x":1.5, "y":4.25, "w":1.5}, + {"label":"Alt", "x":5, "y":4.25, "w":1.5}, + {"label":"Space", "x":6.5, "y":4.25, "w":2}, + {"label":"Menu", "x":8.5, "y":4.25}, + {"label":"Space", "x":10.25, "y":4.25, "w":2.75}, + {"label":"Alt", "x":13, "y":4.25, "w":1.5}, + {"label":"Ctrl", "x":18, "y":4.25, "w":1.5} + ] + } + } +} diff --git a/qmk/keyboards/coarse/cordillera/keymaps/default/keymap.c b/qmk/keyboards/coarse/cordillera/keymaps/default/keymap.c new file mode 100644 index 00000000..ef1479c3 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 coarse + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_alice( + KC_ESC, 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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_alice( + RESET, _______, 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_DEL, + KC_HOME, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_END, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/coarse/cordillera/keymaps/via/keymap.c b/qmk/keyboards/coarse/cordillera/keymaps/via/keymap.c new file mode 100644 index 00000000..69dd6137 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 coarse + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_alice( + KC_ESC, 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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_alice( + RESET, _______, 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_DEL, + KC_HOME, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_END, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_alice( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_alice( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/coarse/cordillera/keymaps/via/rules.mk b/qmk/keyboards/coarse/cordillera/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/coarse/cordillera/mcuconf.h b/qmk/keyboards/coarse/cordillera/mcuconf.h new file mode 100644 index 00000000..8a48bd9b --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA FALSE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/qmk/keyboards/coarse/cordillera/readme.md b/qmk/keyboards/coarse/cordillera/readme.md new file mode 100644 index 00000000..e9fd1210 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/readme.md @@ -0,0 +1,15 @@ +# Cordillera + +![Cordillera](https://i.imgur.com/3VCGsdDl.png) + +A publicly available replacement backlit PCB for top mount USB C Alice cases. + +* Keyboard Maintainer: [coarse](https://github.com/coarse) +* Hardware Supported: [Cordillera PCB](https://keyboard.coarse.tech/Cordillera-Alice-like-PCB-b34d95777ea44249bad3271b01d7838a) +* Hardware Availability: [coarse](https://github.com/coarse) + +Make example for this keyboard (after setting up your build environment): + + make coarse/cordillera:default + +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). diff --git a/qmk/keyboards/coarse/cordillera/rules.mk b/qmk/keyboards/coarse/cordillera/rules.mk new file mode 100644 index 00000000..462340c7 --- /dev/null +++ b/qmk/keyboards/coarse/cordillera/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/converter/siemens_tastatur/rules.mk b/qmk/keyboards/converter/siemens_tastatur/rules.mk index 03e6b0f4..451d07e6 100644 --- a/qmk/keyboards/converter/siemens_tastatur/rules.mk +++ b/qmk/keyboards/converter/siemens_tastatur/rules.mk @@ -1,12 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino SRC = matrix.c diff --git a/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk index 00c11acc..fcb7b9ea 100644 --- a/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk index d0e4977b..fcb7b9ea 100644 --- a/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/coseyfannitutti/mysterium/info.json b/qmk/keyboards/coseyfannitutti/mysterium/info.json index 1b993a2e..4c180b7d 100644 --- a/qmk/keyboards/coseyfannitutti/mysterium/info.json +++ b/qmk/keyboards/coseyfannitutti/mysterium/info.json @@ -8,8 +8,14 @@ "LAYOUT_tkl_ansi": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Menu", "x":11.25, "y":5.25, "w":1.25}, {"label":"Fn", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] }, - "LAYOUT_tkl_ansi_tsangan": { + "LAYOUT_tkl_ansi_7u": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Win", "x":1.5, "y":5.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"label":"Alt", "x":11, "y":5.25, "w":1.5}, {"label":"Fn", "x":12.5, "y":5.25}, {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_iso": { + "layout": [{"x":0, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":7.5, "y":0.25}, {"x":8.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15.25, "y":0.25}, {"x":16.25, "y":0.25}, {"x":17.25, "y":0.25}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_iso_7u": { + "layout": [{"x":0, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":7.5, "y":0.25}, {"x":8.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15.25, "y":0.25}, {"x":16.25, "y":0.25}, {"x":17.25, "y":0.25}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] } } } \ No newline at end of file diff --git a/qmk/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c new file mode 100644 index 00000000..35487eee --- /dev/null +++ b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_7u( + KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_ansi_7u( + 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, RESET, 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/qmk/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c new file mode 100644 index 00000000..bad4dc2f --- /dev/null +++ b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso( + KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, 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_NUHS, KC_ENT, + 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_iso( + 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, RESET, 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c index bd8de69a..f7baaea8 100644 --- a/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c +++ b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c @@ -16,35 +16,35 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi( + [0] = LAYOUT_tkl_iso( KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS, 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_INS, KC_HOME, 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_DEL, KC_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + 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_DEL, KC_END, 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_BSLS, + 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [1] = LAYOUT_tkl_ansi( + [1] = LAYOUT_tkl_iso( 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, RESET, 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 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_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS), - [2] = LAYOUT_tkl_ansi( + [2] = LAYOUT_tkl_iso( 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,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,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), - [3] = LAYOUT_tkl_ansi( + [3] = LAYOUT_tkl_iso( 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,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,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) }; diff --git a/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk index d0e4977b..36b7ba9c 100644 --- a/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/qmk/keyboards/coseyfannitutti/mysterium/mysterium.h b/qmk/keyboards/coseyfannitutti/mysterium/mysterium.h index c5deacd8..b705f04c 100644 --- a/qmk/keyboards/coseyfannitutti/mysterium/mysterium.h +++ b/qmk/keyboards/coseyfannitutti/mysterium/mysterium.h @@ -37,7 +37,7 @@ { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, K59, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ } -#define LAYOUT_tkl_ansi_tsangan( \ +#define LAYOUT_tkl_ansi_7u( \ K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, \ @@ -53,3 +53,37 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, _x_, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ } + +#define LAYOUT_tkl_iso( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K2D, \ + K40, K01, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4G, \ + K50, K51, K52, K56, K59, K5A, K5C, K5E, K5F, K5G, K5H \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, _x_, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, _x_, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, _x_, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, _x_, K3D, _x_, _x_, _x_, _x_ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ + { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, K59, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ +} + +#define LAYOUT_tkl_iso_7u( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K2D, \ + K40, K01, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4G, \ + K50, K51, K52, K56, K5A, K5C, K5E, K5F, K5G, K5H \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, _x_, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, _x_, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, _x_, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, _x_, K3D, _x_, _x_, _x_, _x_ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ + { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, _x_, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ +} diff --git a/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk index d0e4977b..fcb7b9ea 100644 --- a/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/cospad/config.h b/qmk/keyboards/cospad/config.h index 52e41d0d..8d2994b7 100644 --- a/qmk/keyboards/cospad/config.h +++ b/qmk/keyboards/cospad/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B5C // "KP" #define PRODUCT_ID 0xB1E5 #define DEVICE_VER 0x0001 #define MANUFACTURER KPrepublic diff --git a/qmk/keyboards/cospad/keymaps/via/keymap.c b/qmk/keyboards/cospad/keymaps/via/keymap.c new file mode 100644 index 00000000..f8611c02 --- /dev/null +++ b/qmk/keyboards/cospad/keymaps/via/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Esc |TAB | FN | BS | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 | . | | + * `-------------------' + */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + + /* Keymap _FL: Function Layer + * ,-------------------. + * |RGBT| | | | + * |----|----|----|----| + * |RGBM|RGBP|BTOG| | + * |----|----|----|----| + * |HUD |HUI |BON | | + * |----|----|----| | + * |SAD |SAI |BOFF| | + * |----|----|----|----| + * |VAD |VAS |BSTP| | + * |----|----|----| | + * | |RST | | + * `-------------------' + */ + [1] = LAYOUT_numpad_6x4( + RGB_TOG, _______, _______, _______, + RGB_MOD, RGB_M_P, BL_TOGG, _______, + RGB_HUD, RGB_HUI, BL_ON, + RGB_SAD, RGB_SAI, BL_OFF, _______, + RGB_VAD, RGB_VAI, BL_STEP, + _______, RESET, _______ + ), + + [2] = LAYOUT_numpad_6x4( + 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 + ), + + [3] = LAYOUT_numpad_6x4( + 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 + ) +}; diff --git a/qmk/keyboards/cospad/keymaps/via/rules.mk b/qmk/keyboards/cospad/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/cospad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/crkbd/keymaps/bcat/keymap.c b/qmk/keyboards/crkbd/keymaps/bcat/keymap.c index 6018835c..7b8329fe 100644 --- a/qmk/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/qmk/keyboards/crkbd/keymaps/bcat/keymap.c @@ -13,9 +13,9 @@ enum layer { #define LY_RSE MO(LAYER_RAISE) #define KY_CSPC LCTL(KC_SPC) -#define KY_LOCK LGUI(KC_L) -#define KY_WINL LGUI(KC_LEFT) -#define KY_WINR LGUI(KC_RGHT) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ [LAYER_LOWER] = LAYOUT( MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______ ), diff --git a/qmk/keyboards/crkbd/keymaps/bcat/readme.md b/qmk/keyboards/crkbd/keymaps/bcat/readme.md index 743a6572..4ffb1562 100644 --- a/qmk/keyboards/crkbd/keymaps/bcat/readme.md +++ b/qmk/keyboards/crkbd/keymaps/bcat/readme.md @@ -50,7 +50,7 @@ elimination. ## Lower layer -![Lower layer layout](https://i.imgur.com/djIkwsa.png) +![Lower layer layout](https://i.imgur.com/vaIc9JY.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) @@ -74,8 +74,8 @@ And yup, the shifted versions are above the unshifted versions. * Remaining keys from a TKL are placed out of the way on the bottom row of the left half. -* The home row on the left half contains handy shortcuts for window movement, -and browser navigation, and screen lock. +* The home row on the left half contains handy shortcuts for zooming and browser +navigation. * Lower+Esc is bound to Ctrl+Space because the Ctrl and Space keys are both on the left thumb, so this key combination (which I use for tmux prefix and editor @@ -109,7 +109,8 @@ keys (F1–F5) on the home row.) * Insert and Delete are on the rightmost column, because there didn't seem to be a better place to put them. -* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious better location. +* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious +better location. ## Adjust layer diff --git a/qmk/keyboards/crkbd/rev1/legacy/matrix.c b/qmk/keyboards/crkbd/rev1/legacy/matrix.c index 46dead36..8eb02813 100644 --- a/qmk/keyboards/crkbd/rev1/legacy/matrix.c +++ b/qmk/keyboards/crkbd/rev1/legacy/matrix.c @@ -155,6 +155,7 @@ void matrix_init(void) uint8_t _matrix_scan(void) { + bool changed = false; // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); @@ -163,6 +164,7 @@ uint8_t _matrix_scan(void) _delay_us(30); // without this wait read unstable value. matrix_row_t cols = read_cols(); if (matrix_debouncing[i+offset] != cols) { + changed = true; matrix_debouncing[i+offset] = cols; debouncing = DEBOUNCE; } @@ -179,7 +181,7 @@ uint8_t _matrix_scan(void) } } - return 1; + return changed; } #ifdef USE_MATRIX_I2C @@ -237,16 +239,17 @@ int serial_transaction(int master_changed) { uint8_t matrix_scan(void) { + bool changed = false; if (is_master) { - matrix_master_scan(); + changed |= matrix_master_scan(); }else{ - matrix_slave_scan(); + changed |= matrix_slave_scan(); int offset = (isLeftHand) ? ROWS_PER_HAND : 0; memcpy(&matrix[offset], (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); matrix_scan_quantum(); } - return 1; + return (uint8_t) changed; } @@ -297,8 +300,8 @@ uint8_t matrix_master_scan(void) { return ret; } -void matrix_slave_scan(void) { - _matrix_scan(); +uint8_t matrix_slave_scan(void) { + int ret = _matrix_scan(); int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; @@ -314,7 +317,7 @@ void matrix_slave_scan(void) { for (int i = 0; i < ROWS_PER_HAND; ++i) { #ifdef SERIAL_USE_MULTI_TRANSACTION if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; + change = 1; #endif serial_slave_buffer[i] = matrix[offset+i]; } @@ -322,6 +325,7 @@ void matrix_slave_scan(void) { slave_buffer_change_count += change; #endif #endif + return ret; } bool matrix_is_modified(void) diff --git a/qmk/keyboards/crkbd/rev1/legacy/split_util.h b/qmk/keyboards/crkbd/rev1/legacy/split_util.h index 414763bf..b2ddc1f9 100644 --- a/qmk/keyboards/crkbd/rev1/legacy/split_util.h +++ b/qmk/keyboards/crkbd/rev1/legacy/split_util.h @@ -27,7 +27,7 @@ along with this program. If not, see . extern volatile bool isLeftHand; // slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); +uint8_t matrix_slave_scan(void); void split_keyboard_setup(void); bool has_usb(void); diff --git a/qmk/keyboards/dm9records/plaid/keymaps/default/keymap.c b/qmk/keyboards/dm9records/plaid/keymaps/default/keymap.c index 6a858a4a..c5075b0e 100644 --- a/qmk/keyboards/dm9records/plaid/keymaps/default/keymap.c +++ b/qmk/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -214,6 +214,10 @@ led_config_t led_config; //Set leds to saved state during powerup void keyboard_post_init_user(void) { + // set LED pin modes + setPinOutput(LED_RED); + setPinOutput(LED_GREEN); + // Call the post init code. led_config.raw = eeconfig_read_user(); diff --git a/qmk/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c b/qmk/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c new file mode 100644 index 00000000..0abd3f84 --- /dev/null +++ b/qmk/keyboards/dm9records/plaid/keymaps/gipsy-king/keymap.c @@ -0,0 +1,215 @@ +/* Copyright 2020 Benjamin Große + * + * 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 +#include "mousekey.h" + + +enum plaid_layers { + _QWERTY, + _XMONAD, + _RAISE, + _LOWER, +}; + +enum plaid_keycodes { + AUTOCLICK = SAFE_RANGE +}; + +static bool autoclick = false; +static bool autoclick_state = false; +static uint16_t autoclick_timer = 0; + +#define XMONAD LM(_XMONAD, MOD_LGUI) +#define SPC_LWR LT(_LOWER, KC_SPACE) +#define ENT_RSE LT(_RAISE, KC_ENT) +#define LOWER LT(_LOWER, KC_BSPC) + +#define LS_ESC LSFT_T(KC_ESC) +#define RS_QUOT RSFT_T(KC_QUOT) + +#define LCT_MINS LCTL_T(KC_MINS) +#define RCT_EQL RCTL_T(KC_EQL) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P |Bckspc| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | - | Z | X | C | V | B | N | M | , | . | / | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |XMONAD|LShift| Space |Ent/RA|RShift|LOWER | RAlt |RCtrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( // Base QWERTY + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LS_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RS_QUOT, + LCT_MINS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_EQL, + KC_LCTL, KC_LALT, KC_LGUI, XMONAD, KC_LSPO, KC_SPACE,_______, ENT_RSE, KC_RSPC, LOWER, KC_RALT, KC_RCTL +), + +[_XMONAD] = LAYOUT_plaid_grid( // Xmonad with MOD4 + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_P, _______, + KC_LSFT, _______, _______, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, _______, _______, + KC_LSFT, _______, _______, KC_C, _______, KC_B, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______ +), + +/* Raised + * ,-----------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | { | PgUp | PgDn | End | Home | Left | Down | Up | Right| } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | [ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ] | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | |VolDn |VolUp |Mute | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( // Numbers, arrows, symbols + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TILD, KC_LCBR, KC_PGUP, KC_PGDN, KC_END, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCBR, KC_PIPE, + KC_LBRC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_RBRC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE +), + +[_LOWER] = LAYOUT_plaid_grid( // F, media keys, reset + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, RESET, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, AUTOCLICK +) +}; + +#define BLINKEN_RANDOM_STARTLE false +static uint16_t blinken_timer = 0; +static uint16_t next_timeout = 1000; +enum blinken_modes { + BLINK_HOLD, + BLINK_STARTLED, + BLINK_STARTLED_LAYER +}; +static uint16_t blinken_mode = BLINK_HOLD; +static uint16_t blinken_timer_startled = 0; +static uint16_t blinken_startled_state = 0; + +void matrix_init_user(void) { + // https://github.com/hsgw/plaid/issues/15#issuecomment-534677102 + eeconfig_init(); +} + +void keyboard_post_init_user(void) { + writePinHigh(LED_RED); + writePinHigh(LED_GREEN); + blinken_timer = timer_read(); +} + +void matrix_scan_user(void) { + if (blinken_mode != BLINK_STARTLED_LAYER && timer_elapsed(blinken_timer) > next_timeout) { + blinken_timer = timer_read(); + if (BLINKEN_RANDOM_STARTLE && rand() % 5 == 0) { + blinken_mode = BLINK_STARTLED; + blinken_timer_startled = timer_read(); + blinken_startled_state = 0; + } else { + blinken_mode = BLINK_HOLD; + + if(rand() % 2 == 0) { + next_timeout = 1000; + } else if(rand() % 2 == 0) { + next_timeout = 500; + } else { + next_timeout = 300; + } + + if(rand() % 2 == 0) { + writePinLow(LED_RED); + } else { + writePinHigh(LED_RED); + } + if(rand() % 2 == 0) { + writePinLow(LED_GREEN); + } else { + writePinHigh(LED_GREEN); + } + } + } else if ((blinken_mode == BLINK_STARTLED || blinken_mode == BLINK_STARTLED_LAYER) + && timer_elapsed(blinken_timer_startled) > 50) { + blinken_timer_startled = timer_read(); + switch (blinken_startled_state) { + case 0: + writePinLow(LED_GREEN); + blinken_startled_state += 1; + break; + case 1: + writePinHigh(LED_RED); + blinken_startled_state += 1; + break; + case 2: + writePinHigh(LED_GREEN); + blinken_startled_state += 1; + break; + case 3: + writePinLow(LED_RED); + blinken_startled_state = 0; + break; + } + } + if (autoclick && timer_elapsed(autoclick_timer) > (autoclick_state ? 20 : 100)) { + if (!autoclick_state) { + mousekey_on(KC_MS_BTN1); + } else { + mousekey_off(KC_MS_BTN1); + } + mousekey_send(); + autoclick_state = !autoclick_state; + autoclick_timer = timer_read(); + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + blinken_mode = BLINK_STARTLED_LAYER; + break; + case _XMONAD: + blinken_mode = BLINK_STARTLED_LAYER; + break; + case _LOWER: + blinken_mode = BLINK_STARTLED_LAYER; + break; + default: + blinken_mode = BLINK_HOLD; + break; + } + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case AUTOCLICK: + if (record->event.pressed) { + autoclick = !autoclick; + autoclick_timer = timer_read(); + } + break; + } + return true; +}; diff --git a/qmk/keyboards/dm9records/plaid/keymaps/gipsy-king/readme.md b/qmk/keyboards/dm9records/plaid/keymaps/gipsy-king/readme.md new file mode 100644 index 00000000..999d92c8 --- /dev/null +++ b/qmk/keyboards/dm9records/plaid/keymaps/gipsy-king/readme.md @@ -0,0 +1,19 @@ +# Gipsy keymap for plaid + +This layout is based on my corne layout: +* QWERTY with Tab, Backspace on top, dash and equals on the bottom. +* RAISE has numbers on top, arrows on hjkl, end/home on F/G, symbols on the + bottom and around. +* XMONAD has xmonad wm key bindings, should be used with Layer modifier LGUI +* LOWER has F keys and shouldn't be used much. +* Thumbs are: XMONAD, Left SC shift, Space, Enter/Raise, Right SC shift + +Does not have so many modtaps, basically just on enter. + +The LEDs of the plaid keep blinking in a soothing dance, reminiscent of some +old machine. + +When any layer is active, the LEDs are "startled". + +There is an autoclicker for minecraft. + diff --git a/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h b/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h new file mode 100644 index 00000000..5733b9e4 --- /dev/null +++ b/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c b/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c new file mode 100644 index 00000000..c8d48c39 --- /dev/null +++ b/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c @@ -0,0 +1,356 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#include QMK_KEYBOARD_H + + +enum plaid_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Esc/hy| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | fn | Alt | GUI |Lower | Space |Raise | GUI | Alt |Shift | Ctrl | + * `-----------------------------------------------------------------------------------' + * (karabiner remaps Caps lock -> fn) + */ +[_QWERTY] = LAYOUT_plaid_grid( + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + HYPR_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_RSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_RCTL , KC_CAPS, KC_RALT, KC_RGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Prev | Vol- | Play | + * `-----------------------------------------------------------------------------------' + * volume up key repeats randomly on mac, have to use mac specific volume + */ +[_LOWER] = LAYOUT_plaid_grid( + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , KC_BSPC, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC , KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______ , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC__VOLDOWN, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | | | End | | | |Pg Up | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Home | |Pg Dn | | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | Copy |Paste | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol+ | Mute | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + KC_TILD, _______, _______, KC_END, _______, _______, _______, KC_PGUP, _______, _______, _______ , KC_DEL , + _______, KC_HOME, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______ , _______, + _______, _______, _______, KC_COPY, KC_PSTE, KC_PGDN, _______, _______, _______, _______, _______ , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC__VOLUP, KC_MUTE +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset | Red |Green | Rmod | Gmod |Rblink|Gblink| Rkey | Gkey | Rcar | Gcar | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Power |Sleep |Wake |Eject | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + RESET , LED_1 , LED_2 , LED_3 , LED_4 , LED_5 ,LED_6 , LED_7 , LED_8 , LED_9 , LED_0 , _______ , + _______, KC_PWR , KC_SLEP, KC_WAKE, KC_EJCT, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // set LED pin modes + setPinOutput(LED_RED); + setPinOutput(LED_GREEN); + + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + + /* Markov Chain + * + * 1 - x 1 - y + * /---\ /---\ + * v | v | + * /------\ x /------\ + * | |------>| | + * | on | y | off | + * | |<------| | + * \------/ \------/ + */ + + /* Non-homogeneous Markov Chain + * + * /-----\ 1 - x0 /-----\ 1 - x1 /-----\ + * |on 0|------->|on 1|------->|on 2|----> ... + * \-----/\ /\-----/\ /\-----/\ + * \ / \ / . + * x0\ / x1\ / . + * \/ \/ . + * /\ /\ + * y0/ \ y1/ \ . + * / \ / \ . + * / \ / \ . + * /-----\ 1 - y0 /-----\ 1 - y1 /-----\/ + * |off 0|------->|off 1|------->|off 2|----> ... + * \-----/ \-----/ \-----/ + * + * + * if x = 1/4 and y 1/4, behavior is equivalent to the original code + * and converges to a steady state at the rate of 1/2^k + * where k is the number of key presses + * (the distance from a given vector to the steady state, [1/2, 1/2], + * is cut in half every key press) + * + * if x = y, then it is guaranteed that the steady state is still + * [1/2, 1/2], but the rate at which it converges is variable + * + * if x != y, then there is no well-defined steady state + */ + + double x = (1.0*rand())/RAND_MAX; + double y = x; + + double p = (readPin(led)) ? x : y; + if (rand() < p*RAND_MAX) { + togglePin(led); + } + + /* following code is restriced to x + y <= 1 + * if(rand() % 2 == 1) { */ + /* if(rand() % 2 == 0) { */ + /* writePinLow(led); */ + /* } */ + /* else { */ + /* writePinHigh(led); */ + /* } */ + /* } */ + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + break; + } + + if (keycode >= LED_1 && keycode <= LED_0) { + eeconfig_update_user(led_config.raw); + } + + return true; +} diff --git a/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md b/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md new file mode 100644 index 00000000..e52d24c3 --- /dev/null +++ b/qmk/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md @@ -0,0 +1 @@ +# stephen-huan's keymap for Plaid diff --git a/qmk/keyboards/donutcables/budget96/config.h b/qmk/keyboards/donutcables/budget96/config.h index 9482867f..7154a67a 100644 --- a/qmk/keyboards/donutcables/budget96/config.h +++ b/qmk/keyboards/donutcables/budget96/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2020 DonutCables 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 @@ -19,11 +19,11 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 +#define VENDOR_ID 0xDCDC +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 #define MANUFACTURER DonutCables -#define PRODUCT budget96 +#define PRODUCT Budget96 #define RGBLED_NUM 18 diff --git a/qmk/keyboards/donutcables/budget96/keymaps/donut/config.h b/qmk/keyboards/donutcables/budget96/keymaps/donut/config.h new file mode 100644 index 00000000..da538e7b --- /dev/null +++ b/qmk/keyboards/donutcables/budget96/keymaps/donut/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2020 DonutCables + +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 . +*/ + +#pragma once + +// place overrides here + +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE + +#define UNICODE_KEY_WINC KC_RGUI diff --git a/qmk/keyboards/donutcables/budget96/keymaps/donut/keymap.c b/qmk/keyboards/donutcables/budget96/keymaps/donut/keymap.c new file mode 100644 index 00000000..53e77437 --- /dev/null +++ b/qmk/keyboards/donutcables/budget96/keymaps/donut/keymap.c @@ -0,0 +1,171 @@ +/* +Copyright 2020 DonutCables + +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 + +enum layer_names { + _BASE, + _B, + _FN1, + _FN2, +}; + +enum custom_keycodes { + img = SAFE_RANGE, + xkcd, + CD, + AES, + /* Unicode strings maps */ + ALT0, + ALT1, + ALT2, + ALT3, + ALT4, + ALT5, + ALT6, + ALT7, + /* Discord emotes maps */ + B, + X, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_96_ansi( + 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_HOME, KC_INS, KC_END, KC_MPRV, KC_MPLY, KC_MNXT, + 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_DEL, KC_PSCR, KC_PSLS, KC_PAST, + 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_P7, KC_P8, KC_P9, KC_PMNS, + MO(3), 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, MO(2), KC_RALT, KC_SPC, KC_CALC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + /* (1) Bmode layer */ + [_B] = LAYOUT_96_ansi( + 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, 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, B, 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), + + /* (2) Fn 1 */ + [_FN1] = LAYOUT_96_ansi( + 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_PGDN, TG(1), KC_PGUP, KC_VOLD, KC_MUTE, KC_VOLU, + ALT0, KC_TRNS, KC_TRNS, ALT1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALT2, KC_TRNS, KC_TRNS, KC_NLCK, KC_TRNS, KC_TRNS, + KC_TRNS, CD, KC_TRNS, KC_TRNS, KC_TRNS, ALT3, KC_TRNS, KC_TRNS, KC_TRNS, ALT4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, AES, xkcd, 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_CLCK, KC_TRNS, X, KC_TRNS, img, B, KC_TRNS, ALT7, ALT5, ALT6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* (3) Fn 2 */ + [_FN2] = LAYOUT_96_ansi( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UC_M_WC, EEP_RST, RESET, + VLK_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case xkcd: + if (record->event.pressed) { + SEND_STRING("https://xkcd.com/927/"); + } + return true; + case CD: + if (record->event.pressed) { + SEND_STRING("cd d:/keyboard_stuff/gits/qmk_firmware"); + } + return true; + case AES: + if (record->event.pressed) { + SEND_STRING("***A E S T H E T I C S***"); + } + return true; + case img: + if (record->event.pressed) { + SEND_STRING("[url=" SS_LCTL("v") "][img]" SS_LCTL("v") "[/img][/url]"); + } + return true; + case ALT0: + if (record->event.pressed) { + send_unicode_string("≈"); + } + return true; + case ALT1: + if (record->event.pressed) { + send_unicode_string("π"); + } + return true; + case ALT2: + if (record->event.pressed) { + send_unicode_string("±"); + } + return true; + case ALT3: + if (record->event.pressed) { + send_unicode_string("™"); + } + return true; + case ALT4: + if (record->event.pressed) { + send_unicode_string("Ω"); + } + return true; + case ALT5: + if (record->event.pressed) { + send_unicode_string("≤"); + } + return true; + case ALT6: + if (record->event.pressed) { + send_unicode_string("≥"); + } + return true; + case ALT7: + if (record->event.pressed) { + send_unicode_string("ゴ"); + } + return true; + case B: + if (record->event.pressed) { + SEND_STRING(":b:"); + } + return true; + case X: + if (record->event.pressed) { + SEND_STRING(":x:"); + } + return true; + case KC_A ... KC_Z: + case KC_1 ... KC_0: + if (layer_state_is(1)) { + if (record->event.pressed) { + register_code(KC_F13); + tap_code(keycode); + unregister_code(KC_F13); + } + } else { + return true; + } + return false; + } + return true; +} diff --git a/qmk/keyboards/donutcables/budget96/keymaps/donut/readme.md b/qmk/keyboards/donutcables/budget96/keymaps/donut/readme.md new file mode 100644 index 00000000..3e1ca136 --- /dev/null +++ b/qmk/keyboards/donutcables/budget96/keymaps/donut/readme.md @@ -0,0 +1,3 @@ +# My personal keymap for Budget96 + +My daily map for the Budget96. Includes unicode and masked characters for AHK pickup. \ No newline at end of file diff --git a/qmk/keyboards/donutcables/budget96/keymaps/donut/rules.mk b/qmk/keyboards/donutcables/budget96/keymaps/donut/rules.mk new file mode 100644 index 00000000..7d48394b --- /dev/null +++ b/qmk/keyboards/donutcables/budget96/keymaps/donut/rules.mk @@ -0,0 +1,7 @@ +VELOCIKEY_ENABLE = yes +UNICODE_ENABLE = yes +BACKLIGHT_ENABLE = no +MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no diff --git a/qmk/keyboards/donutcables/budget96/readme.md b/qmk/keyboards/donutcables/budget96/readme.md index 11c49b98..9cdb3a01 100644 --- a/qmk/keyboards/donutcables/budget96/readme.md +++ b/qmk/keyboards/donutcables/budget96/readme.md @@ -1,8 +1,8 @@ -# budget96 +# Budget96 -96 key atmega32a keyboard. +A budget-oriented 96 key atmega32a keyboard. Runs ps2avrgb by default. -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [DonutCables](https://github.com/DonutCables) * Hardware Supported: Budget96 PCB * Hardware Availability: [DonutCables](https://donutcables.com/) diff --git a/qmk/keyboards/doodboard/duckboard/config.h b/qmk/keyboards/doodboard/duckboard/config.h new file mode 100644 index 00000000..ea8a8ae5 --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/config.h @@ -0,0 +1,57 @@ +/* Copyright 2020 doodboard + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xFF44 +#define DEVICE_VER 0x0001 +#define MANUFACTURER doodboard +#define PRODUCT duckboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5 } +#define ENCODERS_PAD_B { F6 } +#define ENCODER_RESOLUTION 2 + +/* media key slowdown for windows */ +#define TAP_CODE_DELAY 20 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 8 // Number of LEDs +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/qmk/keyboards/doodboard/duckboard/duckboard.c b/qmk/keyboards/doodboard/duckboard/duckboard.c new file mode 100644 index 00000000..af0cb24b --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/duckboard.c @@ -0,0 +1,17 @@ +/* Copyright 2020 doodboard + * + * 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 "duckboard.h" diff --git a/qmk/keyboards/doodboard/duckboard/duckboard.h b/qmk/keyboards/doodboard/duckboard/duckboard.h new file mode 100644 index 00000000..0e753d44 --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/duckboard.h @@ -0,0 +1,34 @@ +/* Copyright 2020 doodboard + * + * 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 . + */ + + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K01, K02, K03, K04, \ + K11, K12, K13, \ + K21, K22, K23, K24, \ + K31, K32, K33, \ + K40, K41, K42, K43, K44 \ +) { \ + { KC_NO, K01, K02, K03, K04 }, \ + { KC_NO, K11, K12, K13, KC_NO }, \ + { KC_NO, K21, K22, K23, K24 }, \ + { KC_NO, K31, K32, K33, KC_NO }, \ + { K40, K41, K42, K43, K44 } \ +} diff --git a/qmk/keyboards/doodboard/duckboard/info.json b/qmk/keyboards/doodboard/duckboard/info.json new file mode 100644 index 00000000..d5193e61 --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "duckboard", + "url": "", + "maintainer": "doodboard", + "width": 5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 1, "h": 2}, + + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 3, "h": 2} + ] + } + } +} diff --git a/qmk/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/qmk/keyboards/doodboard/duckboard/keymaps/default/keymap.c new file mode 100644 index 00000000..6684e986 --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/keymaps/default/keymap.c @@ -0,0 +1,118 @@ +/* Copyright 2020 doodboard + * + * 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 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_BSPC, KC_MUTE, KC_P0, KC_PDOT, KC_PENT), + [1] = LAYOUT( + TG(1), KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + TG(2), KC_TRNS, KC_INS, KC_DEL, KC_TRNS), + [2] = LAYOUT( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} +} + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 2 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; + +// Credit to u/Pop-X- for the initial code. You can find his commit here https://github.com/qmk/qmk_firmware/pull/9264/files#diff-303f6e3a7a5ee54be0a9a13630842956R196-R333. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0,192,192,192,192,192,192,192,248,248, 30, 30,254,254,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,127,255,255,255,255,255,159,159,135,135,129,129,129, 97, 97, 25, 25, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 97, 97,127, 1, 1, 97, 97,127, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { + 0, 0,128,128,128,128,128,128,128,240,240, 60, 60,252,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 7, 7, 7, 7,255,255,254,254,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255, 63, 63, 15, 15, 3, 3, 3,195,195, 51, 51, 15, 15, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 99, 99,127, 3, 3, 99, 99,127, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + +void oled_task_user(void) { + render_anim(); + oled_set_cursor(0,6); + oled_write_P(PSTR("DUCK\nBOARD\n"), false); + oled_write_P(PSTR("-----\n"), false); + // Host Keyboard Layer Status + oled_write_P(PSTR("MODE\n"), false); + oled_write_P(PSTR("\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("BASE\n"), false); + break; + case 1: + oled_write_P(PSTR("FUNC\n"), false); + break; + case 2: + oled_write_P(PSTR("RGB\n"), false); + break; + } +} +#endif + +void keyboard_post_init_user(void) { + //Customise these values to debug + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/qmk/keyboards/doodboard/duckboard/readme.md b/qmk/keyboards/doodboard/duckboard/readme.md new file mode 100644 index 00000000..d2b799ab --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/readme.md @@ -0,0 +1,17 @@ +# duckboard + +An 18-key numpad with rotary encoder and OLED support. + +* Keyboard Maintainer: [doodboard](https://github.com/doodboard) +* Hardware Supported: duckboard PCB +* Hardware Availability: Private Group Buy + +Make example for this keyboard (after setting up your build environment): + + make doodboard/duckboard:default + +Flashing example for this keyboard: + + make doodboard/duckboard: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). diff --git a/qmk/keyboards/doodboard/duckboard/rules.mk b/qmk/keyboards/doodboard/duckboard/rules.mk new file mode 100644 index 00000000..09a60d8a --- /dev/null +++ b/qmk/keyboards/doodboard/duckboard/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/draytronics/scarlet/config.h b/qmk/keyboards/draytronics/scarlet/config.h new file mode 100644 index 00000000..f7b50dee --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/config.h @@ -0,0 +1,96 @@ +/*Copyright 2020 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x4454 //DT for DrayTronics +#define PRODUCT_ID 0x5343 //SC for Scarlet +#define DEVICE_VER 0x0001 //Version 1 +#define MANUFACTURER Draytronics +#define PRODUCT SCARLET +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 } +#define MATRIX_COL_PINS { A5, A6, A7, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST +/* 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 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ +/* disable debug print */ +//#define NO_DEBUG +/* disable print */ +//#define NO_PRINT +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/draytronics/scarlet/info.json b/qmk/keyboards/draytronics/scarlet/info.json new file mode 100644 index 00000000..42066162 --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "Draytronics SCARLET", + "url": "https://www.draytronics.co.uk/scarlet", + "maintainer": "ghostseven", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"+", "x":3, "y":1, "h":2}, + + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":3, "h":2} + ] + } + } +} diff --git a/qmk/keyboards/draytronics/scarlet/keymaps/default/keymap.c b/qmk/keyboards/draytronics/scarlet/keymaps/default/keymap.c new file mode 100644 index 00000000..950ec617 --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/*Copyright 2020 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT) +}; diff --git a/qmk/keyboards/draytronics/scarlet/readme.md b/qmk/keyboards/draytronics/scarlet/readme.md new file mode 100644 index 00000000..4f1c5e0f --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/readme.md @@ -0,0 +1,19 @@ +# SCARLET + +![scarlet](https://www.draytronics.co.uk/wp-content/uploads/2020/10/Scarlet-PCB-Compared-Combined.png) + +A open source 17 key numpad keyboard, designed to be easily built at home with through hole components. More info / kits / PCB designs available at [draytronics.co.uk/scarlet](draytronics.co.uk) + +* Keyboard Maintainer: [Blake Drayson](https://github.com/ghostseven) +* Hardware Supported: SCARLET PCB / ATMega32A +* Hardware Availability: [draytronics.co.uk](draytronics.co.uk) + +Make example for this keyboard (after setting up your build environment): + + make draytronics/scarlet:default + +Flashing example for this keyboard: + + make draytronics/scarlet: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). diff --git a/qmk/keyboards/draytronics/scarlet/rules.mk b/qmk/keyboards/draytronics/scarlet/rules.mk new file mode 100644 index 00000000..43f52403 --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = numpad_5x4 diff --git a/qmk/keyboards/draytronics/scarlet/scarlet.c b/qmk/keyboards/draytronics/scarlet/scarlet.c new file mode 100644 index 00000000..fdcc811d --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/scarlet.c @@ -0,0 +1,19 @@ +/*Copyright 2020 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +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 "scarlet.h" diff --git a/qmk/keyboards/draytronics/scarlet/scarlet.h b/qmk/keyboards/draytronics/scarlet/scarlet.h new file mode 100644 index 00000000..d96f198d --- /dev/null +++ b/qmk/keyboards/draytronics/scarlet/scarlet.h @@ -0,0 +1,35 @@ +/*Copyright 2020 Blake Drayson / Draytronics + +Contact info@draytronics.co.uk + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K13, \ + K30, K31, K32, \ + K40, K42, K33 \ +) { \ +{ K00, K01, K02, K03, }, \ +{ K10, K11, K12, K13, }, \ +{ K20, K21, K22, KC_NO, }, \ +{ K30, K31, K32, K33, }, \ +{ K40, KC_NO, K42, KC_NO, }, \ +} diff --git a/qmk/keyboards/dz60/keymaps/coppertop/keymap.c b/qmk/keyboards/dz60/keymaps/coppertop/keymap.c new file mode 100644 index 00000000..8586f920 --- /dev/null +++ b/qmk/keyboards/dz60/keymaps/coppertop/keymap.c @@ -0,0 +1,95 @@ + /* Copyright 2020 Philip Chan + * + * 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 + +//Layers +enum layer_names { + _QWERTY, + _FN, + _MEDIA, +}; + +//Custom Keymap Definitions +#define KC_CAD LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty Base layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSpc| Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | `/_Media| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Home | Up |End | + * |-----------------------------------------------------------------------------------------+ + * | LCtrl | LGui | LAlt | Space | Fn | Space | F7 | F10 |Left |Down |Right| + * `----------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_directional( + 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_BSPC, KC_DEL, + 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, + LT(_MEDIA,KC_GRV), 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_HOME, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_F7, KC_F10, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* F-Key/Lighting/whatever layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | | Ins | + * |-----------------------------------------------------------------------------------------+ + * | |R_Tog|R_HUI|R_SAI|R_VAI| | | | | | | | | KC_CAD | + * |-----------------------------------------------------------------------------------------+ + * | Caps | |R_HUD|R_SAD| | | | | | | SLCK|PAUSE| Print Screen| + * |-----------------------------------------------------------------------------------------+ + * | |R_M_P|R_M_B|R_M_R|R_M_SW|R_M_S|R_M_K|R_M_X|R_M_G| | |PgUp |BLUP |PgDn | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |BLTog|BLDN |BLInc| + * `----------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_directional( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_INS, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAD, + KC_CAPS, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PSCR, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, XXXXXXX, XXXXXXX, KC_PGUP, BL_INC, KC_PGDN, + _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_STEP + ), + +/* SFX/Multimedia/Numpad layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | / | * | - | = | |Trns |Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | Prev | Play| Next| | | 7 | 8 | 9 | + | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | | |Mute | VUp | VDn | | | 4 | 5 | 6 | + | | Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | 1 | 2 | 3 |NumEN| | | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | Trns | | 0 | . | | | | | + * `----------------------------------------------------------------------------------------' + */ + + [_MEDIA] = LAYOUT_directional( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, KC_PEQL, XXXXXXX, _______, _______, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, RESET, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/qmk/keyboards/dz60/keymaps/coppertop/rules.mk b/qmk/keyboards/dz60/keymaps/coppertop/rules.mk new file mode 100644 index 00000000..27905483 --- /dev/null +++ b/qmk/keyboards/dz60/keymaps/coppertop/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/qmk/keyboards/dz60/keymaps/draevin/keymap.c b/qmk/keyboards/dz60/keymaps/draevin/keymap.c new file mode 100644 index 00000000..b22dfb55 --- /dev/null +++ b/qmk/keyboards/dz60/keymaps/draevin/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 Draevin Luke @draevin + * + * 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 +#include "draevin.h" + +#define LAYOUT_wrapped(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_CM] = LAYOUT_wrapped ( + HYPR_T(KC_ESC), ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_LBRC, KC_RBRC, KC_BSLS, + KC_BSPC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_ENT, + TD(TD_CAPS), XXXXXXX, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_RSFT, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_RCTL, KC_RALT, XXXXXXX, KC_RGUI, KC_HYPR + ), + + [_QW] = LAYOUT_wrapped ( + HYPR_T(KC_ESC), ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, KC_BSLS, + KC_BSPC, _________________QWERTY_L2_________________, _________________QWERTY_L2_________________, KC_QUOT, KC_ENT, + TD(TD_CAPS), XXXXXXX, _________________QWERTY_L3_________________, _________________QWERTY_L3_________________, KC_RSFT, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_RCTL, KC_RALT, XXXXXXX, KC_RGUI, KC_HYPR + ), + + [_FN] = LAYOUT_wrapped ( + KC_GRV, _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, _______, _______, + _______, ___________________FN_L1___________________, ___________________FN_R1___________________, _______, _______, KC_MAKE, + _______, ___________________FN_L2___________________, ___________________FN_R2___________________, _______, _______, + _______, XXXXXXX, ___________________BLANK___________________, ___________________FN_R3___________________, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CM_QW + ) +}; diff --git a/qmk/keyboards/dz60/keymaps/pevecyan/keymap.c b/qmk/keyboards/dz60/keymaps/pevecyan/keymap.c index 897b6260..8ae4899a 100644 --- a/qmk/keyboards/dz60/keymaps/pevecyan/keymap.c +++ b/qmk/keyboards/dz60/keymaps/pevecyan/keymap.c @@ -8,11 +8,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( \ - KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QOT, SI_PLUS,XXXXXXX,KC_BSPC, \ - KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ - MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN,KC_QUOT,KC_ENT, \ + KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QUOT, SI_PLUS,XXXXXXX,KC_BSPC, \ + KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ + MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN, KC_QUOT,KC_ENT, \ KC_LSFT,XXXXXXX,SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM,SI_DOT, SI_MINS, KC_RSFT,XXXXXXX, \ - KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ + KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ ), [1] = LAYOUT( \ @@ -33,9 +33,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT( \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______, _______,_______,_______,_______,_______,SI_ZV, _______,_______,_______,_______,_______,_______,_______, \ - _______, _______,SI_SV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,SI_CV, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______, _______,_______,_______,_______,_______,SI_ZCAR,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,SI_SCAR, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,SI_CCAR, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ _______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \ ), }; diff --git a/qmk/keyboards/dz60/keymaps/spotpuff/keymap.c b/qmk/keyboards/dz60/keymaps/spotpuff/keymap.c new file mode 100644 index 00000000..edbe635e --- /dev/null +++ b/qmk/keyboards/dz60/keymaps/spotpuff/keymap.c @@ -0,0 +1,95 @@ + /* Copyright 2020 Philip Chan + * + * 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 + +//Layers +enum layer_names { + _QWERTY, + _FN, + _MEDIA, +}; + +//Custom Keymap Definitions +#define KC_CAD LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty Base layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSpc| Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | `/_Media| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |PgUp | Up |PgDn | + * |-----------------------------------------------------------------------------------------+ + * | LCtrl | LGui | LAlt | Space | Fn | Space |Home | End |Left |Down |Right| + * `----------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_directional( + 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_BSPC, KC_DEL, + 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, + LT(_MEDIA,KC_GRV), 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PGUP, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* F-Key/Lighting/whatever layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | | Ins | + * |-----------------------------------------------------------------------------------------+ + * | |R_Tog|R_HUI|R_SAI|R_VAI| | | | | | | | | KC_CAD | + * |-----------------------------------------------------------------------------------------+ + * | Caps | |R_HUD|R_SAD| | | | | | | SLCK|PAUSE| Print Screen| + * |-----------------------------------------------------------------------------------------+ + * | Trns |R_M_P|R_M_B|R_M_R|R_M_SW|R_M_S|R_M_K|R_M_X|R_M_G| | | |BLUP | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | | Trns | | | |BLTog|BLDN |BLInc| + * `----------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_directional( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_INS, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAD, + KC_CAPS, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PSCR, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_STEP + ), + +/* SFX/Multimedia/Numpad layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | |NumLk| | / | * | - | = | |Trns |Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | Prev | Play| Next| | | 7 | 8 | 9 | + | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | Trns | |Mute | VUp | VDn | | | 4 | 5 | 6 | + | | Trns | + * |-----------------------------------------------------------------------------------------+ + * | Trns | | | | | | | 1 | 2 | 3 |NumEN| | | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | Trns | Trns | 0 | . | | | | | + * `----------------------------------------------------------------------------------------' + */ + + [_MEDIA] = LAYOUT_directional( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, KC_PEQL, XXXXXXX, _______, _______, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, RESET, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/qmk/keyboards/dz60/keymaps/spotpuff/rules.mk b/qmk/keyboards/dz60/keymaps/spotpuff/rules.mk new file mode 100644 index 00000000..27905483 --- /dev/null +++ b/qmk/keyboards/dz60/keymaps/spotpuff/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/qmk/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c b/qmk/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c new file mode 100644 index 00000000..27732398 --- /dev/null +++ b/qmk/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 pagondel + * + * 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 + +enum layers { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------------------------------------------------------------------. + * |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |~ ` | + * |-----------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |Del | + * |-----------------------------------------------------------------------------| + * |FN | A | S | D | F | G | H | J | K | L | ; | ' |Return |PgUp| + * |-----------------------------------------------------------------------------| + * |Shift | Z | X | C | V | B | N | M | , | . | / |Shift | Up |PgDn| + * |-----------------------------------------------------------------------------| + * |Ctrl |Win |Alt | Space |Alt | FN |Ctrl |Lef |Dow |Rig | + * `-----------------------------------------------------------------------------' + */ + [_BL] = LAYOUT_65_ansi( + 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_BSPC, KC_GRV, + 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_DEL, + MO(1), 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------------------------. + * |Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL |PNTS| + * |-----------------------------------------------------------------------------| + * | |RgbT|RgbM|Hue+|Hue-|Sat+|Sat-|BR+ |BR- | | |SLCK|Paus|RST | | + * |-----------------------------------------------------------------------------| + * | |Eff+|Eff-| | | | | | | | | |EEP RST | | + * |-----------------------------------------------------------------------------| + * |Shift | | | | | |NK T|Mute|Vol-|Vol+| | |PgUp| | + * |-----------------------------------------------------------------------------| + * | | | | Play | | | |Home|PgDn|End | + * `-----------------------------------------------------------------------------' + */ + [_FL] = LAYOUT_65_ansi( + 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_DEL, KC_PSCR, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_SLCK, KC_PAUS, RESET, _______, + _______, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, + KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_HOME, KC_VOLD, KC_END + ) +}; diff --git a/qmk/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md b/qmk/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md new file mode 100644 index 00000000..8f55ce42 --- /dev/null +++ b/qmk/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md @@ -0,0 +1,35 @@ +# pagondel's DZ65RGB v2 layout + +``` + Keymap Default Layer + ,-----------------------------------------------------------------------------. + |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |~ ` | + |-----------------------------------------------------------------------------| + |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |Del | + |-----------------------------------------------------------------------------| + |FN | A | S | D | F | G | H | J | K | L | ; | ' |Return |PgUp| + |-----------------------------------------------------------------------------| + |Shift | Z | X | C | V | B | N | M | , | . | / |Shift | Up |PgDn| + |-----------------------------------------------------------------------------| + |Ctrl |Win |Alt | Space |Alt | FN |Ctrl |Lef |Dow |Rig | + `-----------------------------------------------------------------------------' +``` + +``` + Keymap Function Layer + ,-----------------------------------------------------------------------------. + |Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL |PNTS| + |-----------------------------------------------------------------------------| + | |RgbT|RgbM|Hue+|Hue-|Sat+|Sat-|BR+ |BR- | | |SLCK|Paus|RST | | + |-----------------------------------------------------------------------------| + | |Eff+|Eff-| | | | | | | | | |EEP RST | | + |-----------------------------------------------------------------------------| + |Shift | | | | | |NK T|Mute|Vol-|Vol+| | |PgUp| | + |-----------------------------------------------------------------------------| + | | | | Play | | | |Home|PgDn|End | + `-----------------------------------------------------------------------------' +``` + +### Build layout + +```qmk compile -kb dztech/dz65rgb/v2 -km pagondel``` diff --git a/qmk/keyboards/emajesty/eiri/config.h b/qmk/keyboards/emajesty/eiri/config.h new file mode 100644 index 00000000..ea7afa48 --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/config.h @@ -0,0 +1,96 @@ +/* +Copyright 2020 EMajesty + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9372 +#define DEVICE_VER 0x0001 +#define MANUFACTURER EMajesty +#define PRODUCT eiri + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B4, B5, B2, B6 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/emajesty/eiri/eiri.c b/qmk/keyboards/emajesty/eiri/eiri.c new file mode 100644 index 00000000..161fc9a9 --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/eiri.c @@ -0,0 +1,17 @@ +/* Copyright 2020 EMajesty + * + * 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 "eiri.h" diff --git a/qmk/keyboards/emajesty/eiri/eiri.h b/qmk/keyboards/emajesty/eiri/eiri.h new file mode 100644 index 00000000..da06287c --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/eiri.h @@ -0,0 +1,40 @@ +/* Copyright 2020 EMajesty + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, \ + K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \ + K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, \ + K36, K37, K38, K39, K40, K41, K42, K43, K44, K45 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11 }, \ + { K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23 }, \ + { K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35 }, \ + { KC_NO, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, KC_NO } \ +} + diff --git a/qmk/keyboards/emajesty/eiri/info.json b/qmk/keyboards/emajesty/eiri/info.json new file mode 100644 index 00000000..63154b32 --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "eiri", + "url": "https://github.com/EMajesty/eiri", + "maintainer": "EMajesty", + "width": 15, + "height": 4.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.75}, + {"x":1, "y":0.5}, + {"x":2, "y":0.25}, + {"x":3, "y":0}, + {"x":4, "y":0.25}, + {"x":5, "y":0.5}, + {"x":9, "y":0.5}, + {"x":10, "y":0.25}, + {"x":11, "y":0}, + {"x":12, "y":0.25}, + {"x":13, "y":0.5}, + {"x":14, "y":0.75}, + + {"x":0, "y":1.75}, + {"x":1, "y":1.5}, + {"x":2, "y":1.25}, + {"x":3, "y":1}, + {"x":4, "y":1.25}, + {"x":5, "y":1.5}, + {"x":9, "y":1.5}, + {"x":10, "y":1.25}, + {"x":11, "y":1}, + {"x":12, "y":1.25}, + {"x":13, "y":1.5}, + {"x":14, "y":1.75}, + + {"x":0, "y":2.75}, + {"x":1, "y":2.5}, + {"x":2, "y":2.25}, + {"x":3, "y":2}, + {"x":4, "y":2.25}, + {"x":5, "y":2.5}, + {"x":9, "y":2.5}, + {"x":10, "y":2.25}, + {"x":11, "y":2}, + {"x":12, "y":2.25}, + {"x":13, "y":2.5}, + {"x":14, "y":2.75}, + + {"x":2, "y":3.25}, + {"x":3, "y":3}, + {"x":4, "y":3.25}, + {"x":5, "y":3.5}, + {"x":6, "y":3.5}, + {"x":8, "y":3.5}, + {"x":9, "y":3.5}, + {"x":10, "y":3.25}, + {"x":11, "y":3}, + {"x":12, "y":3.25} + ] + } + } +} diff --git a/qmk/keyboards/emajesty/eiri/keymaps/default/keymap.c b/qmk/keyboards/emajesty/eiri/keymaps/default/keymap.c new file mode 100644 index 00000000..e52a83c8 --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 EMajesty + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, KC_SPC, KC_DEL, MO(1), MO(2), KC_ENT, KC_BSPC, KC_RALT, KC_RGUI), + [1] = LAYOUT( + KC_ESC, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, _______, _______, KC_LPRN, KC_RPRN, KC_GRV, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT( + RESET, 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_LPRN, KC_RPRN, _______, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/qmk/keyboards/emajesty/eiri/keymaps/default/readme.md b/qmk/keyboards/emajesty/eiri/keymaps/default/readme.md new file mode 100644 index 00000000..f4b3c66d --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/keymaps/default/readme.md @@ -0,0 +1,3 @@ +![default keymap](https://imgur.com/F3L3z8w.png) + +# The default keymap for eiri diff --git a/qmk/keyboards/emajesty/eiri/readme.md b/qmk/keyboards/emajesty/eiri/readme.md new file mode 100644 index 00000000..725eb310 --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/readme.md @@ -0,0 +1,19 @@ +# eiri + +![eiri](https://imgur.com/ZiLTj3Pl.png) + +An Atreus-inspired 40% keyboard with 6 columns + +* Keyboard Maintainer: [EMajesty](https://github.com/EMajesty) +* Hardware Supported: eiri pcb +* Hardware Availability: [Project is open source](https://github.com/EMajesty/eiri) + +Make example for this keyboard (after setting up your build environment): + + make emajesty/eiri:default + +Flashing example for this keyboard: + + make emajesty/eiri: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). diff --git a/qmk/keyboards/emajesty/eiri/rules.mk b/qmk/keyboards/emajesty/eiri/rules.mk new file mode 100644 index 00000000..fd76a524 --- /dev/null +++ b/qmk/keyboards/emajesty/eiri/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/ergodash/rev1/keymaps/333fred/config.h b/qmk/keyboards/ergodash/rev1/keymaps/333fred/config.h index 862f306d..b8f5e8c9 100644 --- a/qmk/keyboards/ergodash/rev1/keymaps/333fred/config.h +++ b/qmk/keyboards/ergodash/rev1/keymaps/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #include QMK_KEYBOARD_CONFIG_H diff --git a/qmk/keyboards/ergodash/rev1/keymaps/333fred/keymap.c b/qmk/keyboards/ergodash/rev1/keymaps/333fred/keymap.c index 8ed826d5..8fb5d0db 100644 --- a/qmk/keyboards/ergodash/rev1/keymaps/333fred/keymap.c +++ b/qmk/keyboards/ergodash/rev1/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/qmk/keyboards/ergodox_ez/config.h b/qmk/keyboards/ergodox_ez/config.h index 8ef600b0..bc63f610 100644 --- a/qmk/keyboards/ergodox_ez/config.h +++ b/qmk/keyboards/ergodox_ez/config.h @@ -1,6 +1,8 @@ /* Copyright 2012 Jun Wako Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) 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 @@ -21,10 +23,10 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1307 +#define VENDOR_ID 0x3297 #define DEVICE_VER 0x0001 -#define MANUFACTURER ZSA Technology Labs Inc +#define MANUFACTURER ZSA Technology Labs +#define PRODUCT_ID 0x4974 #define PRODUCT ErgoDox EZ /* key matrix size */ @@ -32,6 +34,16 @@ along with this program. If not, see . #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) #define MATRIX_COLS 6 +#define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false } +#define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0, B1, B2, B3, D2, D3, C6 } +#define MATRIX_ONBOARD_COL_PINS { F0, F1, F4, F5, F6, F7 } +#define DIODE_DIRECTION COL2ROW +#define EXPANDER_COL_REGISTER GPIOB +#define EXPANDER_ROW_REGISTER GPIOA +#define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 } +#define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 } + + #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 60 @@ -105,7 +117,6 @@ along with this program. If not, see . * manufacturer specs. */ -#define USB_MAX_POWER_CONSUMPTION 500 // RGB backlight #define DRIVER_ADDR_1 0b1110100 @@ -144,6 +155,6 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE diff --git a/qmk/keyboards/ergodox_ez/ergodox_ez.c b/qmk/keyboards/ergodox_ez/ergodox_ez.c index d313f7d5..e6f48c49 100644 --- a/qmk/keyboards/ergodox_ez/ergodox_ez.c +++ b/qmk/keyboards/ergodox_ez/ergodox_ez.c @@ -1,4 +1,24 @@ -#include QMK_KEYBOARD_H +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 "ergodox_ez.h" extern inline void ergodox_board_led_on(void); extern inline void ergodox_right_led_1_on(void); diff --git a/qmk/keyboards/ergodox_ez/ergodox_ez.h b/qmk/keyboards/ergodox_ez/ergodox_ez.h index 88a0a2ee..7bb27171 100644 --- a/qmk/keyboards/ergodox_ez/ergodox_ez.h +++ b/qmk/keyboards/ergodox_ez/ergodox_ez.h @@ -1,13 +1,35 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + #pragma once #include "quantum.h" #include #include #include "i2c_master.h" -#include -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define CPU_16MHz 0x00 +#if defined(KEYBOARD_ergodox_ez_glow) +# include "glow.h" +#elif defined(KEYBOARD_ergodox_ez_shine) +# include "shine.h" +#endif // I2C aliases and register addresses (see "mcp23018.md") #define I2C_ADDR 0b0100000 diff --git a/qmk/keyboards/ergodox_ez/glow/config.h b/qmk/keyboards/ergodox_ez/glow/config.h new file mode 100644 index 00000000..674b7bff --- /dev/null +++ b/qmk/keyboards/ergodox_ez/glow/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + +#pragma once + +#undef PRODUCT_ID +#define PRODUCT_ID 0x4976 +#undef PRODUCT +#define PRODUCT ErgoDox EZ Glow diff --git a/qmk/keyboards/ergodox_ez/glow/glow.h b/qmk/keyboards/ergodox_ez/glow/glow.h new file mode 100644 index 00000000..da7a6073 --- /dev/null +++ b/qmk/keyboards/ergodox_ez/glow/glow.h @@ -0,0 +1,23 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + +#pragma once + +#include "ergodox_ez.h" diff --git a/qmk/keyboards/ergodox_ez/glow/rules.mk b/qmk/keyboards/ergodox_ez/glow/rules.mk new file mode 100644 index 00000000..aad92997 --- /dev/null +++ b/qmk/keyboards/ergodox_ez/glow/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = yes diff --git a/qmk/keyboards/ergodox_ez/keymaps/stamm/config.h b/qmk/keyboards/ergodox_ez/keymaps/stamm/config.h new file mode 100644 index 00000000..e1db3d90 --- /dev/null +++ b/qmk/keyboards/ergodox_ez/keymaps/stamm/config.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Rustam Zagirov + * + * 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 . + */ + +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + +#define ORYX_CONFIGURATOR +#define LEADER_TIMEOUT 500 +#define LEADER_PER_KEY_TIMING + +#define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY +#define PERMISSIVE_HOLD +/* #define PERMISSIVE_HOLD_PER_KEY */ + +#define IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY + +#define TAPPING_FORCE_HOLD +#define TAPPING_FORCE_HOLD_PER_KEY + +/* #define RETRO_TAPPING */ +#undef LED_BRIGHTNESS_DEFAULT +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_LO) diff --git a/qmk/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/qmk/keyboards/ergodox_ez/keymaps/stamm/keymap.c new file mode 100644 index 00000000..e2d9964b --- /dev/null +++ b/qmk/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -0,0 +1,308 @@ +/* Copyright 2020 Rustam Zagirov + * + * 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 +#include "version.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LESS_MAC KC_GRAVE +#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) + +#define E_NUMBERS LT(_3_NUMBERS,KC_E) +#define R_MOUSE LT(_4_MOUSE,KC_R) +#define O_NUMBERS LT(_3_NUMBERS,KC_O) +#define U_MOUSE LT(_4_MOUSE,KC_U) +#define R_NUMBERS LT(_3_NUMBERS,KC_R) +#define W_MOUSE LT(_4_MOUSE,KC_W) +#define LEFT_NUMBERS LT(_3_NUMBERS, KC_LEFT) +#define RIGHT_MOUSE LT(_4_MOUSE, KC_RIGHT) + +enum custom_keycodes { + RGB_SLD = EZ_SAFE_RANGE, + ALT_TAB, +}; + +bool is_alt_tab_active = false; // ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; // we will be using them soon. + +enum layers { + _0_BASE, + _1_BEAKL, + _2_WORKMAN, + _3_NUMBERS, + _4_MOUSE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_0_BASE] = LAYOUT_ergodox( + KC_NONUS_BSLASH, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AUDIO_MUTE, + KC_LEAD, KC_Q, KC_W, E_NUMBERS, R_MOUSE, KC_T, TG(_1_BEAKL), + LCTL(KC_B), LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), LGUI_T(KC_F), KC_G, + KC_BSLASH, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(_2_WORKMAN), + ALT_TAB, XXXXXXX, XXXXXXX, LEFT_NUMBERS, RIGHT_MOUSE, + KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, + XXXXXXX, + KC_ENTER, KC_TAB, KC_ESCAPE, + KC_CAPSLOCK, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINUS, + XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, + KC_H, RGUI_T(KC_J), RALT_T(KC_K), RCTL_T(KC_L), RSFT_T(KC_SCOLON), KC_QUOTE, + KC_RBRACKET, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_EQUAL, + KC_DOWN, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, + XXXXXXX, + KC_ESCAPE, KC_BSPACE, KC_SPACE +), +[_1_BEAKL] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_H, O_NUMBERS, U_MOUSE, KC_X, _______, + _______, LSFT_T(KC_Y), LCTL_T(KC_I), LALT_T(KC_E), LGUI_T(KC_A), KC_DOT, + _______, KC_J, KC_SLASH, KC_COMMA, KC_K, KC_QUOTE, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, KC_G, KC_C, KC_R, KC_F, KC_Z, _______, + KC_D, RGUI_T(KC_S), RALT_T(KC_T), RCTL_T(KC_N), RSFT_T(KC_B), KC_SCOLON, + _______, KC_W, _______, KC_L, KC_P, KC_V, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_2_WORKMAN] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_D, R_NUMBERS, W_MOUSE, KC_B, _______, + _______, _______, _______, LALT_T(KC_H), LGUI_T(KC_T), _______, + _______, _______, _______, KC_M, KC_C, KC_V, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, _______, + KC_Y, RGUI_T(KC_N), RALT_T(KC_E), RCTL_T(KC_O), RSFT_T(KC_I), _______, + _______, KC_K, KC_L, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_3_NUMBERS] = LAYOUT_ergodox( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, _______, KC_1, KC_2, KC_3, KC_BSLASH, _______, + KC_0, KC_KP_DOT, _______, KC_EQUAL, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_4_MOUSE] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + RGB_HUI, RGB_HUD, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, + RGB_SLD, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, + TOGGLE_LAYER_COLOR, _______, KC_MS_WH_UP, _______, KC_MS_WH_DOWN, _______, _______, + _______, _______, _______, _______, _______, + + RGB_VAD, RGB_VAI, + _______, + _______, _______, +), +}; + + +/* bool suspended = false; */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LGUI); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + ergodox_led_all_off(); + switch (get_highest_layer(state)) { + case _1_BEAKL: + ergodox_right_led_1_on(); + break; + case _2_WORKMAN: + ergodox_right_led_2_on(); + break; + case _3_NUMBERS: + ergodox_right_led_3_on(); + break; + case _4_MOUSE: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + /* case 6: */ + /* ergodox_right_led_2_on(); */ + /* ergodox_right_led_3_on(); */ + /* break; */ + /* case 7: */ + /* ergodox_right_led_1_on(); */ + /* ergodox_right_led_2_on(); */ + /* ergodox_right_led_3_on(); */ + /* break; */ + default: + break; + } + return state; + +}; + + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* case SFT_T(KC_SPC): */ + /* return TAPPING_TERM + 1250; */ + case LT(_3_NUMBERS, KC_E): + return 200; + case LT(_4_MOUSE, KC_R): + return 200; + /* case LGUI_T(KC_F): */ + /* return 50; */ + default: + return TAPPING_TERM; + } +} +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_3_NUMBERS, KC_E): + case LT(_4_MOUSE, KC_R): + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case LEFT_NUMBERS: + case RIGHT_MOUSE: + return true; + default: + return false; + } +} + + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_3_NUMBERS, KC_E): + case LT(_4_MOUSE, KC_R): + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case LEFT_NUMBERS: + case RIGHT_MOUSE: + return false; + default: + return true; + } +} + + + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LGUI); + is_alt_tab_active = false; + } + } + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + SEQ_ONE_KEY(KC_S) { + SEND_STRING ("sudo -i\n"); + } + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LGUI("ac")); + /* SEND_STRING(SS_LGUI("a") SS_LGUI("c")); */ + } + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com\n"); + } + SEQ_TWO_KEYS(KC_A, KC_S) { + register_code(KC_LGUI); + register_code(KC_S); + unregister_code(KC_S); + unregister_code(KC_LGUI); + } + } +} diff --git a/qmk/keyboards/ergodox_ez/keymaps/stamm/readme.md b/qmk/keyboards/ergodox_ez/keymaps/stamm/readme.md new file mode 100644 index 00000000..f2cdc7ea --- /dev/null +++ b/qmk/keyboards/ergodox_ez/keymaps/stamm/readme.md @@ -0,0 +1,117 @@ +# Stamm layouts for ergodox_ez + +5 layers: + +* QUERTY +* BEAKL15 +* WORKMAN +* Numbers +* Mouse + +On home row there are hold dual keys: +- shift, ctrl, alt, cmd — on the fingers on the left hand +- cmd, alt, ctrl, shift — mirrored on the finger on the righ hand + +Top row behaves like shifter numbers row. +Hold E switch to layer with numbers. +Hold R switch to mouse controll layer. + +``` + 0 Base +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ ` │ ! │ @ │ # │ $ │ % │Mute │ │Capsl│ ^ │ & │ * │ ( │ ) │ - │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ Lead │ Q │ W │E|LT3│R|LT4│ T │ TG1 │ │ │ Y │ U │ I │ O │ P │ [ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│Ctrl + B│A | ⇧│S | ⌃│D | ⌥│F | ⌘│ G ├─────┤ ├─────┤ H │J | ⌘│K | ⌥│L | ⌃│; | ⇧│ ' │ +├────────┼─────┼─────┼─────┼─────┼─────┤ TG2 │ │ ] ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ \ │ Z │ X │ C │ V │ B │ │ │ │ N │ M │ , │ . │ / │ = │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │⎇ + T│ │ │←|LT3│→|LT4│ │ ↓ │ ↑ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │Vol- │Vol+ │ │Play │Next │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │Enter│ Tab ├─────┤ ├─────┤Bspac│ ⎵ │ + │ │ │ Esc │ │ Esc │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 1 Beakl +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ H │O|LT3│U|LT4│ X │ │ │ │ G │ C │ R │ F │ Z │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │Y | ⇧│I | ⌃│E | ⌥│A | ⌘│ . ├─────┤ ├─────┤ D │S | ⌘│T | ⌥│N | ⌃│B | ⇧│ ; │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ J │ / │ , │ K │ ' │ │ │ │ W │ │ L │ P │ V │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 2 Workman +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ D │R|LT3│W|LT4│ B │ │ │ │ J │ F │ U │ P │ ; │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │H | ⌥│T | ⌘│ ├─────┤ ├─────┤ Y │N | ⌘│E | ⌥│O | ⌃│I | ⇧│ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ M │ C │ V │ │ │ │ K │ L │ │ │ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 3 Numbers +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ * │ F12 │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤ │ 4 │ 5 │ 6 │ + │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ \ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │Reset│ │ │ │ │ │ 0 │ . │ │ = │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 4 Mouse +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │RgbMo│RgbTo│MsBtn│MsUp │MsBtn│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤RgbSl│MsLef│MsDow│MsRig│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │Toggl├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │MsWhU│ │MsWhD│ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │RgbHu│RgbHu│ │RgbVa│RgbVa│ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ 75 │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + +``` + +Copyright © 2020 Rustam Zagirov. Released under [GPL-2.0](/LICENSE). diff --git a/qmk/keyboards/ergodox_ez/keymaps/stamm/rules.mk b/qmk/keyboards/ergodox_ez/keymaps/stamm/rules.mk new file mode 100644 index 00000000..619224be --- /dev/null +++ b/qmk/keyboards/ergodox_ez/keymaps/stamm/rules.mk @@ -0,0 +1,8 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +COMMAND_ENABLE = no +LEADER_ENABLE = yes +RGBLIGHT_ENABLE = yes + +TAP_DANCE_ENABLE = no diff --git a/qmk/keyboards/ergodox_ez/led_i2c.c b/qmk/keyboards/ergodox_ez/led_i2c.c index f5553a8b..fe40ab79 100644 --- a/qmk/keyboards/ergodox_ez/led_i2c.c +++ b/qmk/keyboards/ergodox_ez/led_i2c.c @@ -1,31 +1,27 @@ /* - * light weight WS2812 lib V2.0b - * - * Controls WS2811/WS2812/WS2812B RGB-LEDs - * Author: Tim (cpldcpu@gmail.com) - * - * Jan 18th, 2014 v2.0b Initial Version - * Nov 29th, 2015 v2.3 Added SK6812RGBW support - * - * 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 . - */ +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + #ifdef RGBLIGHT_ENABLE # include "ergodox_ez.h" -extern rgblight_config_t rgblight_config; - void rgblight_call_driver(LED_TYPE *led, uint8_t led_num) { i2c_init(); i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT); diff --git a/qmk/keyboards/ergodox_ez/matrix.c b/qmk/keyboards/ergodox_ez/matrix.c index 28dc37a0..c091b6eb 100644 --- a/qmk/keyboards/ergodox_ez/matrix.c +++ b/qmk/keyboards/ergodox_ez/matrix.c @@ -1,7 +1,8 @@ /* - - +Copyright 2012 Jun Wako Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) 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 @@ -17,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ + /* * scan matrix */ @@ -30,7 +32,8 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "debounce.h" -#include QMK_KEYBOARD_H +#include "ergodox_ez.h" + /* * This constant define not debouncing time in msecs, assuming eager_pr. @@ -45,8 +48,8 @@ along with this program. If not, see . */ /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values static matrix_row_t read_cols(uint8_t row); static void init_cols(void); @@ -54,132 +57,62 @@ static void unselect_rows(void); static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; -// static uint16_t mcp23018_reset_loop; -__attribute__((weak)) void matrix_init_user(void) {} +void matrix_init_custom(void) { + // initialize row and col -__attribute__((weak)) void matrix_scan_user(void) {} + mcp23018_status = init_mcp23018(); -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } - -inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } - -inline uint8_t matrix_cols(void) { return MATRIX_COLS; } - -void matrix_init(void) { - // initialize row and col - - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - } - - debounce_init(MATRIX_ROWS); - matrix_init_quantum(); -} - -void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - } + unselect_rows(); + init_cols(); } // Reads and stores a row, returning // whether a change occurred. static inline bool store_raw_matrix_row(uint8_t index) { - matrix_row_t temp = read_cols(index); - if (raw_matrix[index] != temp) { - raw_matrix[index] = temp; - return true; - } - return false; + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; + } + return false; } -uint8_t matrix_scan(void) { - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); #ifdef RGB_MATRIX_ENABLE - rgb_matrix_init(); // re-init driver on reconnect + rgb_matrix_init(); // re-init driver on reconnect #endif - } + } + } } - } #ifdef LEFT_LEDS - mcp23018_status = ergodox_left_leds_update(); + mcp23018_status = ergodox_left_leds_update(); #endif // LEFT_LEDS - bool changed = false; - for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { - // select rows from left and right hands - uint8_t left_index = i; - uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; - select_row(left_index); - select_row(right_index); + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); - // we don't need a 30us delay anymore, because selecting a - // left-hand row requires more than 30us for i2c. + changed |= store_raw_matrix_row(left_index); + changed |= store_raw_matrix_row(right_index); - changed |= store_raw_matrix_row(left_index); - changed |= store_raw_matrix_row(right_index); + unselect_rows(); + } - unselect_rows(); - } - - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) // deprecated and evidently not called. -{ - return true; -} - -inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } - -inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } - -void matrix_print(void) { - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); - print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; + return changed; } /* Column pin configuration @@ -193,42 +126,43 @@ uint8_t matrix_key_count(void) { * pin: B5 B4 B3 B2 B1 B0 */ static void init_cols(void) { - // init on mcp23018 - // not needed, already done as part of init_mcp23018() + // init on mcp23018 + // not needed, already done as part of init_mcp23018() - // init on teensy - // Input with pull-up(DDR:0, PORT:1) - DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); - PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); + // init on teensy + setPinInputHigh(F0); + setPinInputHigh(F1); + setPinInputHigh(F4); + setPinInputHigh(F5); + setPinInputHigh(F6); + setPinInputHigh(F7); } static matrix_row_t read_cols(uint8_t row) { - if (row < 7) { - if (mcp23018_status) { // if there was an error - return 0; + if (row < 7) { + if (mcp23018_status) { // if there was an error + return 0; + } else { + uint8_t data = 0; + // reading GPIOB (column port) since in mcp23018's sequential mode + // it is addressed directly after writing to GPIOA in select_row() + mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + return data; + } } else { - uint8_t data = 0; - // reading GPIOB (column port) since in mcp23018's sequential mode - // it is addressed directly after writing to GPIOA in select_row() - mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status < 0) goto out; - data = ~((uint8_t)mcp23018_status); - mcp23018_status = I2C_STATUS_SUCCESS; - out: - i2c_stop(); - return data; - } - } else { - /* read from teensy - * bitmask is 0b11110011, but we want those all - * in the lower six bits. - * we'll return 1s for the top two, but that's harmless. - */ + /* read from teensy + * bitmask is 0b11110011, but we want those all + * in the lower six bits. + * we'll return 1s for the top two, but that's harmless. + */ - return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); - } + return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + } } /* Row pin configuration @@ -242,69 +176,79 @@ static matrix_row_t read_cols(uint8_t row) { * pin: A0 A1 A2 A3 A4 A5 A6 */ static void unselect_rows(void) { - // no need to unselect on mcp23018, because the select step sets all - // the other row bits high, and it's not changing to a different - // direction + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction - // unselect on teensy - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); - PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); - DDRD &= ~(1 << 2 | 1 << 3); - PORTD &= ~(1 << 2 | 1 << 3); - DDRC &= ~(1 << 6); - PORTC &= ~(1 << 6); + // unselect on teensy + setPinInput(B0); + setPinInput(B1); + setPinInput(B2); + setPinInput(B3); + setPinInput(D2); + setPinInput(D3); + setPinInput(C6); } static void select_row(uint8_t row) { - if (row < 7) { - // select on mcp23018 - if (mcp23018_status) { // if there was an error - // do nothing + if (row < 7) { + // select on mcp23018 + if (!mcp23018_status) { + // set active row low : 0 + // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + out: + i2c_stop(); + } } else { - // set active row low : 0 - // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - out: - i2c_stop(); + // select on teensy + // Output low(DDR:1, PORT:0) to select + switch (row) { + case 7: + setPinOutput(B0); + writePinLow(B0); + break; + case 8: + setPinOutput(B1); + writePinLow(B1); + break; + case 9: + setPinOutput(B2); + writePinLow(B2); + break; + case 10: + setPinOutput(B3); + writePinLow(B3); + break; + case 11: + setPinOutput(D2); + writePinLow(D2); + break; + case 12: + setPinOutput(D3); + writePinLow(D3); + break; + case 13: + setPinOutput(C6); + writePinLow(C6); + break; + } } - } else { - // select on teensy - // Output low(DDR:1, PORT:0) to select - switch (row) { - case 7: - DDRB |= (1 << 0); - PORTB &= ~(1 << 0); - break; - case 8: - DDRB |= (1 << 1); - PORTB &= ~(1 << 1); - break; - case 9: - DDRB |= (1 << 2); - PORTB &= ~(1 << 2); - break; - case 10: - DDRB |= (1 << 3); - PORTB &= ~(1 << 3); - break; - case 11: - DDRD |= (1 << 2); - PORTD &= ~(1 << 2); - break; - case 12: - DDRD |= (1 << 3); - PORTD &= ~(1 << 3); - break; - case 13: - DDRC |= (1 << 6); - PORTC &= ~(1 << 6); - break; - } - } +} + +// DO NOT REMOVE +// Needed for proper wake/sleep +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + } diff --git a/qmk/keyboards/ergodox_ez/post_config.h b/qmk/keyboards/ergodox_ez/post_config.h index 526cc8c4..0d4fe5c6 100644 --- a/qmk/keyboards/ergodox_ez/post_config.h +++ b/qmk/keyboards/ergodox_ez/post_config.h @@ -1,3 +1,23 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + #pragma once #if !defined(ERGODOX_LED_15) && !defined(ERGODOX_LED_30) diff --git a/qmk/keyboards/ergodox_ez/readme.md b/qmk/keyboards/ergodox_ez/readme.md index 796e96ce..59a2840f 100644 --- a/qmk/keyboards/ergodox_ez/readme.md +++ b/qmk/keyboards/ergodox_ez/readme.md @@ -11,6 +11,11 @@ The ErgoDox EZ is a mass produced version of the original ErgoDox keyboard, with Make example for this keyboard (after setting up your build environment): make ergodox_ez:default:flash + +For the ErgoDox EZ Shine, and Glow, use one of the following: + + make ergodox_ez/shine:default:flash + make ergodox_ez/glow: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). diff --git a/qmk/keyboards/ergodox_ez/rules.mk b/qmk/keyboards/ergodox_ez/rules.mk index 579e4f59..b6311aca 100644 --- a/qmk/keyboards/ergodox_ez/rules.mk +++ b/qmk/keyboards/ergodox_ez/rules.mk @@ -19,20 +19,19 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -UNICODE_ENABLE = yes # Unicode -SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = lite # Custom matrix file for the ErgoDox EZ +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +UNICODE_ENABLE = yes # Unicode +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no -RGBLIGHT_ENABLE = yes -RGB_MATRIX_ENABLE = no # enable later +RGB_MATRIX_ENABLE = no # enable later DEBOUNCE_TYPE = eager_pr # project specific files diff --git a/qmk/keyboards/ergodox_ez/shine/config.h b/qmk/keyboards/ergodox_ez/shine/config.h new file mode 100644 index 00000000..cf4f59f3 --- /dev/null +++ b/qmk/keyboards/ergodox_ez/shine/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + +#pragma once + +#undef PRODUCT_ID +#define PRODUCT_ID 0x4975 +#undef PRODUCT +#define PRODUCT ErgoDox EZ Shine diff --git a/qmk/keyboards/ergodox_ez/shine/rules.mk b/qmk/keyboards/ergodox_ez/shine/rules.mk new file mode 100644 index 00000000..1e3cebb1 --- /dev/null +++ b/qmk/keyboards/ergodox_ez/shine/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/qmk/keyboards/ergodox_ez/shine/shine.h b/qmk/keyboards/ergodox_ez/shine/shine.h new file mode 100644 index 00000000..da7a6073 --- /dev/null +++ b/qmk/keyboards/ergodox_ez/shine/shine.h @@ -0,0 +1,23 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2015 ZSA Technology Labs Inc (@zsa) +Copyright 2020 Christopher Courtney (@drashna) + +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 . +*/ + +#pragma once + +#include "ergodox_ez.h" diff --git a/qmk/keyboards/ergodox_infinity/ergodox_infinity.c b/qmk/keyboards/ergodox_infinity/ergodox_infinity.c index 9fda7991..c69c1eb3 100644 --- a/qmk/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/qmk/keyboards/ergodox_infinity/ergodox_infinity.c @@ -6,6 +6,17 @@ #include "lcd_backlight.h" #endif +#ifdef WPM_ENABLE +# include "serial_link/protocol/transport.h" +# include "wpm.h" + +MASTER_TO_ALL_SLAVES_OBJECT(current_wpm, uint8_t); +static remote_object_t* remote_objects[] = { + REMOTE_OBJECT(current_wpm), +}; +static uint8_t last_sent_wpm = 0; +#endif + void init_serial_link_hal(void) { PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); PORTA->PCR[2] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(2); @@ -39,30 +50,30 @@ void init_serial_link_hal(void) { // Which will reduce the brightness range #define PRESCALAR_DEFINE 0 void lcd_backlight_hal_init(void) { - // Setup Backlight + // Setup Backlight SIM->SCGC6 |= SIM_SCGC6_FTM0; FTM0->CNT = 0; // Reset counter - // PWM Period - // 16-bit maximum - FTM0->MOD = 0xFFFF; + // PWM Period + // 16-bit maximum + FTM0->MOD = 0xFFFF; - // Set FTM to PWM output - Edge Aligned, Low-true pulses + // Set FTM to PWM output - Edge Aligned, Low-true pulses #define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0) - CHANNEL_RED.CnSC = CNSC_MODE; - CHANNEL_GREEN.CnSC = CNSC_MODE; - CHANNEL_BLUE.CnSC = CNSC_MODE; + CHANNEL_RED.CnSC = CNSC_MODE; + CHANNEL_GREEN.CnSC = CNSC_MODE; + CHANNEL_BLUE.CnSC = CNSC_MODE; - // System clock, /w prescalar setting - FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); + // System clock, /w prescalar setting + FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); - CHANNEL_RED.CnV = 0; - CHANNEL_GREEN.CnV = 0; - CHANNEL_BLUE.CnV = 0; + CHANNEL_RED.CnV = 0; + CHANNEL_GREEN.CnV = 0; + CHANNEL_BLUE.CnV = 0; - RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); - RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); - RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); + RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); + RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); + RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); #define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4) RGB_PORT->PCR[RED_PIN] = RGB_MODE; @@ -94,9 +105,9 @@ static uint16_t cie_lightness(uint16_t v) { } void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { - CHANNEL_RED.CnV = cie_lightness(r); - CHANNEL_GREEN.CnV = cie_lightness(g); - CHANNEL_BLUE.CnV = cie_lightness(b); + CHANNEL_RED.CnV = cie_lightness(r); + CHANNEL_GREEN.CnV = cie_lightness(g); + CHANNEL_BLUE.CnV = cie_lightness(b); } __attribute__ ((weak)) @@ -109,21 +120,39 @@ void matrix_scan_user(void) { void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); - // The backlight always has to be initialized, otherwise it will stay lit + matrix_init_user(); + // The backlight always has to be initialized, otherwise it will stay lit #ifndef VISUALIZER_ENABLE - lcd_backlight_hal_init(); + lcd_backlight_hal_init(); +#endif +#ifdef WPM_ENABLE + add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); #endif } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); +#ifdef WPM_ENABLE + if (is_serial_link_master()) { + uint8_t current_wpm = get_current_wpm(); + if (current_wpm != last_sent_wpm) { + *begin_write_current_wpm() = current_wpm; + end_write_current_wpm(); + last_sent_wpm = current_wpm; + } + } else if (is_serial_link_connected()) { + uint8_t* new_wpm = read_current_wpm(); + if (new_wpm) { + set_current_wpm(*new_wpm); + } + } +#endif + matrix_scan_user(); } bool is_keyboard_master(void) { diff --git a/qmk/keyboards/ergodox_infinity/matrix.c b/qmk/keyboards/ergodox_infinity/matrix.c index 3a0a1792..941367a3 100644 --- a/qmk/keyboards/ergodox_infinity/matrix.c +++ b/qmk/keyboards/ergodox_infinity/matrix.c @@ -24,6 +24,7 @@ along with this program. If not, see . #include "print.h" #include "debug.h" #include "matrix.h" +#include "eeconfig.h" #include "serial_link/system/serial_link.h" @@ -118,8 +119,12 @@ uint8_t matrix_scan(void) } uint8_t offset = 0; -#ifdef MASTER_IS_ON_RIGHT +#if (defined(EE_HANDS) || defined(MASTER_IS_ON_RIGHT)) +#ifdef EE_HANDS + if (is_serial_link_master() && !eeconfig_read_handedness()) { +#else if (is_serial_link_master()) { +#endif offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS; } #endif @@ -162,7 +167,13 @@ void matrix_print(void) void matrix_set_remote(matrix_row_t* rows, uint8_t index) { uint8_t offset = 0; -#ifdef MASTER_IS_ON_RIGHT +#ifdef EE_HANDS + if (eeconfig_read_handedness()) { + offset = LOCAL_MATRIX_ROWS * (index + 1); + } else { + offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS * (index + 2); + } +#elif defined(MASTER_IS_ON_RIGHT) offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS * (index + 2); #else offset = LOCAL_MATRIX_ROWS * (index + 1); diff --git a/qmk/keyboards/ergodox_infinity/readme.md b/qmk/keyboards/ergodox_infinity/readme.md index d712bb88..73ee3bc1 100644 --- a/qmk/keyboards/ergodox_infinity/readme.md +++ b/qmk/keyboards/ergodox_infinity/readme.md @@ -29,6 +29,9 @@ Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob The Infinity is two completely independent keyboards, that can connect together. You have a few options in how you flash the firmware: +- Add `#define EE_HANDS` to your config.h, initialize the EEPROM values (see below), + and then flash the same firmware to both halves. + - Flash the left half, rebuild the firmware with "MASTER=right" and then flash the right half. This allows you to plug in either half directly to the computer and is what the above instructions do. @@ -43,6 +46,35 @@ You have a few options in how you flash the firmware: directly connect the right half to the computer. - For minor changes such as changing only the keymap without having updated - any part of the firmware code itself, you can program only the MASTER half. + any part of the firmware code itself, you can program only the MASTER half, + but it is safest to program both halves. + +### EE_HANDS initialization + +To initialize the EEPROM values for `EE_HANDS` to work properly, these steps should work. +They only need to be done once, unless you reset the EEPROM later. + + - Plug in the left keyboard half to the computer, and press its program button. + + - Flash the left half with `make ergodox_infinity:default:dfu-util-split-left` + (If you need to use a different method to flash your keyboard, still run this command, + and abort it with Ctrl+C when the flashing attempts starts to print errors, + then flash the built firmware). + + - On the left half, press the top vertical 1.5U key (second from the top in the rightmost column) once, + then the 1U key at the bottom in the opposite corner (bottom left corner). + + - Plug in the right keyboard half to the computer, and press its program button. + + - Flash the right half with `make ergodox_infinity:default:dfu-util-split-right` + + - On the right half, press the top vertical 1.5U key (second from the top in the leftmost column) once, + then the 1U key at the bottom in the opposite corner (bottom right corner). + + - Add `#define EE_HANDS` to the config.h file of your keymap, and build your firmware using + `make ergodox_infinity:keymapname`. + + - After this, you can flash both halves with the same firmware, _without_ having to rebuild with + "MASTER=right" or risking a mirrored keyboard when connected the wrong way. + If you reset your EEPROM later, you'll have to follow these steps again, though. -- It is safest to program both halves though. diff --git a/qmk/keyboards/ergotravel/keymaps/via/config.h b/qmk/keyboards/ergotravel/keymaps/via/config.h new file mode 100644 index 00000000..9b26bf4c --- /dev/null +++ b/qmk/keyboards/ergotravel/keymaps/via/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2017 Pierre Constantineau + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 14 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + + diff --git a/qmk/keyboards/ergotravel/keymaps/via/keymap.c b/qmk/keyboards/ergotravel/keymaps/via/keymap.c new file mode 100644 index 00000000..7cd72245 --- /dev/null +++ b/qmk/keyboards/ergotravel/keymaps/via/keymap.c @@ -0,0 +1,66 @@ + /* Copyright HarshitGoel96 2020 + * With permission form jpconstantineau, the original maintainer of the Ergo Travel hardware. + * + * 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 + + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_LALT, _______, _______, KC_SPC, KC_SPC, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + + ), + + [_RAISE] = LAYOUT( + +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + + ), + + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + diff --git a/qmk/keyboards/ergotravel/keymaps/via/rules.mk b/qmk/keyboards/ergotravel/keymaps/via/rules.mk new file mode 100644 index 00000000..43061db1 --- /dev/null +++ b/qmk/keyboards/ergotravel/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/ergotravel/rev1/config.h b/qmk/keyboards/ergotravel/rev1/config.h index 89045666..4bcb24e0 100644 --- a/qmk/keyboards/ergotravel/rev1/config.h +++ b/qmk/keyboards/ergotravel/rev1/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB -#define PRODUCT_ID 0x1256 +#define VENDOR_ID 0x4A50 //JP +#define PRODUCT_ID 0x4554 //ET #define DEVICE_VER 0x0100 #define MANUFACTURER JPConstantineau.com #define PRODUCT ErgoTravel Keyboard diff --git a/qmk/keyboards/ergotravel/rules.mk b/qmk/keyboards/ergotravel/rules.mk index 43f93798..5fd2a23d 100644 --- a/qmk/keyboards/ergotravel/rules.mk +++ b/qmk/keyboards/ergotravel/rules.mk @@ -32,4 +32,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = ergotravel/rev1 +DEFAULT_FOLDER = ergotravel/rev1 \ No newline at end of file diff --git a/qmk/keyboards/eve/meteor/config.h b/qmk/keyboards/eve/meteor/config.h index 2100c3a4..1e8c6ca0 100644 --- a/qmk/keyboards/eve/meteor/config.h +++ b/qmk/keyboards/eve/meteor/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x4556 // "EV" +#define PRODUCT_ID 0x4D54 // "MT" #define DEVICE_VER 0x0200 #define MANUFACTURER EVE #define PRODUCT Meteor diff --git a/qmk/keyboards/eve/meteor/info.json b/qmk/keyboards/eve/meteor/info.json index e75b1b02..15ad8a1e 100644 --- a/qmk/keyboards/eve/meteor/info.json +++ b/qmk/keyboards/eve/meteor/info.json @@ -13,4 +13,4 @@ "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5, "w":1.75}, {"x":13, "y":4.5}, {"x":14, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5}, {"x":11, "y":5.5}, {"x":12, "y":5.5}, {"x":13, "y":5.5}, {"x":14, "y":5.5}] } } -} \ No newline at end of file +} diff --git a/qmk/keyboards/eve/meteor/keymaps/via/keymap.c b/qmk/keyboards/eve/meteor/keymaps/via/keymap.c new file mode 100644 index 00000000..28a3b5cb --- /dev/null +++ b/qmk/keyboards/eve/meteor/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 MechMerlin + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_HOME, KC_PGUP, KC_PGDN, KC_END, + 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_BSLS, KC_DEL, + 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_BSPC, + MO(1), 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_NO , KC_RGUI, KC_RCTRL + ), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, + 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, + RESET, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, 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 + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/eve/meteor/keymaps/via/rules.mk b/qmk/keyboards/eve/meteor/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/eve/meteor/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/eve/meteor/readme.md b/qmk/keyboards/eve/meteor/readme.md index 28884156..69d5a35e 100644 --- a/qmk/keyboards/eve/meteor/readme.md +++ b/qmk/keyboards/eve/meteor/readme.md @@ -16,6 +16,8 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e **Reset Key:** Short the two holes labeled `FW_JP` underneath the PCB, beside the Tab key while plugging in the keyboard. -Do not confuse this with the LED holes of the switch in the `Tab` position. `FW_JP` is not reachable from the top as the plate blocks access to it. +Do not confuse this with the LED holes of the switch in the `Tab` position. `FW_JP` is not reachable from the top as the plate blocks access to it. + +If your PCB does not have this circuit exposed, you must hold down the key corresponding to pins A0 and B0 on the MCU. On at least the red EVE PCB, this is the **+/= key** (second row, 13th column). 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). diff --git a/qmk/keyboards/exclusive/e65/config.h b/qmk/keyboards/exclusive/e65/config.h index fdcb3ad4..b056a081 100644 --- a/qmk/keyboards/exclusive/e65/config.h +++ b/qmk/keyboards/exclusive/e65/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4558 // "EX" +#define PRODUCT_ID 0xE605 // E6.5 #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive / E-Team #define PRODUCT E6.5 diff --git a/qmk/keyboards/exclusive/e65/e65.h b/qmk/keyboards/exclusive/e65/e65.h index 4b9fff75..281b52c7 100644 --- a/qmk/keyboards/exclusive/e65/e65.h +++ b/qmk/keyboards/exclusive/e65/e65.h @@ -40,13 +40,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K410, K412, K413, K414, K415 \ -) LAYOUT_65_all_noblocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K410, K412, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} #define LAYOUT_65_ansi_noblocker_splitbs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ @@ -54,13 +54,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K410, K412, K413, K414, K415 \ -) LAYOUT_65_all_noblocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K410, K412, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} #define LAYOUT_65_iso_noblocker( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ @@ -68,13 +68,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K410, K412, K413, K414, K415 \ -) LAYOUT_65_all_noblocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K410, K412, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} // Ansi layout with bottom row 1.25,1.25,1,25,6.25,1.25,1.25 blocker <-,v,-> #define LAYOUT_65_all_blocker( \ @@ -97,13 +97,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K410, K411, K413, K414, K415 \ -) LAYOUT_65_all_blocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K410, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_ansi_blocker_splitbs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ @@ -111,13 +111,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K410, K411, K413, K414, K415 \ -) LAYOUT_65_all_blocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K410, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_iso_blocker( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ @@ -125,14 +125,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K410, K411, K413, K414, K415 \ -) LAYOUT_65_all_blocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K410, K411, K413, K414, K415 \ -) - +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} // ANSI layout with bottom row 1.5,1.5,7,1.5,1.5,<-,v,-> #define LAYOUT_65_all_7u_noblocker( \ @@ -155,13 +154,14 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K406, K410, K412, K413, K414, K415 \ -) LAYOUT_65_all_7u_noblocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K406, K410, K412, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} + #define LAYOUT_65_ansi_7u_noblocker_splitbs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ @@ -169,13 +169,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K406, K410, K412, K413, K414, K415 \ -) LAYOUT_65_all_7u_noblocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K406, K410, K412, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} #define LAYOUT_65_iso_7u_noblocker( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ @@ -183,14 +183,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K406, K410, K412, K413, K414, K415 \ -) LAYOUT_65_all_7u_noblocker( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K406, K410, K412, K413, K414, K415 \ -) - +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, K413, K414, K415 } \ +} // ANSI layout with bottom row 1.5,1,1.5,7,1.5, blocker, <-,v,-> #define LAYOUT_65_all_7u_wk( \ @@ -213,13 +212,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_wk( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_ansi_7u_wk_splitbs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ @@ -227,13 +226,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_wk( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_iso_7u_wk( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ @@ -241,13 +240,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K403, K406, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_wk( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K403, K406, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} // layout with bottom row 1.5,blocker,1.5,7,1.5, blocker, <-,v,-> #define LAYOUT_65_all_7u_wkl( \ @@ -270,13 +269,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K402, K406, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_wkl( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K402, K406, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, KC_NO, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_ansi_7u_wkl_splitbs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ @@ -284,13 +283,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K402, K406, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_wkl( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K402, K406, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, KC_NO, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_iso_7u_wkl( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ @@ -298,14 +297,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K402, K406, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_wkl( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K402, K406, K411, K413, K414, K415 \ -) - +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, KC_NO, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \ +} // layout with bottom row blocker,1,1.5,7,1.5,1, blocker, <-,v,-> #define LAYOUT_65_all_7u_hhkb( \ @@ -328,13 +326,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K406, K410, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K406, K410, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_ansi_7u_hhkb_splitbs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ @@ -342,13 +340,13 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K406, K410, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K406, K410, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} #define LAYOUT_65_iso_7u_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ @@ -356,12 +354,12 @@ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K406, K410, K411, K413, K414, K415 \ -) LAYOUT_65_all_7u_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - K400, K401, K406, K410, K411, K413, K414, K415 \ -) +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \ +} // clang-format on diff --git a/qmk/keyboards/exclusive/e65/keymaps/via/keymap.c b/qmk/keyboards/exclusive/e65/keymaps/via/keymap.c new file mode 100644 index 00000000..d95106e6 --- /dev/null +++ b/qmk/keyboards/exclusive/e65/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 + * + * 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 + +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_BSPC, KC_TRNS, 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_ENT, KC_PGDN, + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_TRNS, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_GRV, 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_DEL, KC_NO, RESET, + BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, + 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, RGB_VAI, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, MO(1), RGB_SAI, RGB_VAD, RGB_SAD), + + [2] = LAYOUT_all( + 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, 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), + + [3] = LAYOUT_all( + 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, 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), +}; diff --git a/qmk/keyboards/exclusive/e65/keymaps/via/rules.mk b/qmk/keyboards/exclusive/e65/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/exclusive/e65/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/exclusive/e85/soldered/soldered.c b/qmk/keyboards/exclusive/e85/soldered/soldered.c index e01221a2..0a7de55c 100644 --- a/qmk/keyboards/exclusive/e85/soldered/soldered.c +++ b/qmk/keyboards/exclusive/e85/soldered/soldered.c @@ -1,4 +1,4 @@ -/* Copyright 2020 MechMerlin +/* Copyright 2020 VashtaNerada * * 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 @@ -15,3 +15,16 @@ */ #include "soldered.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(C7); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(C7, led_state.caps_lock); + } + return true; +} diff --git a/qmk/keyboards/ferris/0_1/0_1.c b/qmk/keyboards/ferris/0_1/0_1.c new file mode 100644 index 00000000..dbdb0b4b --- /dev/null +++ b/qmk/keyboards/ferris/0_1/0_1.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Pierre Chevalier + +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 "0_1.h" diff --git a/qmk/keyboards/ferris/0_1/0_1.h b/qmk/keyboards/ferris/0_1/0_1.h new file mode 100644 index 00000000..4602637c --- /dev/null +++ b/qmk/keyboards/ferris/0_1/0_1.h @@ -0,0 +1,43 @@ +/* +Copyright 2020 Pierre Chevalier + +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 . +*/ + +#pragma once + +#include "quantum.h" + +// clang-format off + +/* left hand right hand */ +#define LAYOUT(\ + K0_0, K0_1, K0_2, K0_3, K0_4, K0_5, K0_6, K0_7, K0_8, K0_9,\ + K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9,\ + K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9,\ + K3_3, K3_4, K3_5, K3_6)\ +/* matrix positions */\ +{\ + {K0_0, K0_1, K0_2, K0_3, K0_4},\ + {K1_0, K1_1, K1_2, K1_3, K1_4},\ + {K2_0, K2_1, K2_2, K2_3, K2_4},\ + {KC_NO, KC_NO, KC_NO, K3_3, K3_4},\ + \ + {K0_5, K0_6, K0_7, K0_8, K0_9},\ + {K1_5, K1_6, K1_7, K1_8, K1_9},\ + {K2_5, K2_6, K2_7, K2_8, K2_9},\ + {K3_5, K3_6, KC_NO, KC_NO, KC_NO}\ +} + +// clang-format on diff --git a/qmk/keyboards/ferris/0_1/config.h b/qmk/keyboards/ferris/0_1/config.h new file mode 100644 index 00000000..33494d92 --- /dev/null +++ b/qmk/keyboards/ferris/0_1/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2020 Pierre Chevalier + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC2AB +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pierre +#define PRODUCT Ferris the keeb +#define DESCRIPTION A minimalistic 34 - keys split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 10 + +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2) + +#define UNUSED_MCU 14 +#define UNUSED_MCP 7 + +// wiring +#define MATRIX_ROW_PINS_MCU \ + { B3, B2, B1, F0 } +#define MATRIX_COL_PINS_MCU \ + { D6, D7, B4, B5, B6 } +#define UNUSED_PINS_MCU \ + { B0, B7, C6, C7, D2, D3, D4, D5, E6, F1, F4, F5, F6, F7 } +#define MATRIX_ROW_PINS_MCP \ + { B0, B1, B2, B3 } +#define MATRIX_COL_PINS_MCP \ + { A0, A1, A2, A3, A4 } +#define UNUSED_PINS_MCP \ + { B4, B5, B6, B7, A5, A6, A7 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + diff --git a/qmk/keyboards/ferris/0_1/matrix.c b/qmk/keyboards/ferris/0_1/matrix.c new file mode 100644 index 00000000..e13c35d3 --- /dev/null +++ b/qmk/keyboards/ferris/0_1/matrix.c @@ -0,0 +1,282 @@ +/* +Copyright 2013 Oleg Kostyuk + 2020 Pierre Chevalier + +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 . +*/ + +/* + * This code was heavily inspired by the ergodox_ez keymap, and modernized + * to take advantage of the quantum.h microcontroller agnostics gpio control + * abstractions and use the macros defined in config.h for the wiring as opposed + * to repeating that information all over the place. + */ + +#include QMK_KEYBOARD_H +#include "i2c_master.h" + +extern i2c_status_t mcp23017_status; +#define I2C_TIMEOUT 1000 + +// For a better understanding of the i2c protocol, this is a good read: +// https://www.robot-electronics.co.uk/i2c-tutorial + +// I2C address: +// See the datasheet, section 3.3.1 on addressing I2C devices and figure 3-6 for an +// illustration +// http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf +// All address pins of the mcp23017 are connected to the ground on the ferris +// | 0 | 1 | 0 | 0 | A2 | A1 | A0 | +// | 0 | 1 | 0 | 0 | 0 | 0 | 0 | +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE) +#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ) + +// Register addresses +// See https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/blob/master/Adafruit_MCP23017.h +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +bool i2c_initialized = 0; +i2c_status_t mcp23017_status = I2C_ADDR; + +uint8_t init_mcp23017(void) { + print("starting init"); + mcp23017_status = I2C_ADDR; + + // I2C subsystem + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + wait_ms(I2C_TIMEOUT); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(IODIRA, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will read all the bits on GPIOA + mcp23017_status = i2c_write(0b11111111, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will write to the pins 0-4 on GPIOB (in select_rows) + mcp23017_status = i2c_write(0b11110000, I2C_TIMEOUT); + if (mcp23017_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(GPPUA, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will read all the bits on GPIOA + mcp23017_status = i2c_write(0b11111111, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will write to the pins 0-4 on GPIOB (in select_rows) + mcp23017_status = i2c_write(0b11110000, I2C_TIMEOUT); + if (mcp23017_status) goto out; + +out: + i2c_stop(); + return mcp23017_status; +} + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23017_reset_loop; + +void matrix_init_custom(void) { + // initialize row and col + + mcp23017_status = init_mcp23017(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } +} + +void matrix_power_up(void) { + mcp23017_status = init_mcp23017(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } +} + +// Reads and stores a row, returning +// whether a change occurred. +static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) { + matrix_row_t temp = read_cols(index); + if (current_matrix[index] != temp) { + current_matrix[index] = temp; + return true; + } + return false; +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + if (mcp23017_status) { // if there was an error + if (++mcp23017_reset_loop == 0) { + // if (++mcp23017_reset_loop >= 1300) { + // since mcp23017_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + dprint("trying to reset mcp23017\n"); + mcp23017_status = init_mcp23017(); + if (mcp23017_status) { + dprint("right side not responding\n"); + } else { + dprint("right side attached\n"); + } + } + } + + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); + + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + changed |= store_matrix_row(current_matrix, left_index); + changed |= store_matrix_row(current_matrix, right_index); + + unselect_rows(); + } + + return changed; +} + +static void init_cols(void) { + // init on mcp23017 + // not needed, already done as part of init_mcp23017() + + // init on mcu + pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; + for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { + pin_t pin = matrix_col_pins_mcu[pin_index]; + setPinInput(pin); + writePinHigh(pin); + } +} + +static matrix_row_t read_cols(uint8_t row) { + if (row < MATRIX_ROWS_PER_SIDE) { + pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; + matrix_row_t current_row_value = 0; + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); + + // Populate the matrix row with the state of the col pin + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + return current_row_value; + } else { + if (mcp23017_status) { // if there was an error + return 0; + } else { + uint8_t data = 0; + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(GPIOA, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_read_nack(I2C_TIMEOUT); + if (mcp23017_status < 0) goto out; + // We read all the pins on GPIOA. + // The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero. + // The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys. + // Since the pins connected to eact columns are sequential, and counting from zero up (col 5 -> GPIOA0, col 6 -> GPIOA1 and so on), the only transformation needed is a bitwise not to swap all zeroes and ones. + data = ~((uint8_t)mcp23017_status); + mcp23017_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + // return reverse_bits(data, MATRIX_COLS_PER_SIDE); + return data; + } + } +} + +static void unselect_rows(void) { + // no need to unselect on mcp23017, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + + // unselect rows on microcontroller + pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; + for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { + pin_t pin = matrix_row_pins_mcu[pin_index]; + setPinInput(pin); + writePinLow(pin); + } +} + +static void select_row(uint8_t row) { + if (row < MATRIX_ROWS_PER_SIDE) { + // select on atmega32u4 + pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; + pin_t pin = matrix_row_pins_mcu[row]; + setPinOutput(pin); + writePinLow(pin); + } else { + // select on mcp23017 + if (mcp23017_status) { // if there was an error + // do nothing + } else { + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(GPIOB, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one. + // Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus. + mcp23017_status = i2c_write(0xFF & ~(1 << (row - MATRIX_ROWS_PER_SIDE)), I2C_TIMEOUT); + + if (mcp23017_status) goto out; + out: + i2c_stop(); + } + } +} diff --git a/qmk/keyboards/ferris/0_1/rules.mk b/qmk/keyboards/ferris/0_1/rules.mk new file mode 100644 index 00000000..8645dbba --- /dev/null +++ b/qmk/keyboards/ferris/0_1/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes +CUSTOM_MATRIX = lite +NO_USB_STARTUP_CHECK = yes +LTO_ENABLE = yes + +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/qmk/keyboards/ferris/info.json b/qmk/keyboards/ferris/info.json new file mode 100644 index 00000000..ffffb58e --- /dev/null +++ b/qmk/keyboards/ferris/info.json @@ -0,0 +1,54 @@ +{ + "keyboard_name": "Ferris", + "url": "https://github.com/pierrechevalier83/ferris/", + "maintainer": "@pierrec83", + "width": 12, + "height": 4.75, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.93}, + {"x": 1, "y": 0.31}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.28}, + {"x": 4, "y": 0.42}, + + {"x": 7, "y": 0.42}, + {"x": 8, "y": 0.28}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0.31}, + {"x": 11, "y": 0.93}, + + {"x": 0, "y": 1.93}, + {"x": 1, "y": 1.31}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.28}, + {"x": 4, "y": 1.42}, + + {"x": 7, "y": 1.42}, + {"x": 8, "y": 1.28}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1.31}, + {"x": 11, "y": 1.93}, + + {"x": 0, "y": 2.93}, + {"x": 1, "y": 2.31}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.28}, + {"x": 4, "y": 2.42}, + + {"x": 7, "y": 2.42}, + {"x": 8, "y": 2.28}, + {"x": 9, "y": 2}, + {"x": 10, "y": 2.31}, + {"x": 11, "y": 2.93}, + + {"x": 3.5, "y": 3.75}, + {"x": 4.5, "y": 4}, + + {"x": 6.5, "y": 4}, + {"x": 7.5, "y": 3.75} + ] + } + } +} diff --git a/qmk/keyboards/ferris/keymaps/default/config.h b/qmk/keyboards/ferris/keymaps/default/config.h new file mode 100644 index 00000000..cf0fb747 --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pierre Chevalier + +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 . +*/ + +#pragma once +// Set the mouse settings to a comfortable speed/accuracy trade-off, +// assuming a screen refresh rate of 60 Htz or higher +// The default is 50. This makes the mouse ~3 times faster and more accurate +#define MOUSEKEY_INTERVAL 16 +// The default is 20. Since we made the mouse about 3 times faster with the previous setting, +// give it more time to accelerate to max speed to retain precise control over short distances. +#define MOUSEKEY_TIME_TO_MAX 40 +// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive +#define MOUSEKEY_DELAY 100 +// It makes sense to use the same delay for the mouseweel +#define MOUSEKEY_WHEEL_DELAY 100 +// The default is 100 +#define MOUSEKEY_WHEEL_INTERVAL 50 +// The default is 40 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 + +// Pick good defaults for enabling homerow modifiers +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD diff --git a/qmk/keyboards/ferris/keymaps/default/keymap.json b/qmk/keyboards/ferris/keymaps/default/keymap.json new file mode 100644 index 00000000..7f7d614e --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/default/keymap.json @@ -0,0 +1,106 @@ +{ "version": 1, + "notes": "My awesome keymap", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "handwired/ferris", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + ["KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T", + "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P", + + "LSFT_T(KC_A)", "LT(5,KC_S)" , "LT(1,KC_D)" , "LT(3,KC_F)" , "KC_G", + "KC_H" , "LT(4,KC_J)" , "LT(2,KC_K)" , "LT(6,KC_L)" , "LSFT_T(KC_SCLN)", + + "KC_Z" , "LCTL_T(KC_X)", "LALT_T(KC_C)" , "KC_V" , "KC_B", + "KC_N" , "KC_M" , "LALT_T(KC_COMM)", "LCTL_T(KC_DOT)", "KC_SLSH", + + "KC_P0" , "KC_BSPC", + "LT(7,KC_SPC)", "KC_P1" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_BTN1" , "KC_WH_U" , "KC_BTN2" , "KC_TRNS", + + "KC_TRNS" , "KC_BTN2" , "KC_NO" , "KC_BTN1" , "KC_TRNS", + "KC_TRNS" , "KC_MS_L" , "KC_MS_D" , "KC_MS_U" , "KC_MS_R", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_WH_L" , "KC_WH_D" , "KC_WH_R" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_PGUP" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LEFT" , "KC_UP" , "KC_DOWN" , "KC_RGHT" , "KC_TRNS", + "KC_TRNS" , "KC_LGUI" , "KC_NO" , "LCTL(KC_LALT)" , "LCA(KC_LSFT)", + + "KC_TRNS" , "KC_HOME" , "KC_PGDN" , "KC_END" , "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_UNDS" , "KC_PIPE" , "KC_QUOT" , "KC_TRNS", + + "KC_CIRC" , "KC_ASTR" , "KC_AMPR" , "KC_NO" , "KC_TRNS", + "KC_HASH" , "KC_TILD" , "KC_SLSH" , "KC_DQUO" , "KC_DLR", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_MINS" , "KC_BSLS" , "KC_GRV" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_COLN" , "KC_LT" , "KC_GT" , "KC_SCLN", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LCBR" , "KC_RCBR" , "KC_LPRN" , "KC_RPRN" , "KC_AT", + "KC_TRNS" , "KC_NO" , "KC_EQL" , "KC_PLUS" , "KC_PERC", + + "KC_TRNS" , "KC_EXLM" , "KC_LBRC" , "KC_RBRC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_VOLD" , "KC_TRNS", + "KC_TRNS" , "KC_VOLU" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10", + + "KC_TRNS" , "KC_NO" , "LCTL(KC_LALT)" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F11", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F12", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_PSLS" , "KC_7" , "KC_8" , "KC_9" , "KC_PPLS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_0" , "KC_1" , "KC_2" , "KC_3" , "KC_PMNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_NO" , "KC_TRNS", + + "KC_PAST" , "KC_4" , "KC_5" , "KC_6" , "KC_PEQL", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_COLN" , "KC_ESC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_DEL", + + "KC_TRNS" , "KC_PERC" , "KC_SLSH" , "KC_ENT" , "KC_TRNS", + "DF(1)" , "KC_LGUI" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_EXLM" , "KC_TRNS", + "DF(0)" , "KC_TRNS" , "RALT_T(KC_COMM)", "RCTL_T(KC_DOT)", "RESET", + + "KC_TRNS" , "KC_TAB", + "KC_NO" , "KC_TRNS" + ] + ], + "author": "@pierrec83" +} diff --git a/qmk/keyboards/ferris/keymaps/default/readme.md b/qmk/keyboards/ferris/keymaps/default/readme.md new file mode 100644 index 00000000..252f886f --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/default/readme.md @@ -0,0 +1,122 @@ +A usable default keymap for the Ferris keyboard +=============================================== + +Keymaps in general are quite personal, so it is difficult to come up with a default that will suit every user. + +This keymap makes heavy use of keys behaving differently when tapped and held, so that all the keys one may need remain accessible despite the low number of thumb keys. + +It comes with a number of layers to give access to most of the keys one may need on a keyboard. It is not meant to be the best possible keymap, but rather a good base on which to build a keymap that works for you. + +This is not the only way to make 34 keys a comfortable typing experience, but it is one way to do so. If you don't already know of a better way, this may be as good a starting point as any :) + +Note that this keymap was built from the perspective that it is OK to take a steep learning curve if it results in a keymap that is easier to use in the long run. This means that it may take more effort to learn this keymap than some alternatives. "Easy to use" was assessed against the workflow of the author, so your mileage may vary on some of the details. + +What do all these layers do? +---------------------------- + +### Layer 0: Base layer + +![Layer 0](https://i.imgur.com/HjNHUPL.png) + +On tapping the keys, our base layer is qwerty with space on the right homing thumb and backspace on the left homing thumb. + +In this layer, the non-homing-thumb positions have 0 and 1. I recommend modifying this to some frequently accessed shortcut such as copy/paste, previous/next tab or anything that makes most sense in your own workflow. O and 1 are place-holders and make it easy to troubleshoot that all keys are working properly before soldering in the switches. +The reason I recommend convenience shortcuts instead of more commonly used keys like tab or meta is that unhoming of the thumbs was a frequent source of typos for me when I used more than one thumb key frequently in the context of typing. + +Despite being missing on this layer, "meta", "tab", "esc" and such are accessible from any other layer: see Layer 7. + +The behaviour of some keys differ when held: +* Both homing pinkies behave as shift. +* Both bottom-row ring fingers behave as ctrl. +* Both bottom-row middle fingers behave as alt. + +* The homing left ring finger gives access to the Function keys layer +* The homing right ring finger gives access to the Numbers layer +* The homing left middle finger gives access to the Mouse layer +* The homing right middle finger gives access to the Navigation layer +* The homing left index finger gives access to the Right symbols layer +* The homing right index finger gives access to the Left symbols layer +* The homing right thumb gives access to the Always accessible layer + +### Layer 1: Mouse + +![Layer 1](https://i.imgur.com/0fvTuB9.png) + +Layer 1 is a mouse layer: it can be used one-handed or two-handed. The most common way to use it is two handed, with left and right click on the homerow of the left hand and directions on the homerow of the right hand. +Scrolling is available on the right hand with mid finger up and down for vertical scroll and index and ring finger down for horizontal scroll. +On the right hand, left click and right click are also available with index and ring finger up to allow one handed operation. This can be particularly handy when enabling the mouse layer permanently (no need to hold the left middle finger), which can be done from Layer 7. + +Note that thanks to the transparency, shift, ctrl and alt are all accessible on the left hand while operating the mouse. + +### Layer 2: Navigation + +![Layer 2](https://i.imgur.com/ZquQJRq.png) + +The navigation layer somewhat mirrors the mouse layer. It is accessed by holding the right middle finger and gives access to arrow keys on the left homerow. Page up and down, Home and End mirror the vertical scrolling and horizontal scrolling on the mouse layer. + +On the right hand, in addition to ctrl and alt which are available through transparency, ctrl + alt, ctrl + alt + shift and meta are accessible on the homerow to enable common shortcuts in some window managers. This part is quite workflow dependent, so make sure to adapt it to your own workflow as appropriate. + +### Layer 3: Right symbols + +![Layer 3](https://i.imgur.com/9tLAUqG.png) + +When holding down the left index, one may access about half of the symbols. The pinkies store `^` and `$` symbols that represent begin and end in vim. The left homerow hosts `*` and `&`, symbols which are related in the way that they represent some form of indirection in programming languages such as rust. On the right hand, most symbols used when navigating the command line are stored together, organized by columns of related symbols. + +### Layer 4: Left symbols + +![Layer 4](https://i.imgur.com/CkjUSW6.png) + +When holding down the right index, one may access the other symbols. On the left hand, most of the different brackets are laid out. The most frequent ones (round brackets and curly brackets) get a spot on the homerow. The rest of the layer hosts the remaining symbols that are easier to access here than on any other layers. + +### Layer 5: Function keys + +![Layer 5](https://i.imgur.com/fWgVqc4.png) + +By holding down the left ring finger, one may access the function keys, roughly in a numpad layout. +This means that alt+F4 is easy to type, with F4 being on the homerow. +There is a shortcut for ctrl+alt on the left hand to enable convenient switching between virtual terminals on Linux. + +### Layer 6: Numbers + +![Layer 6](https://i.imgur.com/S8gq9Kj.png) + +The number layer is accessed by holding the right ring finger. It hosts the numbers and some duplicated symbols that are commonly accessed next to numbers, such as mathematical operators. +The number are layed out similarly to a numpad, but with the middle row and the homerow swapped so that the most used numbers: 0, 1, 2 and 3 are all available in homing positions. + +### Layer 7: Always accessible + +![Layer 7](https://i.imgur.com/twqBeBb.png) + +Layer 7 is accessed by holding the right homing thumb down. Because this position is left transparent from every other layer, this layer is always accessible. +It gives access to some essential keys that would typically be accessed on a thumb cluster or pinkies, such as meta, enter, tab, esc and delete. + +As the layer hosting esc, we duplicated some symbols here to allow for fast navigation in vim. For instance, esc, :, w, q can be done in a single roll. + +Where is the keymap.c? +---------------------- + +The keymap.c file is not published to the repository. It is generated from `keymap.json` by the build system. + +This avoids duplicating information and allow users to edit their keymap from the qmk configurator web interface. + +How do I edit and update the keymap? +------------------------------------ + +The `keymap.json` file is generated from the qmk configurator interface and formatted for better readability in the context of the Ferris keyboard. + +To edit it, you may: +* Edit it directly from a text editor. +* Edit it from the qmk configurator. + +If you decide to use the latter workflow, here are the steps to follow: + +* From the qmk configurator, hit the "import QMK keymap json file" button (it has a drawing with an up arrow on it). +* Browse to the location of your keymap (for example, `/keyboards/handwired/ferris/keymaps/default/keymap.json`) +* Perform any modification to the keymap in the web UI +* Export the keymap to your downloads folder, by hitting the "Export QMK keymap json file" button (it has a drawing with a down arrow on it) +* Override your original keymap with the output of formatting the exported keymap by running a command such as this one from the root of your qmk repo: + ``` + ./keyboards/handwired/ferris/keymaps/json2crab.py --input /default.json > ./keyboards/handwired/ferris/keymaps/default/keymap.json + ``` + Note that you may first need to make json2crab executable by using `chmod +x` on it. + Also note that you may then want to remove the exported keymap from your dowload directory. diff --git a/qmk/keyboards/ferris/keymaps/json2crab.py b/qmk/keyboards/ferris/keymaps/json2crab.py new file mode 100644 index 00000000..a32429fa --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/json2crab.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 + +import argparse +import sys +import json + +indent_level=4 + +def parse_cli(): + parser = argparse.ArgumentParser(description='Ferris keymap formatter') + parser.add_argument("--input", type=argparse.FileType('r'), + default=sys.stdin, help="Input keymap (json file produced by qmk configurator)") + return parser.parse_args() + +def col_index(key_index): + if key_index < 30: + col = key_index % 5 + else: + col = key_index % 2 + return col + +def format_layers(layers): + formatted = indent_level * " " + "\"layers\": [\n" + max_key_length = {} + for layer in layers: + for (index, keycode) in enumerate(layer): + col = col_index(index) + max_length = max_key_length.get(col) + if (not max_length) or len(keycode) > max_length: + max_key_length.update({col: len(keycode)}) + for (layer_index, layer) in enumerate(layers): + formatted += 2 * indent_level * " " + formatted += "[" + for (index, keycode) in enumerate(layer): + if index > 30 and index % 2 == 0 or index % 5 == 0 and index != 0: + formatted += (1 + 2 * indent_level) * " " + formatted += json.dumps(keycode) + if index == 33: + formatted += "\n" + elif index > 30 and index % 2 == 1 or index % 5 == 4: + formatted += ",\n" + else: + n_spaces = max_key_length[col_index(index)] - len(keycode) + formatted += n_spaces * " " + formatted += ", " + if index % 10 == 9: + formatted += "\n" + formatted += 2 * indent_level * " " + if layer_index < len(layers) - 1: + formatted += "],\n" + else: + formatted += "]\n" + formatted += indent_level * " " + formatted += "]" + + return formatted + +def format_keymap(keymap_json): + formatted = "{" + for (index, k) in enumerate(keymap_json): + if k == "layers": + formatted += format_layers(keymap_json[k]) + else: + formatted += f"{indent_level * ' '}{json.dumps(k)}: {json.dumps(keymap_json[k])}" + if index < len(keymap_json) - 1: + formatted += "," + formatted += "\n" + formatted += "}" + return formatted + +def main(): + args=parse_cli() + keymap_json = json.loads(args.input.read()) + print(format_keymap(keymap_json)) + +main() diff --git a/qmk/keyboards/ferris/keymaps/pierrec83/config.h b/qmk/keyboards/ferris/keymaps/pierrec83/config.h new file mode 100644 index 00000000..cf0fb747 --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/pierrec83/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pierre Chevalier + +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 . +*/ + +#pragma once +// Set the mouse settings to a comfortable speed/accuracy trade-off, +// assuming a screen refresh rate of 60 Htz or higher +// The default is 50. This makes the mouse ~3 times faster and more accurate +#define MOUSEKEY_INTERVAL 16 +// The default is 20. Since we made the mouse about 3 times faster with the previous setting, +// give it more time to accelerate to max speed to retain precise control over short distances. +#define MOUSEKEY_TIME_TO_MAX 40 +// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive +#define MOUSEKEY_DELAY 100 +// It makes sense to use the same delay for the mouseweel +#define MOUSEKEY_WHEEL_DELAY 100 +// The default is 100 +#define MOUSEKEY_WHEEL_INTERVAL 50 +// The default is 40 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 + +// Pick good defaults for enabling homerow modifiers +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD diff --git a/qmk/keyboards/ferris/keymaps/pierrec83/keymap.json b/qmk/keyboards/ferris/keymaps/pierrec83/keymap.json new file mode 100644 index 00000000..2372e7e3 --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/pierrec83/keymap.json @@ -0,0 +1,118 @@ +{ "version": 1, + "notes": "My awesome keymap", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "handwired/ferris", + "keymap": "pierrec83", + "layout": "LAYOUT", + "layers": [ + ["KC_Q" , "KC_D" , "KC_R" , "KC_W" , "KC_B", + "KC_J" , "KC_F" , "KC_U" , "KC_P" , "KC_SCLN", + + "LSFT_T(KC_A)" , "LT(6,KC_S)" , "LT(2,KC_H)" , "LT(4,KC_T)" , "KC_G", + "KC_Y" , "LT(5,KC_N)" , "LT(3,KC_E)" , "LT(7,KC_O)" , "LSFT_T(KC_I)", + + "KC_Z" , "LCTL_T(KC_X)" , "LALT_T(KC_M)" , "KC_C" , "KC_V", + "KC_K" , "KC_L" , "LALT_T(KC_COMM)", "LCTL_T(KC_DOT)" , "KC_SLSH", + + "LCA(KC_UP)" , "KC_BSPC", + "LT(8,KC_SPC)" , "LCA(KC_DOWN)" + ], + ["KC_Q" , "KC_C" , "KC_M" , "KC_Y" , "KC_COLN", + "KC_Z" , "KC_W" , "KC_COMM" , "KC_U" , "KC_J", + + "LSFT_T(KC_R)" , "LT(6,KC_S)" , "LT(2,KC_T)" , "LT(4,KC_H)" , "KC_X", + "KC_TRNS" , "LT(5,KC_N)" , "LT(3,KC_A)" , "LT(7,KC_I)" , "LSFT_T(KC_O)", + + "KC_B" , "LCTL_T(KC_F)" , "LALT_T(KC_G)" , "KC_D" , "KC_V", + "KC_ESC" , "KC_L" , "LALT_T(KC_DOT)" , "LCTL_T(KC_BSPC)" , "KC_K", + + "LCA(KC_UP)" , "KC_E", + "LT(8,KC_SPC)" , "LCA(KC_DOWN)" + ], + ["KC_TRNS" , "ANY(LCTL(LSFT(KC_C)))", "KC_TRNS" , "ANY(LCTL(LSFT(KC_V)))", "KC_TRNS", + "KC_TRNS" , "KC_BTN1" , "KC_WH_U" , "KC_BTN2" , "KC_TRNS", + + "KC_TRNS" , "KC_BTN2" , "KC_NO" , "KC_BTN1" , "KC_TRNS", + "KC_TRNS" , "KC_MS_L" , "KC_MS_D" , "KC_MS_U" , "KC_MS_R", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_WH_L" , "KC_WH_D" , "KC_WH_R" , "KC_TRNS", + + "ANY(LCTL(LSFT(KC_TAB)))", "KC_TRNS", + "KC_TRNS" , "LCTL(KC_TAB)" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_PGUP" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LEFT" , "KC_UP" , "KC_DOWN" , "KC_RGHT" , "KC_TRNS", + "KC_TRNS" , "KC_LGUI" , "KC_NO" , "LCTL(KC_LALT)" , "LCA(KC_LSFT)", + + "KC_TRNS" , "KC_HOME" , "KC_PGDN" , "KC_END" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "LGUI(KC_LEFT)" , "KC_TRNS", + "KC_TRNS" , "LGUI(KC_RGHT)" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_UNDS" , "KC_PIPE" , "KC_QUOT" , "KC_TRNS", + + "KC_CIRC" , "KC_ASTR" , "KC_AMPR" , "KC_NO" , "KC_TRNS", + "KC_HASH" , "KC_TILD" , "KC_SLSH" , "KC_DQUO" , "KC_DLR", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_MINS" , "KC_BSLS" , "KC_GRV" , "KC_TRNS", + + "KC_BRID" , "KC_TRNS", + "KC_TRNS" , "KC_BRIU" + ], + ["KC_TRNS" , "KC_COLN" , "KC_LT" , "KC_GT" , "KC_SCLN", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LCBR" , "KC_RCBR" , "KC_LPRN" , "KC_RPRN" , "KC_AT", + "KC_TRNS" , "KC_NO" , "KC_EQL" , "KC_PLUS" , "KC_PERC", + + "KC_TRNS" , "KC_EXLM" , "KC_LBRC" , "KC_RBRC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_VOLD" , "KC_TRNS", + "KC_TRNS" , "KC_VOLU" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10", + + "KC_TRNS" , "KC_TRNS" , "LCTL(KC_LALT)" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F11", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F12", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_PSLS" , "KC_7" , "KC_8" , "KC_9" , "KC_PPLS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_0" , "KC_1" , "KC_2" , "KC_3" , "KC_PMNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_NO" , "KC_TRNS", + + "KC_PAST" , "KC_4" , "KC_5" , "KC_6" , "KC_PEQL", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_ESC" , "KC_COLN" , "KC_TRNS" , "KC_TRNS", + "DF(2)" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_DEL", + + "KC_TRNS" , "KC_PERC" , "KC_SLSH" , "KC_ENT" , "KC_EXLM", + "DF(1)" , "KC_LGUI" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "DF(0)" , "KC_TRNS" , "RALT_T(KC_COMM)", "RCTL_T(KC_DOT)" , "RESET", + + "KC_TRNS" , "KC_TAB", + "KC_NO" , "KC_TRNS" + ] + ], + "author": "@pierrec83" +} diff --git a/qmk/keyboards/ferris/keymaps/pierrec83/readme.md b/qmk/keyboards/ferris/keymaps/pierrec83/readme.md new file mode 100644 index 00000000..d96a3bb8 --- /dev/null +++ b/qmk/keyboards/ferris/keymaps/pierrec83/readme.md @@ -0,0 +1,43 @@ +@pierrec83's personal keymap for the Ferris keyboard +==================================================== + +This keymap shares many commonalities with the default keymap. +See its readme for a write-up on many of the decisions, including +how to generate the formatted json file with json2crab.py and the +general philosophy for each layer. + +Because this is my own keymap, I didn't refrain from using shortcuts +that make sense for me and may not make sense for most. + +Key differences from the default keymap include: + +Alpha layers: +------------- + +Because I only learned to touch type when I switched from qwerty to workman, +my base layer is workman and my layout doesn't contain a qwerty layer. + +My layer 1 hosts a variant of RSTHD that I am developing, inspired from workman's +focus on reducing side-index-motion. It should become my end game keymap eventually, +but I still haven't found the time to learn it to a working proficiency. + +Secondary thumbs: +----------------- + +Instead of a placeholder 0 and 1, the secondary thumbs on my keymap +perform the following actions: +* Navigate to previous and next workspace the base layer +* Navigate to previous and next tab on the mouse layer +* Volume control on layer +* Brightness control on layer + +Mouse layer: +------------ + +* Copy/Paste shortcuts on the left hand, on the upper row. + +Always available layer: +----------------------- + +* Esc and column are placed differently to allow easy vim navigation with the positions of w and q in the workman base layer +* Enable permanent switch to the RSTHD layer in addition to the mouse layer diff --git a/qmk/keyboards/ferris/readme.md b/qmk/keyboards/ferris/readme.md new file mode 100644 index 00000000..74a08a38 --- /dev/null +++ b/qmk/keyboards/ferris/readme.md @@ -0,0 +1,19 @@ +# Ferris + +![Ferris, top view](https://imgur.com/V4QuaGs.jpg) +![Ferris, bottom view](https://i.imgur.com/7DJYME8.jpg) + +A split 34 keys column staggered keyboard named and decorated after the rustlang mascott. All PCB files and some thoughts on the design are available on the [project's github page](https://github.com/pierrechevalier83/ferris) + +* Keyboard Maintainer: [Pierre Chevalier](https://github.com/pierrechevalier83) +* Hardware Supported: + * Ferris 0.1 (With atmega32u4 chip. Comes in 4 variants: base, low, high and compact) + * Ferris sweep (With pro-micro. Comes in a couple of PCB edge cuts shapes, but with identical pinout) +* Hardware Availability: Pierre Chevalier has been selling keyboard kits (see the #ferris channel in the 40% discord chat). Wider availability is on the horizon. + +Make examples for this keyboard (after setting up your build environment): + + make ferris/0_1:default + make ferris/sweep:default:avrdude-split-right + +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). diff --git a/qmk/keyboards/ferris/sweep/config.h b/qmk/keyboards/ferris/sweep/config.h new file mode 100644 index 00000000..ad960610 --- /dev/null +++ b/qmk/keyboards/ferris/sweep/config.h @@ -0,0 +1,74 @@ +/* Copyright 2018-2020 ENDO Katsuhiro David Philip Barr <@davidphilipbarr> Pierre Chevalier + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC2AB +#define PRODUCT_ID 0x3939 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DPB +#define PRODUCT Ferris sweep + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * 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) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +#define DIRECT_PINS { \ + { E6, F7, F6, F5, F4 }, \ + { B1, B3, B2, B6, D3 }, \ + { D1, D0, D4, C6, D7 }, \ + { B4, B5, NO_PIN, NO_PIN, NO_PIN } \ +} + +#define DIRECT_PINS_RIGHT { \ + { F4, F5, F6, F7, E6 }, \ + { D3,B6,B2,B3,B1 }, \ + { D7,C6,D4,D0,D1}, \ + { B5, B4, NO_PIN, NO_PIN, NO_PIN } \ +} + + + +#define UNUSED_PINS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* Serial settings */ +#define USE_SERIAL +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 + +#define EE_HANDS diff --git a/qmk/keyboards/ferris/sweep/rules.mk b/qmk/keyboards/ferris/sweep/rules.mk new file mode 100644 index 00000000..ce4d5215 --- /dev/null +++ b/qmk/keyboards/ferris/sweep/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes # Use shared split_common code diff --git a/qmk/keyboards/ferris/sweep/sweep.c b/qmk/keyboards/ferris/sweep/sweep.c new file mode 100644 index 00000000..5b41bad8 --- /dev/null +++ b/qmk/keyboards/ferris/sweep/sweep.c @@ -0,0 +1,16 @@ +/* Copyright 2018-2020 ENDO Katsuhiro David Philip Barr <@davidphilipbarr> Pierre Chevalier + * + * 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 "sweep.h" diff --git a/qmk/keyboards/ferris/sweep/sweep.h b/qmk/keyboards/ferris/sweep/sweep.h new file mode 100644 index 00000000..e8d66ebc --- /dev/null +++ b/qmk/keyboards/ferris/sweep/sweep.h @@ -0,0 +1,47 @@ +/* Copyright 2018-2020 ENDO Katsuhiro David Philip Barr <@davidphilipbarr> Pierre Chevalier + * + * 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 "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// readability +#define ___ KC_NO + +#define LAYOUT( \ + L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \ + L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \ + L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \ + L16, L17, R16, R17 \ + ) \ + { \ + { L01, L02, L03, L04, L05 }, \ + { L06, L07, L08, L09, L10 }, \ + { L11, L12, L13, L14, L15 }, \ + { L16, L17, ___, ___ , ___}, \ + { R01, R02, R03, R04, R05 }, \ + { R06, R07, R08, R09, R10 }, \ + { R11, R12, R13, R14, R15 }, \ + { R16, R17, ___, ___, ___ } \ + } + diff --git a/qmk/keyboards/fjlabs/bolsa65/bolsa65.c b/qmk/keyboards/fjlabs/bolsa65/bolsa65.c new file mode 100644 index 00000000..1d094ac8 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/bolsa65.c @@ -0,0 +1,28 @@ +/* +Copyright 2020 +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 "bolsa65.h" + +void matrix_init_kb(void) { + // Initialize indicator LEDs to output + setPinOutput(F7); // Caps + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(F7, led_state.caps_lock); + } + return res; +} diff --git a/qmk/keyboards/fjlabs/bolsa65/bolsa65.h b/qmk/keyboards/fjlabs/bolsa65/bolsa65.h new file mode 100644 index 00000000..24325d0f --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/bolsa65.h @@ -0,0 +1,32 @@ +/* +Copyright 2020 +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 . +*/ + +#pragma once + +#include "quantum.h" + +/* Bolsa65 Keymap Definitions */ +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E } \ +} diff --git a/qmk/keyboards/fjlabs/bolsa65/config.h b/qmk/keyboards/fjlabs/bolsa65/config.h new file mode 100644 index 00000000..c38da970 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/config.h @@ -0,0 +1,108 @@ +/* +Copyright 2020 + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7074 // FJLabs +#define PRODUCT_ID 0x0001 // Bolsa65 +#define DEVICE_VER 0x0001 // Version 1 +#define MANUFACTURER FJLabs +#define PRODUCT bolsa65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * +*/ + +// Checked with Eagle Schematic +#define MATRIX_ROW_PINS { F1, F0, F6, F5, F4 } +#define MATRIX_COL_PINS { C7, B1, B2, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 RGB Underglow +#define RGB_DI_PIN B0 +#define RGBLED_NUM 24 +#define RGBLIGHT_ANIMATIONS */ +/* #define RGBLIGHT_LAYER_BLINK*/ + +/* Define less important options */ + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/fjlabs/bolsa65/info.json b/qmk/keyboards/fjlabs/bolsa65/info.json new file mode 100644 index 00000000..2485c29f --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "Bolsa65", + "url": "https://www.bolsakeyboardsupply.com", + "maintainer": "FJLabs", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + } + } +} diff --git a/qmk/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c b/qmk/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c new file mode 100644 index 00000000..d36898e0 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* +Copyright 2020 +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 + +enum layers { + _LAYER0, + _LAYER1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_65_ansi_blocker( + KC_GRAVE, 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, TG(1), + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC , + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_ansi_blocker( + 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_TRNS, TG(1), + KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, 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 + ) +}; diff --git a/qmk/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c b/qmk/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c new file mode 100644 index 00000000..0db9e522 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2020 +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 + +enum layers { + _LAYER0, + _LAYER1, + _LAYER2, + _LAYER3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_65_ansi_blocker( + KC_GRAVE, 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, TG(1), + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC , + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_ansi_blocker( + 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_TRNS, TG(1), + KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, 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 + ), + + [_LAYER2] = LAYOUT_65_ansi_blocker( + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_LAYER3] = LAYOUT_65_ansi_blocker( + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/qmk/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk b/qmk/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/fjlabs/bolsa65/readme.md b/qmk/keyboards/fjlabs/bolsa65/readme.md new file mode 100644 index 00000000..e668f4b8 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/readme.md @@ -0,0 +1,12 @@ +# bolsa65 + +The following is the QMK Firmware for the [BolsaKeyboardSupply](https://www.bolsakeyboardsupply.com) Bolsa65 mechanical keyboard. + +* Keyboard Maintainer: FJLabs +* Hardware Supported: Bolsa65 + +Make example for this keyboard (after setting up your build environment): + + make fjlabs/bolsa65:default + +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). diff --git a/qmk/keyboards/fjlabs/bolsa65/rules.mk b/qmk/keyboards/fjlabs/bolsa65/rules.mk new file mode 100644 index 00000000..945e7be2 --- /dev/null +++ b/qmk/keyboards/fjlabs/bolsa65/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +KEYBOARD_LOCK_ENABLE = yes + +LAYOUTS = 65_ansi_blocker diff --git a/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/config.h b/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/config.h index 76f13f08..3273cc8d 100644 --- a/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/config.h +++ b/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/config.h @@ -1,19 +1,25 @@ /* -Copyright 2018 Fredric Silberberg (333fred) + Copyright (c) 2020 Fred Silberberg -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. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -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. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -You should have received a copy of the GNU General Public License -along with this program. If not, see . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ + #pragma once // Long tapping term on the big switch, because it takes so long to press diff --git a/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c b/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c index be40fecb..ef1717c6 100644 --- a/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c +++ b/qmk/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H typedef enum { diff --git a/qmk/keyboards/flehrad/bigswitch/keymaps/via/keymap.c b/qmk/keyboards/flehrad/bigswitch/keymaps/via/keymap.c new file mode 100644 index 00000000..f253f4b1 --- /dev/null +++ b/qmk/keyboards/flehrad/bigswitch/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 MechMerlin + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT(KC_TRNS), + + [1] = LAYOUT(KC_TRNS), + + [2] = LAYOUT(KC_TRNS), + + [3] = LAYOUT(KC_TRNS) +}; diff --git a/qmk/keyboards/flehrad/bigswitch/keymaps/via/rules.mk b/qmk/keyboards/flehrad/bigswitch/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/flehrad/bigswitch/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/flx/lodestone/rules.mk b/qmk/keyboards/flx/lodestone/rules.mk index 467313fb..4bcf2708 100644 --- a/qmk/keyboards/flx/lodestone/rules.mk +++ b/qmk/keyboards/flx/lodestone/rules.mk @@ -31,4 +31,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches LTO_ENABLE = yes -LAYOUTS = 65_ansi_blocker 65_iso_blocker +LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso_blocker 65_iso_blocker_split_bs diff --git a/qmk/keyboards/genone/eclipse_65/config.h b/qmk/keyboards/genone/eclipse_65/config.h new file mode 100644 index 00000000..e9869e36 --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 GEN ONE LLC + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x2222 +#define DEVICE_VER 0x0001 +#define MANUFACTURER GEN ONE LLC +#define PRODUCT Eclipse65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * +*/ +#define MATRIX_ROW_PINS { B3, B7, B0, B1, B2 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/genone/eclipse_65/eclipse_65.c b/qmk/keyboards/genone/eclipse_65/eclipse_65.c new file mode 100644 index 00000000..eab6d20d --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/eclipse_65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 GEN ONE LLC + * + * 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 "eclipse_65.h" diff --git a/qmk/keyboards/genone/eclipse_65/eclipse_65.h b/qmk/keyboards/genone/eclipse_65/eclipse_65.h new file mode 100644 index 00000000..84d5e5f2 --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/eclipse_65.h @@ -0,0 +1,36 @@ +/* Copyright 2020 GEN ONE LLC + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + + +#define LAYOUT_65_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K312, K313, K314, \ + K400, K401, K402, K406, K409, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, ____, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, K406, ____, ____, K409, K410, K411, K412, K413, K414 } \ +} diff --git a/qmk/keyboards/genone/eclipse_65/info.json b/qmk/keyboards/genone/eclipse_65/info.json new file mode 100644 index 00000000..cbbd9f22 --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "eclipse_65", + "url": "https://genonemerch.com", + "maintainer": "rojasa1990", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/qmk/keyboards/genone/eclipse_65/keymaps/default/keymap.c b/qmk/keyboards/genone/eclipse_65/keymaps/default/keymap.c new file mode 100644 index 00000000..abc24808 --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 GEN ONE LLC + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_65_ansi( + 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_BSPC, KC_HOME, + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_65_ansi( + KC_GRV, 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_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, 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), +}; diff --git a/qmk/keyboards/genone/eclipse_65/readme.md b/qmk/keyboards/genone/eclipse_65/readme.md new file mode 100644 index 00000000..9c32d643 --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/readme.md @@ -0,0 +1,17 @@ +# GEN ONE Eclipse_65 + +Eclipse_65 is a keyboard PCB supporting 65% layout. [More info at GEN ONE MERCH](https://genonemerch.com) + +* Keyboard Maintainer: [rojasa1990](https://github.com/rojasa1990) +* Hardware Supported: GEN ONE Eclipse_65 +* Hardware Availability: GEN ONE MERCH + +Make example for this keyboard (after setting up your build environment): + + make genone/eclipse_65:default + +Flashing example for this keyboard: + + make genone/eclipse_65: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). diff --git a/qmk/keyboards/genone/eclipse_65/rules.mk b/qmk/keyboards/genone/eclipse_65/rules.mk new file mode 100644 index 00000000..a8020aa5 --- /dev/null +++ b/qmk/keyboards/genone/eclipse_65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keybaord RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi diff --git a/qmk/keyboards/gergo/keymaps/drashna/keymap.c b/qmk/keyboards/gergo/keymaps/drashna/keymap.c index d1e62240..7258d350 100644 --- a/qmk/keyboards/gergo/keymaps/drashna/keymap.c +++ b/qmk/keyboards/gergo/keymaps/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" /* diff --git a/qmk/keyboards/gh60/v1p3/config.h b/qmk/keyboards/gh60/v1p3/config.h new file mode 100644 index 00000000..211dff94 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2020 noroadsleft + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Unknown +#define PRODUCT GH60 v1.3 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 } +#define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D1, D2, D3, D4, D5, D6, D7, B4, B5 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 15 + +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/qmk/keyboards/gh60/v1p3/info.json b/qmk/keyboards/gh60/v1p3/info.json new file mode 100644 index 00000000..11d43524 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/info.json @@ -0,0 +1,511 @@ +{ + "keyboard_name": "GH60 v1.3", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B0,C7)", "x":0, "y":0}, + {"label":"K01 (B0,F6)", "x":1, "y":0}, + {"label":"K02 (B0,F5)", "x":2, "y":0}, + {"label":"K03 (B0,F4)", "x":3, "y":0}, + {"label":"K04 (B0,F1)", "x":4, "y":0}, + {"label":"K05 (B0,E6)", "x":5, "y":0}, + {"label":"K06 (B0,D0)", "x":6, "y":0}, + {"label":"K07 (B0,D1)", "x":7, "y":0}, + {"label":"K08 (B0,D2)", "x":8, "y":0}, + {"label":"K09 (B0,D3)", "x":9, "y":0}, + {"label":"K0A (B0,D4)", "x":10, "y":0}, + {"label":"K0B (B0,D5)", "x":11, "y":0}, + {"label":"K0C (B0,D6)", "x":12, "y":0}, + {"label":"K0D (B0,D7)", "x":13, "y":0, "w":0.667}, + {"label":"K0E (B0,B4)", "x":13.667, "y":0, "w":0.666}, + {"label":"K0F (B0,B5)", "x":14.333, "y":0, "w":0.667}, + + {"label":"K10 (B1,C7)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,F6)", "x":1.5, "y":1}, + {"label":"K12 (B1,F5)", "x":2.5, "y":1}, + {"label":"K13 (B1,F4)", "x":3.5, "y":1}, + {"label":"K14 (B1,F1)", "x":4.5, "y":1}, + {"label":"K15 (B1,E6)", "x":5.5, "y":1}, + {"label":"K16 (B1,D0)", "x":6.5, "y":1}, + {"label":"K17 (B1,D1)", "x":7.5, "y":1}, + {"label":"K18 (B1,D2)", "x":8.5, "y":1}, + {"label":"K19 (B1,D3)", "x":9.5, "y":1}, + {"label":"K1A (B1,D4)", "x":10.5, "y":1}, + {"label":"K1B (B1,D5)", "x":11.5, "y":1}, + {"label":"K1C (B1,D6)", "x":12.5, "y":1}, + {"label":"K1D (B1,D7)", "x":13.5, "y":1, "w":1.5}, + + {"label":"K20 (B2,C7)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,F6)", "x":1.75, "y":2}, + {"label":"K22 (B2,F5)", "x":2.75, "y":2}, + {"label":"K23 (B2,F4)", "x":3.75, "y":2}, + {"label":"K24 (B2,F1)", "x":4.75, "y":2}, + {"label":"K25 (B2,E6)", "x":5.75, "y":2}, + {"label":"K26 (B2,D0)", "x":6.75, "y":2}, + {"label":"K27 (B2,D1)", "x":7.75, "y":2}, + {"label":"K28 (B2,D2)", "x":8.75, "y":2}, + {"label":"K29 (B2,D3)", "x":9.75, "y":2}, + {"label":"K2A (B2,D4)", "x":10.75, "y":2}, + {"label":"K2B (B2,D5)", "x":11.75, "y":2}, + {"label":"K2C (B2,D6)", "x":12.75, "y":2}, + {"label":"K2D (B2,D7)", "x":13.75, "y":2, "w":1.25}, + + {"label":"K30 (B3,C7)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,F6)", "x":1.25, "y":3, "w":0.75}, + {"label":"K32 (B3,F5)", "x":2, "y":3}, + {"label":"K33 (B3,F4)", "x":3, "y":3}, + {"label":"K34 (B3,F1)", "x":4, "y":3}, + {"label":"K35 (B3,E6)", "x":5, "y":3}, + {"label":"K36 (B3,D0)", "x":6, "y":3}, + {"label":"K37 (B3,D1)", "x":7, "y":3}, + {"label":"K38 (B3,D2)", "x":8, "y":3}, + {"label":"K39 (B3,D3)", "x":9, "y":3}, + {"label":"K3A (B3,D4)", "x":10, "y":3}, + {"label":"K3B (B3,D5)", "x":11, "y":3}, + {"label":"K3C (B3,D6)", "x":12, "y":3, "w":0.75}, + {"label":"K3D (B3,D7)", "x":12.75, "y":3, "w":0.75}, + {"label":"K3E (B3,B4)", "x":13.5, "y":3, "w":0.75}, + {"label":"K3F (B3,B5)", "x":14.25, "y":3, "w":0.75}, + + {"label":"K40 (F7,C7)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (F7,F6)", "x":1.25, "y":4, "w":0.75}, + {"label":"K42 (F7,F5)", "x":2, "y":4, "w":0.75}, + {"label":"K43 (F7,F4)", "x":2.75, "y":4, "w":0.75}, + {"label":"K44 (F7,F1)", "x":3.5, "y":4, "w":0.75}, + {"label":"K45 (F7,E6)", "x":4.25, "y":4, "w":1.25}, + {"label":"K48 (F7,D2)", "x":5.5, "y":4, "w":3}, + {"label":"K49 (F7,D3)", "x":8.5, "y":4, "w":1.25}, + {"label":"K4A (F7,D4)", "x":9.75, "y":4, "w":0.875}, + {"label":"K4B (F7,D5)", "x":10.625, "y":4, "w":0.875}, + {"label":"K4C (F7,D6)", "x":11.5, "y":4, "w":0.875}, + {"label":"K4D (F7,D7)", "x":12.375, "y":4, "w":0.875}, + {"label":"K4E (F7,B4)", "x":13.25, "y":4, "w":0.875}, + {"label":"K4F (F7,B5)", "x":14.125, "y":4, "w":0.875} + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi_arrow": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3, "w":1.75}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + }, + "LAYOUT_60_ansi_arrow_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3, "w":1.75}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + }, + "LAYOUT_60_ansi_tsangan": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4, "w":1.5} + ] + }, + "LAYOUT_60_hhkb": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4} + ] + }, + "LAYOUT_64_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/gh60/v1p3/keymaps/default/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/default/keymap.c new file mode 100644 index 00000000..003606d4 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_GRV, KC_BSPC, KC_BSPC, + 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_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_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, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_APP, KC_LEFT, KC_DOWN, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_NO, 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_NO, KC_NO, KC_NO, + KC_NO, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_SPI, RGB_SPD, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, + KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, RGB_VAI, RGB_SAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, + KC_NO, KC_NO, RESET, BL_DEC, BL_ON, BL_INC, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_END, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/default/readme.md b/qmk/keyboards/gh60/v1p3/keymaps/default/readme.md new file mode 100644 index 00000000..ecf2a883 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for GH60 v1.3 diff --git a/qmk/keyboards/gh60/v1p3/keymaps/default_ansi/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/default_ansi/keymap.c new file mode 100644 index 00000000..82fb774e --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/default_ansi/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 noroadsleft + * + * 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 FN_CAPS LT(1, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + 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_BSPC, + 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, + FN_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GRV, 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_DEL, + _______, _______, _______, _______, RESET, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/default_ansi/readme.md b/qmk/keyboards/gh60/v1p3/keymaps/default_ansi/readme.md new file mode 100644 index 00000000..7552e3d0 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/default_ansi/readme.md @@ -0,0 +1,34 @@ +# The default ANSI keymap for GH60 v1.3 + +## Function layer + +| Shortcut | Action | +| :----------------- | :------------------- | +| `Fn` + `Esc` | ` ~ | +| `Fn` + `1` | `F1` | +| `Fn` + `2` | `F2` | +| `Fn` + `3` | `F3` | +| `Fn` + `4` | `F4` | +| `Fn` + `5` | `F5` | +| `Fn` + `6` | `F6` | +| `Fn` + `7` | `F7` | +| `Fn` + `8` | `F8` | +| `Fn` + `9` | `F9` | +| `Fn` + `0` | `F10` | +| `Fn` + `-` | `F11` | +| `Fn` + `=` | `F12` | +| `Fn` + `Backspace` | `Delete` | +| `Fn` + `R` | `RESET` | +| `Fn` + `I` | `Up` | +| `Fn` + `J` | `Left` | +| `Fn` + `K` | `Down` | +| `Fn` + `L` | `Right` | +| `Fn` + `U` | `Home` | +| `Fn` + `O` | `End` | +| `Fn` + `Y` | `Insert` | +| `Fn` + `H` | `Delete` | +| `Fn` + `P` | `Page Up` | +| `Fn` + `;` | `Page Down` | +| `Fn` + `[` | `Print Screen` | +| `Fn` + `]` | `Scroll Lock` | +| `Fn` + `\` | `Pause` | diff --git a/qmk/keyboards/gh60/v1p3/keymaps/factory_hhkb/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/factory_hhkb/keymap.c new file mode 100644 index 00000000..b3908e7e --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/factory_hhkb/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_GRV, + 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_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HASH, KC_ENT, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RGUI, KC_RGUI, KC_RALT, KC_RALT, KC_RGHT + ), + [1] = LAYOUT_all( + _______, 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_BSPC, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_TILD, _______, + _______, _______, RESET, KC_APP, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, KC_END, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/factory_layout5/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/factory_layout5/keymap.c new file mode 100644 index 00000000..31003909 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/factory_layout5/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_GRV, KC_BSPC, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TILD, KC_ENT, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, MO(1), KC_SPC, MO(1), KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, 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_DEL, KC_DEL, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, KC_HASH, _______, + _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/factory_layout7/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/factory_layout7/keymap.c new file mode 100644 index 00000000..ed08a087 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/factory_layout7/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_GRV, KC_BSPC, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TILD, KC_ENT, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, MO(1), KC_SPC, MO(1), KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, 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_DEL, KC_DEL, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, KC_HASH, _______, + _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/factory_layout9/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/factory_layout9/keymap.c new file mode 100644 index 00000000..5a779d9b --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/factory_layout9/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_DEL, KC_BSPC, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TILD, KC_ENT, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, MO(1), KC_SPC, MO(1), KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, 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_DEL, _______, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_HASH, _______, + _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_END, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/factory_minila/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/factory_minila/keymap.c new file mode 100644 index 00000000..166ddd7c --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/factory_minila/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_GRV, KC_BSPC, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TILD, KC_ENT, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_APP, KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_HASH, _______, + _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_END, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gh60/v1p3/keymaps/factory_poker/keymap.c b/qmk/keyboards/gh60/v1p3/keymaps/factory_poker/keymap.c new file mode 100644 index 00000000..68d0ea01 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/keymaps/factory_poker/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +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_GRV, KC_BSPC, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TILD, KC_ENT, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, KC_LALT, BL_TOGG, KC_SPC, BL_TOGG, KC_RALT, MO(1), MO(1), KC_APP, KC_APP, KC_RCTL + ), + [1] = LAYOUT_all( + _______, 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_DEL, KC_DEL, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_HASH, _______, + _______, _______, RESET, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_END, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/qmk/keyboards/gh60/v1p3/readme.md b/qmk/keyboards/gh60/v1p3/readme.md new file mode 100644 index 00000000..b0b75a78 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/readme.md @@ -0,0 +1,25 @@ +# GH60 v1.3 + +![GH60 v1.3](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/gh60/v1p3/pcb_bottom.jpg) + +A 60% with USB Type-C, in-switch backlight, and RGB Underglow. Also called GH60 RGB. + +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: GH60 V1.3 PCB, ATmega32U4 +* Hardware Availability: [NPKC RGB CP Store on AliExpress](https://www.aliexpress.com/i/32851321035.html) + +Make example for this keyboard (after setting up your build environment): + + make gh60/v1p3:default + +Flashing example for this keyboard: + + make gh60/v1p3:default:flash + +## Layouts + +[Reference Image](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/gh60/v1p3/layouts.jpg) + +The `factory_*` keymaps are based on KBFirmware JSON files provided by the vendor. Layouts 1 (Minila), 3 (Poker), 5, 7, 9, and HHKB (not pictured) have keymaps present. + +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). diff --git a/qmk/keyboards/gh60/v1p3/rules.mk b/qmk/keyboards/gh60/v1p3/rules.mk new file mode 100644 index 00000000..c2d48dc3 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi 60_ansi_arrow 60_ansi_tsangan 60_hhkb 64_ansi diff --git a/qmk/keyboards/gh60/v1p3/v1p3.c b/qmk/keyboards/gh60/v1p3/v1p3.c new file mode 100644 index 00000000..bf41fb21 --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/v1p3.c @@ -0,0 +1,16 @@ +/* Copyright 2020 noroadsleft + * + * 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 "v1p3.h" diff --git a/qmk/keyboards/gh60/v1p3/v1p3.h b/qmk/keyboards/gh60/v1p3/v1p3.h new file mode 100644 index 00000000..df4d126f --- /dev/null +++ b/qmk/keyboards/gh60/v1p3/v1p3.h @@ -0,0 +1,167 @@ +/* Copyright 2020 noroadsleft + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* + * So... to be perfectly honest, I'm guessing at these based on a KBFirmware + * JSON file and photos of the PCB from a user on QMK Discord. + * + * This board has the most unusual matrix wiring I've seen on any mechanical + * keyboard PCB. The 2u Backspace doesn't share its matrix position with either + * of the keys used in a split Backspace. Left GUI and Left Alt are on + * different columns depending on how large the Left Ctrl key is (which could be + * as wide as 1.75u). I don't have much idea what's going on in the bottom right + * corner. Pretty much everything in the drawings below is basically a + * semi-educated guess. + * + * Sorry if you're coming in here after the fact. I don't have the PCB on-hand. + * + * - noroadsleft + * + * ┌───────┐ + * 2u Backspace │0E │ + * └───────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ANSI Enter ISO Enter + * ANSI LSft │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0F │ ┌─────┐ ┌─────┐ + * ┌────────┐ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ │1D │ │2D │ + * │30 │ ─┐ │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │ ┌──┴─────┤ ┌──┴┐ │ + * └────────┘ │ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ │2D │ │2C │ │ + * ISO LSft │ │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │2D │ └────────┘ └───┴────┘ + * ┌────┬───┐ │ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬──┴┬───┤ ┌──────────┐ + * │30 │31 │ ─┼> │LSft │32 │33 │34 │35 │36 │37 │38 │39 │3A │3C │3D │3F │ │3D │ ANSI RSft + * └────┴───┘ │ ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ └──────────┘ + * 2u LSft │ │40 │41 │43 │48 │4A │4B │4C │4E │4F │ ┌───┬───┬───┐ + * ┌───────┐ │ └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ │3B │3D │3F │ 3x1u "RSft" + * │30 │ ─┘ └───┴───┴───┘ + * └───────┘ ┌──────┬───┐ + * │3E │3F │ HHKB RSft + * └──────┴───┘ + * ┌──────┬────┬────┬────┬───────────┬────┬────┬───┬───┬───┬───┐ + * │40 │42 │44 │45 │48 │49 │4A │4B │4C │4E │4F │ Minila + * └──────┴────┴────┴────┴───────────┴────┴────┴───┴───┴───┴───┘ + * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ + * │40 │41 │43 │48 │4A │4B │4D │4F │ Standard + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + * ┌─────┬───┬─────┬───────────────────────────┬─────┬───┬─────┐ + * │40 │41 │43 │48 │4B │4D │4F │ Tsangan/HHKB + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + * ┌─────┬───┬─────┬───────────────────────────┬───┬───┬───┬───┐ + * │40 │41 │43 │48 │4B │4C │4E │4F │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ + * ┌─────┬───┬─────┬───────────────────────┬─────┬─────┬───┬───┐ + * │40 │41 │43 │48 │4A │4C │4E │4F │ + * └─────┴───┴─────┴───────────────────────┴─────┴─────┴───┴───┘ + */ + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, \ + K40, K41, K42, K43, K44, K45, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K43, K48, K4A, K4B, K4D, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, KC_NO, K4D, KC_NO, K4F }, \ +} + +#define LAYOUT_60_ansi_arrow( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3F, \ + K40, K41, K43, K48, K4A, K4B, K4C, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, KC_NO, K4E, K4F }, \ +} + +#define LAYOUT_60_ansi_arrow_split_bs( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3F, \ + K40, K41, K43, K48, K4A, K4B, K4C, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, KC_NO, K4E, K4F }, \ +} + +#define LAYOUT_60_ansi_tsangan( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K43, K48, K4B, K4D, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, KC_NO, K48, KC_NO, KC_NO, K4B, KC_NO, K4D, KC_NO, K4F }, \ +} + +#define LAYOUT_60_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E, K3F, \ + K41, K43, K48, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, KC_NO, K3E, K3F }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, KC_NO, K48, KC_NO, KC_NO, K4B, KC_NO, K4D, KC_NO, KC_NO }, \ +} + +#define LAYOUT_64_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K40, K41, K43, K48, K4A, K4B, K4C, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, KC_NO, K4E, K4F }, \ +} diff --git a/qmk/keyboards/gingham/keymaps/via/keymap.c b/qmk/keyboards/gingham/keymaps/via/keymap.c index 3f7f1c42..f3034497 100644 --- a/qmk/keyboards/gingham/keymaps/via/keymap.c +++ b/qmk/keyboards/gingham/keymaps/via/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ 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, diff --git a/qmk/keyboards/gingham/keymaps/via/readme.md b/qmk/keyboards/gingham/keymaps/via/readme.md index a49e2c05..b82bc8e7 100644 --- a/qmk/keyboards/gingham/keymaps/via/readme.md +++ b/qmk/keyboards/gingham/keymaps/via/readme.md @@ -1,3 +1 @@ # Compile with this keymap to use VIA - -Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/qmk/keyboards/gingham/keymaps/via/rules.mk b/qmk/keyboards/gingham/keymaps/via/rules.mk index 930e3552..1e5b9980 100644 --- a/qmk/keyboards/gingham/keymaps/via/rules.mk +++ b/qmk/keyboards/gingham/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/qmk/keyboards/gray_studio/hb85/config.h b/qmk/keyboards/gray_studio/hb85/config.h index f3fb20ec..9309012a 100644 --- a/qmk/keyboards/gray_studio/hb85/config.h +++ b/qmk/keyboards/gray_studio/hb85/config.h @@ -17,8 +17,8 @@ along with this program. If not, see . #pragma once -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422F +#define VENDOR_ID 0x4753 +#define PRODUCT_ID 0x2000 #define DEVICE_VER 0x0200 #define MANUFACTURER Gray Studio #define PRODUCT HB85 diff --git a/qmk/keyboards/gray_studio/hb85/keymaps/via/config.h b/qmk/keyboards/gray_studio/hb85/keymaps/via/config.h new file mode 100644 index 00000000..c81bd53b --- /dev/null +++ b/qmk/keyboards/gray_studio/hb85/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 MechMerlin + +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 . +*/ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/qmk/keyboards/gray_studio/hb85/keymaps/via/keymap.c b/qmk/keyboards/gray_studio/hb85/keymaps/via/keymap.c new file mode 100644 index 00000000..febf4715 --- /dev/null +++ b/qmk/keyboards/gray_studio/hb85/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2019 Felipe Coury + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_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_BSPC, KC_PSLS, KC_PAST, KC_PMNS, +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_P7 , KC_P8 , KC_P9 , +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_P4 , KC_P5 , KC_P6 , +KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , + KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT + ), + + [1] = LAYOUT_all( + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/gray_studio/hb85/keymaps/via/rules.mk b/qmk/keyboards/gray_studio/hb85/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/gray_studio/hb85/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/gray_studio/hb85/readme.md b/qmk/keyboards/gray_studio/hb85/readme.md index 7e39f327..523f774c 100644 --- a/qmk/keyboards/gray_studio/hb85/readme.md +++ b/qmk/keyboards/gray_studio/hb85/readme.md @@ -4,7 +4,7 @@ A Sony HitBit MSX Computer inspired Keyboard. -* Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +* Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury), [MechMerlin](https://github.com/mechmerlin) * Hardware Supported: Gray Studio HB85 * Hardware Availability: [Group buy](https://en.zfrontier.com/products/gray-hb85) finished diff --git a/qmk/keyboards/handwired/3dp660/3dp660.c b/qmk/keyboards/handwired/3dp660/3dp660.c new file mode 100644 index 00000000..3f655d35 --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/3dp660.c @@ -0,0 +1,17 @@ + /* Copyright 2020 gooberpsycho + * + * 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 "3dp660.h" diff --git a/qmk/keyboards/handwired/3dp660/3dp660.h b/qmk/keyboards/handwired/3dp660/3dp660.h new file mode 100644 index 00000000..67288b1f --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/3dp660.h @@ -0,0 +1,35 @@ + /* Copyright 2020 gooberpsycho + * + * 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 . + */ + +#pragma once +#include "quantum.h" + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3D, \ + k40, k41, k42, k45, k49, k4A, k4B, k4C, k4D, k4E \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, KC_NO, k3C, k3D, KC_NO}, \ + {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E} \ +} diff --git a/qmk/keyboards/handwired/3dp660/config.h b/qmk/keyboards/handwired/3dp660/config.h new file mode 100644 index 00000000..e719cf2c --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6075 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Handwired +#define PRODUCT 3dp660 + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + diff --git a/qmk/keyboards/handwired/3dp660/info.json b/qmk/keyboards/handwired/3dp660/info.json new file mode 100644 index 00000000..5b782508 --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "3dp660", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_66_ansi": { + + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"BKSP", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.5, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Del", "x":15.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.25}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"CTRL", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"MO(1)", "x":11.25, "y":4}, + {"label":"CTRL", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/handwired/3dp660/keymaps/default/keymap.c b/qmk/keyboards/handwired/3dp660/keymaps/default/keymap.c new file mode 100644 index 00000000..e9eee115 --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/keymaps/default/keymap.c @@ -0,0 +1,34 @@ + /* Copyright 2020 gooberpsycho + * + * 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 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_66_ansi( + 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_BSPC, KC_DEL, + 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_END, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_66_ansi( + RESET, 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), +}; diff --git a/qmk/keyboards/handwired/3dp660/keymaps/via/keymap.c b/qmk/keyboards/handwired/3dp660/keymaps/via/keymap.c new file mode 100644 index 00000000..b39eabe4 --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/keymaps/via/keymap.c @@ -0,0 +1,48 @@ + /* Copyright 2020 gooberpsycho + * + * 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 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_66_ansi( + 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_BSPC, KC_DEL, + 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_END, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_66_ansi( + RESET, 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_66_ansi( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_66_ansi( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/qmk/keyboards/handwired/3dp660/keymaps/via/rules.mk b/qmk/keyboards/handwired/3dp660/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/handwired/3dp660/readme.md b/qmk/keyboards/handwired/3dp660/readme.md new file mode 100644 index 00000000..dfece8ed --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/readme.md @@ -0,0 +1,24 @@ +# 3dp660 + +![](https://i.imgur.com/KWyU57el.jpg) + +### Teensy 2.0 Pinout +| rows | 0 | 1 | 2 | 3 | 4 | +| --------------- | --- | --- | --- | --- | --- | +| Teensy/QMK pin | B0 | B1 | B2 | B3 | B7 | + +| columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Teensy/QMK pin | D2 | D3 | C6 | C7 | D5 | D4 | D7 | B4 | B5 | B6 | F7 | F6 | F5 | F4 | F1 | + + +Make example for this keyboard (after setting up your build environment): + + make handwired/3dp660:default + +**Reset Key:** Hold down the key located at `k00`, commonly programmed as Escape while plugging in the keyboard. + +* Keyboard Maintainer: [gooberpsycho](https://github.com/gooberpsycho) +* Hardware Availability: [Casefile](https://www.thingiverse.com/thing:2897260) + +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). diff --git a/qmk/keyboards/handwired/3dp660/rules.mk b/qmk/keyboards/handwired/3dp660/rules.mk new file mode 100644 index 00000000..d97f13a3 --- /dev/null +++ b/qmk/keyboards/handwired/3dp660/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes diff --git a/qmk/keyboards/handwired/curiosity/config.h b/qmk/keyboards/handwired/curiosity/config.h new file mode 100644 index 00000000..8b632a5e --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Spaceman + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5342 // "SB" +#define PRODUCT_ID 0x4355 // "CU" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Spaceman +#define PRODUCT Curiosity + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, F7, F6, F5 } +#define MATRIX_COL_PINS { D3, D4, F4, C6, D7, E6, B5, B4, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/qmk/keyboards/handwired/curiosity/curiosity.c b/qmk/keyboards/handwired/curiosity/curiosity.c new file mode 100644 index 00000000..e0a6e130 --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/curiosity.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Spaceman + * + * 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 "curiosity.h" \ No newline at end of file diff --git a/qmk/keyboards/handwired/curiosity/curiosity.h b/qmk/keyboards/handwired/curiosity/curiosity.h new file mode 100644 index 00000000..a79bfa66 --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/curiosity.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Spaceman + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_small_mods( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k3b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k3a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k39, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ +} +#define LAYOUT_large_mods( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k3b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO, KC_NO, k3b }, \ +} diff --git a/qmk/keyboards/handwired/curiosity/info.json b/qmk/keyboards/handwired/curiosity/info.json new file mode 100644 index 00000000..333868e1 --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "Curiosity", + "url": "", + "maintainer": "Spaceman", + "width": 13.5, + "height": 4, + "layouts": { + "LAYOUT_small_mods": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0, "w":1.5}, + {"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":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1}, {"x":12.25, "y":1, "w":1.25}, + {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, + {"x":0.75, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2}, {"x":6.5, "y":3, "w":2.25}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3} + ] + }, + "LAYOUT_large_mods": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0, "w":1.5}, + {"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":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":2.25}, + {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2, "w":2}, + {"x":0.75, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2}, {"x":6.5, "y":3, "w":2.25}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3} + ] + } + } +} diff --git a/qmk/keyboards/handwired/curiosity/keymaps/default/keymap.c b/qmk/keyboards/handwired/curiosity/keymaps/default/keymap.c new file mode 100644 index 00000000..741ad387 --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Spaceman + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_small_mods( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [1] = LAYOUT_small_mods( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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 + ), +}; diff --git a/qmk/keyboards/handwired/curiosity/readme.md b/qmk/keyboards/handwired/curiosity/readme.md new file mode 100644 index 00000000..eaf608e2 --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/readme.md @@ -0,0 +1,13 @@ +# The Curiosity + +40% Keyboard + +* Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) +* Hardware Supported: Curiosity PCB +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make handwired/curiosity:default + +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). diff --git a/qmk/keyboards/handwired/curiosity/rules.mk b/qmk/keyboards/handwired/curiosity/rules.mk new file mode 100644 index 00000000..dace27ef --- /dev/null +++ b/qmk/keyboards/handwired/curiosity/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = no # Use link time optimization diff --git a/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h b/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h index 31901320..87b5b663 100644 --- a/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h +++ b/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define USE_SERIAL diff --git a/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c b/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c index d8ac1910..78c16fb5 100644 --- a/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c +++ b/qmk/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h b/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h new file mode 100644 index 00000000..eea543ae --- /dev/null +++ b/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h @@ -0,0 +1,40 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#pragma once + +#define USE_SERIAL +#define EE_HANDS + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#define OLED_DISPLAY_128X64 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } + +#undef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 + +#undef OLED_TIMEOUT +#define OLED_TIMEOUT 240000 diff --git a/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c b/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c new file mode 100644 index 00000000..f9b5ca6d --- /dev/null +++ b/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c @@ -0,0 +1,579 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include QMK_KEYBOARD_H +#include "333fred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_5x6_5( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), + KC_F4, KC_LALT, KC_BSPC, TD(TD_SYM_VIM), KC_DEL, KC_UP, KC_ENT, KC_SPC, OSL(VIM), KC_EQL, + KC_LGUI, TD(TD_COPY_PASTE), KC_DOWN, OSM(MOD_RCTL) + ), + + [SYMB] = LAYOUT_5x6_5( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_7, KC_8, KC_9, _______, KC_F12, + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, _______, KC_4, KC_5, KC_6, _______, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, KC_1, KC_2, KC_3, _______, _______, + KC_F7, _______, _______, _______, _______, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_ENT, + _______, _______, KC_VOLD, _______ + ), + + [VIM] = LAYOUT_5x6_5( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______,_______, _______, TG(GAME), _______, _______, _______, _______, + _______, _______, _______, _______ + ), + + [GAME] = LAYOUT_5x6_5( + 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_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_G, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_B, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LOCK, KC_LALT, KC_SPC, KC_ENT, KC_GRV, TG(GAME), _______, _______, _______, KC_EQL, + KC_BSPC, KC_F5, KC_F6, _______ + ), +}; + +uint32_t quote_timer; + +void keyboard_post_init_user(void) { quote_timer = 0; } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_process_keycode(keycode); + return !try_handle_macro(keycode, record); +} + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00}; + + oled_write_P(qmk_logo, false); +} + +void render_led_status(void) { + led_t led_state = host_keyboard_led_state(); + if (led_state.num_lock || led_state.caps_lock || led_state.scroll_lock) { + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + } +} + +void render_mods_status(void) { + uint8_t mods = get_mods() | get_oneshot_mods(); + bool ctrl = mods & MOD_MASK_CTRL; + bool shft = mods & MOD_MASK_SHIFT; + bool alt = mods & MOD_MASK_ALT; + bool gui = mods & MOD_MASK_GUI; + + oled_write_P(ctrl ? PSTR("CTRL ") : PSTR(" "), false); + oled_write_P(shft ? PSTR("SHIFT ") : PSTR(" "), false); + oled_write_P(alt ? PSTR("ALT ") : PSTR(" "), false); + oled_write_ln_P(gui ? PSTR("GUI ") : PSTR(" "), false); +} + +#define MAX_LINES 8 + +void write_quote(const char* data, const uint8_t num_lines) { + uint8_t current_line = 0; + for (; current_line < (MAX_LINES - num_lines) / 2; current_line++) { + oled_advance_page(true); + } + + oled_write_ln_P(data, false); + + for (current_line += num_lines; current_line < MAX_LINES; current_line++) + { + oled_advance_page(true); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_logo(); + oled_advance_page(/* clearPageRemainder */ true); + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_ln_P(PSTR("Base"), false); + break; + case SYMB: + oled_write_ln_P(PSTR("Symbols"), false); + break; + case VIM: + oled_write_ln_P(PSTR("Vim"), false); + break; + case GAME: + oled_write_ln_P(PSTR("Gaming"), false); + break; + } + + render_mods_status(); + render_led_status(); + } else { + if ((quote_timer != 0 && timer_elapsed32(quote_timer) < 300000 /* 5 minutes */) || !is_oled_on()) { + return; + } + + srand(timer_read32()); + int currentQuote = rand() % 63; + quote_timer = timer_read32(); + + // Max character count on my screen is 20 characters per line. + // Quotes are from various fantasy books, mostly either from + // The Stormlight Archive or from The Wheel of Time. + switch (currentQuote) { + case 0: + write_quote(PSTR(" Life before Death \n" + " Strength before \n" + " Weakness \n" + " Journey before \n" + " Destination"), + 5); + break; + case 1: + write_quote(PSTR(" Honor is dead, but \n" + "I'll see what I can \n" + " do."), + 3); + break; + case 2: + write_quote(PSTR(" You cannot have my \n" + " pain!"), + 2); + break; + case 3: + write_quote(PSTR(" Pride doesn't win \n" + " battles"), + 2); + break; + case 4: + write_quote(PSTR(" I have practice \n" + " following fools in \n" + " their reckless \n" + " pursuits."), + 4); + break; + case 5: + write_quote(PSTR(" What is the most \n" + " important step a \n" + " man can take?"), + 3); + break; + case 6: + write_quote(PSTR(" It's the next one. \n" + " Always the next \n" + " step, Dalinar."), + 3); + break; + case 7: + write_quote(PSTR(" NO MATING."), 1); + break; + case 8: + write_quote(PSTR(" Inappropriate? \n" + "Such as... dividing \n" + " by zero?"), + 3); + break; + case 9: + write_quote(PSTR(" I am a stick!"), 1); + break; + case 10: + write_quote(PSTR(" But you could be \n" + " fire!"), + 1); + break; + case 11: + write_quote(PSTR(" Sometimes a \n" + " hyprocrite is \n" + " nothing more than \n" + " than a man in the \n" + "process of changing"), + 5); + break; + case 12: + write_quote(PSTR(" You surrender when \n" + " you are dead. Many \n" + "a man has been given\n" + " less."), + 4); + break; + case 13: + write_quote(PSTR(" Kneel and swear to \n" + " the Lord Dragon,...\n" + " or you will be \n" + " knelt."), + 4); + break; + case 14: + write_quote(PSTR("I'm right, anyway. I\n" + "wish I wasn't, but I\n" + " am. I bloody am."), + 3); + break; + case 15: + write_quote(PSTR(" Death rides on my \n" + " shoulder,. Death \n" + " walks in my \n" + " footsteps. I am \n" + " death."), + 5); + break; + case 16: + write_quote(PSTR(" The Golden Crane \n" + " flies for Tarmon \n" + " Gai'don"), + 3); + break; + case 17: + write_quote(PSTR("You humans are very \n" + " excitable"), + 2); + break; + case 18: + write_quote(PSTR(" Phaw!"), 1); + break; + case 19: + write_quote(PSTR("I may be a fool, but\n" + " I intend to be a \n" + " live fool."), + 3); + break; + case 20: + write_quote(PSTR(" Anyone who claimed \n" + " that old age had \n" + " brought them \n" + "patience was either \n" + " lying or senile."), + 5); + break; + case 21: + write_quote(PSTR("Death is light as a \n" + "feather; duty, heavy\n" + " as a mountain"), + 3); + break; + case 22: + write_quote(PSTR("Dovie'andi se tovya \n" + " sagain."), + 2); + break; + case 23: + write_quote(PSTR(" Carai an Caldazar! \n" + "Carai an Ellisande! \n" + " Al Ellisande!"), + 3); + break; + case 24: + write_quote(PSTR(" Mia dovienya \n" + " nesodhin soende."), + 2); + break; + case 25: + write_quote(PSTR(" The Wheel of Time \n" + "turns, and Ages come\n" + " and pass, leaving \n" + "memories that become\n" + " legend."), + 5); + break; + case 26: + write_quote(PSTR(" Legend fades to \n" + "myth, and even myth \n" + " is long forgotten \n" + " when the Age that \n" + "gave it birth comes \n" + " again."), + 6); + break; + case 27: + write_quote(PSTR(" What is too absurd \n" + " to believe is \n" + "believed because it \n" + "is too absurd to be \n" + " a lie."), + 5); + break; + case 28: + write_quote(PSTR("And you gave me the \n" + " way out! Chew on \n" + "that bitterness for \n" + "lunch, you flaming, \n" + "burning, misbegotten\n" + " liars!"), + 6); + break; + case 29: + write_quote(PSTR(" He was going to \n" + "start having, 'I am \n" + "not a bloody Lord', \n" + " embroidered on his \n" + " coats."), + 5); + break; + case 30: + write_quote(PSTR("All was not lost, of\n" + " course. All was \n" + " never lost as long \n" + " as you were alive."), + 4); + break; + case 31: + write_quote(PSTR(" Everything is just \n" + " bloody fine!"), + 2); + break; + case 32: + write_quote(PSTR("The wheel weaves as \n" + " the wheel wills"), + 2); + break; + case 33: + write_quote(PSTR(" Time to toss the \n" + " dice"), + 2); + break; + case 34: + write_quote(PSTR("Always plan for the \n" + " worst, child, that \n" + " way all your \n" + " surprises are \n" + " pleasant ones."), + 5); + break; + case 35: + write_quote(PSTR("'Pessimism, she is a\n" + " fond friend of \n" + "yours, yes?' 'That's\n" + " uncalled for. I \n" + " barely know her. \n" + "Mere acquaintances, \n" + " at best.'"), + 7); + break; + case 36: + write_quote(PSTR(" Do not trouble \n" + "trouble till trouble\n" + " troubles you."), + 3); + break; + case 37: + write_quote(PSTR("If your enemy offers\n" + " you two targets, \n" + " strike at a third."), + 3); + break; + case 38: + write_quote(PSTR("The wind was not the\n" + "beginning. There are\n" + " neither beginnings \n" + " nor endings to the \n" + " turning of the \n" + " Wheel of Time. But \n" + " it was _a_ \n" + " beginning."), + 8); + break; + case 39: + write_quote(PSTR("Bloody flaming ashes"), 1); + break; + case 40: + write_quote(PSTR("Then follow Lord Mat\n" + " whenever he calls \n" + "To dance with Jak O'\n" + " the Shadows."), + 4); + break; + case 41: + write_quote(PSTR(" There are no \n" + " endings, and never \n" + "will be endings, to \n" + " the turning of the \n" + " Wheel of Time. But \n" + " it was an ending."), + 6); + break; + case 42: + write_quote(PSTR(" TAI'SHAR MALKIER!"), 1); + break; + case 43: + write_quote(PSTR("I would not mind you\n" + " in my head, if you \n" + "were not so clearly \n" + " mad."), + 4); + break; + case 44: + write_quote(PSTR(" ILYENA, MY LOVE, \n" + " FORGIVE ME!"), + 2); + break; + case 45: + write_quote(PSTR(" Oh, Light. That's \n" + "impossible! We can't\n" + " use it! Cast it \n" + "away! That is death \n" + " we hold, death and \n" + "betrayal. It is HIM."), + 6); + break; + case 46: + write_quote(PSTR("Nothing ever goes as\n" + " you expect. Expect \n" + " nothing, and you \n" + " will not be \n" + " surprised. Expect \n" + " nothing. Hope for \n" + " nothing. Nothing."), + 7); + break; + case 47: + write_quote(PSTR(" Distant Weeping"), 1); + break; + case 48: + write_quote(PSTR("Are you real? Am I?"), 1); + break; + case 49: + write_quote(PSTR(" I'm just an old \n" + "gleeman, who could I\n" + " possibly be \n" + " dangerous to?"), + 4); + break; + case 50: + write_quote(PSTR(" Mat bloody Cauthon \n" + " is no bloody hero!"), + 2); + break; + case 51: + write_quote(PSTR("You are a coward and\n" + " a tyrant. I'd name \n" + " you Darkfriend as \n" + "well, but I suspect \n" + " that the Dark One \n" + " would perhaps be \n" + " embarrassed to \n" + "associate with you."), + 8); + break; + case 52: + write_quote(PSTR(" I win again, Lews \n" + " Therin."), + 2); + break; + case 53: + write_quote(PSTR("May you always find \n" + " water and shade."), + 2); + break; + case 54: + write_quote(PSTR(" I will never serve \n" + "you, Father of Lies.\n" + "In a thousand lives,\n" + "I never have. I know\n" + " that. I'm sure of \n" + "it. Come. It is time\n" + " to die."), + 7); + break; + case 55: + write_quote(PSTR(" There may be more \n" + "than one way to skin\n" + " a cat, but the cat \n" + "isn't going to like \n" + " any of them."), + 5); + break; + case 56: + write_quote(PSTR("Please see that they\n" + " know, although the \n" + "word Black may brand\n" + "my name forever, my \n" + "soul is Brown. Tell \n" + " them..."), + 6); + break; + case 57: + write_quote(PSTR(" 'Your soul is of a \n" + "pure white, Verin,' \n" + "Egwene said softly. \n" + " 'Like the Light \n" + " itself.'"), + 5); + break; + case 58: + write_quote(PSTR(" Asha'man, Kill!"), 1); + break; + case 59: + write_quote(PSTR(" Let the lord of \n" + " chaos rule."), + 2); + break; + case 60: + write_quote(PSTR(" There's always \n" + " another secret."), + 2); + break; + case 61: + write_quote(PSTR(" You see the great \n" + "thing about madness \n" + "is that it's all in \n" + " your head."), + 4); + break; + case 62: + write_quote(PSTR(" In one Age, called \n" + " the Third Age by \n" + "some, an Age yet to \n" + " come, an Age long \n" + " past, a wind rose \n" + " above..."), + 6); + break; + } + } +} + +void encoder_update_user(uint8_t index, bool clockwise) { + // On the left, control the volume. On the right, scroll the page + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk b/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk new file mode 100644 index 00000000..2bd6620c --- /dev/null +++ b/qmk/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk @@ -0,0 +1,4 @@ +KEY_LOCK_ENABLE = yes +CONSOLE_ENABLE = no +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/qmk/keyboards/handwired/freoduo/config.h b/qmk/keyboards/handwired/freoduo/config.h new file mode 100644 index 00000000..c65da93a --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/config.h @@ -0,0 +1,52 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xB141 +#define PRODUCT_ID 0x0602 //F is 6th in alphabet, 02 as in DUO +#define DEVICE_VER 0x0001 +#define MANUFACTURER ParyzFilip +#define PRODUCT Freoduo + +/* key matrix size */ +/* rows are doubled-up */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +/* wiring of each half */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { B2, B6, F6, B3, B1, F7 } +#define EE_HANDS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 3 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLIGHT_HUE_STEP 16 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/qmk/keyboards/handwired/freoduo/freoduo.c b/qmk/keyboards/handwired/freoduo/freoduo.c new file mode 100644 index 00000000..7415e626 --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/freoduo.c @@ -0,0 +1 @@ +#include "freoduo.h" diff --git a/qmk/keyboards/handwired/freoduo/freoduo.h b/qmk/keyboards/handwired/freoduo/freoduo.h new file mode 100644 index 00000000..453d1d1c --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/freoduo.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, KC_NO}, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { KC_NO, R41, R42, R43, R44, R45 } \ + } diff --git a/qmk/keyboards/handwired/freoduo/info.json b/qmk/keyboards/handwired/freoduo/info.json new file mode 100644 index 00000000..5c2d7e17 --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/info.json @@ -0,0 +1,72 @@ +{ +"keyboard_name": "Freoduo", +"manufacturer": "Filip Paryz", +"url": "https://github.com/FilipParyz", +"maintainer": "https://github.com/FilipParyz", +"width": 12, +"height": 5, +"layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + {"x": 7, "y": 2}, + {"x": 8, "y": 2}, + {"x": 9, "y": 2}, + {"x": 10, "y": 2}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, + {"x": 7, "y": 3}, + {"x": 8, "y": 3}, + {"x": 9, "y": 3}, + {"x": 10, "y": 3}, + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4, "w": 2}, + {"x": 7, "y": 4, "w": 2}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4} + ] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/handwired/freoduo/keymaps/default/config.h b/qmk/keyboards/handwired/freoduo/keymaps/default/config.h new file mode 100644 index 00000000..f28e4073 --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define GRAVE_ESC_CTRL_OVERRIDE +#define RGBLED_NUM 18 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 9, 9 } +// Switch RGB sides with LED MAP. +#define RGBLIGHT_LED_MAP { 8, 7, 6, 5, 4, 3, 2, 1, 0, 17, 16, 15, 14, 13, 12, 11, 10, 9} +#define RGBLIGHT_LAYERS diff --git a/qmk/keyboards/handwired/freoduo/keymaps/default/keymap.c b/qmk/keyboards/handwired/freoduo/keymaps/default/keymap.c new file mode 100644 index 00000000..16eeed13 --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/keymaps/default/keymap.c @@ -0,0 +1,189 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, +}; + +// Light all LEDs red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_RED} // Light all LEDs, starting with LED 0 +); +// Light all LEDs in green when keyboard layer 1 is active +const rgblight_segment_t PROGMEM layer_lower[] = RGBLIGHT_LAYER_SEGMENTS( + {6, 6, HSV_GREEN} +); +// Light all LEDs in blue when keyboard layer 2 is active +const rgblight_segment_t PROGMEM layer_raise[] = RGBLIGHT_LAYER_SEGMENTS( + {6, 6, HSV_MAGENTA} +); +// Light all LEDs in yellow when keyboard layer 3 is active +const rgblight_segment_t PROGMEM layer_adjust[] = RGBLIGHT_LAYER_SEGMENTS( + {6, 6, HSV_ORANGE} +); + + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_capslock_layer, + layer_lower, + layer_raise, + layer_adjust +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + // Both layers will light up if both kb layers are active + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + return state; +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + return true; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------------------------------------------------. + * |` ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Enter| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | A | S | D | F | G | H | J | K | L | ; | " | + * | LOWER| | | | | | | | | | | RAISE| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up | ? | + * | | | | | | | | | | | | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |ADJUST| Alt | GUI | Space | Backspace | Alt | Left |Down |Right | + * | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + LT(_LOWER,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_RAISE, KC_QUOT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, RSFT_T(KC_SLSH), + KC_LCTL, ADJUST, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* LOWER + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | Up | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Left | Down | Right| | | |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + 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_UP, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_NUHS, KC_NUBS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* RAISE + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | | | | | | | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + 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_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, S(KC_NUHS),S(KC_NUBS),_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* ADJUST (LOWER + RAISE) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset|RGB Tg|RGB Md| | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Hue Dn|Hue Up| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Sat Dn|Sat Up| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Val Dn|Val Up| | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + RESET , RGB_TOG, RGB_MOD, VLK_TOG, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/qmk/keyboards/handwired/freoduo/keymaps/default/rules.mk b/qmk/keyboards/handwired/freoduo/keymaps/default/rules.mk new file mode 100644 index 00000000..f4abb12c --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/qmk/keyboards/handwired/freoduo/readme.md b/qmk/keyboards/handwired/freoduo/readme.md new file mode 100644 index 00000000..7fa8af68 --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/readme.md @@ -0,0 +1,12 @@ +# Freoduo + +A split 60%, 5x12 ortholinear keyboard handwired by Filip Paryż. + +* Keyboard Maintainer: [Filip Paryz](https://github.com/FilipParyz) +* Hardware Supported: Pro Micro, ATmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make handwired/freoduo:default + +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). \ No newline at end of file diff --git a/qmk/keyboards/handwired/freoduo/rules.mk b/qmk/keyboards/handwired/freoduo/rules.mk new file mode 100644 index 00000000..e3da3753 --- /dev/null +++ b/qmk/keyboards/handwired/freoduo/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +VELOCIKEY_ENABLE = yes +SPLIT_KEYBOARD = yes \ No newline at end of file diff --git a/qmk/keyboards/handwired/leftynumpad/config.h b/qmk/keyboards/handwired/leftynumpad/config.h new file mode 100644 index 00000000..9059bfe7 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/config.h @@ -0,0 +1,102 @@ +/* +Copyright 2020 Tom Swartz + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xBEEF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Tom Swartz +#define PRODUCT LeftyNumpad +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } +#define MATRIX_COL_PINS { E6, B4, B5, B6, B2 } +#define UNUSED_PINS {D3, D2, B0, D5, B3, B1, F7, F6, F5, F4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 10 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/handwired/leftynumpad/info.json b/qmk/keyboards/handwired/leftynumpad/info.json new file mode 100644 index 00000000..9dab7643 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "LeftyNumpad", + "url": "https://github.com/tomswartz07", + "maintainer": "Tom Swartz", + "width": 5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"0,0", "x":0, "y":0}, + {"label":"1,0", "x":1, "y":0}, + {"label":"2,0", "x":2, "y":0}, + {"label":"3,0", "x":3, "y":0}, + {"label":"4,0", "x":4, "y":0}, + {"label":"0,1", "x":0, "y":1}, + {"label":"1,1", "x":1, "y":1}, + {"label":"2,1", "x":2, "y":1}, + {"label":"3,1", "x":3, "y":1}, + {"label":"0,2", "x":0, "y":2}, + {"label":"1,2", "x":1, "y":2}, + {"label":"2,2", "x":2, "y":2}, + {"label":"3,2", "x":3, "y":2}, + {"label":"5,1", "x":4, "y":1, "h":2}, + {"label":"0,3", "x":0, "y":3}, + {"label":"1,3", "x":1, "y":3}, + {"label":"2,3", "x":2, "y":3}, + {"label":"3,3", "x":3, "y":3}, + {"label":"0,4", "x":0, "y":4}, + {"label":"1,4", "x":1, "y":4}, + {"label":"2,4", "x":2, "y":4}, + {"label":"3,4", "x":3, "y":4}, + {"label":"4,3", "x":4, "y":3, "h":2} + ] + } + } +} diff --git a/qmk/keyboards/handwired/leftynumpad/keymaps/default/keymap.c b/qmk/keyboards/handwired/leftynumpad/keymaps/default/keymap.c new file mode 100644 index 00000000..d75e4221 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +/* Copyright 2020 Tom Swartz + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _NP, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_00 = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* NumberPad Layer + ,---------------------------------------. + | Back | Num | / | * | - | + | Space | Lock | | | | + |-------+-------+-------+-------+-------| + | Tab | 7 | 8 | 9 | + | + | | Home | Up | PgUp | | + |-------+-------+-------+-------| | + | Layer | 4 | 5 | 6 | | + | Toggle| Left | | Right | | + |-------+-------+-------+-------+-------| + | Page | 1 | 2 | 3 | Enter | + | Up | End | Down | PgDn | | + |-------+-------+-------+-------| | + | Page | 00 | 0 | . | | + | Down | | | | | + `---------------------------------------' +*/ + [_NP] = LAYOUT( + KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_7, KC_8, KC_9, + TG(_NP), KC_4, KC_5, KC_6, KC_PPLS, + KC_PGUP, KC_1, KC_2, KC_3, + KC_PGDOWN, KC_00, KC_0, KC_PDOT, KC_PENT + ), +/* Macropad/Function Layer + ,---------------------------------------. + | `~ | Play | F13 | Prev | Next | + | | Pause | | | | + |-------+-------+-------+-------+-------| + | Tab | F14 | F15 | 9 | + | + | | | | PgUp | | + |-------+-------+-------+-------| | + | Layer | 4 | 5 | 6 | | + | Toggle| Left | | Right | | + |-------+-------+-------+-------+-------| + | U | B | 2 | 3 | Enter | + | | | Down | PgDn | | + |-------+-------+-------+-------| | + | D | F | 0 | . | | + | | | | | | + `---------------------------------------' +*/ + [_FN] = LAYOUT( + KC_GRV, KC_MPLY, KC_F13, KC_MPRV, KC_MNXT, + _______, KC_F14, KC_F15, _______, + _______, _______, _______, _______, _______, + KC_U, KC_B, _______, _______, + KC_D, KC_F, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_00: + if (record->event.pressed) { + // when keycode DOUBLEZERO is pressed + SEND_STRING("00"); + } + break; + } + return true; +} diff --git a/qmk/keyboards/handwired/leftynumpad/keymaps/default/readme.md b/qmk/keyboards/handwired/leftynumpad/keymaps/default/readme.md new file mode 100644 index 00000000..107395eb --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/keymaps/default/readme.md @@ -0,0 +1,21 @@ +# The default keymap for LeftyNumpad + +## Base Layer +``` + ,---------------------------------------. + | Back | Num | / | * | - | + | Space | Lock | | | | + |-------+-------+-------+-------+-------| + | Layer | 7 | 8 | 9 | + | + | Up | Home | Up | PgUp | | + |-------+-------+-------+-------| | + | Layer | 4 | 5 | 6 | | + | Down | Left | | Right | | + |-------+-------+-------+-------+-------| + | Page | 1 | 2 | 3 | Enter | + | Up | End | Down | PgDn | | + |-------+-------+-------+-------| | + | Page | 00 | 0 | . | | + | Down | | | | | + `---------------------------------------' +``` diff --git a/qmk/keyboards/handwired/leftynumpad/leftynumpad.c b/qmk/keyboards/handwired/leftynumpad/leftynumpad.c new file mode 100644 index 00000000..195ec782 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/leftynumpad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Tom Swartz + * + * 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 "leftynumpad.h" diff --git a/qmk/keyboards/handwired/leftynumpad/leftynumpad.h b/qmk/keyboards/handwired/leftynumpad/leftynumpad.h new file mode 100644 index 00000000..7f3ebb84 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/leftynumpad.h @@ -0,0 +1,42 @@ +/* Copyright 2020 Tom Swartz + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K05, K15, K25, K35, K45, \ + K04, K14, K24, K34, \ + K03, K13, K23, K33, K43, \ + K02, K12, K22, K32, \ + K01, K11, K21, K31, K41 \ +) \ +{ \ + { K05, K15, K25, K35, K45 }, \ + { K04, K14, K24, K34 }, \ + { K03, K13, K23, K33, K43 }, \ + { K02, K12, K22, K32 }, \ + { K01, K11, K21, K31, K41 } \ +} diff --git a/qmk/keyboards/handwired/leftynumpad/readme.md b/qmk/keyboards/handwired/leftynumpad/readme.md new file mode 100644 index 00000000..4446bf29 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/readme.md @@ -0,0 +1,16 @@ +# LeftyNumpad + +![Image of LeftyNumpad](https://i.imgur.com/kkSPIxpl.png) + +A small numberpad/macropad intended to be placed southpaw-style on the left +side of a keyboard. + +* Keyboard Maintainer: [Tom Swartz](https://github.com/tomswartz07) +* Hardware Supported: Handwired, Uses Arudino Micro. +* Hardware Availability: Handwired hardware. + +Make example for this keyboard (after setting up your build environment): + + make handwired/leftynumpad:default + +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). diff --git a/qmk/keyboards/handwired/leftynumpad/rules.mk b/qmk/keyboards/handwired/leftynumpad/rules.mk new file mode 100644 index 00000000..5c0d8f30 --- /dev/null +++ b/qmk/keyboards/handwired/leftynumpad/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/handwired/onekey/blackpill_f401/config.h b/qmk/keyboards/handwired/onekey/blackpill_f401/config.h index c6166380..829e8467 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f401/config.h +++ b/qmk/keyboards/handwired/onekey/blackpill_f401/config.h @@ -23,7 +23,7 @@ #define UNUSED_PINS #define BACKLIGHT_PIN A0 -#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define RGB_DI_PIN A1 diff --git a/qmk/keyboards/handwired/onekey/blackpill_f401/halconf.h b/qmk/keyboards/handwired/onekey/blackpill_f401/halconf.h index d73c214e..ae08512d 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f401/halconf.h +++ b/qmk/keyboards/handwired/onekey/blackpill_f401/halconf.h @@ -16,5 +16,6 @@ #pragma once #define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE #include_next "halconf.h" diff --git a/qmk/keyboards/handwired/onekey/blackpill_f401/mcuconf.h b/qmk/keyboards/handwired/onekey/blackpill_f401/mcuconf.h index 33e07847..034a022d 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f401/mcuconf.h +++ b/qmk/keyboards/handwired/onekey/blackpill_f401/mcuconf.h @@ -19,3 +19,6 @@ #undef STM32_I2C_USE_I2C1 #define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE diff --git a/qmk/keyboards/handwired/onekey/blackpill_f401/rules.mk b/qmk/keyboards/handwired/onekey/blackpill_f401/rules.mk index 60926204..6eb37a58 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f401/rules.mk +++ b/qmk/keyboards/handwired/onekey/blackpill_f401/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable diff --git a/qmk/keyboards/handwired/onekey/blackpill_f411/config.h b/qmk/keyboards/handwired/onekey/blackpill_f411/config.h index c6166380..829e8467 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f411/config.h +++ b/qmk/keyboards/handwired/onekey/blackpill_f411/config.h @@ -23,7 +23,7 @@ #define UNUSED_PINS #define BACKLIGHT_PIN A0 -#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define RGB_DI_PIN A1 diff --git a/qmk/keyboards/handwired/onekey/blackpill_f411/halconf.h b/qmk/keyboards/handwired/onekey/blackpill_f411/halconf.h index d73c214e..ae08512d 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f411/halconf.h +++ b/qmk/keyboards/handwired/onekey/blackpill_f411/halconf.h @@ -16,5 +16,6 @@ #pragma once #define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE #include_next "halconf.h" diff --git a/qmk/keyboards/handwired/onekey/blackpill_f411/mcuconf.h b/qmk/keyboards/handwired/onekey/blackpill_f411/mcuconf.h index 33e07847..034a022d 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f411/mcuconf.h +++ b/qmk/keyboards/handwired/onekey/blackpill_f411/mcuconf.h @@ -19,3 +19,6 @@ #undef STM32_I2C_USE_I2C1 #define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE diff --git a/qmk/keyboards/handwired/onekey/blackpill_f411/rules.mk b/qmk/keyboards/handwired/onekey/blackpill_f411/rules.mk index f2e0f2b4..7cf88643 100644 --- a/qmk/keyboards/handwired/onekey/blackpill_f411/rules.mk +++ b/qmk/keyboards/handwired/onekey/blackpill_f411/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable diff --git a/qmk/keyboards/handwired/onekey/bluepill/rules.mk b/qmk/keyboards/handwired/onekey/bluepill/rules.mk index 66ce5174..019b1130 100644 --- a/qmk/keyboards/handwired/onekey/bluepill/rules.mk +++ b/qmk/keyboards/handwired/onekey/bluepill/rules.mk @@ -1,13 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 - +# Bootloader selection +BOOTLOADER = stm32duino # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/handwired/onekey/keymaps/oled/keymap.c b/qmk/keyboards/handwired/onekey/keymaps/oled/keymap.c new file mode 100644 index 00000000..1c120d01 --- /dev/null +++ b/qmk/keyboards/handwired/onekey/keymaps/oled/keymap.c @@ -0,0 +1,458 @@ +/* Copyright 2020 Sergey Vlasov + * + * 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 + +enum tap_dances { + TD_OLED, +}; + +enum oled_test_modes { + // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. + TEST_FIRST, + TEST_LOGO = TEST_FIRST, + TEST_CHARACTERS, + TEST_SLOW_UPDATE, + TEST_ALL_ON, + TEST_FRAME, + TEST_ALL_OFF, + TEST_FILL_HORZ_0, + TEST_FILL_HORZ_1, + TEST_FILL_VERT_0, + TEST_FILL_VERT_1, + TEST_FILL_CHECKERBOARD_1, + TEST_FILL_CHECKERBOARD_2, + TEST_FILL_CHECKERBOARD_4, + TEST_LAST = TEST_FILL_CHECKERBOARD_4, + + // Special modes which are not reachable normally. + TEST_DRAW_ALWAYS_ON, + TEST_DRAW_ALWAYS_OFF, +}; + +static enum oled_test_modes test_mode = TEST_FIRST; + +static oled_rotation_t rotation = OLED_ROTATION_0; + +static bool scrolling; +static uint8_t scrolling_speed; +static bool need_update = true; +static bool draw_always; +static bool update_speed_test; +static uint32_t update_speed_start_timer; +static uint16_t update_speed_count; +static bool restart_test; + +static void stop_scrolling(void) { + if (scrolling) { + oled_scroll_off(); + scrolling = false; + } +} + +static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + // single hold - step through rotations + switch (rotation) { + case OLED_ROTATION_0: + rotation = OLED_ROTATION_90; + break; + case OLED_ROTATION_90: + rotation = OLED_ROTATION_180; + break; + case OLED_ROTATION_180: + rotation = OLED_ROTATION_270; + break; + default: + rotation = OLED_ROTATION_0; + break; + } + stop_scrolling(); + oled_init(rotation); + } else { + // single tap - step through test modes + if (test_mode < TEST_LAST) { + ++test_mode; + } else { + test_mode = TEST_FIRST; + } + stop_scrolling(); + oled_clear(); + } + restart_test = true; + need_update = true; + break; + + case 2: + if (state->pressed) { + // tap + hold - change scrolling speed + scrolling_speed = (scrolling_speed + 1) % 8; + stop_scrolling(); + oled_scroll_set_speed(scrolling_speed); + // Cannot reactivate scrolling here, because oled_scroll_off() + // marks the whole display as dirty, and oled_scroll_left() + // silently does nothing if either the display is dirty or + // scrolling is already active. + } else { + // double tap - toggle scrolling + if (!scrolling) { + scrolling = true; + oled_scroll_left(); + } else { + scrolling = false; + oled_scroll_off(); + } + } + need_update = true; + break; + + case 3: + if (state->pressed) { + // double tap + hold - toggle `draw_always` + draw_always = !draw_always; + if (draw_always) { + test_mode = TEST_DRAW_ALWAYS_ON; + } else { + test_mode = TEST_DRAW_ALWAYS_OFF; + } + stop_scrolling(); + oled_clear(); + restart_test = true; + need_update = true; + } else { + // triple tap - toggle update speed test + update_speed_test = !update_speed_test; + if (update_speed_test) { + stop_scrolling(); + update_speed_start_timer = timer_read32(); + update_speed_count = 0; + } + } + break; + case 4: + if (!state->pressed) { + // quadruple tap - step through brightness levels + oled_set_brightness(oled_get_brightness() + 0x10); + } + break; + default: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; + +// `bool oled_is_dirty(void)` does not exist at the moment +extern OLED_BLOCK_TYPE oled_dirty; + +static inline uint8_t pixel_width(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH; + } + return OLED_DISPLAY_HEIGHT; +} + +static inline uint8_t pixel_height(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT; + } + return OLED_DISPLAY_WIDTH; +} + +// Draw the QMK logo at the top left corner, clipping if it does not fit. +static void test_logo(void) { + uint8_t lines = oled_max_lines(); + if (lines > 3) { + lines = 3; + } + uint8_t chars = oled_max_chars(); + if (chars > 21) { + chars = 21; + } + for (uint8_t row = 0; row < lines; ++row) { + oled_set_cursor(0, row); + for (uint8_t col = 0; col < chars; ++col) { + oled_write_char(0x80 + 0x20 * row + col, false); + } + } +} + +static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; + +// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. +static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { + uint8_t width = pixel_width(); + uint8_t lines = oled_max_lines(); + uint16_t index = 0; + for (uint8_t row = 0; row < lines; ++row) { + for (uint8_t col = 0; col < width; ++col) { + uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; + oled_write_raw_byte(byte, index++); + } + } +} + +// Draw a frame at the edges of the OLED screen. +static void test_frame(void) { + uint8_t width = pixel_width(); + uint8_t height = pixel_height(); + for (uint8_t x = 0; x < width; ++x) { + oled_write_pixel(x, 0, true); + oled_write_pixel(x, height - 1, true); + } + for (uint8_t y = 1; y < height - 1; ++y) { + oled_write_pixel(0, y, true); + oled_write_pixel(width - 1, y, true); + } +} + +// Use all 94 visible ASCII characters for testing. +#define TEST_CHAR_COUNT ('~' - '!' + 1) + +static char get_test_char(uint8_t char_index) { return char_index + '!'; } + +// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters +// at once, the sequence is repeated the second time with inverted characters). +static void test_characters(void) { + uint8_t cols = oled_max_chars(); + uint8_t rows = oled_max_lines(); + bool invert = false; + uint8_t char_index = 0; + for (uint8_t row = 0; row < rows; ++row) { + for (uint8_t col = 0; col < cols; ++col) { + oled_write_char(get_test_char(char_index), invert); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + invert = !invert; + } + } + } +} + +// Test screen updating after drawing a single character or pixel. +void test_slow_update(void) { + static uint8_t phase, x, y, char_index, first_char; + static uint16_t timer; + static uint16_t delay = 500; + + if (restart_test) { + // Initialize all state variables before starting the test. + restart_test = false; + phase = 0; + x = 0; + y = 0; + char_index = 0; + first_char = 0; + delay = 500; + } else { + // Wait for the specified time between steps. + if (timer_elapsed(timer) < delay) { + return; + } + } + + timer = timer_read(); + switch (phase) { + case 0: + // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the + // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be + // overlapped by the inverted character background. + oled_set_cursor(x, y); + oled_write_char(get_test_char(char_index), false); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + } + if (++x >= oled_max_chars()) { + x = 0; + if (++y >= oled_max_lines()) { + // The whole screen was filled - start the next phase. + ++phase; + x = y = 0; + } + } + delay = 250; + break; + + case 1: + // Phase 1: draw a line along the left edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y < pixel_height() - 1) { + ++y; + } else { + // The bottom left corner is reached - start the next phase. + ++phase; + ++x; + } + delay = 50; + break; + + case 2: + // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x < pixel_width() - 1) { + ++x; + } else { + // The bottom right corner was reached - start the next phase. + ++phase; + --y; + } + delay = 50; + break; + + case 3: + // Phase 3: draw a line along the right edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y > 0) { + --y; + } else { + // The top right corner was reached - start the next phase. + ++phase; + --x; + } + delay = 50; + break; + + case 4: + // Phase 4: draw a line along the top edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x > 0) { + --x; + } else { + // The top left corner was reached - start the next phase. + ++phase; + } + delay = 50; + break; + + default: + // Restart from phase 0, but change the first character of the sequence to make screen updates visible. + if (++first_char >= TEST_CHAR_COUNT) { + first_char = 0; + } + phase = 0; + x = 0; + y = 0; + char_index = first_char; + delay = 500; + break; + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + oled_scroll_set_area(0, 0); + oled_scroll_set_speed(scrolling_speed); + return rotation; +} + +void oled_task_user(void) { + if (update_speed_test) { + // Speed test mode - wait for screen update completion. + if (!oled_dirty) { + // Update statistics and send the measurement result to the console. + update_speed_count++; + if (update_speed_count % 256 == 0) { + uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); + } + + // Toggle between the "all on" and "all off" states and trigger the screen update again. + if (test_mode == TEST_ALL_ON) { + test_mode = TEST_ALL_OFF; + } else { + test_mode = TEST_ALL_ON; + } + need_update = true; + } + } + + // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on + // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty + // bits only when something has actually changed. However, redrawing the image only when some of the underlying + // data has changed is more efficient. Make it possible to test both modes here. + if (!draw_always || update_speed_test) { + // Draw the image only when the `need_update` flag is set, except for the "slow update" test. + // This mode is also forced when the screen update speed test is performed. + if (!need_update) { + if (test_mode != TEST_SLOW_UPDATE) { + return; + } + } + need_update = false; + } + + switch (test_mode) { + case TEST_LOGO: + test_logo(); + break; + case TEST_CHARACTERS: + test_characters(); + break; + case TEST_SLOW_UPDATE: + test_slow_update(); + break; + case TEST_ALL_ON: + oled_write_raw_P(fill_ff, sizeof(fill_ff)); + break; + case TEST_FRAME: + test_frame(); + break; + case TEST_ALL_OFF: + // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous + // content of the buffer and always marks the whole buffer as dirty. + if (update_speed_test) { + oled_clear(); + } else { + test_fill(0x00, 0x00, 1); + } + break; + case TEST_FILL_HORZ_0: + test_fill(0x55, 0x55, 1); + break; + case TEST_FILL_HORZ_1: + test_fill(0xaa, 0xaa, 1); + break; + case TEST_FILL_VERT_0: + test_fill(0xff, 0x00, 1); + break; + case TEST_FILL_VERT_1: + test_fill(0x00, 0xff, 1); + break; + case TEST_FILL_CHECKERBOARD_1: + test_fill(0x55, 0xaa, 1); + break; + case TEST_FILL_CHECKERBOARD_2: + test_fill(0x33, 0xcc, 2); + break; + case TEST_FILL_CHECKERBOARD_4: + test_fill(0x0f, 0xf0, 4); + break; + + case TEST_DRAW_ALWAYS_ON: + oled_write_P(PSTR("Draw Always"), false); + break; + case TEST_DRAW_ALWAYS_OFF: + oled_write_P(PSTR("Draw Once"), false); + break; + } +} + +void keyboard_post_init_user(void) { + // Console messages are used for update speed test results + debug_enable = true; +} diff --git a/qmk/keyboards/handwired/onekey/keymaps/oled/readme.md b/qmk/keyboards/handwired/onekey/keymaps/oled/readme.md new file mode 100644 index 00000000..380b3eb5 --- /dev/null +++ b/qmk/keyboards/handwired/onekey/keymaps/oled/readme.md @@ -0,0 +1,23 @@ +# OLED tester + +Available commands using a single key: +- Single tap: Switch to the next test pattern. +- Single hold: Switch to the next orientation (note that 90° and 270° orientations may not work correctly with some displays). +- Double tap: Toggle horizontal scrolling of the top row. Note that this scrolling is implemented by the controller and has major limitations: it works only with SSD1306-based displays, blocks all display updates, may not work correctly if the display width is less than 128 pixels, and does not handle 90°/270° rotation properly. +- Tap and hold: Change scrolling speed (because of controller limitations, scrolling needs to be started again manually using a double tap). +- Triple tap: Start or stop the update speed test. This test repeatedly fills the display with all-on and all-off pixels, measures the time required for updating the display, and prints the measured values to the HID console every 256th refresh. +- Double tap and hold: Switch between the “draw once” (default) and “draw always” modes. The “draw always” mode means that `oled_task_user()` redraws the whole picture completely every time it is called; the example code in the OLED feature documentation is written in this style. Testing the “draw always” mode can uncover bugs in the implementation of drawing functions (they must not set the dirty mark if the buffer content is not actually changed). + +Available test patterns: +- QMK logo (clipped to fit on the display). +- Fill the whole screen with as much unique characters as possible (all 94 printable ASCII characters are used, and if the display has more character positions available, the same characters are printed again, but inverted). +- “Slow update” test — instead of updating the whole screen at once, draw things piece by piece to uncover display update bugs. The drawing sequence used by this test: + - Fill the whole screen with printable ASCII characters (similar to the previous test, but characters are drawn one by one with 250 ms intervals between them, and inverted characters are not used to avoid obscuring the next phases). + - Draw a frame along the screen edges, starting from the top left corner and going down along the left edge, then along the bottom, right and top edges, with 50 ms delay after every pixel. + - Repeat the same sequence again, but with the character sequence shifted by 1 character (so that the updates would be visible). +- All pixels on. +- Pixels at the edges of the screen on. +- All pixels off. +- Horizontal on/off 1px lines (two variants - starting from on or off state). +- Vertical on/off 1px lines (two variants - starting from on or off state). +- Checkerboard pattern (three variants - 1×1, 2×2, 4×4 pixels). diff --git a/qmk/keyboards/handwired/onekey/keymaps/oled/rules.mk b/qmk/keyboards/handwired/onekey/keymaps/oled/rules.mk new file mode 100644 index 00000000..2ef0a8d0 --- /dev/null +++ b/qmk/keyboards/handwired/onekey/keymaps/oled/rules.mk @@ -0,0 +1,2 @@ +OLED_DRIVER_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/qmk/keyboards/handwired/onekey/keymaps/pytest_nocpp/keymap.c b/qmk/keyboards/handwired/onekey/keymaps/pytest_nocpp/keymap.c new file mode 100644 index 00000000..4e06bb11 --- /dev/null +++ b/qmk/keyboards/handwired/onekey/keymaps/pytest_nocpp/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H +#include "audio.h" + +/* THIS FILE WAS GENERATED AND IS EXPERIMENTAL! + * + * This file was generated by qmk-compile-json. You may or may not want to + * edit it directly. + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_ENTER) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } + +}; diff --git a/qmk/keyboards/handwired/onekey/pytest/templates/keymap.json b/qmk/keyboards/handwired/onekey/pytest/templates/keymap.json new file mode 100644 index 00000000..35344388 --- /dev/null +++ b/qmk/keyboards/handwired/onekey/pytest/templates/keymap.json @@ -0,0 +1,3 @@ +{ + "documentation": "This file is a keymap.json file for handwired/onekey/pytest" +} diff --git a/qmk/keyboards/handwired/onekey/rules.mk b/qmk/keyboards/handwired/onekey/rules.mk index 968e338e..ac343e16 100644 --- a/qmk/keyboards/handwired/onekey/rules.mk +++ b/qmk/keyboards/handwired/onekey/rules.mk @@ -5,7 +5,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/qmk/keyboards/handwired/pteron44/config.h b/qmk/keyboards/handwired/pteron44/config.h new file mode 100644 index 00000000..94622fa8 --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/config.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Fidel Coria + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x542C +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK Community +#define PRODUCT Pteron44 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { E6, B4, B5, B6 } +#define MATRIX_COL_PINS { F4, F6, F5, F7, B1, B3, C6, D4, D0, D1, D2, D3 } +#define UNUSED_PINS { D7 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 // 5 is default diff --git a/qmk/keyboards/handwired/pteron44/info.json b/qmk/keyboards/handwired/pteron44/info.json new file mode 100644 index 00000000..ed8791b0 --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "pteron44", + "url": "", + "maintainer": "fidelcoria", + "width": 17, + "height": 5.95, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K100", "x":0, "y":1.75}, + {"label":"K101", "x":1, "y":1.75}, + {"label":"K102", "x":2, "y":1.25}, + {"label":"K103", "x":3, "y":1}, + {"label":"K104", "x":4, "y":1.35}, + {"label":"K105", "x":5, "y":1.45}, + + {"label":"K106", "x":11, "y":1.45}, + {"label":"K107", "x":12, "y":1.35}, + {"label":"K108", "x":13, "y":1}, + {"label":"K109", "x":14, "y":1.25}, + {"label":"K110", "x":15, "y":1.75}, + {"label":"K111", "x":16, "y":1.75}, + + {"label":"K200", "x":0, "y":2.75}, + {"label":"K201", "x":1, "y":2.75}, + {"label":"K202", "x":2, "y":2.25}, + {"label":"K203", "x":3, "y":2}, + {"label":"K204", "x":4, "y":2.35}, + {"label":"K205", "x":5, "y":2.45}, + + {"label":"K206", "x":11, "y":2.45}, + {"label":"K207", "x":12, "y":2.35}, + {"label":"K208", "x":13, "y":2}, + {"label":"K209", "x":14, "y":2.25}, + {"label":"K210", "x":15, "y":2.75}, + {"label":"K211", "x":16, "y":2.75}, + + {"label":"K300", "x":0, "y":3.75}, + {"label":"K301", "x":1, "y":3.75}, + {"label":"K302", "x":2, "y":3.25}, + {"label":"K303", "x":3, "y":3}, + {"label":"K304", "x":4, "y":3.35}, + {"label":"K305", "x":5, "y":3.45}, + + {"label":"K306", "x":11, "y":3.45}, + {"label":"K307", "x":12, "y":3.35}, + {"label":"K308", "x":13, "y":3}, + {"label":"K309", "x":14, "y":3.25}, + {"label":"K310", "x":15, "y":3.75}, + {"label":"K311", "x":16, "y":3.75}, + + {"label":"K402", "x":4, "y":4.35}, + {"label":"K403", "x":5, "y":4.45}, + {"label":"K404", "x":6, "y":4.65}, + {"label":"K405", "x":7, "y":4.95}, + + {"label":"K406", "x":9, "y":4.95}, + {"label":"K407", "x":10, "y":4.65}, + {"label":"K408", "x":11, "y":4.45}, + {"label":"K409", "x":12, "y":4.35} + ] + } + } +} diff --git a/qmk/keyboards/handwired/pteron44/keymaps/default/keymap.c b/qmk/keyboards/handwired/pteron44/keymaps/default/keymap.c new file mode 100644 index 00000000..9eb2f7ff --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/keymaps/default/keymap.c @@ -0,0 +1,109 @@ +/* Copyright 2020 Fidel Coria + * + * 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 + +enum pteron_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * +-----------------------------------------+ +-----------------------------------------+ + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * +-------------+------+------+------+------| |------+------+------+------+-------------+ + * |Lower | SPC | Alt | GUI | | Ctrl | GUI | SPC |Raise | + * +---------------------------+ +---------------------------+ + */ +[_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + LOWER, KC_SPC, KC_LALT, KC_LGUI, KC_RCTL, KC_RGUI, KC_SPC, RAISE +), + +/* Lower + * +-----------------------------------------+ +-----------------------------------------+ + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | | | | + * +-------------+------+------+------+------| |------+------+------+------+-------------+ + * | | Next | Play | | | | Vol- | Vol+ | | + * +---------------------------+ +---------------------------+ + */ +[_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, KC_MNXT, KC_MPLY, _______, _______, KC_VOLD, KC_VOLU, _______ + +), + +/* Raise + * +-----------------------------------------+ +-----------------------------------------+ + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / | | | | + * +-------------+------+------+------+------| |------+------+------+------+-------------+ + * | | Next | Play | | | | Vol- | Vol+ | | + * +---------------------------+ +---------------------------+ + */ +[_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, KC_MNXT, KC_MPLY, _______, _______, KC_VOLD, KC_VOLU, _______ +), + +/* Adjust (Lower + Raise) + * +-----------------------------------------+ +-----------------------------------------+ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | Debug| Reset| | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | + * +---------------------------+ +---------------------------+ + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, DEBUG, RESET, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/qmk/keyboards/handwired/pteron44/pteron44.c b/qmk/keyboards/handwired/pteron44/pteron44.c new file mode 100644 index 00000000..e6c2ad50 --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/pteron44.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Fidel Coria + * + * 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 "pteron44.h" diff --git a/qmk/keyboards/handwired/pteron44/pteron44.h b/qmk/keyboards/handwired/pteron44/pteron44.h new file mode 100644 index 00000000..97182233 --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/pteron44.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Fidel Coria + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, \ + K402, K403, K404, K405, K406, K407, K408, K409 \ +) { \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \ + { KC_NO, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, KC_NO, KC_NO } \ +} diff --git a/qmk/keyboards/handwired/pteron44/readme.md b/qmk/keyboards/handwired/pteron44/readme.md new file mode 100644 index 00000000..88fd68ef --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/readme.md @@ -0,0 +1,15 @@ +# Pteron44 + +![Pteron44](https://raw.githubusercontent.com/FSund/pteron-keyboard/master/images/44key-switch-plate-square-holes.png) + +An ergonomic keyboard heavily inspired by the [Atreus](https://github.com/technomancy/atreus), [Iris](https://github.com/keebio/iris-case) and [Atreis](https://github.com/dekonnection/atreis) keyboards. More info and files for laser cutting plates and case are in the [Pteron repository](https://github.com/FSund/pteron-keyboard). + +* Keyboard Maintainer: [Fidel Coria](https://github.com/fidelcoria) +* Hardware Supported: Elite C +* Hardware Availability: Handwired, no PCB's available (for now) + +Make example for this keyboard (after setting up your build environment): + + make handwired/pteron44:default + +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). diff --git a/qmk/keyboards/handwired/pteron44/rules.mk b/qmk/keyboards/handwired/pteron44/rules.mk new file mode 100644 index 00000000..12c8a600 --- /dev/null +++ b/qmk/keyboards/handwired/pteron44/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/handwired/riblee_f401/config.h b/qmk/keyboards/handwired/riblee_f401/config.h index d8e7e7d6..6e5c0797 100644 --- a/qmk/keyboards/handwired/riblee_f401/config.h +++ b/qmk/keyboards/handwired/riblee_f401/config.h @@ -27,10 +27,6 @@ #define MATRIX_ROWS 5 #define MATRIX_COLS 12 -// Testing with onekey -// #define MATRIX_ROW_PINS { A7 } -// #define MATRIX_COL_PINS { B0 } - #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } #define UNUSED_PINS @@ -39,3 +35,7 @@ #define BACKLIGHT_PIN A0 #define BACKLIGHT_LEVELS 5 + +#define MOUSEKEY_INTERVAL 32 + +#define TAPPING_TERM 175 \ No newline at end of file diff --git a/qmk/keyboards/handwired/riblee_f401/keymaps/default/keymap.c b/qmk/keyboards/handwired/riblee_f401/keymaps/default/keymap.c index 40f64e18..4bb18634 100644 --- a/qmk/keyboards/handwired/riblee_f401/keymaps/default/keymap.c +++ b/qmk/keyboards/handwired/riblee_f401/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -48,15 +48,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_5x12( - 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_5x12( @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ), /* Raise @@ -147,24 +147,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | |Reset |Debug | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * | | | | | | | NKRO | Swap |Un swp| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_5x12( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - }; layer_state_t layer_state_set_user(layer_state_t state) { @@ -193,12 +192,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case BACKLIT: if (record->event.pressed) { - register_code(KC_RSFT); + register_code(keycode_config(KC_LGUI)); #ifdef BACKLIGHT_ENABLE backlight_step(); #endif } else { - unregister_code(KC_RSFT); + unregister_code(keycode_config(KC_LGUI)); } return false; break; diff --git a/qmk/keyboards/handwired/riblee_f401/riblee_f401.h b/qmk/keyboards/handwired/riblee_f401/riblee_f401.h index 306565a3..a1b326aa 100644 --- a/qmk/keyboards/handwired/riblee_f401/riblee_f401.h +++ b/qmk/keyboards/handwired/riblee_f401/riblee_f401.h @@ -1,5 +1,5 @@ /* -Copyright 2020 QMK Community, Daniel Reibl +Copyright 2020 QMK Community, Janos Daniel Reibl @riblee 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 diff --git a/qmk/keyboards/handwired/riblee_f401/rules.mk b/qmk/keyboards/handwired/riblee_f401/rules.mk index eab426a3..efe2522e 100644 --- a/qmk/keyboards/handwired/riblee_f401/rules.mk +++ b/qmk/keyboards/handwired/riblee_f401/rules.mk @@ -1,35 +1,13 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control KEYBOARD_SHARED_EP = yes @@ -38,9 +16,11 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = software RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output \ No newline at end of file +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_5x12 \ No newline at end of file diff --git a/qmk/keyboards/handwired/riblee_f411/config.h b/qmk/keyboards/handwired/riblee_f411/config.h new file mode 100644 index 00000000..a1aa122e --- /dev/null +++ b/qmk/keyboards/handwired/riblee_f411/config.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Daniel Reibl + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x002B +#define DEVICE_VER 0x0001 +#define MANUFACTURER Riblee +#define PRODUCT Handwired F411 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A1 +#define BACKLIGHT_LEVELS 5 + +#define MOUSEKEY_INTERVAL 32 + +#define TAPPING_TERM 175 \ No newline at end of file diff --git a/qmk/keyboards/handwired/riblee_f411/keymaps/default/keymap.c b/qmk/keyboards/handwired/riblee_f411/keymaps/default/keymap.c new file mode 100644 index 00000000..61b04fe6 --- /dev/null +++ b/qmk/keyboards/handwired/riblee_f411/keymaps/default/keymap.c @@ -0,0 +1,206 @@ +/* Copyright 2015-2017 Jack Humbert + * Copyright 2020 Daniel Reibl + * + * 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 + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + BACKLIT +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset |Debug | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | NKRO | Swap |Un swp| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(keycode_config(KC_LGUI)); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(keycode_config(KC_LGUI)); + } + return false; + break; + } + return true; +}; diff --git a/qmk/keyboards/handwired/riblee_f411/readme.md b/qmk/keyboards/handwired/riblee_f411/readme.md new file mode 100644 index 00000000..e59a307f --- /dev/null +++ b/qmk/keyboards/handwired/riblee_f411/readme.md @@ -0,0 +1,16 @@ +# Handwired Preonic + +A compact 50% (12x5) ortholinear keyboard. + +* Keyboard Maintainer: [Daniel Reibl](https://github.com/riblee) +* Hardware Supported: Blackpill F411 + +Make example for this keyboard (after setting up your build environment): + + make handwired/riblee_f411:default + +Flashing example for this keyboard: + + make handwired/riblee_f411: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). \ No newline at end of file diff --git a/qmk/keyboards/handwired/riblee_f411/riblee_f411.c b/qmk/keyboards/handwired/riblee_f411/riblee_f411.c new file mode 100644 index 00000000..20d3735e --- /dev/null +++ b/qmk/keyboards/handwired/riblee_f411/riblee_f411.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 "riblee_f411.h" \ No newline at end of file diff --git a/qmk/keyboards/handwired/riblee_f411/riblee_f411.h b/qmk/keyboards/handwired/riblee_f411/riblee_f411.h new file mode 100644 index 00000000..b06173aa --- /dev/null +++ b/qmk/keyboards/handwired/riblee_f411/riblee_f411.h @@ -0,0 +1,34 @@ +/* +Copyright 2020 QMK Community, Janos Daniel Reibl + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ +} diff --git a/qmk/keyboards/handwired/riblee_f411/rules.mk b/qmk/keyboards/handwired/riblee_f411/rules.mk new file mode 100644 index 00000000..40a72bdc --- /dev/null +++ b/qmk/keyboards/handwired/riblee_f411/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = STM32F411 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +KEYBOARD_SHARED_EP = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = software +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_5x12 diff --git a/qmk/keyboards/handwired/sick_pad/config.h b/qmk/keyboards/handwired/sick_pad/config.h new file mode 100644 index 00000000..f431daf3 --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 Joel Schneider + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDA20 +#define DEVICE_VER 0x0001 +#define MANUFACTURER FedorSosnin +#define PRODUCT SiCK-PAD + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B9, B15, B14, B13 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 diff --git a/qmk/keyboards/handwired/sick_pad/info.json b/qmk/keyboards/handwired/sick_pad/info.json new file mode 100644 index 00000000..68ff6b40 --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "sick_pad", + "url": "https://www.thingiverse.com/thing:3682168", + "maintainer": "jmschneider", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + } + } +} diff --git a/qmk/keyboards/handwired/sick_pad/keymaps/default/keymap.c b/qmk/keyboards/handwired/sick_pad/keymaps/default/keymap.c new file mode 100644 index 00000000..62e599fa --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Joel Schneider + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ) +}; diff --git a/qmk/keyboards/handwired/sick_pad/readme.md b/qmk/keyboards/handwired/sick_pad/readme.md new file mode 100644 index 00000000..5d3879c4 --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/readme.md @@ -0,0 +1,15 @@ +# SiCK-PAD + +![SiCK-PAD](https://cdn.thingiverse.com/assets/79/f6/22/c5/93/IMG_7816.JPG) + +The SiCK-PAD is a custom 3D printed mechanical numpad built from scratch without the price tag often associated with one. + +- Keyboard Maintainer: [jmschneider](https://github.com/jmschneider) +- Hardware Supported: QMK Proton C +- Hardware Availability: [files to print and documentation](https://www.thingiverse.com/thing:3682168) + +Make example for this keyboard (after setting up your build environment): + + make handwired/sick_pad:default + +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). diff --git a/qmk/keyboards/handwired/sick_pad/rules.mk b/qmk/keyboards/handwired/sick_pad/rules.mk new file mode 100644 index 00000000..bfe731ec --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LAYOUTS = numpad_5x4 diff --git a/qmk/keyboards/handwired/sick_pad/sick_pad.c b/qmk/keyboards/handwired/sick_pad/sick_pad.c new file mode 100644 index 00000000..3464545f --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/sick_pad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Joel Schneider + * + * 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 "sick_pad.h" diff --git a/qmk/keyboards/handwired/sick_pad/sick_pad.h b/qmk/keyboards/handwired/sick_pad/sick_pad.h new file mode 100644 index 00000000..2fe82388 --- /dev/null +++ b/qmk/keyboards/handwired/sick_pad/sick_pad.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Joel Schneider + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, KC_NO }, \ + { KC_NO, K41, K42, K43 } \ +} diff --git a/qmk/keyboards/handwired/swiftrax/astro65/astro65.c b/qmk/keyboards/handwired/swiftrax/astro65/astro65.c new file mode 100644 index 00000000..57586550 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/astro65.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Swiftrax + +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 "astro65.h" diff --git a/qmk/keyboards/handwired/swiftrax/astro65/astro65.h b/qmk/keyboards/handwired/swiftrax/astro65/astro65.h new file mode 100644 index 00000000..291a71aa --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/astro65.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ +#pragma once + +#include "quantum.h" + +// readability +#define XXXX KC_NO + +#define LAYOUT_65_ansi_blocker_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015,\ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115,\ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215,\ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315,\ + K400, K401, K402, K406, K410, K411, K412, K414, K415 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015},\ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, XXXX, K115},\ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXXX, XXXX, K215},\ + {K300, XXXX, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, XXXX, K314, K315},\ + {K400, K401, K402, XXXX, XXXX, XXXX, K406, XXXX, XXXX, XXXX, K410, K411, K412, XXXX, K414, K415} \ +} diff --git a/qmk/keyboards/handwired/swiftrax/astro65/config.h b/qmk/keyboards/handwired/swiftrax/astro65/config.h new file mode 100644 index 00000000..84cc9b53 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEAEF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Astro65 +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B3, F7, B1, B2 } +#define MATRIX_COL_PINS { E6, D5, C7, C6, B6, B5, B4, D7, D6, D4, F0, F1, F4, F5, F6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/qmk/keyboards/handwired/swiftrax/astro65/info.json b/qmk/keyboards/handwired/swiftrax/astro65/info.json new file mode 100644 index 00000000..767ec70a --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Astro65", + "url": "https://github.com/swiftrax", + "maintainer": "Swiftrax", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1, "y":0}, {"label":"0,2", "x":2, "y":0}, {"label":"0,3", "x":3, "y":0}, {"label":"0,4", "x":4, "y":0}, {"label":"0,5", "x":5, "y":0}, {"label":"0,6", "x":6, "y":0}, {"label":"0,7", "x":7, "y":0}, {"label":"0,8", "x":8, "y":0}, {"label":"0,9", "x":9, "y":0}, {"label":"0,10", "x":10, "y":0}, {"label":"0,11", "x":11, "y":0}, {"label":"0,12", "x":12, "y":0}, {"label":"0,13", "x":13, "y":0}, {"label":"0,14", "x":14, "y":0}, {"label":"0,15", "x":15, "y":0}, {"label":"1,0", "x":0, "y":1, "w":1.5}, {"label":"1,1", "x":1.5, "y":1}, {"label":"1,2", "x":2.5, "y":1}, {"label":"1,3", "x":3.5, "y":1}, {"label":"1,4", "x":4.5, "y":1}, {"label":"1,5", "x":5.5, "y":1}, {"label":"1,6", "x":6.5, "y":1}, {"label":"1,7", "x":7.5, "y":1}, {"label":"1,8", "x":8.5, "y":1}, {"label":"1,9", "x":9.5, "y":1}, {"label":"1,10", "x":10.5, "y":1}, {"label":"1,11", "x":11.5, "y":1}, {"label":"1,12", "x":12.5, "y":1}, {"label":"1,13", "x":13.5, "y":1, "w":1.5}, {"label":"1,15", "x":15, "y":1}, {"label":"2,0", "x":0, "y":2, "w":1.75}, {"label":"2,1", "x":1.75, "y":2}, {"label":"2,2", "x":2.75, "y":2}, {"label":"2,3", "x":3.75, "y":2}, {"label":"2,4", "x":4.75, "y":2}, {"label":"2,5", "x":5.75, "y":2}, {"label":"2,6", "x":6.75, "y":2}, {"label":"2,7", "x":7.75, "y":2}, {"label":"2,8", "x":8.75, "y":2}, {"label":"2,9", "x":9.75, "y":2}, {"label":"2,10", "x":10.75, "y":2}, {"label":"2,11", "x":11.75, "y":2}, {"label":"2,12", "x":12.75, "y":2, "w":2.25}, {"label":"2,15", "x":15, "y":2}, {"label":"3,0", "x":0, "y":3, "w":2.25}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3, "w":1.75}, {"label":"3,14", "x":14, "y":3}, {"label":"3,15", "x":15, "y":3}, {"label":"4,0", "x":0, "y":4, "w":1.25}, {"label":"4,1", "x":1.25, "y":4, "w":1.25}, {"label":"4,2", "x":2.5, "y":4, "w":1.25}, {"label":"4,6", "x":3.75, "y":4, "w":6.25}, {"label":"4,10", "x":10, "y":4, "w":1.25}, {"label":"4,11", "x":11.25, "y":4, "w":1.25}, {"label":"4,12", "x":13, "y":4}, {"label":"4,14", "x":14, "y":4}, {"label":"4,15", "x":15, "y":4}] + } + } +} diff --git a/qmk/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c b/qmk/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c new file mode 100644 index 00000000..d9fab28c --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Swiftrax + +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 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_split_bs( + 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_BSPC, KC_BSLS, KC_HOME, + 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_END , + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_split_bs( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), +}; diff --git a/qmk/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c b/qmk/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c new file mode 100644 index 00000000..839992fc --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Swiftrax + +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 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_split_bs( + 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_BSPC, KC_BSLS, KC_HOME, + 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_END , + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_split_bs( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), + +[2] = LAYOUT_65_ansi_blocker_split_bs( + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), + +[3] = LAYOUT_65_ansi_blocker_split_bs( + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), +}; diff --git a/qmk/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk b/qmk/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/handwired/swiftrax/astro65/readme.md b/qmk/keyboards/handwired/swiftrax/astro65/readme.md new file mode 100644 index 00000000..b5bf429a --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/readme.md @@ -0,0 +1,13 @@ +# Astro65 + +A 65% that uses Ai03's unified daughter board + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Astro65 +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/astro65:default + +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). diff --git a/qmk/keyboards/handwired/swiftrax/astro65/rules.mk b/qmk/keyboards/handwired/swiftrax/astro65/rules.mk new file mode 100644 index 00000000..1a5f11e3 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/astro65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker_split_bs diff --git a/qmk/keyboards/handwired/swiftrax/retropad/config.h b/qmk/keyboards/handwired/swiftrax/retropad/config.h new file mode 100644 index 00000000..e604eda4 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB0C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Retropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { C7, C6, B5 } +#define MATRIX_COL_PINS { B4, D2 } + +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/handwired/swiftrax/retropad/info.json b/qmk/keyboards/handwired/swiftrax/retropad/info.json new file mode 100644 index 00000000..9637c7b3 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Retropad", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 2, + "height": 3.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,1", "x":0.5, "y":0}, {"label":"1,0", "x":0, "y":1.5}, {"label":"1,1", "x":1, "y":1.5}, {"label":"2,0", "x":0, "y":2.5}, {"label":"2,1", "x":1, "y":2.5}] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c b/qmk/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c new file mode 100644 index 00000000..8b9992e1 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/qmk/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c b/qmk/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c new file mode 100644 index 00000000..8b9992e1 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/qmk/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk b/qmk/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/handwired/swiftrax/retropad/readme.md b/qmk/keyboards/handwired/swiftrax/retropad/readme.md new file mode 100644 index 00000000..5dd2e2df --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/readme.md @@ -0,0 +1,13 @@ +# Retropad + +2x2 macro pad with a rotary encoder + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Retropad PCB +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/retropad:default + +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). diff --git a/qmk/keyboards/handwired/swiftrax/retropad/retropad.c b/qmk/keyboards/handwired/swiftrax/retropad/retropad.c new file mode 100644 index 00000000..3ffe2952 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/retropad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * 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 "retropad.h" \ No newline at end of file diff --git a/qmk/keyboards/handwired/swiftrax/retropad/retropad.h b/qmk/keyboards/handwired/swiftrax/retropad/retropad.h new file mode 100644 index 00000000..e7527d5c --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/retropad.h @@ -0,0 +1,31 @@ +/* Copyright 2020 swiftrax + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K001, \ + K100, K101, \ + K200, K201 \ +) { \ + { XXX, K001, }, \ + { K100, K101, }, \ + { K200, K201, } \ +} diff --git a/qmk/keyboards/handwired/swiftrax/retropad/rules.mk b/qmk/keyboards/handwired/swiftrax/retropad/rules.mk new file mode 100644 index 00000000..8771c701 --- /dev/null +++ b/qmk/keyboards/handwired/swiftrax/retropad/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/qmk/keyboards/handwired/t111/chconf.h b/qmk/keyboards/handwired/t111/chconf.h new file mode 100644 index 00000000..f5e47164 --- /dev/null +++ b/qmk/keyboards/handwired/t111/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/handwired/t111/config.h b/qmk/keyboards/handwired/t111/config.h new file mode 100644 index 00000000..e459e765 --- /dev/null +++ b/qmk/keyboards/handwired/t111/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2020 DmNosachev + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6FAA +#define DEVICE_VER 0x0001 +#define MANUFACTURER FUJITSU +#define PRODUCT T111 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { A15, B6, B5, B4, B3, B9, B8, B7 } +/* 0 1 2 3 4 5 6 7*/ +#define MATRIX_COL_PINS { B15, B11, B10, B1, B0, A10, A9, A7, A6, A5, A4, A8, B13, B14 } +/* 0 1 2 3 4 5 6 7 8 9 A B C D*/ + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/handwired/t111/halconf.h b/qmk/keyboards/handwired/t111/halconf.h new file mode 100644 index 00000000..ff5ae7e8 --- /dev/null +++ b/qmk/keyboards/handwired/t111/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/handwired/t111/info.json b/qmk/keyboards/handwired/t111/info.json new file mode 100644 index 00000000..b31fed51 --- /dev/null +++ b/qmk/keyboards/handwired/t111/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "t111", + "url": "", + "maintainer": "DmNosachev", + "width": 21.75, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Break", "x":0, "y":0}, {"label":"PF1", "x":2, "y":0}, {"label":"PF2", "x":3, "y":0}, {"label":"PF3", "x":4, "y":0}, {"label":"PF4", "x":5, "y":0}, {"label":"PF5", "x":6, "y":0}, {"label":"PF6", "x":7, "y":0}, {"label":"PF7", "x":8, "y":0}, {"label":"PF8", "x":9, "y":0}, {"label":"PF9", "x":10, "y":0}, {"label":"PF10", "x":11, "y":0}, {"label":"PF11", "x":12, "y":0}, {"label":"PF12", "x":13, "y":0}, {"label":"PF13", "x":14, "y":0}, {"label":"PF14", "x":15, "y":0}, {"label":"PF15", "x":16, "y":0}, {"label":"PF16", "x":17, "y":0}, {"label":"Esc", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"~", "x":13, "y":1.5}, {"label":"bkspc", "x":14, "y":1.5, "w":1.25}, {"label":"Ins", "x":15.5, "y":1.5}, {"label":"Cls", "x":16.5, "y":1.5}, {"label":"*", "x":17.75, "y":1.5}, {"label":"/", "x":18.75, "y":1.5}, {"label":"+", "x":19.75, "y":1.5}, {"label":"-", "x":20.75, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"El", "x":15.5, "y":2.5}, {"label":"Dup", "x":16.5, "y":2.5}, {"label":"7", "x":17.75, "y":2.5}, {"label":"8", "x":18.75, "y":2.5}, {"label":"9", "x":19.75, "y":2.5}, {"label":"=", "x":20.75, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"|", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.5, "h":2}, {"label":"Del", "x":15.5, "y":3.5}, {"label":"Home", "x":16.5, "y":3.5}, {"label":"4", "x":17.75, "y":3.5}, {"label":"5", "x":18.75, "y":3.5}, {"label":"6", "x":19.75, "y":3.5}, {"label":",", "x":20.75, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"x":12.25, "y":4.5}, {"label":"Shift", "x":13.25, "y":4.5, "w":2}, {"label":"\u0432\u2020\u2018", "x":15.5, "y":4.5}, {"label":"\u0432\u2020\u201c", "x":16.5, "y":4.5}, {"label":"1", "x":17.75, "y":4.5}, {"label":"2", "x":18.75, "y":4.5}, {"label":"3", "x":19.75, "y":4.5}, {"label":"Enter", "x":20.75, "y":4.5, "h":2}, {"label":"Caps", "x":1.75, "y":5.5}, {"label":"Graph", "x":2.75, "y":5.5, "w":1.5}, {"x":4.25, "y":5.5, "w":8}, {"label":"Alt", "x":12.25, "y":5.5, "w":1.5}, {"label":"\u0432\u2020\u0452", "x":15.5, "y":5.5}, {"label":"\u0432\u2020\u2019", "x":16.5, "y":5.5}, {"label":"0", "x":17.75, "y":5.5, "w":2}, {"label":".", "x":19.75, "y":5.5}] + } + } +} diff --git a/qmk/keyboards/handwired/t111/keymaps/default/keymap.c b/qmk/keyboards/handwired/t111/keymaps/default/keymap.c new file mode 100644 index 00000000..e76a837d --- /dev/null +++ b/qmk/keyboards/handwired/t111/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 DmNosachev + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | xxx | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | xxx |PrnSc| ScLk|Pause| | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | ins | del | |NumLk| / | * | - | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | PgUp| PgDn| | 7 | 8 | 9 | += | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | home| end | | 4 | 5 | 6 | + | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | shift | Z | X | C | V | B | N | M | , | . | /? | ctrl| shift | up | down| | 1 | 2 | 3 |enter| + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | gui | alt | Space | alt | | left|right| | 0 | . | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + KC_NO, 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_NO, KC_PSCR, KC_SLCK, KC_PAUS, + 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_GRV, KC_BSPC, KC_INS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_PGUP, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_EQL, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_HOME, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTRL, KC_RSFT, KC_UP, KC_DOWN, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +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/qmk/keyboards/handwired/t111/keymaps/oleg/config.h b/qmk/keyboards/handwired/t111/keymaps/oleg/config.h new file mode 100644 index 00000000..22ae5bcf --- /dev/null +++ b/qmk/keyboards/handwired/t111/keymaps/oleg/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 DmNosachev + +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 . +*/ + +#pragma once + +#define UNICODE_SELECTED_MODES UC_WIN, UC_WINC \ No newline at end of file diff --git a/qmk/keyboards/handwired/t111/keymaps/oleg/keymap.c b/qmk/keyboards/handwired/t111/keymaps/oleg/keymap.c new file mode 100644 index 00000000..63342af7 --- /dev/null +++ b/qmk/keyboards/handwired/t111/keymaps/oleg/keymap.c @@ -0,0 +1,145 @@ +/* Copyright 2020 DmNosachev + * + * 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 +#include "debug.h" +#include "version.h" + +enum custom_keycodes { + VRSN = SAFE_RANGE, + MC1 +}; + +enum unicode_names { + USCT, + ULSB, + URSB, + USCO, + UAPO, + UCOM, + UDOT, + USLS, + ULCB, + URCB, + UCLN, + UQOT, + ULTH, + UGTH, + UQUE, + UGRV, + UTLD, + UAT, + UHSH, + UDLR, + UPCT, + UCFX, + UAMP, + UAST +}; + +const uint32_t PROGMEM unicode_map[] = { + [USCT] = 0x00A7, // § + [ULSB] = 0x005B, // [ + [URSB] = 0x005D, // ] + [USCO] = 0x003B, // ; + [UAPO] = 0x0027, // ' + [UCOM] = 0x002C, // , + [UDOT] = 0x002E, // . + [USLS] = 0x002F, // slash + [ULCB] = 0x007B, // { + [URCB] = 0x007D, // } + [UCLN] = 0x003A, // : + [UQOT] = 0x0022, // " + [ULTH] = 0x003C, // < + [UGTH] = 0x003E, // > + [UQUE] = 0x003F, // ? + [UGRV] = 0x0060, // ` + [UTLD] = 0x007E, // ~ + [UAT] = 0x0040, // at + [UHSH] = 0x0023, // hash + [UDLR] = 0x0024, // dollar + [UPCT] = 0x0025, // percent + [UCFX] = 0x005E, // ^ + [UAMP] = 0x0026, // & + [UAST] = 0x002A, // asterisk +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | gui | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Vol-| Vol+| Mute|Pause| | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | PgUp| Home| |NumLk| / | * | - | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | PgDn| End| | 7 | 8 | 9 | += | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | Del |NumLk| | 4 | 5 | 6 | + | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | shift | Z | X | C | V | B | N | M | , | . | /? | [] | shift | up | down| | 1 | 2 | 3 |enter| + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | caps | alt | Space | Fn | | left|right| | 0 | . | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + KC_LGUI, 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_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, + 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_GRV, KC_BSPC, KC_PGUP, KC_HOME, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_ENT, KC_PGDN, KC_END, KC_P7, KC_P8, KC_P9, KC_EQL, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_DEL, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC1, KC_RSFT, KC_UP, KC_DOWN, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_CAPS, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_RGHT, KC_P0, KC_PDOT + ), +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | VRSN| |Sleep| |Umode| | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | | @ | # | $ | § | ^ | & | * | | | | | | | | | | |Calc | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | mb1 | m↑ | mb2 | mb3 | | | |SysRq|ScrLk|Pause| | | | | | | | | | | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | | m← | m↓ | m→ | mb5 | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | | | mb4 | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [1] = LAYOUT( + VRSN, KC_SLEP, _______, UC_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, X(UAT), X(UHSH), X(UDLR), X(USCT), X(UCFX), X(UAMP), X(UAST), _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, _______, _______, _______, KC_SYSREQ, KC_SLCK, KC_PAUS, XP(ULSB, ULCB), XP(URSB, URCB), _______, _______, _______, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, _______, _______, _______, _______, _______, XP(USCO, UCLN), XP(UAPO, UQOT), _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN4, _______, _______, _______, _______, XP(UCOM, ULTH), XP(UDOT, UGTH), XP(USLS, UQUE), KC_APP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + + case MC1: + if (record->event.pressed) { + send_unicode_string("[]"); + } + return false; + break; + } + return true; +} diff --git a/qmk/keyboards/handwired/t111/keymaps/oleg/rules.mk b/qmk/keyboards/handwired/t111/keymaps/oleg/rules.mk new file mode 100644 index 00000000..0517619e --- /dev/null +++ b/qmk/keyboards/handwired/t111/keymaps/oleg/rules.mk @@ -0,0 +1 @@ +UNICODEMAP_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/handwired/t111/mcuconf.h b/qmk/keyboards/handwired/t111/mcuconf.h new file mode 100644 index 00000000..60d9931c --- /dev/null +++ b/qmk/keyboards/handwired/t111/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ \ No newline at end of file diff --git a/qmk/keyboards/handwired/t111/readme.md b/qmk/keyboards/handwired/t111/readme.md new file mode 100644 index 00000000..31bbc2a7 --- /dev/null +++ b/qmk/keyboards/handwired/t111/readme.md @@ -0,0 +1,45 @@ +# QMK-based firmware for Fujitsu N860-2500-T111 keyboard + +![Fujitsu T111](https://i.imgur.com/aGtg7FMl.jpg) + +Fujitsu N860-2500-T111 keyboard conversion project: direct connection of Black Pill to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: [Fujitsu N860-2500-T111](https://deskthority.net/viewtopic.php?t=17087), Black Pill STM32F103C8T6 MCU board. Alternatively you can use any MCU which is supported by QMK and has 22 or more IO pins: Arduino Micro, Teensy 2.0, Teensy 2.0++, Blue Pill, etc. +* Thanks to Deskthority user *OldIsNew* for the matrix decoding. + +Make example for this keyboard (after setting up your build environment): + + make handwired/t111:default + +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). + +# Modding + +## Matrix + +Fujitsu N860-2500-T111 has 14x8 matrix. It's ghost-free thanks to the diodes. + +Rows (0-7) and columns (0-D): +![T111 rows and columns](https://i.imgur.com/37MxQG8h.jpg) + +## Black Pill +Suggested mount position for the Black Pill (view from the top side of the PCB): + +``` + C1 C2 C3 C4 C7 C8 C9 CA R5 R6 +,--------------------------------------------------------------------, +|B11 B10 B1 B0 A7 A6 A5 A4 A3 A2 A1 A0 RST C13 B9 B8 GND |---, +| |USB| +|B12 B13 B14 B15 A8 A9 A10 A11 A12 A15 B3 B4 B5 B6 B7 3V3 GND |---' +'--------------------------------------------------------------------' + CC CD C0 CB C6 C5 R0 R4 R3 R2 R1 R7 +``` + +![Black Pill](https://i.imgur.com/lJfdAQTh.jpg) + +1. Desolder all ICs, capacitors and resistors. +1. Solder 4-pin SWD header to Black Pill. +2. Burn [STM32duino bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/bootloader_only_binaries/generic_boot20_pb12.bin) to Black Pill. +3. Compile and flash the firmware: `make handwired/t111:default:flash` +4. Connect rows and columns to the corresponding pins of the Black Pill. diff --git a/qmk/keyboards/handwired/t111/rules.mk b/qmk/keyboards/handwired/t111/rules.mk new file mode 100644 index 00000000..1c391242 --- /dev/null +++ b/qmk/keyboards/handwired/t111/rules.mk @@ -0,0 +1,24 @@ +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/handwired/t111/t111.c b/qmk/keyboards/handwired/t111/t111.c new file mode 100644 index 00000000..f61e3424 --- /dev/null +++ b/qmk/keyboards/handwired/t111/t111.c @@ -0,0 +1,17 @@ +/* Copyright 2020 DmNosachev + * + * 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 "t111.h" diff --git a/qmk/keyboards/handwired/t111/t111.h b/qmk/keyboards/handwired/t111/t111.h new file mode 100644 index 00000000..35651f63 --- /dev/null +++ b/qmk/keyboards/handwired/t111/t111.h @@ -0,0 +1,57 @@ +/* Copyright 2020 DmNosachev + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* +,-------------------------------------------------------------------------------------------------------------------------------------. +|break| | PF1 | PF2 | PF3 | PF4 | PF5 | PF6 | PF7 | PF8 | PF9 | PF10| PF11| PF12| PF13| PF14| PF15| PF16| | +|-------------------------------------------------------------------------------------------------------------------------------------| +| esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | ins | cls | | * | / | + | - | +|-------------------------------------------------------------------------------------------------------------------------------------| +| tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | el | dup | | 7 | 8 | 9 | = | +|-------------------------------------------------------------------------------- |--------------------------------------| +| ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | del | home| | 4 | 5 | 6 | , | +|-------------------------------------------------------------------------------------------------------------------------------------| +| shift | Z | X | C | V | B | N | M | , | . | /? |blank| shift | up | down| | 1 | 2 | 3 |enter| +|-------------------------------------------------------------------------------------------------------------------------------| | +| | caps| graph | Space | alt | | left|right| | 0 | . | | +`-------------------------------------------------------------------------------------------------------------------------------------' +*/ + +#define LAYOUT( \ + K30, K40, K11, K21, K31, K41, K51, K61, K71, K01, K12, K22, K32, K42, K52, K62, K72, \ + K20, K13, K23, K33, K43, K53, K63, K73, K03, K14, K24, K34, K44, K54, K58, K64, K74, K15, K06, K76, K66, \ + K10, K17, K27, K37, K47, K57, K67, K77, K07, K18, K28, K38, K48, K68, K78, K1B, K00, K70, K60, \ + K0A, K19, K29, K39, K49, K59, K69, K79, K09, K1A, K2A, K3A, K4A, K5A, K6A, K7A, K2B, K3B, K4B, K5B, \ + K0D, K1C, K2C, K3C, K4C, K5C, K6C, K7C, K0C, K1D, K2D, K3D, K04, K6D, K7D, K25, K35, K45, K55, \ + K08, K0B, K50, K05, K6B, K7B, K65, K75 \ +) \ +{ \ +/* 0 */ { K00, K01, XXX, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ +/* 1 */ { K10, K11, K12, K13, K14, K15, XXX, K17, K18, K19, K1A, K1B, K1C, K1D }, \ +/* 2 */ { K20, K21, K22, K23, K24, K25, XXX, K27, K28, K29, K2A, K2B, K2C, K2D }, \ +/* 3 */ { K30, K31, K32, K33, K34, K35, XXX, K37, K38, K39, K3A, K3B, K3C, K3D }, \ +/* 4 */ { K40, K41, K42, K43, K44, K45, XXX, K47, K48, K49, K4A, K4B, K4C, XXX }, \ +/* 5 */ { K50, K51, K52, K53, K54, K55, XXX, K57, K58, K59, K5A, K5B, K5C, XXX }, \ +/* 6 */ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D }, \ +/* 7 */ { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D } \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D */ diff --git a/qmk/keyboards/handwired/z150/rules.mk b/qmk/keyboards/handwired/z150/rules.mk index fd1d3820..d86e9f6e 100644 --- a/qmk/keyboards/handwired/z150/rules.mk +++ b/qmk/keyboards/handwired/z150/rules.mk @@ -1,12 +1,7 @@ MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO -STM32_BOOTLOADER_ADDRESS = 0x80000000 - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/handwired/zergo/config.h b/qmk/keyboards/handwired/zergo/config.h index 55fbd280..8bac9970 100644 --- a/qmk/keyboards/handwired/zergo/config.h +++ b/qmk/keyboards/handwired/zergo/config.h @@ -33,18 +33,11 @@ along with this program. If not, see . /* key matrix pins */ #define MATRIX_ROW_PINS { B1, D7, C3, D6, D5, D4 } #define MATRIX_COL_PINS { C7, C6, C5, C4, C2, C1, B7, D3, D2, B6, B5, B4, B3, B2 } -#define UNUSED_PINS +#define UNUSED_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, C0, E0, E1, E4, E5, F0, F1, F2, F3, F4, F5, F6, F7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* number of backlight levels */ - /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -/* 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 diff --git a/qmk/keyboards/handwired/zergo/keymaps/default/keymap.c b/qmk/keyboards/handwired/zergo/keymaps/default/keymap.c index a9dcc82a..19a2b9b2 100644 --- a/qmk/keyboards/handwired/zergo/keymaps/default/keymap.c +++ b/qmk/keyboards/handwired/zergo/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 E.Zelianin + /* Copyright 2020 E.Zelianin * * 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 @@ -16,22 +16,37 @@ #include QMK_KEYBOARD_H +// Each layer gets a name for readability. +enum zergo_layers { + l_main, + l_arrows, +}; + +//define keycode custom names to better structure view of layout +#define K_SPCFN LT(l_arrows,KC_SPC) // tap for space, hold for arrows layer +#define K_SHHOME MT(MOD_LSFT,KC_HOME) // tap for home, hold for shift +#define K_CEND MT(MOD_LCTL,KC_END) // tap for end, hoild for control +#define K_SHPGUP MT(MOD_RSFT,KC_PGUP) // tap for pageup, hoLd for shift +#define K_CPGDN MT(MOD_RCTL, KC_PGDN) // tap for pagedown, hold for control +#define K_LNG LCTL(KC_LSFT) // control+shift (to change lahguage) +#define K_CENTER MT(MOD_RCTL,KC_ENTER) // tap for enter, hold for control + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - 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_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RCTL, - MT(MOD_LSFT, KC_HOME), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC, MT(MOD_RSFT, KC_PGUP), - MT(MOD_LCTL, KC_END), KC_DOWN, KC_RGHT, KC_LALT, KC_SPC, KC_ENT, KC_SPC, KC_RALT, KC_LGUI, KC_MENU, MT(MOD_RCTL, KC_PGDN)), +[l_main] = LAYOUT( + 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_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, K_LNG, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, K_CENTER, + K_SHHOME, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC, K_SHPGUP, + K_CEND, KC_NO, KC_NO, KC_LALT, KC_SPC, KC_ENT, K_SPCFN, KC_RALT, KC_APP, KC_RGUI, K_CPGDN), - LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, - 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_ENT, KC_UP, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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), +[l_arrows] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_ENT, KC_UP, KC_BSPC, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______), }; diff --git a/qmk/keyboards/handwired/zergo/rules.mk b/qmk/keyboards/handwired/zergo/rules.mk index e633ab39..ea5530ff 100644 --- a/qmk/keyboards/handwired/zergo/rules.mk +++ b/qmk/keyboards/handwired/zergo/rules.mk @@ -7,16 +7,16 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/handwired/zergo/zergo.h b/qmk/keyboards/handwired/zergo/zergo.h index 5b769586..ba653216 100644 --- a/qmk/keyboards/handwired/zergo/zergo.h +++ b/qmk/keyboards/handwired/zergo/zergo.h @@ -19,17 +19,17 @@ #include "quantum.h" #define LAYOUT( \ - K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K206, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K306, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, K312, K313, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ - K500, K501, K502, K503, K505, K506, K507, K509, K511, K512, K513 \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K206, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K306, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K503, K505, K506, K507, K509, K510, K512, K513 \ ) { \ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, KC_NO, K509, KC_NO, K511, K512, K513 } \ + { K500, K501, K502, K503, KC_NO, K505, K506, K507, KC_NO, K509, K510, KC_NO, K512, K513 } \ } diff --git a/qmk/keyboards/helix/helix.h b/qmk/keyboards/helix/helix.h index d3d3b041..b900d975 100644 --- a/qmk/keyboards/helix/helix.h +++ b/qmk/keyboards/helix/helix.h @@ -8,6 +8,12 @@ #ifdef KEYBOARD_helix_rev2 #include "rev2.h" #endif +#ifdef KEYBOARD_helix_rev3_5rows + #include "rev3_5rows.h" +#endif +#ifdef KEYBOARD_helix_rev3_4rows + #include "rev3_4rows.h" +#endif #ifdef KEYBOARD_helix_pico #include "pico.h" #endif diff --git a/qmk/keyboards/helix/readme.md b/qmk/keyboards/helix/readme.md index e1161cfd..0c190f76 100644 --- a/qmk/keyboards/helix/readme.md +++ b/qmk/keyboards/helix/readme.md @@ -5,9 +5,9 @@ Helix A compact split ortholinear keyboard. -Keyboard Maintainer: [Makoto Kurauchi](https://github.com/MakotoKurauchi/) [@pluis9](https://twitter.com/pluis9) -Hardware Supported: Helix PCB Alpha, Beta, Pro Micro -Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix) +Keyboard Maintainer: [Makoto Kurauchi](https://github.com/MakotoKurauchi/) [@pluis9](https://twitter.com/pluis9) [yushakobo](https://github.com/yushakobo) +Hardware Supported: Helix PCB Alpha, Beta, Rev3, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/MakotoKurauchi/helix), [Yushakobo Shop](https://yushakobo.jp/shop/), [Little Keyboards](https://littlekeyboards.com/collections/helix) ## How to build * [Helix how to Customize and Compile](rev2/keymaps/default/readme.md#customize) diff --git a/qmk/keyboards/helix/rev3_4rows/config.h b/qmk/keyboards/helix/rev3_4rows/config.h new file mode 100644 index 00000000..bc695d99 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2020 yushakobo + +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 . +*/ + +#pragma once + +#include "config_common.h" +#include + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3265 //yushakobo +#define PRODUCT_ID 0x0004 //Helix rev3 4rows +#define DEVICE_VER 0x0001 +#define MANUFACTURER yushakobo +#define PRODUCT Helix rev3 4rows + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Split hand configration */ +#define SPLIT_HAND_MATRIX_GRID D7,B2 +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT + +/* Dip switch on matrix grid */ +#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} } + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 50 // Number of LEDs + +#ifdef RGB_MATRIX_ENABLE + #define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #define RGBLED_SPLIT { 25, 25 } +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Custom font */ +#define OLED_FONT_H "keyboards/helix/common/glcdfont.c" + +/* Encorder */ +#define ENCODERS_PAD_A { B6 } +#define ENCODERS_PAD_B { B5 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/helix/rev3_4rows/info.json b/qmk/keyboards/helix/rev3_4rows/info.json new file mode 100644 index 00000000..0ad2a7c3 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "Helix rev3 4rows", + "url": "", + "maintainer": "yushakobo", + "width": 15, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3} + ] + } + } +} diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/default/config.h b/qmk/keyboards/helix/rev3_4rows/keymaps/default/config.h new file mode 100644 index 00000000..ba446182 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/default/keymap.c b/qmk/keyboards/helix/rev3_4rows/keymaps/default/keymap.c new file mode 100644 index 00000000..a9a2c4ac --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/default/keymap.c @@ -0,0 +1,193 @@ +/* Copyright 2020 yushakobo + * + * 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 + + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + EISU = SAFE_RANGE, + KANA, + ADJUST, + RGBRST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST|EEPRST| | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, RGBRST, EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left side encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Right side encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EISU: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG2); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG1); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_LOWER); + layer_on(_RAISE); + } else { + layer_off(_LOWER); + layer_off(_RAISE); + } + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +/* +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool led_update_user(led_t led_state) { + return true; +} +*/ diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/default/readme.md b/qmk/keyboards/helix/rev3_4rows/keymaps/default/readme.md new file mode 100644 index 00000000..e7470968 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/default/readme.md @@ -0,0 +1,66 @@ +# The default keymap for Helix rev3 4rows + +### Qwerty Layer (Base) +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | +`-------------------------------------------------------------------------------------------------' +``` +### Lower Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' +``` +### Raise Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' +``` +### Adjust Layer (Lower + Raise) +``` +,-----------------------------------------. ,-----------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | Reset|RGBRST|EEPRST| | | | | | | | | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | MODE | HUE- | SAT- | VAL- | +`-------------------------------------------------------------------------------------------------' +``` + +### Rotary Encoder Settings + +|L/R|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Page Down|Page Up| +|Right|Down|Up| + +### DipSW Settings + +|Switch No.|| +|---|---| +|Left 1|Toggle Win/mac| +|Left 2|Not assigned| +|Right 1|Not assigned| +|Right 2|Not assigned| diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/via/config.h b/qmk/keyboards/helix/rev3_4rows/keymaps/via/config.h new file mode 100644 index 00000000..ba446182 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/via/keymap.c b/qmk/keyboards/helix/rev3_4rows/keymaps/via/keymap.c new file mode 100644 index 00000000..5611c96b --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/via/keymap.c @@ -0,0 +1,180 @@ +/* Copyright 2020 yushakobo + * + * 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 + + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + EISU = SAFE_RANGE, + KANA, + ADJUST, + RGBRST +}; + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + MO(_ADJUST), KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST| | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left side encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Right side encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EISU: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG2); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG1); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +/* +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool led_update_user(led_t led_state) { + return true; +} +*/ diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/via/readme.md b/qmk/keyboards/helix/rev3_4rows/keymaps/via/readme.md new file mode 100644 index 00000000..34030075 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/via/readme.md @@ -0,0 +1,66 @@ +# The default VIA keymap for Helix rev3 4rows + +### Qwerty Layer (Base) +``` +,-----------------------------------------. ,-----------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | +`-------------------------------------------------------------------------------------------------' +``` +### Lower Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' +``` +### Raise Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | +|------+------+------+------+------+------+-------------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' +``` +### Adjust Layer (Lower + Raise) +``` +,-----------------------------------------. ,-----------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | Reset|RGBRST| | | | | | | | | | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | MODE | HUE- | SAT- | VAL- | +`-------------------------------------------------------------------------------------------------' +``` + +### Rotary Encoder Settings + +|L/R|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Page Down|Page Up| +|Right|Down|Up| + +### DipSW Settings + +|Switch No.|| +|---|---| +|Left 1|Toggle Win/mac| +|Left 2|Not assigned| +|Right 1|Not assigned| +|Right 2|Not assigned| diff --git a/qmk/keyboards/helix/rev3_4rows/keymaps/via/rules.mk b/qmk/keyboards/helix/rev3_4rows/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/helix/rev3_4rows/oled_display.c b/qmk/keyboards/helix/rev3_4rows/oled_display.c new file mode 100644 index 00000000..7716a172 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/oled_display.c @@ -0,0 +1,123 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +/* + How to Customize + + $ make helix/rev3_4rows:YOUR_KEYMAP:clean + $ cp keyboards/helix/rev3_4rows/oled_display.c keyboards/helix/rev3_4rows/keymaps/YOUR_KEYMAP + + $ edit keyboards/helix/rev3_4rows/keymaps/YOUR_KEYMAP/oled_display.c + $ make helix/rev3_4rows:YOUR_KEYMAP + $ make helix/rev3_4rows:YOUR_KEYMAP:flash + */ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_status(void) { + + // Render to mode icon + static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if (is_mac_mode()) { + oled_write_P(os_logo[0][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[0][1], false); + }else{ + oled_write_P(os_logo[1][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[1][1], false); + } + + oled_write_P(PSTR(" "), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + oled_write_P(PSTR("\n"), false); + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +} + + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +static void render_rgbled_status(bool full) { +#ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) { + if (full) { + snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", + rgblight_get_mode(), + rgblight_get_hue()/RGBLIGHT_HUE_STEP, + rgblight_get_sat()/RGBLIGHT_SAT_STEP, + rgblight_get_val()/RGBLIGHT_VAL_STEP); + } else { + snprintf(buf, sizeof(buf), "[%2d] ", rgblight_get_mode()); + } + oled_write(buf, false); + } +#endif +} + +void oled_task_user(void) { + if(is_keyboard_master()){ + render_status(); + }else{ + render_logo(); + render_rgbled_status(true); + } +} +#endif diff --git a/qmk/keyboards/helix/rev3_4rows/readme.md b/qmk/keyboards/helix/rev3_4rows/readme.md new file mode 100644 index 00000000..25e856ba --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/readme.md @@ -0,0 +1,13 @@ +# Helix rev3 4rows + +A compact split ortholinear keyboard. + +* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo) +* Hardware Supported: Helix rev3 PCBs, Pro Micro +* Hardware Availability: (Under preparation) + +Make example for this keyboard (after setting up your build environment): + + make helix/rev3_4rows: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). diff --git a/qmk/keyboards/helix/rev3_4rows/rev3_4rows.c b/qmk/keyboards/helix/rev3_4rows/rev3_4rows.c new file mode 100644 index 00000000..cf183366 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/rev3_4rows.c @@ -0,0 +1,48 @@ +/* Copyright 2020 yushakobo + * + * 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 "helix.h" + +bool is_mac_mode(void) { + return keymap_config.swap_lalt_lgui == false; +} + +void set_mac_mode(bool macmode) { + if (macmode) { + /* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI) key. */ + /* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124 */ + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false; + } else { + /* The result is the same as pressing the AG_SWAP(=MAGIC_SWAP_ALT_GUI) key. */ + /* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81 */ + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true; + } +} + +void dip_switch_update_kb(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { // Left no.1 Helix rev3 common + set_mac_mode(false); + } else { + set_mac_mode(true); + } + break; + default: // Left no.2 or Right no.1 or Right no.2 for user/keymap + dip_switch_update_user(index, active); + break; + } +} diff --git a/qmk/keyboards/helix/rev3_4rows/rev3_4rows.h b/qmk/keyboards/helix/rev3_4rows/rev3_4rows.h new file mode 100644 index 00000000..dc1e2d5d --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/rev3_4rows.h @@ -0,0 +1,47 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +bool is_mac_mode(void); +void set_mac_mode(bool macmode); + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { R05, R04, R03, R02, R01, R00, KC_NO }, \ + { R15, R14, R13, R12, R11, R10, KC_NO }, \ + { R25, R24, R23, R22, R21, R20, KC_NO }, \ + { R35, R34, R33, R32, R31, R30, R36 }, \ + } diff --git a/qmk/keyboards/helix/rev3_4rows/rules.mk b/qmk/keyboards/helix/rev3_4rows/rules.mk new file mode 100644 index 00000000..7168f174 --- /dev/null +++ b/qmk/keyboards/helix/rev3_4rows/rules.mk @@ -0,0 +1,10 @@ +EXTRAKEY_ENABLE = yes # Audio control and System control +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +SPLIT_KEYBOARD = yes +#RGB_MATRIX_ENABLE = WS2812 +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes +DIP_SWITCH_ENABLE = yes +LTO_ENABLE = yes + +SRC += oled_display.c diff --git a/qmk/keyboards/helix/rev3_5rows/config.h b/qmk/keyboards/helix/rev3_5rows/config.h new file mode 100644 index 00000000..bea91400 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2020 yushakobo + +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 . +*/ + +#pragma once + +#include "config_common.h" +#include + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3265 //yushakobo +#define PRODUCT_ID 0x0003 //Helix rev3 5rows +#define DEVICE_VER 0x0001 +#define MANUFACTURER yushakobo +#define PRODUCT Helix rev3 5rows + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Split hand configration */ +#define SPLIT_HAND_MATRIX_GRID D7,B2 +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT + +/* Dip switch on matrix grid */ +#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {5,6}, {6,6} } + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 64 // Number of LEDs + +#ifdef RGB_MATRIX_ENABLE + #define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #define RGBLED_SPLIT { 32, 32 } +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Custom font */ +#define OLED_FONT_H "keyboards/helix/common/glcdfont.c" + +/* Encorder */ +#define ENCODERS_PAD_A { B6 } +#define ENCODERS_PAD_B { B5 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/helix/rev3_5rows/info.json b/qmk/keyboards/helix/rev3_5rows/info.json new file mode 100644 index 00000000..14a61994 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Helix rev3 5rows", + "url": "", + "maintainer": "yushakobo", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/default/config.h b/qmk/keyboards/helix/rev3_5rows/keymaps/default/config.h new file mode 100644 index 00000000..ba446182 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/default/keymap.c b/qmk/keyboards/helix/rev3_5rows/keymaps/default/keymap.c new file mode 100644 index 00000000..18b55913 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/default/keymap.c @@ -0,0 +1,203 @@ +/* Copyright 2020 yushakobo + * + * 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 + + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + EISU = SAFE_RANGE, + KANA, + ADJUST, + RGBRST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST|EEPRST| | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | Mac | | Win | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, RGBRST, EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left side encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Right side encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EISU: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG2); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG1); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_LOWER); + layer_on(_RAISE); + } else { + layer_off(_LOWER); + layer_off(_RAISE); + } + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +/* +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool led_update_user(led_t led_state) { + return true; +} +*/ diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/default/readme.md b/qmk/keyboards/helix/rev3_5rows/keymaps/default/readme.md new file mode 100644 index 00000000..423443ba --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/default/readme.md @@ -0,0 +1,81 @@ +# The default keymap for Helix rev3 5rows + +### Qwerty Layer (Base) +``` +,-----------------------------------------. ,-----------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | +`-------------------------------------------------------------------------------------------------' + +``` + +### Lower Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' + +``` + + +### Raise Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| | | | | | | | | | | | | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' + +``` + +### Adjust Layer (Lower + Raise) +``` +,-----------------------------------------. ,-----------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | Reset|RGBRST|EEPRST| | | | | | | | | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | Mac | | Win | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | MODE | HUE- | SAT- | VAL- | +`-------------------------------------------------------------------------------------------------' +``` + +### Rotary Encoder Settings + +|L/R|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Page Down|Page Up| +|Right|Down|Up| + +### DipSW Settings + +|Switch No.|| +|---|---| +|Left 1|Toggle Win/mac| +|Left 2|Not assigned| +|Right 1|Not assigned| +|Right 2|Not assigned| diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/via/config.h b/qmk/keyboards/helix/rev3_5rows/keymaps/via/config.h new file mode 100644 index 00000000..ba446182 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/via/keymap.c b/qmk/keyboards/helix/rev3_5rows/keymaps/via/keymap.c new file mode 100644 index 00000000..903e2637 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/via/keymap.c @@ -0,0 +1,190 @@ +/* Copyright 2020 yushakobo + * + * 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 + + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + EISU = SAFE_RANGE, + KANA, + ADJUST, + RGBRST +}; + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + MO(_ADJUST), KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST| | | | | | | | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | Mac | | Win | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | MODE | HUE- | SAT- | VAL- | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left side encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Right side encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EISU: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG2); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if (is_mac_mode()) { + register_code(KC_LANG1); + }else{ + tap_code16(LALT(KC_GRAVE)); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +/* +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool led_update_user(led_t led_state) { + return true; +} +*/ diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/via/readme.md b/qmk/keyboards/helix/rev3_5rows/keymaps/via/readme.md new file mode 100644 index 00000000..d3ea17f1 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/via/readme.md @@ -0,0 +1,81 @@ +# The default VIA keymap for Helix rev3 5rows + +### Qwerty Layer (Base) +``` +,-----------------------------------------. ,-----------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | +`-------------------------------------------------------------------------------------------------' + +``` + +### Lower Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| | | | | | | | | | | | | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' + +``` + + +### Raise Layer +``` +,-----------------------------------------. ,-----------------------------------------. +| | | | | | | | | | | | | Bksp | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | Next | Vol- | Vol+ | Play | +`-------------------------------------------------------------------------------------------------' + +``` + +### Adjust Layer (Lower + Raise) +``` +,-----------------------------------------. ,-----------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | Reset|RGBRST| | | | | | | | | | Del | +|------+------+------+------+------+------| |------+------+------+------+------+------| +| | | | | | Mac | | Win | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | +|------+------+------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | MODE | HUE- | SAT- | VAL- | +`-------------------------------------------------------------------------------------------------' +``` + +### Rotary Encoder Settings + +|L/R|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Page Down|Page Up| +|Right|Down|Up| + +### DipSW Settings + +|Switch No.|| +|---|---| +|Left 1|Toggle Win/mac| +|Left 2|Not assigned| +|Right 1|Not assigned| +|Right 2|Not assigned| diff --git a/qmk/keyboards/helix/rev3_5rows/keymaps/via/rules.mk b/qmk/keyboards/helix/rev3_5rows/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/helix/rev3_5rows/oled_display.c b/qmk/keyboards/helix/rev3_5rows/oled_display.c new file mode 100644 index 00000000..ffe8b594 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/oled_display.c @@ -0,0 +1,123 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + + /* + How to Customize + + $ make helix/rev3_5rows:YOUR_KEYMAP:clean + $ cp keyboards/helix/rev3_5rows/oled_display.c keyboards/helix/rev3_5rows/keymaps/YOUR_KEYMAP + + $ edit keyboards/helix/rev3_5rows/keymaps/YOUR_KEYMAP/oled_display.c + $ make helix/rev3_5rows:YOUR_KEYMAP + $ make helix/rev3_5rows:YOUR_KEYMAP:flash + */ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_status(void) { + + // Render to mode icon + static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if (is_mac_mode()) { + oled_write_P(os_logo[0][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[0][1], false); + }else{ + oled_write_P(os_logo[1][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[1][1], false); + } + + oled_write_P(PSTR(" "), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + oled_write_P(PSTR("\n"), false); + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +} + + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +static void render_rgbled_status(bool full) { +#ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) { + if (full) { + snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", + rgblight_get_mode(), + rgblight_get_hue()/RGBLIGHT_HUE_STEP, + rgblight_get_sat()/RGBLIGHT_SAT_STEP, + rgblight_get_val()/RGBLIGHT_VAL_STEP); + } else { + snprintf(buf, sizeof(buf), "[%2d] ", rgblight_get_mode()); + } + oled_write(buf, false); + } +#endif +} + +void oled_task_user(void) { + if(is_keyboard_master()){ + render_status(); + }else{ + render_logo(); + render_rgbled_status(true); + } +} +#endif diff --git a/qmk/keyboards/helix/rev3_5rows/readme.md b/qmk/keyboards/helix/rev3_5rows/readme.md new file mode 100644 index 00000000..ff7e2cd5 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/readme.md @@ -0,0 +1,13 @@ +# Helix rev3 5rows + +A compact split ortholinear keyboard. + +* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo) +* Hardware Supported: Helix rev3 PCBs, Pro Micro +* Hardware Availability: (Under preparation) + +Make example for this keyboard (after setting up your build environment): + + make helix/rev3_5rows: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). diff --git a/qmk/keyboards/helix/rev3_5rows/rev3_5rows.c b/qmk/keyboards/helix/rev3_5rows/rev3_5rows.c new file mode 100644 index 00000000..cf183366 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/rev3_5rows.c @@ -0,0 +1,48 @@ +/* Copyright 2020 yushakobo + * + * 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 "helix.h" + +bool is_mac_mode(void) { + return keymap_config.swap_lalt_lgui == false; +} + +void set_mac_mode(bool macmode) { + if (macmode) { + /* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI) key. */ + /* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124 */ + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = false; + } else { + /* The result is the same as pressing the AG_SWAP(=MAGIC_SWAP_ALT_GUI) key. */ + /* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81 */ + keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = true; + } +} + +void dip_switch_update_kb(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { // Left no.1 Helix rev3 common + set_mac_mode(false); + } else { + set_mac_mode(true); + } + break; + default: // Left no.2 or Right no.1 or Right no.2 for user/keymap + dip_switch_update_user(index, active); + break; + } +} diff --git a/qmk/keyboards/helix/rev3_5rows/rev3_5rows.h b/qmk/keyboards/helix/rev3_5rows/rev3_5rows.h new file mode 100644 index 00000000..1e3121d7 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/rev3_5rows.h @@ -0,0 +1,50 @@ +/* Copyright 2020 yushakobo + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +bool is_mac_mode(void); +void set_mac_mode(bool macmode); + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R05, R04, R03, R02, R01, R00, KC_NO }, \ + { R15, R14, R13, R12, R11, R10, KC_NO }, \ + { R25, R24, R23, R22, R21, R20, KC_NO }, \ + { R35, R34, R33, R32, R31, R30, R36 }, \ + { R45, R44, R43, R42, R41, R40, R46 } \ + } diff --git a/qmk/keyboards/helix/rev3_5rows/rules.mk b/qmk/keyboards/helix/rev3_5rows/rules.mk new file mode 100644 index 00000000..7168f174 --- /dev/null +++ b/qmk/keyboards/helix/rev3_5rows/rules.mk @@ -0,0 +1,10 @@ +EXTRAKEY_ENABLE = yes # Audio control and System control +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +SPLIT_KEYBOARD = yes +#RGB_MATRIX_ENABLE = WS2812 +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes +DIP_SWITCH_ENABLE = yes +LTO_ENABLE = yes + +SRC += oled_display.c diff --git a/qmk/keyboards/id87/config.h b/qmk/keyboards/id87/config.h new file mode 100644 index 00000000..e0a81eb7 --- /dev/null +++ b/qmk/keyboards/id87/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2020 Tybera +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6964 // "id" +#define PRODUCT_ID 0x0087 +#define DEVICE_VER 0x0001 +#define MANUFACTURER IDOBAO +#define PRODUCT IDOBAO ID87 + +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * 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) + * +*/ + +#define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B7, F7, F6, F5, F4, F1 } + +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define CAPS_LOCK_LED_PIN C7 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 22 /* 16 Bottom 6 top*/ +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/qmk/keyboards/id87/id87.c b/qmk/keyboards/id87/id87.c new file mode 100644 index 00000000..0ec1c76b --- /dev/null +++ b/qmk/keyboards/id87/id87.c @@ -0,0 +1,32 @@ +/* +Copyright 2020 Tybera +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 "id87.h" + +void matrix_init_kb(void) { + led_init_ports(); + matrix_init_user(); +} + +void led_init_ports(void) { + setPinOutput(CAPS_LOCK_LED_PIN); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); + } + return res; +} \ No newline at end of file diff --git a/qmk/keyboards/id87/id87.h b/qmk/keyboards/id87/id87.h new file mode 100644 index 00000000..1a75d957 --- /dev/null +++ b/qmk/keyboards/id87/id87.h @@ -0,0 +1,40 @@ +/* +Copyright 2020 Tybera +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_tkl_ansi( \ + K00, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58 }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} + + diff --git a/qmk/keyboards/id87/info.json b/qmk/keyboards/id87/info.json new file mode 100644 index 00000000..f07ac746 --- /dev/null +++ b/qmk/keyboards/id87/info.json @@ -0,0 +1,100 @@ +{ + "keyboard_name": "ID87", + "url": "https://www.idobao.net/products/idobao-id87-80-hot-swappable-mechanical-keyboard-kit", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"-", "x":11, "y":1.5}, + {"label":"=", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[", "x":11.5, "y":2.5}, + {"label":"]", "x":12.5, "y":2.5}, + {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";", "x":10.75, "y":3.5}, + {"label":"'", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",", "x":9.25, "y":4.5}, + {"label":".", "x":10.25, "y":4.5}, + {"label":"/", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"LT(1, KC_APP)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/qmk/keyboards/id87/keymaps/default/keymap.c b/qmk/keyboards/id87/keymaps/default/keymap.c new file mode 100644 index 00000000..2b07bdb0 --- /dev/null +++ b/qmk/keyboards/id87/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Tybera +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, + _______, BL_TOGG, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC, RGB_MOD + ), + +}; diff --git a/qmk/keyboards/id87/keymaps/default/readme.md b/qmk/keyboards/id87/keymaps/default/readme.md new file mode 100644 index 00000000..6054431d --- /dev/null +++ b/qmk/keyboards/id87/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for id87 \ No newline at end of file diff --git a/qmk/keyboards/id87/keymaps/via/keymap.c b/qmk/keyboards/id87/keymaps/via/keymap.c new file mode 100644 index 00000000..53478455 --- /dev/null +++ b/qmk/keyboards/id87/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Tybera +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, + _______, BL_TOGG, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC, RGB_MOD + ), + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/id87/keymaps/via/rules.mk b/qmk/keyboards/id87/keymaps/via/rules.mk new file mode 100644 index 00000000..ca9fed0e --- /dev/null +++ b/qmk/keyboards/id87/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes diff --git a/qmk/keyboards/id87/readme.md b/qmk/keyboards/id87/readme.md new file mode 100644 index 00000000..ee3604f8 --- /dev/null +++ b/qmk/keyboards/id87/readme.md @@ -0,0 +1,19 @@ +# IDOBAO ID87 + +![ID87](https://cdn.shopify.com/s/files/1/0382/1348/4675/products/6601EE887B14D36DE54CA137F0E383AE_1024x1024.jpg) + +A TKL hotswap board from IDOBAO. + +* Keyboard Maintainer: Tybera +* Hardware Supported: IDOBAO ID87, atmega32u4 +* Hardware Availability: [Idobao](https://www.idobao.net/products/idobao-id87-80-hot-swappable-mechanical-keyboard-kit) + +Make example for this keyboard (after setting up your build environment): + + make id87:default + +Flashing example for this keyboard: + + make id87: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). diff --git a/qmk/keyboards/id87/rules.mk b/qmk/keyboards/id87/rules.mk new file mode 100644 index 00000000..35ecb290 --- /dev/null +++ b/qmk/keyboards/id87/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = tkl_ansi diff --git a/qmk/keyboards/inett_studio/sqx/hotswap/config.h b/qmk/keyboards/inett_studio/sqx/hotswap/config.h index a59ad3e7..174b948c 100644 --- a/qmk/keyboards/inett_studio/sqx/hotswap/config.h +++ b/qmk/keyboards/inett_studio/sqx/hotswap/config.h @@ -70,3 +70,8 @@ #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) #define RGB_MATRIX_DISABLE_KEYCODES #endif + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 +#define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/qmk/keyboards/inett_studio/sqx/universal/config.h b/qmk/keyboards/inett_studio/sqx/universal/config.h index a4a5b42c..7fa41fae 100644 --- a/qmk/keyboards/inett_studio/sqx/universal/config.h +++ b/qmk/keyboards/inett_studio/sqx/universal/config.h @@ -70,3 +70,8 @@ #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) # define RGB_MATRIX_DISABLE_KEYCODES #endif + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 +#define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/qmk/keyboards/jagdpietr/drakon/config.h b/qmk/keyboards/jagdpietr/drakon/config.h new file mode 100644 index 00000000..f9565e41 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/config.h @@ -0,0 +1,114 @@ +/* +Copyright 2020 jagdpietr + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER jagdpietr +#define PRODUCT drakon + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { C7, B5, B6, B0, B1, F1 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C6, B2, B3, B7, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { F0 } + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/jagdpietr/drakon/drakon.c b/qmk/keyboards/jagdpietr/drakon/drakon.c new file mode 100644 index 00000000..ca25ac31 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/drakon.c @@ -0,0 +1,225 @@ +/* Copyright 2020 jagdpietr + * + * 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 "drakon.h" + +char wpm_str[10]; + +__attribute__((weak)) +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +__attribute__((weak)) +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +static void render_status(void) { + //Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + +} + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 128 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00, + 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84, + 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x03, 0x03, 0x02, 0x06, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x10, 0x10, 0x30, 0x20, 0x3f, 0x00 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00, + 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04, + 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00, + 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x03, 0x02, 0x02, 0x06, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x30, 0x21, 0x3f, 0x38 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00, + 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2, + 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70, + 0x30, 0x38, 0x19, 0x0f, 0x1e, 0x1c, 0x79, 0xf8, 0xe8, 0xc4, 0x84, 0x08, 0x08, 0x18, 0x1f, 0x1c + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +__attribute__((weak)) +void oled_task_user(void) { + + render_anim(); + oled_set_cursor(0,6); + sprintf(wpm_str, " WPM: %03d", get_current_wpm()); + oled_set_cursor(0,5); + oled_write(wpm_str, false); + + render_status(); + + } + +#endif diff --git a/qmk/keyboards/jagdpietr/drakon/drakon.h b/qmk/keyboards/jagdpietr/drakon/drakon.h new file mode 100644 index 00000000..68315914 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/drakon.h @@ -0,0 +1,91 @@ +/* Copyright 2020 jagdpietr + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + + +/* LAYOUT_ansi + * ,---------------------------------------------------------. .---. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D|2D| |5C | + * |---------------------------------------------------------| ,-----------. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | |5A |5D |59 | + * |---------------------------------------------------------| `-----------' + * |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2A |2B |2C | |5B | + * |---------------------------------------------------------. `---' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B | |3C | + * |--------------------------------------------------'--`---'---. + * |40 |41 |42 | 43 |49 |4A | |4B |4C |4D | + * `----------------------------------------------' `-----------' + */ + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K5C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K5A, K5D, K59, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K5B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, K41, K42, K43, XXX, XXX, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D } \ +} + +/* LAYOUT_wkl + * ,---------------------------------------------------------. .---. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D|2D| |5C | + * |---------------------------------------------------------| ,-----------. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | |5A |5D |59 | + * |---------------------------------------------------------| `-----------' + * |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2A |2B |2C | |5B | + * |---------------------------------------------------------. `---' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B | |3C | + * |--------------------------------------------------'--`---'---. + * |40 | |42 | 43 |49 |4A | |4B |4C |4D | + * `----------------------------------------------' `-----------' + */ + +#define LAYOUT_wkl( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K5C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K5A, K5D, K59, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K5B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K42, K43, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, XXX, K42, K43, XXX, XXX, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D } \ +} diff --git a/qmk/keyboards/jagdpietr/drakon/info.json b/qmk/keyboards/jagdpietr/drakon/info.json new file mode 100644 index 00000000..328bdba9 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "drakon", + "url": "", + "maintainer": "jagdpietr", + "width": 18.25, + "height": 5.25, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":16.25, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":16.25, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.25}, {"x":13.75, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.75, "y":4.25}, {"x":13.75, "y":4.25}, {"x":14.75, "y":4.25}] + }, + "LAYOUT_wkl": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":16.25, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":16.25, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.25}, {"x":13.75, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":1.75, "y":4, "w":1.25}, {"x":3, "y":4, "w":7}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.75, "y":4.25}, {"x":13.75, "y":4.25}, {"x":14.75, "y":4.25}] + } + } +} diff --git a/qmk/keyboards/jagdpietr/drakon/keymaps/default/keymap.c b/qmk/keyboards/jagdpietr/drakon/keymaps/default/keymap.c new file mode 100644 index 00000000..70ec6845 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 jagdpietr + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_ansi( + KC_GESC, 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_DEL, KC_MUTE, + 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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_ansi( + 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_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_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_ansi( + 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/qmk/keyboards/jagdpietr/drakon/keymaps/default/readme.md b/qmk/keyboards/jagdpietr/drakon/keymaps/default/readme.md new file mode 100644 index 00000000..e56b5a93 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for drakon diff --git a/qmk/keyboards/jagdpietr/drakon/keymaps/wkl/keymap.c b/qmk/keyboards/jagdpietr/drakon/keymaps/wkl/keymap.c new file mode 100644 index 00000000..79582353 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/keymaps/wkl/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 jagdpietr + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_wkl( + KC_GESC, 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_DEL, KC_MUTE, + 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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_wkl( + 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_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_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_wkl( + 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_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_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) + +}; diff --git a/qmk/keyboards/jagdpietr/drakon/keymaps/wkl/readme.md b/qmk/keyboards/jagdpietr/drakon/keymaps/wkl/readme.md new file mode 100644 index 00000000..46356035 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The Winkeyless keymap for drakon diff --git a/qmk/keyboards/jagdpietr/drakon/readme.md b/qmk/keyboards/jagdpietr/drakon/readme.md new file mode 100644 index 00000000..f20bdfdf --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/readme.md @@ -0,0 +1,14 @@ +# drakon + +![drakon](https://i.imgur.com/J5PkdURl.jpg) + +60% keyboard with OLED and 4-directional press Encoder + +* Keyboard Maintainer: [jagdpietr](https://github.com/JagdPietr) +* Hardware Supported: Atmega32u4-AU + +Make example for this keyboard (after setting up your build environment): + + make drakon:default + +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). diff --git a/qmk/keyboards/jagdpietr/drakon/rules.mk b/qmk/keyboards/jagdpietr/drakon/rules.mk new file mode 100644 index 00000000..a74fce28 --- /dev/null +++ b/qmk/keyboards/jagdpietr/drakon/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes +WPM_ENABLE = yes +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/qmk/keyboards/jian/keymaps/advanced/keymap.c b/qmk/keyboards/jian/keymaps/advanced/keymap.c index 417678f7..25108aa1 100644 --- a/qmk/keyboards/jian/keymaps/advanced/keymap.c +++ b/qmk/keyboards/jian/keymaps/advanced/keymap.c @@ -191,7 +191,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_base_wrapper(QWERTY_base), #ifdef DIPS_ENABLE -[_DIPS] = LAYOUT_DIPS(\ +[_DIPS] = LAYOUT_dips(\ LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH, \ LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH \ ), diff --git a/qmk/keyboards/jian/nsrev2/nsrev2.c b/qmk/keyboards/jian/nsrev2/nsrev2.c index a7508ad9..c3acff55 100644 --- a/qmk/keyboards/jian/nsrev2/nsrev2.c +++ b/qmk/keyboards/jian/nsrev2/nsrev2.c @@ -1,7 +1,7 @@ #include "nsrev2.h" -// TODO: #ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}}, @@ -14,6 +14,7 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { }; #endif +#ifdef BACKLIGHT_ENABLE static bool backlight_was_toggled = false; void suspend_power_down_kb(void) { @@ -29,6 +30,7 @@ void suspend_wakeup_init_kb(void) { backlight_was_toggled = false; } } +#endif #ifdef PHYSICAL_LEDS_ENABLE void led_init_kb(void) diff --git a/qmk/keyboards/jian/rev1/rev1.c b/qmk/keyboards/jian/rev1/rev1.c index f1cfe991..1c7e9362 100644 --- a/qmk/keyboards/jian/rev1/rev1.c +++ b/qmk/keyboards/jian/rev1/rev1.c @@ -14,6 +14,7 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { }; #endif +#ifdef BACKLIGHT_ENABLE static bool backlight_was_toggled = false; void suspend_power_down_kb(void) { @@ -29,6 +30,7 @@ void suspend_wakeup_init_kb(void) { backlight_was_toggled = false; } } +#endif #ifdef PHYSICAL_LEDS_ENABLE void led_init_kb(void) diff --git a/qmk/keyboards/jian/rev2/rev2.c b/qmk/keyboards/jian/rev2/rev2.c index 6f4808de..09824c66 100644 --- a/qmk/keyboards/jian/rev2/rev2.c +++ b/qmk/keyboards/jian/rev2/rev2.c @@ -14,6 +14,7 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { }; #endif +#ifdef BACKLIGHT_ENABLE static bool backlight_was_toggled = false; void suspend_power_down_kb(void) { @@ -29,6 +30,7 @@ void suspend_wakeup_init_kb(void) { backlight_was_toggled = false; } } +#endif #ifdef PHYSICAL_LEDS_ENABLE void led_init_kb(void) diff --git a/qmk/keyboards/jisplit89/config.h b/qmk/keyboards/jisplit89/config.h index cfb6bf4f..c9b55e7a 100644 --- a/qmk/keyboards/jisplit89/config.h +++ b/qmk/keyboards/jisplit89/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 Salicylic_Acid 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 diff --git a/qmk/keyboards/jisplit89/jisplit89.c b/qmk/keyboards/jisplit89/jisplit89.c index f57f71a6..0f03aa4c 100644 --- a/qmk/keyboards/jisplit89/jisplit89.c +++ b/qmk/keyboards/jisplit89/jisplit89.c @@ -1 +1,18 @@ +/* +Copyright 2020 Salicylic_Acid + +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 "jisplit89.h" diff --git a/qmk/keyboards/jisplit89/jisplit89.h b/qmk/keyboards/jisplit89/jisplit89.h index ab1ed00b..b59b5a66 100644 --- a/qmk/keyboards/jisplit89/jisplit89.h +++ b/qmk/keyboards/jisplit89/jisplit89.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Salicylic_Acid + +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 . +*/ + #pragma once #ifdef KEYBOARD_jisplit89_rev1 diff --git a/qmk/keyboards/jisplit89/keymaps/default/keymap.c b/qmk/keyboards/jisplit89/keymaps/default/keymap.c index 787e74c4..bfbb0989 100644 --- a/qmk/keyboards/jisplit89/keymaps/default/keymap.c +++ b/qmk/keyboards/jisplit89/keymaps/default/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Salicylic_Acid + +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 #include "keymap_jp.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -46,30 +63,18 @@ LT(_ADJUST,KC_ZKHK),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7 ) }; -int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool result = false; - switch (keycode) { + switch (keycode) { #ifdef RGBLIGHT_ENABLE - case RGB_MOD: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_get_mode(); - } - break; case RGB_RST: if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_get_mode(); + uint8_t mode = rgblight_get_mode(); + eeconfig_update_rgblight_default(); + rgblight_enable(); + rgblight_mode(mode); } - break; + break; #endif - default: - result = true; - break; - } - - return result; + } + return true; } diff --git a/qmk/keyboards/jisplit89/keymaps/salicylic/keymap.c b/qmk/keyboards/jisplit89/keymaps/salicylic/keymap.c index 350292db..e4102796 100644 --- a/qmk/keyboards/jisplit89/keymaps/salicylic/keymap.c +++ b/qmk/keyboards/jisplit89/keymaps/salicylic/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Salicylic_Acid + +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 #include "keymap_jp.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -110,34 +127,22 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX //A description for expressing the layer position in LED mode. layer_state_t layer_state_set_user(layer_state_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); -return state; + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); } int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool result = false; - switch (keycode) { + switch (keycode) { #ifdef RGBLIGHT_ENABLE - case RGB_MOD: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_get_mode(); - } - break; case RGB_RST: if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_get_mode(); + uint8_t mode = rgblight_get_mode(); + eeconfig_update_rgblight_default(); + rgblight_enable(); + rgblight_mode(mode); } - break; + break; #endif - default: - result = true; - break; - } - - return result; + } + return true; } diff --git a/qmk/keyboards/jisplit89/keymaps/salicylic/rules.mk b/qmk/keyboards/jisplit89/keymaps/salicylic/rules.mk index 0bcbf86d..8db22809 100644 --- a/qmk/keyboards/jisplit89/keymaps/salicylic/rules.mk +++ b/qmk/keyboards/jisplit89/keymaps/salicylic/rules.mk @@ -1,2 +1,2 @@ TAP_DANCE_ENABLE = yes -MOUSEKEY_ENABLE = yes \ No newline at end of file +MOUSEKEY_ENABLE = yes diff --git a/qmk/keyboards/jisplit89/keymaps/via/config.h b/qmk/keyboards/jisplit89/keymaps/via/config.h new file mode 100644 index 00000000..08bcdab7 --- /dev/null +++ b/qmk/keyboards/jisplit89/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Salicylic_acid3 + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/qmk/keyboards/jisplit89/keymaps/via/keymap.c b/qmk/keyboards/jisplit89/keymaps/via/keymap.c new file mode 100644 index 00000000..61bcadbc --- /dev/null +++ b/qmk/keyboards/jisplit89/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* +Copyright 2020 Salicylic_Acid + +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 +#include "keymap_jp.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + 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_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +LT(1,KC_ZKHK),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, JP_YEN, KC_BSPC, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_ENT, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_QUOT, JP_RBRC, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_PGDN, KC_UP, KC_PGUP, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_HENK, KC_KANA, KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + [1] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + MO(1), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + [2] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; diff --git a/qmk/keyboards/jisplit89/keymaps/via/rules.mk b/qmk/keyboards/jisplit89/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/jisplit89/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/jisplit89/rev1/config.h b/qmk/keyboards/jisplit89/rev1/config.h index a2ba9040..ee5f2ca0 100644 --- a/qmk/keyboards/jisplit89/rev1/config.h +++ b/qmk/keyboards/jisplit89/rev1/config.h @@ -1,5 +1,5 @@ /* -Copyright 2020 Salicylic_acid3 +Copyright 2020 Salicylic_Acid 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 @@ -18,12 +18,11 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x06ae +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB4F +#define DEVICE_VER 0x0001 #define MANUFACTURER Salicylic_Acid #define PRODUCT jisplit89 -#define DESCRIPTION A custom keyboard /* key matrix size */ #define MATRIX_ROWS 14 diff --git a/qmk/keyboards/jisplit89/rev1/rev1.c b/qmk/keyboards/jisplit89/rev1/rev1.c index 520a869e..13e201e6 100644 --- a/qmk/keyboards/jisplit89/rev1/rev1.c +++ b/qmk/keyboards/jisplit89/rev1/rev1.c @@ -1 +1,18 @@ +/* +Copyright 2020 Salicylic_Acid + +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 "rev1.h" diff --git a/qmk/keyboards/jisplit89/rev1/rev1.h b/qmk/keyboards/jisplit89/rev1/rev1.h index 13fb08df..71515f5e 100644 --- a/qmk/keyboards/jisplit89/rev1/rev1.h +++ b/qmk/keyboards/jisplit89/rev1/rev1.h @@ -1,12 +1,26 @@ +/* +Copyright 2020 Salicylic_Acid + +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 . +*/ + #pragma once #include "jisplit89.h" #include "quantum.h" -////////////////////////////////////////////////////////////////////////////// -// When only use JISplit89. -////////////////////////////////////////////////////////////////////////////// /* * ,-------------------------------------- ----------------------------------------------------------. * | L00 | L01 | L02 | L03 | L04 | L05 | | R00 | R01 | R02 | R03 | R04 | R05 | R06 | R07 | R60 | diff --git a/qmk/keyboards/jisplit89/rules.mk b/qmk/keyboards/jisplit89/rules.mk index c78aa66b..9c714e88 100644 --- a/qmk/keyboards/jisplit89/rules.mk +++ b/qmk/keyboards/jisplit89/rules.mk @@ -2,20 +2,12 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = caterina # Build Options # change yes to no to disable - # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/qmk/keyboards/kbdfans/bella/soldered/config.h b/qmk/keyboards/kbdfans/bella/soldered/config.h new file mode 100644 index 00000000..0d729beb --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/config.h @@ -0,0 +1,42 @@ +/* Copyright 2020 dztech + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B42 +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFANS +#define PRODUCT BELLA SOLDERED +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, D1, B6 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define DEBOUNCE 5 +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE diff --git a/qmk/keyboards/kbdfans/bella/soldered/info.json b/qmk/keyboards/kbdfans/bella/soldered/info.json new file mode 100644 index 00000000..5ecd7470 --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/info.json @@ -0,0 +1,95 @@ +{ + "keyboard_name": "bella_soldered", + "url": "", + "maintainer": "kbdfans", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Page Up", "x":15.25, "y":0}, + {"label":"~", "x":0, "y":1.25}, + {"label":"!", "x":1, "y":1.25}, + {"label":"@", "x":2, "y":1.25}, + {"label":"#", "x":3, "y":1.25}, + {"label":"$", "x":4, "y":1.25}, + {"label":"%", "x":5, "y":1.25}, + {"label":"^", "x":6, "y":1.25}, + {"label":"&", "x":7, "y":1.25}, + {"label":"*", "x":8, "y":1.25}, + {"label":"(", "x":9, "y":1.25}, + {"label":")", "x":10, "y":1.25}, + {"label":"_", "x":11, "y":1.25}, + {"label":"+", "x":12, "y":1.25}, + {"label":"~", "x":13, "y":1.25}, + {"label":"Backspace", "x":14, "y":1.25}, + {"label":"Insert", "x":15.25, "y":1.25}, + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":6.5, "y":2.25}, + {"label":"U", "x":7.5, "y":2.25}, + {"label":"I", "x":8.5, "y":2.25}, + {"label":"O", "x":9.5, "y":2.25}, + {"label":"P", "x":10.5, "y":2.25}, + {"label":"{", "x":11.5, "y":2.25}, + {"label":"}", "x":12.5, "y":2.25}, + {"label":"|", "x":13.5, "y":2.25, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.25}, + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":6.75, "y":3.25}, + {"label":"J", "x":7.75, "y":3.25}, + {"label":"K", "x":8.75, "y":3.25}, + {"label":"L", "x":9.75, "y":3.25}, + {"label":":", "x":10.75, "y":3.25}, + {"label":"\"", "x":11.75, "y":3.25}, + {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, + {"label":"Page Down", "x":15.25, "y":3.25}, + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"ISO Backslash", "x":1.25, "y":4.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":7.25, "y":4.25}, + {"label":"M", "x":8.25, "y":4.25}, + {"label":"<", "x":9.25, "y":4.25}, + {"label":">", "x":10.25, "y":4.25}, + {"label":"?", "x":11.25, "y":4.25}, + {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":14.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Alt", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt", "x":10, "y":5.25, "w":1.5}, + {"label":"Win", "x":11.5, "y":5.25, "w":1.5}, + {"label":"Left", "x":13.25, "y":5.5}, + {"label":"Down", "x":14.25, "y":5.5}, + {"label":"Right", "x":15.25, "y":5.5} + ] + } + } +} diff --git a/qmk/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c b/qmk/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c new file mode 100644 index 00000000..94e001ac --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 dztech + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + 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_PGUP, + 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_GRV, 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_DEL, + 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_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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + 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, 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) + +}; diff --git a/qmk/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c b/qmk/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c new file mode 100644 index 00000000..c75a4155 --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 dztech + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + 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_PGUP, + 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_GRV, 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_DEL, + 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_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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + 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, 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), + + LAYOUT_all( + 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, 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), + + LAYOUT_all( + 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, 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) +}; diff --git a/qmk/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk b/qmk/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/kbdfans/bella/soldered/readme.md b/qmk/keyboards/kbdfans/bella/soldered/readme.md new file mode 100644 index 00000000..057110b5 --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/readme.md @@ -0,0 +1,19 @@ +# Bella Soldered + +![Bella Soldered](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kbdfans/bella/soldered/kbdfans_bella_soldered.jpg) + +A 75% keyboard kit featuring offset arrow keys. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681), [The QMK Community](https://github.com/qmk) +* Hardware Supported: Bella soldered PCB; ATmega32U4 +* Hardware Availability: [KBDfans](https://kbdfans.com/collections/bella) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/bella/soldered:default + +Flashing example for this keyboard: + + make kbdfans/bella/soldered: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). diff --git a/qmk/keyboards/kbdfans/bella/soldered/rules.mk b/qmk/keyboards/kbdfans/bella/soldered/rules.mk new file mode 100644 index 00000000..b0ed9e41 --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/kbdfans/bella/soldered/soldered.c b/qmk/keyboards/kbdfans/bella/soldered/soldered.c new file mode 100644 index 00000000..602543af --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/soldered.c @@ -0,0 +1,28 @@ +/* Copyright 2020 dztech + * + * 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 "soldered.h" +void matrix_init_kb(void) { + setPinOutput(E6); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(E6, !led_state.caps_lock); + } + return res; +} diff --git a/qmk/keyboards/kbdfans/bella/soldered/soldered.h b/qmk/keyboards/kbdfans/bella/soldered/soldered.h new file mode 100644 index 00000000..6e60f66e --- /dev/null +++ b/qmk/keyboards/kbdfans/bella/soldered/soldered.h @@ -0,0 +1,34 @@ +/* Copyright 2020 dztech + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \ + K500, K501, K502, K506, K510, K511, K512, K514, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, KC_NO, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, KC_NO, K514, K515 } \ +} diff --git a/qmk/keyboards/kbdfans/kbd19x/config.h b/qmk/keyboards/kbdfans/kbd19x/config.h index 3fcda998..1146afa6 100644 --- a/qmk/keyboards/kbdfans/kbd19x/config.h +++ b/qmk/keyboards/kbdfans/kbd19x/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4B42 +#define PRODUCT_ID 0x0191 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT kbd19x diff --git a/qmk/keyboards/kbdfans/kbd19x/kbd19x.h b/qmk/keyboards/kbdfans/kbd19x/kbd19x.h index 73f3cbe1..28ad8315 100644 --- a/qmk/keyboards/kbdfans/kbd19x/kbd19x.h +++ b/qmk/keyboards/kbdfans/kbd19x/kbd19x.h @@ -41,61 +41,62 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } * represents the switch matrix. */ -// 2u backspace: XXX, k1e -// split backspace: k1d, k1e +// 2u backspace: XXX, k71 +// split backspace: k70, k71 -// 2u numpad +: k2i, XXX -// split numpad +: k2i, k3i +// 2u numpad +: k2c, XXX +// split numpad +: k2c, k3c -// 2u numpad enter: k4i, XXX -// split numpad enter: k4i, k5i +// 2u numpad enter: k4c, XXX +// split numpad enter: k4c, k5c // 2.25u lshift: k40, XXX // split (1.25u, 1u) lshift: k40, k41 -// ANSI enter or ISO enter: k3e -// backslash or NUHS: k2e +// ANSI enter or ISO enter: k38 +// Key next to ISO enter: k72 +// backslash or NUHS: k73 // left winkey: k50, k51, k52 // left WKL: k50, XXX, k52 -// right winkey: k59, k5a, k5b -// right WKL: k59, XXX, k5b +// right winkey: k55, k56, k57 +// right WKL: k55, XXX, k57 #define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \ - k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h, k5i \ + k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k70, k71, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \ + k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b, k5c \ )\ {\ - {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\ - {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\ - {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\ - {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i},\ - {k40, k41, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\ - {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, k5i},\ - {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ - {k1d, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c},\ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c},\ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c},\ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c},\ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c},\ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\ + {k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\ } #define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, k1h, k1i, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, \ - k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \ - k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h \ + k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k71, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \ + k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b \ )\ {\ - {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\ - {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\ - {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\ - {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, XXX},\ - {k40, XXX, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\ - {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, XXX},\ - {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ - {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c},\ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c},\ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c},\ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX},\ + {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, XXX},\ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\ + {XXX, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\ } diff --git a/qmk/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c b/qmk/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c new file mode 100644 index 00000000..138fe97f --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2020 MechMerlin + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( /* Base */ + 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, BL_STEP, KC_PSCR, KC_SLCK, KC_PAUS, KC_PGDN, \ + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + 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_P7, KC_P8, KC_P9, KC_PPLS, \ + 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_P4, KC_P5, KC_P6, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ + ), + [1] = LAYOUT_ansi( /* Func */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [2] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [3] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + + diff --git a/qmk/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk b/qmk/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/kbdfans/kbd19x/readme.md b/qmk/keyboards/kbdfans/kbd19x/readme.md index 50adfb77..da37474a 100644 --- a/qmk/keyboards/kbdfans/kbd19x/readme.md +++ b/qmk/keyboards/kbdfans/kbd19x/readme.md @@ -10,9 +10,9 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number **Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. -Keyboard Maintainer: [jshuf](https://github.com/jshuf) -Hardware Supported: KBD19x PCB -Hardware Availability: [KBDfans](https://kbdfans.cn) +* Keyboard Maintainer: [jshuf](https://github.com/jshuf), [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: KBD19x PCB +* Hardware Availability: [KBDfans](https://kbdfans.cn) Make example for this keyboard (after setting up your build environment): diff --git a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/info.json index 72c851e3..cb012517 100644 --- a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/info.json +++ b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/info.json @@ -290,6 +290,78 @@ {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4} ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [{"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"|", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Home", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"End", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] } } } diff --git a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c new file mode 100644 index 00000000..70e2237d --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c @@ -0,0 +1,65 @@ + /* Copyright 2020 King Wang Wong + * + * 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 + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: _QWERTY + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────┬───────┬─────────┐ + * │ 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_GRV│ KC_INS│ KC_DEL │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──┴───────┼─────────┤ + * │ 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 │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────┼─────────┤ + * │ CTRL │ 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_PGDN │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────┬─────────┼─────────┤ + * │ KC_LSFT │ 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 │ MO(1) │ KC_BSPC │ KC_RALT │ KC_RCTL │ │ KC_LEFT │ KC_DOWN │ KC_RGHT │ + * └───────────┴───────────┴───────────┴───────────────────────┴───────────┴───────────────────────────┴─────────┴─────────┴─────┴─────────┴─────────┴─────────┘ + */ + [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_GRV, KC_INS, KC_DEL, + 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_LCTL, 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_PGDN, + KC_LSFT, KC_LSFT, 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, MO(1), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: _FN1 + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────┬───────┬─────────┐ + * │ GRAVE │ KC_F1 │ KC_F2 │ KC_F3 │ KC_F4 │ KC_F5 │ KC_F6 │ KC_F7 │ KC_F8 │ KC_F9 │ KC_F10 │ KC_F11 │ KC_F12 │ ____│__ (2) │ RESET │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──┴───────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLU │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────┼─────────┤ + * │ CAPS │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLD │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────┬─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───┬─────────┼─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ │ _______ │ _______ │ _______ │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────┴─────────┴─────────┴─────────┘ + */ + [1] = LAYOUT_all( + RESET, 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_MUTE, + _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h index 6b80aa20..48268d0b 100644 --- a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h +++ b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h @@ -74,14 +74,29 @@ #define LAYOUT_65_iso_blocker( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K213, K214, \ K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ K400, K401, K402, K405, K409, K410, K411, K413, K414 \ ) \ { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ } + +#define LAYOUT_65_iso_blocker_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K213, K214, \ + K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K405, K409, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} diff --git a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk index a945af72..9fa82184 100644 --- a/qmk/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk +++ b/qmk/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk @@ -31,3 +31,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso_blocker 65_iso_blocker_split_bs \ No newline at end of file diff --git a/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/config.h b/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/config.h new file mode 100644 index 00000000..02bde2d2 --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/config.h @@ -0,0 +1,20 @@ +// Copyright 2020 Christian Eiden, cykedev +// +// 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 . + +#pragma once + +#undef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE diff --git a/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/keymap.c b/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/keymap.c new file mode 100644 index 00000000..c77bbc75 --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/keymap.c @@ -0,0 +1,110 @@ +// Copyright 2020 Christian Eiden, cykedev +// +// 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 + +// layers, ordering is important! +enum layers { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ,--------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | ` | + * |-------------------------------------------------------------------------------------------+------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |-------------------------------------------------------------------------------------------+------+ + * | MO(_FN2) | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp | + * |-------------------------------------------------------------------------------------------+------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | PgDn | + * +-------------------------------------------------------------------------┬---┬-------------+------+ + * | LCtrl | LAlt | LGUI | Space | RGUI | RAlt | | Left | Dn | Rght | + * `-------------------------------------------------------------------------┘ └-------------+------´ + */ + [_BASE] = LAYOUT_65_ansi_blocker( + 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_BSPC, KC_GRV, + 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_DEL, + MO(_FN1), 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, OSM(MOD_RALT), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* FN 1 layer + * ,--------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | | Br - |Br +| | Ins | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | Lft | Dwn | Up | Rgt | | | | Home | + * |-------------------------------------------------------------------------------------------+------+ + * | MO(_FN2) | | | | | | | | | | | | V + | End | + * +-------------------------------------------------------------------------┬---┬-------------+------+ + * | | | | | | | | Prev | V - | Next | + * `-------------------------------------------------------------------------┘ └-------------+------´ + */ + [_FN1] = LAYOUT_65_ansi_blocker( + _______, 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_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, KC_INS, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_HOME, + MO(_FN2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_END, + _______, _______, _______, _______, _______, _______, KC_MRWD, KC_VOLD, KC_MFFD + ), + + /* FN 2 layer + * ,--------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | Reset | EEPR | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | | Mo- | Mo+ | |Solid | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | Sp- | Sp+ | | V + | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | | | S + | V - | + * +-------------------------------------------------------------------------┬---┬-------------+------+ + * | | | | Backlight | | | | H - | S - | H + | + * `-------------------------------------------------------------------------┘ └-------------+------´ + */ + [_FN2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_P, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_VAD, + _______, _______, _______, RGB_TOG, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI + ), + + /* FN 3 layer + * ,--------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------+------+ + * | | | | | | | | | | | | | | | + * +-------------------------------------------------------------------------┬---┬-------------+------+ + * | | | | | | | | | | | + * `-------------------------------------------------------------------------┘ └-------------+------´ + */ + [_FN3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/rules.mk b/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd67/mkiirgb/keymaps/cykedev/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c b/qmk/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c new file mode 100644 index 00000000..4a987b9a --- /dev/null +++ b/qmk/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2020 @ethan605 + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Qwerty layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BSPC │HOME │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BSLS │END │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ LCTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │PGUP │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHFT │ UP │PGDN │ + * ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ CAPS │ LALT │ LCMD │ SPC │RCMD │RALT │RCTL │LEFT │DOWN │RIGHT│ + * └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [0] = LAYOUT( + 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, MO(1), + 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_DEL, KC_BSPC, KC_HOME, + 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_END, + KC_LCTL, 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_PGUP, + KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_CAPS, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: Function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ RESET │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ │ TOG │ MOD │ HU+ │ HU- │ SA+ │ SA- │ VA+ │ VA- │ │ │ │ │ │ │ // RGB controls + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │ DEC │ TOG │ INC │STEP │ │ │ │ │ │ │ // Backlight controls + * ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/kbdfans/maja/maja.c b/qmk/keyboards/kbdfans/maja/maja.c index 545d8c46..a0afcbda 100644 --- a/qmk/keyboards/kbdfans/maja/maja.c +++ b/qmk/keyboards/kbdfans/maja/maja.c @@ -102,3 +102,12 @@ void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); suspend_wakeup_init_user(); } + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (host_keyboard_led_state().caps_lock) + { + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + } +} diff --git a/qmk/keyboards/keebio/bdn9/keymaps/eosti/config.h b/qmk/keyboards/keebio/bdn9/keymaps/eosti/config.h index 4ba28f26..98f8eab1 100644 --- a/qmk/keyboards/keebio/bdn9/keymaps/eosti/config.h +++ b/qmk/keyboards/keebio/bdn9/keymaps/eosti/config.h @@ -1 +1,18 @@ -#define TAPPING_TERM 175 +/* Copyright 2020 Reid Sox-Harris + * + * 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 . + */ +#pragma once + +#define TAPPING_TERM 275 diff --git a/qmk/keyboards/keebio/bdn9/keymaps/eosti/keymap.c b/qmk/keyboards/keebio/bdn9/keymaps/eosti/keymap.c index adec3984..06537cba 100644 --- a/qmk/keyboards/keebio/bdn9/keymaps/eosti/keymap.c +++ b/qmk/keyboards/keebio/bdn9/keymaps/eosti/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Reid Sox-Harris + * + * 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 enum layer_names { @@ -13,12 +29,11 @@ enum custom_keycodes { M804, M805, M806, - MAIL_C }; // tapdance keycodes enum td_keycodes { - LAY // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. + LAY }; // define a type containing as many tapdance states as you need @@ -60,7 +75,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { SEND_STRING("M804" SS_TAP(X_ENTER)); } - break; + break; case M805: if (record->event.pressed) { SEND_STRING("M805" SS_TAP(X_ENTER)); @@ -71,11 +86,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("M806" SS_TAP(X_ENTER)); } break; - case MAIL_C: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_ENTER) SS_TAP(X_DOWN) SS_TAP(X_DOWN) SS_TAP(X_ENTER)); - } - break; } return true; @@ -90,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├────────┼────────┼────────┤ KC_LEFT, KC_DOWN, KC_RGHT, // ├────────┼────────┼────────┤ - KC_NO, KC_NO, KC_NO + KC_MRWD, KC_MPLY, KC_MFFD // └────────┴────────┴────────┘ ), [_MACRO] = LAYOUT( @@ -99,16 +109,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├────────┼────────┼────────┤ M801, M802, M803, // ├────────┼────────┼────────┤ - MAIL_C, KC_NO, EX_ARR + KC_NO, KC_NO, EX_ARR // └────────┴────────┴────────┘ ), [_MOD] = LAYOUT( // ┌────────┬────────┬────────┐ _______, BL_STEP,TG(_MOD), // ├────────┼────────┼────────┤ - KC_NO, RGB_MOD, KC_NO, + RGB_TOG, RGB_HUI, RGB_SAI, // ├────────┼────────┼────────┤ - KC_NO, KC_NO, KC_NO + RGB_MOD, RGB_HUD, RGB_SAD // └────────┴────────┴────────┘ ) }; @@ -123,6 +133,8 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } +// Tapdance! Hold to use as a modifier to the _MOD layout, tap to change it between _BASE and _MACRO + // determine the tapdance state to return int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { diff --git a/qmk/keyboards/keebio/bdn9/keymaps/eosti/readme.md b/qmk/keyboards/keebio/bdn9/keymaps/eosti/readme.md index d93ce1e5..cafa1782 100644 --- a/qmk/keyboards/keebio/bdn9/keymaps/eosti/readme.md +++ b/qmk/keyboards/keebio/bdn9/keymaps/eosti/readme.md @@ -3,7 +3,7 @@ ## Features - Single encoder in the top left to control volume, push to mute -- Arrow keys on home layer +- Arrow keys and media keys on home layer - Tap upper right to toggle to macro layer - Hold upper right to change keyboard functions (aka RGB) -- 520 entire bytes free! +- 428 entire bytes free! diff --git a/qmk/keyboards/keebio/bdn9/keymaps/eosti/rules.mk b/qmk/keyboards/keebio/bdn9/keymaps/eosti/rules.mk index 31e0fcf2..ff3294ba 100644 --- a/qmk/keyboards/keebio/bdn9/keymaps/eosti/rules.mk +++ b/qmk/keyboards/keebio/bdn9/keymaps/eosti/rules.mk @@ -1 +1,4 @@ TAP_DANCE_ENABLE=yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +LTO_ENABLE = yes diff --git a/qmk/keyboards/keebio/iris/keymaps/333fred/config.h b/qmk/keyboards/keebio/iris/keymaps/333fred/config.h index c3997b0f..3c8ba4cb 100644 --- a/qmk/keyboards/keebio/iris/keymaps/333fred/config.h +++ b/qmk/keyboards/keebio/iris/keymaps/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define USE_SERIAL diff --git a/qmk/keyboards/keebio/iris/keymaps/333fred/keymap.c b/qmk/keyboards/keebio/iris/keymaps/333fred/keymap.c index b8a65d7d..1141e6b0 100644 --- a/qmk/keyboards/keebio/iris/keymaps/333fred/keymap.c +++ b/qmk/keyboards/keebio/iris/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/qmk/keyboards/keebio/iris/keymaps/csc027/config.h b/qmk/keyboards/keebio/iris/keymaps/csc027/config.h index 5d201a6f..31333b06 100644 --- a/qmk/keyboards/keebio/iris/keymaps/csc027/config.h +++ b/qmk/keyboards/keebio/iris/keymaps/csc027/config.h @@ -17,7 +17,6 @@ along with this program. If not, see . #pragma once -#define USE_I2C #define EE_HANDS #undef RGBLED_NUM diff --git a/qmk/keyboards/keebio/iris/keymaps/csc027/keymap.c b/qmk/keyboards/keebio/iris/keymaps/csc027/keymap.c index f81e8f84..1682f012 100644 --- a/qmk/keyboards/keebio/iris/keymaps/csc027/keymap.c +++ b/qmk/keyboards/keebio/iris/keymaps/csc027/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 #include "csc027.h" @@ -36,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______ ), - [_GT] = LAYOUT_wrapper( - _______________________GIT_L1______________________, _______________________GIT_R1______________________, - _______________________GIT_L2______________________, _______________________GIT_R2______________________, - _______________________GIT_L3______________________, _______________________GIT_R3______________________, - _______________________GIT_L4______________________, _______, _______, _______________________GIT_R4______________________, + [_WT] = LAYOUT_wrapper( + ________________WINDOWS_TERMINAL_L1________________, ________________WINDOWS_TERMINAL_R1________________, + ________________WINDOWS_TERMINAL_L2________________, ________________WINDOWS_TERMINAL_R2________________, + ________________WINDOWS_TERMINAL_L3________________, ________________WINDOWS_TERMINAL_R3________________, + ________________WINDOWS_TERMINAL_L4________________, _______, _______, ________________WINDOWS_TERMINAL_R4________________, _______, _______, _______, _______, _______, _______ ), diff --git a/qmk/keyboards/keebio/iris/keymaps/dcompact/keymap.c b/qmk/keyboards/keebio/iris/keymaps/dcompact/keymap.c index ec1ffac8..90e48c9c 100644 --- a/qmk/keyboards/keebio/iris/keymaps/dcompact/keymap.c +++ b/qmk/keyboards/keebio/iris/keymaps/dcompact/keymap.c @@ -9,6 +9,19 @@ #define WKSP_U LALT(LCTL(KC_UP)) #define WKSP_R LALT(LCTL(KC_RGHT)) +#define AM_CYC A(S(KC_SPC)) +#define AM_SHR A(S(KC_COMM)) +#define AM_GRW A(S(KC_DOT)) +#define AM_REL A(S(KC_Z)) +#define AM_LFT A(S(KC_H)) +#define AM_RGH A(S(KC_L)) +#define AM_CW A(S(KC_K)) +#define AM_CCW A(S(KC_J)) +#define AM_TLL A(S(KC_1)) +#define AM_TLW A(S(KC_2)) +#define AM_BSP A(S(KC_3)) +#define AM_FUL A(S(KC_4)) + enum custom_layers { _BASE, _LOWER, @@ -52,11 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, AM_CYC, AM_SHR, AM_GRW, AM_REL, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + XXXXXXX, AM_LFT, AM_CCW, AM_CW, AM_RGH, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, + XXXXXXX, AM_TLL, AM_TLW, AM_BSP, AM_FUL, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ @@ -138,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_SAI, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, BL_BRTG, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ diff --git a/qmk/keyboards/keebio/iris/keymaps/drashna/config.h b/qmk/keyboards/keebio/iris/keymaps/drashna/config.h index 49381b60..63f87b7c 100644 --- a/qmk/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/qmk/keyboards/keebio/iris/keymaps/drashna/config.h @@ -1,19 +1,18 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ #pragma once diff --git a/qmk/keyboards/keebio/iris/keymaps/drashna/keymap.c b/qmk/keyboards/keebio/iris/keymaps/drashna/keymap.c index edfcd23e..bc34ba82 100644 --- a/qmk/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/qmk/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" /* diff --git a/qmk/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/qmk/keyboards/keebio/iris/keymaps/drashna_lp/config.h index 5370d88e..414acab8 100644 --- a/qmk/keyboards/keebio/iris/keymaps/drashna_lp/config.h +++ b/qmk/keyboards/keebio/iris/keymaps/drashna_lp/config.h @@ -1,19 +1,18 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ #pragma once diff --git a/qmk/keyboards/keebio/iris/keymaps/drashna_old/config.h b/qmk/keyboards/keebio/iris/keymaps/drashna_old/config.h index 5adf014e..f08b22dc 100644 --- a/qmk/keyboards/keebio/iris/keymaps/drashna_old/config.h +++ b/qmk/keyboards/keebio/iris/keymaps/drashna_old/config.h @@ -1,19 +1,18 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ #pragma once diff --git a/qmk/keyboards/keebio/iris/keymaps/eosti/config.h b/qmk/keyboards/keebio/iris/keymaps/eosti/config.h index 01bb31a6..a7e52bf2 100644 --- a/qmk/keyboards/keebio/iris/keymaps/eosti/config.h +++ b/qmk/keyboards/keebio/iris/keymaps/eosti/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2020 Reid Sox-Harris 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 diff --git a/qmk/keyboards/keebio/iris/keymaps/eosti/keymap.c b/qmk/keyboards/keebio/iris/keymaps/eosti/keymap.c index 34f75120..c30e5c98 100644 --- a/qmk/keyboards/keebio/iris/keymaps/eosti/keymap.c +++ b/qmk/keyboards/keebio/iris/keymaps/eosti/keymap.c @@ -1,10 +1,27 @@ +/* Copyright 2020 Reid Sox-Harris + * + * 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 enum layer_names { _QWERTY, _GAME, _UPPER, - _LOWER + _LOWER, + _UTILS }; enum custom_keycodes { @@ -14,13 +31,13 @@ enum custom_keycodes { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case TMUX_WN: + case TMUX_WN: // Switches to next window in tmux if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") "n"); + SEND_STRING(SS_LCTRL("a") "n"); // Requires a leader of ctrl-a } break; - case TMUX_WL: + case TMUX_WL: // Switches to last window in tmux if (record->event.pressed) { SEND_STRING(SS_LCTRL("a") "l"); } @@ -33,14 +50,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #define UPPER MO(_UPPER) #define LOWER MO(_LOWER) #define GAME TG(_GAME) +#define UTILS MO(_UTILS) -#define WM_R LCTL(KC_RGHT) -#define WM_L LCTL(KC_LEFT) -#define WM_MC LCTL(KC_UP) -#define WEB_R LGUI(KC_RCBR) -#define WEB_L LGUI(KC_LCBR) -#define TMUX_ESC LCTL(KC_A) -#define TMUX_U RALT(KC_UP) +#define WM_R LCTL(KC_RGHT) // Moves the MacOS WM to the right +#define WM_L LCTL(KC_LEFT) // ...and to the left +#define WM_MC LCTL(KC_UP) // Enters MacOS Mission Control +#define WEB_R LGUI(KC_RCBR) // Change tabs to the right on Firefox, Chrome +#define WEB_L LGUI(KC_LCBR) // ...and to the left +#define TMUX_U RALT(KC_UP) // tmux navigation, requires tmux.conf change #define TMUX_D RALT(KC_DOWN) #define TMUX_R RALT(KC_RGHT) #define TMUX_L RALT(KC_LEFT) @@ -50,13 +67,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - KC_LGUI, UPPER, KC_ENT, KC_SPC, LOWER, KC_NO + KC_LGUI, UPPER, KC_ENT, KC_SPC, LOWER, KC_RALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_GAME] = LAYOUT( @@ -69,31 +86,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, KC_SPC, KC_ENT, _______, _______ + _______, _______, KC_SPC, KC_ENT, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_UPPER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC , KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - TMUX_ESC, KC_NO, KC_NO, KC_NO, WEB_L, WEB_R, TMUX_L, TMUX_D, TMUX_U, TMUX_R, KC_NO, KC_BSLS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_NO, KC_VOLU, WM_MC, WM_L, WM_R, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, KC_NO, + _______, WEB_L, WEB_R, WM_MC, WM_L, WM_R, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, KC_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_MUTE, KC_VOLD, KC_LBRC, KC_LPRN, KC_LCBR,_______, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_NO, KC_PGDN,_______, + _______, KC_NO, KC_LABK, KC_LBRC, KC_LPRN, KC_LCBR, _______, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_RABK, KC_PGDN,_______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, _______, _______, KC_NO, _______ + _______, UPPER, _______, _______, UTILS, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_NO, GAME, + KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC , KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_SLEP, KC_DEL, KC_END, KC_PGDN, KC_NO, KC_NO, + _______, TMUX_WL, TMUX_WN, KC_NO, KC_NO, KC_NO, TMUX_L, TMUX_D, TMUX_U, TMUX_R, KC_NO, KC_PIPE, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, TMUX_WL, TMUX_WN,_______, KC_LBRC, KC_LPRN, KC_LCBR, _______, KC_RCBR, KC_RPRN, KC_RBRC, KC_NO, KC_NO, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_DEL, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, UTILS, _______, _______, LOWER, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_UTILS] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_NO, GAME, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD,_______, _______, KC_SLEP, KC_DEL, KC_END, KC_PGDN, KC_NO, KC_NO, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, KC_NO, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ diff --git a/qmk/keyboards/keebio/iris/keymaps/eosti/readme.md b/qmk/keyboards/keebio/iris/keymaps/eosti/readme.md index 0fc61a44..f62c9cb5 100644 --- a/qmk/keyboards/keebio/iris/keymaps/eosti/readme.md +++ b/qmk/keyboards/keebio/iris/keymaps/eosti/readme.md @@ -5,7 +5,8 @@ - QWERTY base layer with right thumb space and left thumb enter - Gaming layer to swap enter and space so that WASD and space can all be on the same hand - MacOS navigation keys for switching windows and entering Mission Control -- Google Chrome navigation keys for cycling tabs +- Browser navigation keys for cycling tabs - HJKL arrow keys -- tmux navigation keys for switching focus, panes, and the leader key +- tmux navigation keys for switching focus, panes +- Plays nicely with my Planck layout for easy switching - Probably other stuff too? diff --git a/qmk/keyboards/keebio/levinson/keymaps/via/keymap.c b/qmk/keyboards/keebio/levinson/keymaps/via/keymap.c new file mode 100644 index 00000000..f6504de3 --- /dev/null +++ b/qmk/keyboards/keebio/levinson/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* +Copyright 2020 Danny Nguyen +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, FN_MO13, KC_SPC, KC_SPC, FN_MO23, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [1] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [2] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [3] = LAYOUT_ortho_4x12( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/keebio/levinson/keymaps/via/rules.mk b/qmk/keyboards/keebio/levinson/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/keebio/levinson/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/keebio/levinson/rev2/config.h b/qmk/keyboards/keebio/levinson/rev2/config.h index 5b1ae6fe..5a011255 100644 --- a/qmk/keyboards/keebio/levinson/rev2/config.h +++ b/qmk/keyboards/keebio/levinson/rev2/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1146 +#define PRODUCT_ID 0x2146 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio #define PRODUCT Levinson diff --git a/qmk/keyboards/keebio/levinson/rev3/config.h b/qmk/keyboards/keebio/levinson/rev3/config.h index da5f4e74..45cff5d8 100644 --- a/qmk/keyboards/keebio/levinson/rev3/config.h +++ b/qmk/keyboards/keebio/levinson/rev3/config.h @@ -19,10 +19,9 @@ along with this program. If not, see . #pragma once - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1146 +#define PRODUCT_ID 0x3146 #define DEVICE_VER 0x0300 #define MANUFACTURER Keebio #define PRODUCT Levinson diff --git a/qmk/keyboards/keebio/levinson/rules.mk b/qmk/keyboards/keebio/levinson/rules.mk index d80f94a2..d2046720 100644 --- a/qmk/keyboards/keebio/levinson/rules.mk +++ b/qmk/keyboards/keebio/levinson/rules.mk @@ -19,7 +19,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls diff --git a/qmk/keyboards/keebio/nyquist/keymaps/default/keymap.c b/qmk/keyboards/keebio/nyquist/keymaps/default/keymap.c index db4b5396..f93583d7 100644 --- a/qmk/keyboards/keebio/nyquist/keymaps/default/keymap.c +++ b/qmk/keyboards/keebio/nyquist/keymaps/default/keymap.c @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME,KC_END, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -124,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), diff --git a/qmk/keyboards/keebio/nyquist/keymaps/via/keymap.c b/qmk/keyboards/keebio/nyquist/keymaps/via/keymap.c index 43ce83bb..312e8c99 100644 --- a/qmk/keyboards/keebio/nyquist/keymaps/via/keymap.c +++ b/qmk/keyboards/keebio/nyquist/keymaps/via/keymap.c @@ -1,48 +1,46 @@ +/* +Copyright 2020 Danny Nguyen +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 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[0] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), -[1] = LAYOUT( - 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, KC_TRNS, KC_TRNS, KC_TRNS -), -[2] = LAYOUT( - 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, KC_TRNS, KC_TRNS, KC_TRNS -), -[3] = LAYOUT( - 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, KC_TRNS, KC_TRNS, KC_TRNS -), - + [0] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + MO(3), KC_LCTL, KC_LALT, KC_LGUI, FN_MO13, KC_SPC, KC_SPC, FN_MO23, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [1] = LAYOUT_ortho_5x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + BL_STEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME,KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [2] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [3] = LAYOUT_ortho_5x12( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; - diff --git a/qmk/keyboards/keebio/nyquist/keymaps/winternebs/config.h b/qmk/keyboards/keebio/nyquist/keymaps/winternebs/config.h new file mode 100644 index 00000000..263af1de --- /dev/null +++ b/qmk/keyboards/keebio/nyquist/keymaps/winternebs/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#define MOUSEKEY_DELAY 80 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAXSPEED 6 +#define MOUSEKEY_TIME_TO_MAX 10 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 10 + +#ifndef FORCE_NKRO +# define FORCE_NKRO +#endif diff --git a/qmk/keyboards/keebio/nyquist/keymaps/winternebs/keymap.c b/qmk/keyboards/keebio/nyquist/keymaps/winternebs/keymap.c new file mode 100644 index 00000000..bb1ab6ca --- /dev/null +++ b/qmk/keyboards/keebio/nyquist/keymaps/winternebs/keymap.c @@ -0,0 +1,143 @@ +/* Copyright 2020 winterNebs + * + * 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 + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _QWERTY, + _WORKMAN, + _LOWER, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, +}; + +#define LOWER MO(_LOWER) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space | Bksp |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, z, KC_LEFT, KC_DOWN, KC_RGHT +), +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | D | R | W | B | J | F | U | P | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | H | T | G | Y | N | E | O | I | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space | Bksp |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_WORKMAN] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_DEL, + KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up | UP |Pg Dn | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |PrScr | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_UP, KC_PGDN, + _______, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn| | | | | ScrL | ScrR | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Sat Up|Sat Dn|Val Up|Val Dn|AGnorm|AGswap| Home | M1 | ^ | M2 |ScrUp | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Qwerty|WORKMN| | End | < | v | > |Scrdn | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | Left | Down | Up |Right | Vol+ |Pause | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NKRO | | | | | | | | Last | Vol- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, _______, _______, _______, _______, KC_WH_L, KC_WH_R, _______, + RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, AG_NORM, AG_SWAP, KC_HOME, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, + _______, _______, _______, QWERTY, WORKMAN, _______, KC_END, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_MPLY, + MAGIC_TOGGLE_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT +) + + +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + } + return true; +} diff --git a/qmk/keyboards/keebio/nyquist/keymaps/winternebs/rules.mk b/qmk/keyboards/keebio/nyquist/keymaps/winternebs/rules.mk new file mode 100644 index 00000000..bcb6ddeb --- /dev/null +++ b/qmk/keyboards/keebio/nyquist/keymaps/winternebs/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes diff --git a/qmk/keyboards/keebio/nyquist/rev2/config.h b/qmk/keyboards/keebio/nyquist/rev2/config.h index 2810bde7..b0429f52 100644 --- a/qmk/keyboards/keebio/nyquist/rev2/config.h +++ b/qmk/keyboards/keebio/nyquist/rev2/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1156 +#define PRODUCT_ID 0x2156 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio #define PRODUCT The Nyquist Keyboard diff --git a/qmk/keyboards/keebio/nyquist/rev2/rules.mk b/qmk/keyboards/keebio/nyquist/rev2/rules.mk index 9735fbeb..05c0f5ed 100644 --- a/qmk/keyboards/keebio/nyquist/rev2/rules.mk +++ b/qmk/keyboards/keebio/nyquist/rev2/rules.mk @@ -18,7 +18,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls diff --git a/qmk/keyboards/keebio/nyquist/rev3/config.h b/qmk/keyboards/keebio/nyquist/rev3/config.h index b2573d1d..5d4000b4 100644 --- a/qmk/keyboards/keebio/nyquist/rev3/config.h +++ b/qmk/keyboards/keebio/nyquist/rev3/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1156 +#define PRODUCT_ID 0x3156 #define DEVICE_VER 0x0300 #define MANUFACTURER Keebio #define PRODUCT The Nyquist Keyboard diff --git a/qmk/keyboards/keebio/nyquist/rev3/rules.mk b/qmk/keyboards/keebio/nyquist/rev3/rules.mk index d7db1800..16d445b6 100644 --- a/qmk/keyboards/keebio/nyquist/rev3/rules.mk +++ b/qmk/keyboards/keebio/nyquist/rev3/rules.mk @@ -18,7 +18,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls diff --git a/qmk/keyboards/keebio/quefrency/keymaps/draevin/keymap.c b/qmk/keyboards/keebio/quefrency/keymaps/draevin/keymap.c new file mode 100644 index 00000000..7e629157 --- /dev/null +++ b/qmk/keyboards/keebio/quefrency/keymaps/draevin/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2020 Draevin Luke @draevin + * + * 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 +#include "draevin.h" + +#define LAYOUT_65wm_wrapped(...) LAYOUT_65_with_macro(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_CM] = LAYOUT_65wm_wrapped( + HYPR_T(KC_MPLY), KC_ESC, KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_MPRV, KC_MNXT, KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_F15, KC_F16, KC_BSPC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_ENT, KC_END, + KC_F17, KC_F18, TD(TD_CAPS), _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_RSFT, KC_UP, MO(_FN), + KC_F19, KC_F20, KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_QW] = LAYOUT_65wm_wrapped( + HYPR_T(KC_MPLY), KC_ESC, KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_MPRV, KC_MNXT, KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_F15, KC_F16, KC_BSPC, _________________QWERTY_L2_________________, _________________QWERTY_L2_________________, KC_QUOT, KC_ENT, KC_END, + KC_F17, KC_F18, TD(TD_CAPS), _________________QWERTY_L3_________________, _________________QWERTY_L3_________________, KC_RSFT, KC_UP, MO(_FN), + KC_F19, KC_F20, KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_65wm_wrapped( + _______, _______, _______, _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, XXXXXXX, _______, _______, + RGB_TOG, RGB_MOD, _______, ___________________FN_L1___________________, ___________________FN_R1___________________, _______, _______, KC_MAKE, KC_PGUP, + _______, _______, KC_DEL, ___________________FN_L2___________________, ___________________FN_R2___________________, _______, _______, KC_PGDN, + _______, _______, _______, ___________________BLANK___________________, ___________________FN_R3___________________, _______, _______, _______, + _______, CM_QW, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______//_______ + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (layer_state_is(_FN)) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/qmk/keyboards/keebio/quefrency/keymaps/draevin/rules.mk b/qmk/keyboards/keebio/quefrency/keymaps/draevin/rules.mk new file mode 100644 index 00000000..fcfd2225 --- /dev/null +++ b/qmk/keyboards/keebio/quefrency/keymaps/draevin/rules.mk @@ -0,0 +1 @@ +EXTRAKEY_ENABLE = yes diff --git a/qmk/keyboards/keebio/quefrency/keymaps/joestrong/README.md b/qmk/keyboards/keebio/quefrency/keymaps/joestrong/README.md new file mode 100644 index 00000000..717b9ecd --- /dev/null +++ b/qmk/keyboards/keebio/quefrency/keymaps/joestrong/README.md @@ -0,0 +1,17 @@ +# JoeStrong's Quefrency layout - 60% ISO + +* Standard UK ISO qwerty layout +* Function key in place of Caps Lock +* Function layer provides vim-like arrows and various function keys + +## Default layer + +![Default layer layout](https://i.imgur.com/HXeKSGN.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f606625fbc4b84a0e9f82fff308aad29)) + +## Function layer + +![Function layer layout](https://i.imgur.com/cVKl9tB.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/b75402b2838f36e319f1c0a7fef07dd6)) diff --git a/qmk/keyboards/keebio/quefrency/keymaps/joestrong/config.h b/qmk/keyboards/keebio/quefrency/keymaps/joestrong/config.h new file mode 100644 index 00000000..f9efe78c --- /dev/null +++ b/qmk/keyboards/keebio/quefrency/keymaps/joestrong/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C diff --git a/qmk/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c b/qmk/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c new file mode 100644 index 00000000..ead47592 --- /dev/null +++ b/qmk/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 Joseph Strong + * + * 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 +#include "keymap_uk.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_iso( + KC_GESC, 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_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, + MO(_FN1),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_LSFT, UK_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _______, + KC_LCTL, KC_LGUI, MO(_FN1), KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, MO(_FN1), _______, KC_LGUI, KC_RCTL + ), + + [_FN1] = LAYOUT_60_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, + _______, _______, KC__VOLDOWN, KC__VOLUP, KC__MUTE, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/keebio/sinc/keymaps/draevin/keymap.c b/qmk/keyboards/keebio/sinc/keymaps/draevin/keymap.c new file mode 100644 index 00000000..d9d4be1b --- /dev/null +++ b/qmk/keyboards/keebio/sinc/keymaps/draevin/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Draevin Luke @draevin + * + * 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 +#include "draevin.h" + +#define LAYOUT_80_wrapper(...) LAYOUT_80(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_CM] = LAYOUT_80_wrapper( + HYPR_T(KC_ESC), _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, KC_F13, KC_HYPR, + KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_BSPC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_ENT, KC_END, + TD(TD_CAPS), _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_RSFT, KC_UP, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, MO(_FN), XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_QW] = LAYOUT_80_wrapper( + HYPR_T(KC_ESC), _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, KC_F13, KC_HYPR, + KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_BSPC, _________________QWERTY_L2_________________, _________________QWERTY_L2_________________, KC_QUOT, KC_ENT, KC_END, + TD(TD_CAPS), _________________QWERTY_L3_________________, _________________QWERTY_L3_________________, KC_RSFT, KC_UP, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, MO(_FN), XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_80_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, _______, CM_QW, + _______, ___________________BLANK___________________, ___________________BLANK___________________, ___________________BLANK___________________, + _______, ___________________FN_L1___________________, ___________________FN_R1___________________, _______, _______, KC_MAKE, KC_PGUP, + _______, ___________________FN_L2___________________, ___________________FN_R2___________________, _______, _______, KC_PGDN, + _______, ___________________BLANK___________________, ___________________FN_R3___________________, _______, _______, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/keebio/viterbi/keymaps/drashna/config.h b/qmk/keyboards/keebio/viterbi/keymaps/drashna/config.h index 40a5bbd0..5d7ffa8a 100644 --- a/qmk/keyboards/keebio/viterbi/keymaps/drashna/config.h +++ b/qmk/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -1,19 +1,18 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ #pragma once diff --git a/qmk/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/qmk/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 3b213418..99e06b4d 100644 --- a/qmk/keyboards/keebio/viterbi/keymaps/drashna/keymap.c +++ b/qmk/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" // Fillers to make layering more clear diff --git a/qmk/keyboards/keebzdotnet/wazowski/config.h b/qmk/keyboards/keebzdotnet/wazowski/config.h index 56f05515..26c7ccd5 100644 --- a/qmk/keyboards/keebzdotnet/wazowski/config.h +++ b/qmk/keyboards/keebzdotnet/wazowski/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B5A // "KZ" #define PRODUCT_ID 0x53FC #define DEVICE_VER 0x0001 #define MANUFACTURER keebzdotnet diff --git a/qmk/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c b/qmk/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c new file mode 100644 index 00000000..94214290 --- /dev/null +++ b/qmk/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 keebzdotnet + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT( + KC_A, KC_B, KC_C, KC_D, KC_E, + KC_F, KC_G, KC_H, KC_I, KC_J, + KC_K, KC_L, KC_M, KC_N + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk b/qmk/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/keebzdotnet/wazowski/rules.mk b/qmk/keyboards/keebzdotnet/wazowski/rules.mk index b8ce67b6..e82d793b 100644 --- a/qmk/keyboards/keebzdotnet/wazowski/rules.mk +++ b/qmk/keyboards/keebzdotnet/wazowski/rules.mk @@ -14,11 +14,11 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/qmk/keyboards/keyboardio/atreus/atreus.c b/qmk/keyboards/keyboardio/atreus/atreus.c new file mode 100644 index 00000000..0ad71565 --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/atreus.c @@ -0,0 +1,17 @@ +/* Copyright (C) 2019, 2020 Keyboard.io, Inc + * + * 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 "atreus.h" diff --git a/qmk/keyboards/keyboardio/atreus/atreus.h b/qmk/keyboards/keyboardio/atreus/atreus.h new file mode 100644 index 00000000..b03276ff --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/atreus.h @@ -0,0 +1,32 @@ +/* Copyright (C) 2019, 2020 Keyboard.io, Inc + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, XXX, XXX, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, XXX, XXX, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/qmk/keyboards/keyboardio/atreus/config.h b/qmk/keyboards/keyboardio/atreus/config.h new file mode 100644 index 00000000..fb3a48e5 --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/config.h @@ -0,0 +1,81 @@ +/* Copyright (C) 2019, 2020 Keyboard.io, Inc + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0x2303 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Keyboardio +#define PRODUCT Atreus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { F6, F5, F4, F1 } +#define MATRIX_COL_PINS { F7, E2, C7, C6, B6, B5, D7, D6, D4, D5, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/keyboardio/atreus/info.json b/qmk/keyboards/keyboardio/atreus/info.json new file mode 100644 index 00000000..69386999 --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/info.json @@ -0,0 +1,57 @@ +{ + "keyboard_name": "Keyboardio Atreus", + "url": "", + "maintainer": "keyboardio", + "width": 13, + "height": 4.7, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Q", "x":0, "y":0.6}, + {"label":"W", "x":1, "y":0.35}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0.35}, + {"label":"T", "x":4, "y":0.7}, + {"label":"Y", "x":8, "y":0.7}, + {"label":"U", "x":9, "y":0.35}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0.35}, + {"label":"P", "x":12, "y":0.6}, + {"label":"A", "x":0, "y":1.6}, + {"label":"S", "x":1, "y":1.35}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1.35}, + {"label":"G", "x":4, "y":1.7}, + {"label":"H", "x":8, "y":1.7}, + {"label":"J", "x":9, "y":1.35}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1.35}, + {"label":";", "x":12, "y":1.6}, + {"label":"Z", "x":0, "y":2.6}, + {"label":"X", "x":1, "y":2.35}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2.35}, + {"label":"B", "x":4, "y":2.7}, + {"label":"`", "x":5, "y":2.54}, + {"label":"\\", "x":7, "y":2.54}, + {"label":"N", "x":8, "y":2.7}, + {"label":"M", "x":9, "y":2.35}, + {"label":",", "x":10, "y":2}, + {"label":".", "x":11, "y":2.35}, + {"label":"/", "x":12, "y":2.6}, + {"label":"Esc", "x":0, "y":3.6}, + {"label":"Tab", "x":1, "y":3.35}, + {"label":"Super", "x":2, "y":3}, + {"label":"Shift", "x":3, "y":3.35}, + {"label":"Bksp", "x":4, "y":3.7}, + {"label":"Ctrl", "x":5, "y":3.54}, + {"label":"Alt", "x":7, "y":3.54}, + {"label":"Space", "x":8, "y":3.7}, + {"label":"Fun", "x":9, "y":3.35}, + {"label":"-", "x":10, "y":3}, + {"label":"'", "x":11, "y":3.35}, + {"label":"Enter", "x":12,"y":3.6} + ] + } + } +} diff --git a/qmk/keyboards/keyboardio/atreus/keymaps/default/keymap.c b/qmk/keyboards/keyboardio/atreus/keymaps/default/keymap.c new file mode 100644 index 00000000..71687334 --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +// Copyright (C) 2019, 2020 Keyboard.io, Inc +// +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _RS, + _LW, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift bksp ctrl || alt space fn . 0 = + */ + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_UP, KC_DLR, KC_PERC, KC_PGUP, KC_7, KC_8, KC_9, KC_BSPC, + KC_LPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_RPRN, KC_PGDN, KC_4, KC_5, KC_6, KC_BSLS, + KC_LBRC, KC_RBRC, KC_HASH, KC_LCBR, KC_RCBR, KC_CIRC, KC_AMPR,KC_ASTR, KC_1, KC_2, KC_3, KC_PLUS, + TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT,KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), + /* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause + */ + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, _______, _______, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) +}; diff --git a/qmk/keyboards/keyboardio/atreus/readme.md b/qmk/keyboards/keyboardio/atreus/readme.md new file mode 100644 index 00000000..ab7dba14 --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/readme.md @@ -0,0 +1,31 @@ +# Keyboardio Atreus + +![Atreus](https://atreus.technomancy.us/i/atreus2-mug.jpg) + +A small mechanical keyboard that is based around the shape of the human hand. + +* Keyboard Maintainer: [Keyboardio](https://github.com/keyboardio) +* Hardware Supported: Keyboardio Atreus +* Hardware Availability: https://www.kickstarter.com/projects/keyboardio/atreus + +These configuration files are specifically for the Keyboardio Atreus, a +collaboration between [Phil Hagelberg](https://github.com/technomancy) and +[Keyboardio](https://github.com/keyboardio). The keyboard is currently on +Kickstarter, and will come fully assembled. + +Make example for this keyboard (after setting up your build environment): + + make keyboardio/atreus:default + +Flashing example for this keyboard: + + make keyboardio/atreus:default:flash + +*Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.* + +To flash new firmware, the keyboard needs to be in bootloader mode. To do that, +one needs to hold the bottom left key (`Esc` by default) and reset the +keyboard - either via a macro, or by sending a hang-up signal to the keyboard +device, or by pressing the reset button on the bottom with a pin. + +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). diff --git a/qmk/keyboards/keyboardio/atreus/rules.mk b/qmk/keyboards/keyboardio/atreus/rules.mk new file mode 100644 index 00000000..76ff03a8 --- /dev/null +++ b/qmk/keyboards/keyboardio/atreus/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +UNICODE_ENABLE = yes # Unicode diff --git a/qmk/keyboards/keyhive/maypad/info.json b/qmk/keyboards/keyhive/maypad/info.json index 89367173..df059775 100644 --- a/qmk/keyboards/keyhive/maypad/info.json +++ b/qmk/keyboards/keyhive/maypad/info.json @@ -1,16 +1,19 @@ { - "keyboard_name": "maypad", - "url": "https://keyhive.xyz/shop/may-pad", - "maintainer": "codybender", - "width": 4, - "height": 5, + "keyboard_name": "maypad", + "url": "https://keyhive.xyz/shop/may-pad", + "maintainer": "codybender", + "width": 4, + "height": 5, "layouts": { "LAYOUT_numpad_5x4": { "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}] }, + "LAYOUT_numpad_5x4_split_plus": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"=", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"-", "x":3, "y":1}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}] + }, "LAYOUT_ortho_5x4": { "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"00", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}] } - + } } diff --git a/qmk/keyboards/keyhive/maypad/keymaps/eosti/config.h b/qmk/keyboards/keyhive/maypad/keymaps/eosti/config.h new file mode 100644 index 00000000..8e6a83b7 --- /dev/null +++ b/qmk/keyboards/keyhive/maypad/keymaps/eosti/config.h @@ -0,0 +1,17 @@ +/* Copyright 2020 Reid Sox-Harris + * + * 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 . + */ +#pragma once +#define TAPPING_TERM 200 diff --git a/qmk/keyboards/keyhive/maypad/keymaps/eosti/keymap.c b/qmk/keyboards/keyhive/maypad/keymaps/eosti/keymap.c new file mode 100644 index 00000000..e4d4b87b --- /dev/null +++ b/qmk/keyboards/keyhive/maypad/keymaps/eosti/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 Reid Sox-Harris + * + * 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 + +enum layer_names { + _QWERTY, + _MOD +}; + +// Keymaps Shortcut Defines + +#define ESC_MOD LT(_MOD, KC_ESC) +#define MOD TG(_MOD) +#define SQRT RALT(KC_V) // (macOS) Prints √ +#define NEQL RALT(KC_EQL) // (macOS) Prints ≠ +#define PM RALT(KC_PLUS) // (macOS) Prints ± +#define PI RALT(KC_P) // (macOS) Prints π + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_numpad_5x4_split_plus( + // ┌────────┬────────┬────────┬────────┐ + ESC_MOD, KC_PSLS, KC_PAST, KC_PEQL, + // ├────────┼────────┼────────┼────────┤ + KC_P7, KC_P8, KC_P9, KC_PPLS, + // ├────────┼────────┼────────┼────────┤ + KC_P4, KC_P5, KC_P6, KC_PMNS, + // ├────────┼────────┼────────┼────────┤ + KC_P1, KC_P2, KC_P3, + // ├─────────────────┼────────┼ ┤ + KC_P0, KC_PDOT, KC_PENT + // ├─────────────────┴────────┴────────┘ + ), + [_MOD] = LAYOUT_numpad_5x4_split_plus( + // ┌────────┬────────┬────────┬────────┐ + MOD, SQRT, KC_CIRC, NEQL, + // ├────────┼────────┼────────┼────────┤ + KC_P7, KC_P8, KC_P9, PM, + // ├────────┼────────┼────────┼────────┤ + KC_P4, KC_P5, KC_P6, PI, + // ├────────┼────────┼────────┼────────┤ + KC_P1, KC_P2, KC_P3, + // ├─────────────────┼────────┼ ┤ + KC_P0, KC_BSPC, KC_TAB + // ├─────────────────┴────────┴────────┘ + ) + +}; diff --git a/qmk/keyboards/keyhive/maypad/keymaps/eosti/readme.md b/qmk/keyboards/keyhive/maypad/keymaps/eosti/readme.md new file mode 100644 index 00000000..5b3ee3bc --- /dev/null +++ b/qmk/keyboards/keyhive/maypad/keymaps/eosti/readme.md @@ -0,0 +1,6 @@ +# EosTi's Maypad Layout + +## Features +* Split-plus layout (who needs a massive plus anyway) +* Tapdance ESC/mod key, giving access to special characters and mod functions +* Standard numpad base layer diff --git a/qmk/keyboards/keyhive/maypad/keymaps/eosti/rules.mk b/qmk/keyboards/keyhive/maypad/keymaps/eosti/rules.mk new file mode 100644 index 00000000..4c1902ee --- /dev/null +++ b/qmk/keyboards/keyhive/maypad/keymaps/eosti/rules.mk @@ -0,0 +1,3 @@ +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +LTO_ENABLE = yes diff --git a/qmk/keyboards/keyhive/maypad/maypad.h b/qmk/keyboards/keyhive/maypad/maypad.h index 42c71f41..ac576f99 100644 --- a/qmk/keyboards/keyhive/maypad/maypad.h +++ b/qmk/keyboards/keyhive/maypad/maypad.h @@ -46,6 +46,20 @@ { KC_NO, k41, k42, k43 } \ } +#define LAYOUT_numpad_5x4_split_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { KC_NO, k41, k42, k43 } \ +} + #define LAYOUT_ortho_5x4( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ diff --git a/qmk/keyboards/keyhive/maypad/readme.md b/qmk/keyboards/keyhive/maypad/readme.md index 3467827b..62db1a2f 100644 --- a/qmk/keyboards/keyhive/maypad/readme.md +++ b/qmk/keyboards/keyhive/maypad/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make keyhive/maypad:default -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). \ No newline at end of file +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). diff --git a/qmk/keyboards/kingly_keys/romac_plus/config.h b/qmk/keyboards/kingly_keys/romac_plus/config.h index 503a463f..5ea8321d 100644 --- a/qmk/keyboards/kingly_keys/romac_plus/config.h +++ b/qmk/keyboards/kingly_keys/romac_plus/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4B4B +#define PRODUCT_ID 0x0002 #define DEVICE_VER 0x0001 #define MANUFACTURER TheRoyalSweatshirt #define PRODUCT RoMac+ diff --git a/qmk/keyboards/kyria/keymaps/cwebster2/config.h b/qmk/keyboards/kyria/keymaps/cwebster2/config.h new file mode 100644 index 00000000..6a56d7ee --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/cwebster2/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Casey Webster + * + * 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 . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + //#define RGBLIGHT_ANIMATIONS + //#define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_BREATHING + //#define RGBLIGHT_EFFECT_CHRISTMAS + //#define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_RAINBOW_MOOD + //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_SNAKE + //#define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_TWINKLE + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_LIMIT_VAL 128 + #define RGBLIGHT_EFFECT_BREATHE_MAX 128 + #define RGBLIGHT_LAYERS + #define RGBLIGHT_MAX_LAYERS 16 + //#define RGBLIGHT_STARTUP_ANIMATION +#endif + +#ifdef COMBO_ENABLE + #define COMBO_COUNT 2 +#endif + +#define QMK_KEYS_PER_SCAN 4 + +#define EE_HANDS + +//#define DEBUG_MATRIX_SCAN_RATE +//#define SPLIT_MODS_ENABLE diff --git a/qmk/keyboards/kyria/keymaps/cwebster2/keymap.c b/qmk/keyboards/kyria/keymaps/cwebster2/keymap.c new file mode 100644 index 00000000..311ad167 --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/cwebster2/keymap.c @@ -0,0 +1,397 @@ +/* Copyright 2020 Casey Webster + * + * 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 +#include "raw_hid.h" +#define RAW_EPSIZE 8 +#include + +#include "cwebster2.h" + +#ifdef WPM_ENABLE +char wpm_str[10]; +uint16_t wpm_graph_timer = 0; +#endif + +#ifdef COMBO_ENABLE +enum combos { + ZX_COPY, + CV_PASTE +}; + +const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END }; +const uint16_t PROGMEM paste_combo[] = { KC_C, KC_V, COMBO_END }; + +combo_t key_combos[COMBO_COUNT] = { + [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)), + [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)) +}; +#endif + +#define LAYOUT_kyria_base( \ + L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \ + L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \ + L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \ + L33, L34, L35, R35, R34, R33 \ + ) \ + LAYOUT_kyria_wrapper ( \ + KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \ + KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \ + KC_EQL, L21, L22, L23, L24, L25, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, R25, R24, R23, R22, R21, KC_MINS, \ + SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR \ + ) +#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + */ + [_QWERTY] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______QWERTY_L1______, _______QWERTY_R1______, + _______QWERTY_L2______, _______QWERTY_R2______, + _______QWERTY_L3______, _______QWERTY_R3______, + _______THUMBS_L_______, _______THUMBS_R_______ + /* `---------------------' `---------------------' */ + ), + [_COLEMAK] = LAYOUT_kyria_wrapper( + /* ,-----------------------. ,-----------------------. */ + KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS, + KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN, + KC_EQL, _______COLEMAK_L3_____, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS, + SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR + /* `---------------------' `---------------------' */ + ), + // GAME layout -- qwerty without homerow mods + [_GAME] = LAYOUT_kyria_wrapper( + /* ,-------------------------------------------. ,-------------------------------------------. */ + KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS, + KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS, + KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12 + /* `----------------------------------' `----------------------------------' */ + ), + [_FN] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______FN_______L1____, _______INACTIVE_R1____, + _______FN_______L2____, _______INACTIVE_R2____, + _______FN_______L3____, _______NAV______R2____, + _______FN________T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_SYMBOLS] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______SYM______L1____, _______INACTIVE_R1____, + _______SYM______L2____, _______INACTIVE_R2____, + _______SYM______L3____, _______INACTIVE_R3____, + _______SYM_______T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_NUM] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______NUM______L1____, _______INACTIVE_R1____, + _______NUM______L2____, _______INACTIVE_R2____, + _______NUM______L3____, _______INACTIVE_R3____, + _______NUM_______T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_NAV] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______NAV______R1____, + _______INACTIVE_L2____, _______NAV______R2____, + _______INACTIVE_L3____, _______NAV______R3____, + _______INACTIVE__T____, _______NAV_______T____ + /* `---------------------' `---------------------' */ + ), + [_MOUSE] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______MOUSE____R1____, + _______INACTIVE_L2____, _______MOUSE____R2____, + _______INACTIVE_L3____, _______MOUSE____R3____, + _______INACTIVE__T____, _______MOUSE_____T____ + /* `---------------------' `---------------------' */ + ), + [_MEDIA] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______MEDIA____R1____, + _______INACTIVE_L2____, _______MEDIA____R2____, + _______INACTIVE_L3____, _______MEDIA____R3____, + _______INACTIVE__T____, _______MEDIA_____T____ + /* `---------------------' `---------------------' */ + ), +}; + +#ifdef RAW_ENABLE +static void send_layer_via_hid(int layer) { + uint8_t data[RAW_EPSIZE]; + data[0] = 1; + data[1] = layer; + raw_hid_send(data, sizeof(data)); + return; +} +#endif + + +#ifdef RGBLIGHT_LAYERS +const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_AZURE} ); +const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} ); +const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} ); +const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} ); +const rgblight_segment_t PROGMEM my_symbols_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GREEN} ); +const rgblight_segment_t PROGMEM my_num_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_CORAL} ); +const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GOLDENROD} ); +const rgblight_segment_t PROGMEM my_mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_TURQUOISE} ); +const rgblight_segment_t PROGMEM my_media_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_MAGENTA} ); + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 3, HSV_RED}, + {7, 1, HSV_RED}, + {10, 3, HSV_RED}, + {17, 1, HSV_RED} +); + +const rgblight_segment_t PROGMEM my_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {3, 1, HSV_RED}, + {13, 1, HSV_RED} +); + +const rgblight_segment_t PROGMEM my_ctrl_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {4, 1, HSV_ORANGE}, + {14, 1, HSV_ORANGE} +); + +const rgblight_segment_t PROGMEM my_alt_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {5, 1, HSV_GOLD}, + {15, 1, HSV_GOLD} +); + +const rgblight_segment_t PROGMEM my_gui_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {9, 1, HSV_SPRINGGREEN}, + {19, 1, HSV_SPRINGGREEN} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_colemak_layer, + my_qwerty_layer, + my_game_layer, + my_fn_layer, + my_symbols_layer, + my_num_layer, + my_nav_layer, + my_mouse_layer, + my_media_layer, + my_capslock_layer, + my_shift_layer, + my_ctrl_layer, + my_alt_layer, + my_gui_layer +); + +void matrix_scan_keymap(void) { + uint8_t mods = mod_config(get_mods()); + rgblight_set_layer_state(10, mods & MOD_MASK_SHIFT); + rgblight_set_layer_state(11, mods & MOD_MASK_CTRL); + rgblight_set_layer_state(12, mods & MOD_MASK_ALT); + rgblight_set_layer_state(13, mods & MOD_MASK_GUI); +} +#endif + +void keyboard_post_init_user(void) { + rgblight_sethsv_noeeprom(HSV_BLUE); + keyboard_post_init_rgb(); +#ifdef RGBLIGHT_LAYERS + rgblight_layers = my_rgb_layers; +#else + rgblight_sethsv_noeeprom(HSV_BLUE); +#endif + /*debug_enable=true;*/ + /*debug_matrix=true;*/ +} + +//todo https://github.com/qmk/qmk_firmware/blob/debdc6379c7a72815df1f53e3406479381d243af/keyboards/crkbd/keymaps/soundmonster/keymap.c RGBRST + +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_LAYERS + for (int i = _QWERTY; i < __LAST; i++) { + rgblight_set_layer_state(i, layer_state_cmp(state, i)); + } +# ifdef RAW_ENABLE + send_layer_via_hid(state); +# endif +#endif + return state; +} + +#ifdef RGBLIGHT_LAYERS +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(9, led_state.caps_lock); + return true; +} +#endif + +#ifdef OLED_DRIVER_ENABLE +void suspend_power_down_user() { + oled_clear(); + oled_off(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + static const char PROGMEM logo[] = { + // canvas is 128x64. need 16 padding + // 80x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0, 0x60, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x7c, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x7c, 0xf8, 0xe0, 0x60, 0x20, 0x10, 0x10, 0x0c, 0x0f, 0x09, 0x08, 0x00, 0x09, 0x9b, 0x5c, 0x50, 0x10, 0x20, 0x40, 0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x17, 0x15, 0x3d, 0xef, 0xaf, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0xa0, 0xbf, 0xff, 0x3f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(logo, sizeof(logo)); + + oled_advance_page(false); + oled_advance_page(false); + oled_advance_page(false); + oled_advance_page(false); + oled_write_P(qmk_logo, false); + +#ifdef COMBO_ENABLE + oled_write_P(PSTR("Combos enabled: "), false); + if (is_combo_enabled()) { + oled_write_P(PSTR("Yes\n"), false); + } else { + oled_write_P(PSTR("No\n"), false); + } +#endif + +#ifdef SPLIT_MODS_ENABLE + uint8_t mods = get_mods() | get_weak_mods(); + oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); + oled_write_P(PSTR("\n"), false); + +#endif + +#ifdef WPM_ENABLE + // Write WPM + sprintf(wpm_str, "WPM: %03d", get_current_wpm()); + //oled_write_P(PSTR("\n"), false); + oled_write_P(PSTR(" "), false); + oled_write(wpm_str, false); +#endif +} + + +static void render_status(void) { + static bool isColemak = false; + // QMK Logo and version information + oled_write_P(PSTR("Kyria rev1.3\n\n"), false); + + oled_write_P(isColemak ? PSTR("COLEMAK ") : PSTR("QWERTY "), false); + + // Host Keyboard Layer Status + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + isColemak = false; + break; + case _SYMBOLS: + oled_write_P(PSTR("Shifted Sym\n"), false); + break; + case _NUM: + oled_write_P(PSTR("Numbers\n"), false); + break; + case _NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case _FN: + oled_write_P(PSTR("Fn\n"), false); + break; + case _GAME: + oled_write_P(PSTR("Game\n"), false); + isColemak = false; + break; + case _COLEMAK: + oled_write_P(PSTR("Colemak-DHm\n"), false); + isColemak = true; + break; + case _MEDIA: + oled_write_P(PSTR("Media keys\n"), false); + break; + case _MOUSE: + oled_write_P(PSTR("Mouse keys\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + uint8_t mods = get_mods() | get_weak_mods(); + oled_write_P(PSTR("\n"), false); + oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); + oled_write_P(PSTR("\n"), false); + +#define I3MASK MOD_BIT(KC_LGUI) +#define I3SMASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_LSFT)) +#define KMASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) + + oled_write_P((mods == I3MASK) ? PSTR("I3 ") : (mods == I3SMASK) ? PSTR("I3-SFT ") : PSTR(" "), false); + oled_write_P((mods == KMASK) ? PSTR("KITTY ") : PSTR(" "), false); + oled_write_P(PSTR("\n"), false); + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_logo(); + } +} +#endif + + +#ifdef RAW_ENABLE +void raw_hid_receive(uint8_t *data, uint8_t length) { + // messages from host + // add ability to set color + raw_hid_send(data, length); +} +#endif diff --git a/qmk/keyboards/kyria/keymaps/cwebster2/rules.mk b/qmk/keyboards/kyria/keymaps/cwebster2/rules.mk new file mode 100644 index 00000000..fe9ca3c2 --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/cwebster2/rules.mk @@ -0,0 +1,5 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RAW_ENABLE = yes +WPM_ENABLE = yes +COMBO_ENABLE = no diff --git a/qmk/keyboards/kyria/keymaps/drashna/config.h b/qmk/keyboards/kyria/keymaps/drashna/config.h index 5e9d8b01..1af947e7 100644 --- a/qmk/keyboards/kyria/keymaps/drashna/config.h +++ b/qmk/keyboards/kyria/keymaps/drashna/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 Thomas Baart +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * 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 diff --git a/qmk/keyboards/kyria/keymaps/drashna/keymap.c b/qmk/keyboards/kyria/keymaps/drashna/keymap.c index 98afff19..08f32812 100644 --- a/qmk/keyboards/kyria/keymaps/drashna/keymap.c +++ b/qmk/keyboards/kyria/keymaps/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" uint8_t is_master; diff --git a/qmk/keyboards/kyria/keymaps/winternebs/config.h b/qmk/keyboards/kyria/keymaps/winternebs/config.h new file mode 100644 index 00000000..db14011d --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/winternebs/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#pragma once + +#define OLED_FONT_H "keyboards/kyria/keymaps/winternebs/glcdfont.c" +#define OLED_FONT_END 127 +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#define FORCE_NKRO +#define ENCODER_RESOLUTION 4 + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/qmk/keyboards/kyria/keymaps/winternebs/glcdfont.c b/qmk/keyboards/kyria/keymaps/winternebs/glcdfont.c new file mode 100644 index 00000000..7303c6af --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/winternebs/glcdfont.c @@ -0,0 +1,55 @@ +#include "progmem.h" + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = {// 'download (1)', 192x32px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x5b, 0x4f, 0x5b, 0x3e, 0x00, 0x3e, 0x6b, 0x4f, 0x6b, +0x3e, 0x00, 0x1c, 0x3e, 0x7c, 0x3e, 0x1c, 0x00, 0x18, 0x3c, 0x7e, 0x3c, 0x18, 0x00, 0x1c, 0x57, +0x7d, 0x57, 0x1c, 0x00, 0x1c, 0x5e, 0x7f, 0x5e, 0x1c, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00, +0xff, 0xe7, 0xc3, 0xe7, 0xff, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xff, 0xe7, 0xdb, 0xe7, +0xff, 0x00, 0x30, 0x48, 0x3a, 0x06, 0x0e, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7f, +0x05, 0x05, 0x07, 0x00, 0x40, 0x7f, 0x05, 0x25, 0x3f, 0x00, 0x5a, 0x3c, 0xe7, 0x3c, 0x5a, 0x00, +0x7f, 0x3e, 0x1c, 0x1c, 0x08, 0x00, 0x08, 0x1c, 0x1c, 0x3e, 0x7f, 0x00, 0x14, 0x22, 0x7f, 0x22, +0x14, 0x00, 0x5f, 0x5f, 0x00, 0x5f, 0x5f, 0x00, 0x06, 0x09, 0x7f, 0x01, 0x7f, 0x00, 0x00, 0x66, +0x89, 0x95, 0x6a, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xa2, 0xff, 0xa2, 0x94, 0x00, +0x08, 0x04, 0x7e, 0x04, 0x08, 0x00, 0x10, 0x20, 0x7e, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2a, 0x1c, +0x08, 0x00, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x00, 0x1e, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0c, 0x1e, +0x0c, 0x1e, 0x0c, 0x00, 0x30, 0x38, 0x3e, 0x38, 0x30, 0x00, 0x06, 0x0e, 0x3e, 0x0e, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, +0x00, 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00, 0x23, 0x13, +0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1c, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00, 0x00, 0x2a, 0x1c, 0x7f, 0x1c, +0x2a, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, +0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00, 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00, 0x72, 0x49, 0x49, 0x49, +0x46, 0x00, 0x21, 0x41, 0x49, 0x4d, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7f, 0x10, 0x00, 0x27, 0x45, +0x45, 0x45, 0x39, 0x00, 0x3c, 0x4a, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1e, 0x00, 0x00, 0x00, 0x14, 0x00, +0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, +0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3e, 0x41, 0x5d, 0x59, 0x4e, 0x00, 0x7c, 0x12, 0x11, 0x12, 0x7c, 0x00, 0x7f, 0x49, 0x49, 0x49, +0x36, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x3e, 0x00, 0x7f, 0x49, +0x49, 0x49, 0x41, 0x00, 0x7f, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3e, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x41, 0x7f, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3f, +0x01, 0x00, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7f, 0x02, +0x1c, 0x02, 0x7f, 0x00, 0x7f, 0x04, 0x08, 0x10, 0x7f, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00, +0x7f, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3e, 0x41, 0x51, 0x21, 0x5e, 0x00, 0x7f, 0x09, 0x19, 0x29, +0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7f, 0x01, 0x03, 0x00, 0x3f, 0x40, +0x40, 0x40, 0x3f, 0x00, 0x1f, 0x20, 0x40, 0x20, 0x1f, 0x00, 0x3f, 0x40, 0x38, 0x40, 0x3f, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4d, +0x43, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, +0x41, 0x41, 0x7f, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7f, 0x28, 0x44, 0x44, +0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x38, 0x44, 0x44, 0x28, 0x7f, 0x00, 0x38, 0x54, +0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7e, 0x09, 0x02, 0x00, 0x18, 0xa4, 0xa4, 0x9c, 0x78, 0x00, +0x7f, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7d, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3d, +0x00, 0x00, 0x7f, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x40, 0x00, 0x00, 0x7c, 0x04, +0x78, 0x04, 0x78, 0x00, 0x7c, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0xfc, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xfc, 0x00, 0x7c, 0x08, 0x04, 0x04, +0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3f, 0x44, 0x24, 0x00, 0x3c, 0x40, +0x40, 0x20, 0x7c, 0x00, 0x1c, 0x20, 0x40, 0x20, 0x1c, 0x00, 0x3c, 0x40, 0x30, 0x40, 0x3c, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4c, 0x90, 0x90, 0x90, 0x7c, 0x00, 0x44, 0x64, 0x54, 0x4c, +0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x41, +0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3c, 0x26, 0x23, 0x26, 0x3c, 0x00 +}; \ No newline at end of file diff --git a/qmk/keyboards/kyria/keymaps/winternebs/keymap.c b/qmk/keyboards/kyria/keymaps/winternebs/keymap.c new file mode 100644 index 00000000..60b3464a --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/winternebs/keymap.c @@ -0,0 +1,725 @@ +/* Copyright 2019 Thomas Baart + * + * 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 + +#ifdef CONSOLE_ENABLE + #include +#endif +enum custom_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + ADJUST, + SBKSP, + ENDW +}; + +enum layers { + _QWERTY = 0, + _WORKMAN, + _LOWER, + _RAISE, + _ADJUST +}; +#define RAISE LT(_RAISE, KC_ENT) +#define LOWER MO(_LOWER) +#define HOME_A KC_A +#define HOME_S KC_S +#define HOME_H CTL_T(KC_H) +#define HOME_T SFT_T(KC_T) +#define HOME_N SFT_T(KC_N) +#define HOME_E CTL_T(KC_E) +#define HOME_O KC_O +#define HOME_I KC_I +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | CTRL | Z | X | C | V | B | | | | | | N | M | , | . | / | ENTER | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | ALT | LOWER| Space| | | SHIFT| Bksp | RAISE| | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, LOWER, KC_SPC, _______, KC_LSFT, KC_BSPC, RAISE, _______, _______ + ), + /* + * Workman Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | D | R | W | B | | J | F | U | P | ; | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB | A | S | H | T | G | | Y | N | E | O | I | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | Z | X | M | C | V | SHIFT| Space| | | ENTER| K | L | , | . | / | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | ESC | LOWER| Space| SWAP | | SWAP | Bksp | RAISE| | | + * `----------------------------------' `----------------------------------' + */ + [_WORKMAN] = LAYOUT( + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + KC_TAB, HOME_A, HOME_S, HOME_H, HOME_T, KC_G, KC_Y, HOME_N, HOME_E, HOME_O, HOME_I, KC_QUOT, + XXXXXXX, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LSFT, KC_SPC, SH_MON, KC_ENT, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, + KC_LGUI, KC_LALT, LOWER, KC_SPC, SH_MON, SH_MON, KC_BSPC, RAISE, XXXXXXX, _______ + ), +/* + * Lower Layer: NUM/symb + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | DEL | $ | + | ( | ) | @ | | | | - | = | _ | * | \ | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | ! | # | { | } | ~ | | | | | | & | [ | ] | % | ^ | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |prints| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DEL, KC_DLR, KC_PLUS, KC_LPRN, KC_RPRN, KC_AT, KC_PIPE, KC_MINS, KC_EQL, KC_UNDS, KC_ASTR, KC_BSLS, + _______, KC_EXLM, KC_HASH, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_LBRC, KC_RBRC, KC_PERC, KC_CIRC, _______, + KC_PSCR, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______ + ), + /* + * Raise Layer: VIM Movement + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | PgDn | | Word | Back | | Down | | PgUp | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | Left | | | | | | End | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | Up | Right| | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, KC_PGDN, _______, C(KC_RGHT), C(KC_LEFT), KC_DOWN, _______, KC_PGUP, _______, _______, _______, + _______, _______, _______, KC_LEFT, _______, _______, _______, _______, ENDW, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* + * Layer template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | |QWERTY|WRKMAN| | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} +#endif +#ifdef OLED_DRIVER_ENABLE +bool left = false; +bool right = false; +bool lastl = false; +bool lastr = false; +#endif +bool bksp = false; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u, total: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.key.col + 10 * record->event.key.row); + #endif + #ifdef OLED_DRIVER_ENABLE + if(record->event.pressed){ + uint8_t n = record->event.key.col + 10 * record->event.key.row; + if (n<40) { + left = true; + } + else { + right = true; + } + } + #endif + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + case SBKSP: + if (record->event.pressed) { + register_code(KC_LSFT); + bksp = true; + } + else { + unregister_code(KC_LSFT); + if (bksp) { + tap_code(KC_BSPC); + } + } + return false; + break; + case ENDW: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_RGHT); + unregister_code(KC_LCTL); + tap_code(KC_LEFT); + } + } + bksp = false; + return true; + +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + + + +char wpm_str[10]; +// WPM-responsive animation stuff here +#define IDLE_FRAMES 2 +#define IDLE_SPEED 10 // below this wpm value your animation will idle + + +#define TAP_FRAMES 3 + +#define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 896 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; +// Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { +// 'bongo0', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { +// 'bongo1', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x40, +0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x10, 0x10, 0x90, 0x90, 0x90, 0x90, 0x90, 0xa0, 0xa0, +0xa0, 0xa0, 0xa0, 0xc0, 0xc0, 0xc1, 0x80, 0x80, 0x81, 0x81, 0x02, 0x06, 0x84, 0x7c, 0x5f, 0x58, +0x4c, 0x46, 0x42, 0x42, 0x42, 0x43, 0x61, 0x23, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xa0, 0x20, 0x20, +0x30, 0x10, 0x10, 0x18, 0x08, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03, 0x01, 0x08, 0x18, 0x18, 0x28, +0x68, 0x44, 0x84, 0x84, 0x86, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x09, 0x07, 0x01, 0x01, 0x03, +0x06, 0x06, 0x10, 0x3c, 0x4c, 0xc8, 0x88, 0x08, 0x08, 0x18, 0x10, 0x30, 0x60, 0xc0, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, +0x01, 0x01, 0x81, 0xc1, 0x21, 0x31, 0x11, 0x0d, 0x05, 0x01, 0x03, 0x02, 0x06, 0x0e, 0xc6, 0xe4, +0x04, 0x04, 0x04, 0x06, 0x02, 0x03, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, +0x81, 0x01, 0x01, 0x01, 0x00, 0x00, 0x07, 0x0c, 0x30, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1e, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x01, 0x07, +0x1c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, +0x06, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x04, 0x0c, 0x3c, 0x15, 0xd3, 0x72, 0x10, 0x20, +0x20, 0x20, 0x21, 0x23, 0x26, 0x24, 0x2c, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { +// 'bongo2', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, +0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, +0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, +0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, +0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + // 'bongo3', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, +0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, +0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, +0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + // 'bongo4', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, +0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, +0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, +0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, +0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, +0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { +// 'bongo5', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, +0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, +0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, +0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, +0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <= IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + else { + // if is true 2 frames in a row make it false; + if(left && !lastl && right && !lastr) { + oled_write_raw_P(tap[2], ANIM_SIZE); + } + else if (left && !lastl) { + oled_write_raw_P(tap[0], ANIM_SIZE); + } + else if (right && !lastr) { + oled_write_raw_P(tap[1], ANIM_SIZE); + } + else { + oled_write_raw_P(prep[0], ANIM_SIZE); + left = false; + right = false; + } + lastl = left; + lastr = right; + left = false; + right = false; + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +bool wpm_keycode_user(uint16_t keycode) { + return true; +} +static void render_logo(void) { + oled_set_cursor(0,0); + oled_write_P(PSTR(" play asc "), false); + oled_set_cursor(3,3); + oled_write_P(PSTR(" play asc "), false); + oled_set_cursor(6,6); + oled_write_P(PSTR(" play asc "), false); +} +void oled_task_user(void) { + if (is_keyboard_master()) { + render_anim(); + oled_set_cursor(0,7); + sprintf(wpm_str, "APM: %03d ", get_current_wpm()); + oled_write(wpm_str, false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("base"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJUST"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + } else { + render_logo(); + oled_scroll_left(); + + } +} +#endif diff --git a/qmk/keyboards/kyria/keymaps/winternebs/rules.mk b/qmk/keyboards/kyria/keymaps/winternebs/rules.mk new file mode 100644 index 00000000..5831e23c --- /dev/null +++ b/qmk/keyboards/kyria/keymaps/winternebs/rules.mk @@ -0,0 +1,12 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more +NKRO_ENABLE = yes +WPM_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +AUDIO_ENABLE = no # Audio output +SPACE_CADET_ENABLE = no +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no +BOOTMAGIC_ENABLE = no +SWAP_HANDS_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/kyria/kyria.c b/qmk/keyboards/kyria/kyria.c index 21ed5e84..1692093f 100644 --- a/qmk/keyboards/kyria/kyria.c +++ b/qmk/keyboards/kyria/kyria.c @@ -14,3 +14,4 @@ * along with this program. If not, see . */ #include "kyria.h" + diff --git a/qmk/keyboards/kyria/rev1/rev1.c b/qmk/keyboards/kyria/rev1/rev1.c index 9aedcc13..970a359e 100644 --- a/qmk/keyboards/kyria/rev1/rev1.c +++ b/qmk/keyboards/kyria/rev1/rev1.c @@ -1 +1,17 @@ -#include "rev1.h" \ No newline at end of file +#include "rev1.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) + +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} +}; + +#endif diff --git a/qmk/keyboards/launchpad/keymaps/drashna/config.h b/qmk/keyboards/launchpad/keymaps/drashna/config.h new file mode 100644 index 00000000..212b1da8 --- /dev/null +++ b/qmk/keyboards/launchpad/keymaps/drashna/config.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + +#pragma once + +/* Underlight Configuration */ +#undef RGB_DI_PIN +#define RGB_DI_PIN F5 +#define RGBLIGHT_ANIMATIONS +#undef RGBLED_NUM +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define DRIVER_LED_TOTAL RGBLED_NUM +#define B7_AUDIO +#define AUDIO_CLICKY diff --git a/qmk/keyboards/launchpad/keymaps/drashna/keymap.c b/qmk/keyboards/launchpad/keymaps/drashna/keymap.c new file mode 100644 index 00000000..f8e4d1a4 --- /dev/null +++ b/qmk/keyboards/launchpad/keymaps/drashna/keymap.c @@ -0,0 +1,107 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 + +enum local_layers { + _QWERTY, + _RGB, + _FUNC, +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-------------. + * | 1 | 2 | + * |------+------| + * | 3 | 4 | + * |------+------| + * | 5 | 6 | + * |------+------| + * | FUNC | RGB | + * `-------------' + */ + [_QWERTY] = LAYOUT( \ + KC_1, KC_2, \ + KC_3, KC_4, \ + KC_5, KC_6, \ + MO(_FUNC), TG(_RGB) \ + ), + + /* RGB + * ,-------------. + * | Mode-| Mode+| + * |------+------| + * | HUE- | HUE+ | + * |------+------| + * | SAT- | SAT+ | + * |------+------| + * |RGBTOG| | + * `-------------' + */ + [_RGB] = LAYOUT( \ + RGB_RMOD, RGB_MOD, \ + RGB_HUD, RGB_HUI, \ + RGB_SAD, RGB_SAI, \ + RGB_TOG, KC_TRNS \ + ), + + /* Function + * ,-------------. + * | Q |CALDEL| + * |------+------| + * | A |TSKMGR| + * |------+------| + * | Z | X | + * |------+------| + * | | C | + * `-------------' + */ + [_FUNC] = LAYOUT( \ + KC_Q, CALTDEL, \ + KC_A, TSKMGR, \ + KC_Z, KC_X, \ + _______, RESET \ + ) + +}; + + + + +#ifdef RGB_MATRIX_ENABLE + led_config_t g_led_config = { + { + { 7, 0 }, + { 6, 1 }, + { 5, 2 }, + { 4, 3 }, + },{ + { 121, 2 }, { 121, 23 }, + { 121, 41 }, { 121, 60 }, + { 103, 2 }, { 103, 23 }, + { 103, 41 }, { 103, 60 }, + },{ + 1, 1, 1, 1, + 1, 1, 1, 1, + } + }; +#endif diff --git a/qmk/keyboards/launchpad/keymaps/drashna/rules.mk b/qmk/keyboards/launchpad/keymaps/drashna/rules.mk new file mode 100644 index 00000000..463b8559 --- /dev/null +++ b/qmk/keyboards/launchpad/keymaps/drashna/rules.mk @@ -0,0 +1,6 @@ +BOOTLOADER = atmel-dfu + +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no +BOOTMAGIC_ENABLE = lite +RGB_MATRIX_ENABLE = WS2812 diff --git a/qmk/keyboards/lazydesigners/the30/keymaps/via/keymap.c b/qmk/keyboards/lazydesigners/the30/keymaps/via/keymap.c new file mode 100644 index 00000000..1a1b10fd --- /dev/null +++ b/qmk/keyboards/lazydesigners/the30/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1) + ), + [1] = LAYOUT_ortho_3x10( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT_ortho_3x10( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = LAYOUT_ortho_3x10( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/qmk/keyboards/lazydesigners/the30/keymaps/via/rules.mk b/qmk/keyboards/lazydesigners/the30/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/lazydesigners/the30/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/lets_split/keymaps/geripgeri/config.h b/qmk/keyboards/lets_split/keymaps/geripgeri/config.h index 6e71ea2b..1091789b 100644 --- a/qmk/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/qmk/keyboards/lets_split/keymaps/geripgeri/config.h @@ -21,9 +21,6 @@ along with this program. If not, see . #pragma once -#define AUTO_SHIFT_TIMEOUT 200 -#define NO_AUTO_SHIFT_NUMERIC - // RGB lighting #define RGBLIGHT_SLEEP #undef RGBLED_NUM diff --git a/qmk/keyboards/lets_split/keymaps/geripgeri/keymap.c b/qmk/keyboards/lets_split/keymaps/geripgeri/keymap.c index b268fb90..62e35704 100644 --- a/qmk/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/qmk/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -5,7 +5,6 @@ enum layer_names { _LOWER, _RAISE, _NUMPAD, - _GAMING, _ADJUST }; @@ -118,14 +117,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | TGLAS| | | | | | | | | | | |GAMING| + * | | | | | | | | | | | | | | * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( RESET, EEP_RST, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______, _______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_GAMING) + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Numpad @@ -144,27 +143,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ -), - -/* Gaming - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | RAISE| | | | LOWER| | | | | - * `-----------------------------------------' `-----------------------------------------' - */ -[_GAMING] = LAYOUT_ortho_4x12( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ )}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case RGB_VAI: @@ -288,14 +268,9 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_setrgb_at(0,255,0, 0); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); break; - case _GAMING: - rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5; - autoshift_disable(); - break; - default: + default: rgb_mode = RGBLIGHT_MODE_BREATHING + 1; rgblight_mode_noeeprom(rgb_mode); - autoshift_enable(); break; } return state; diff --git a/qmk/keyboards/lets_split/keymaps/geripgeri/rules.mk b/qmk/keyboards/lets_split/keymaps/geripgeri/rules.mk index 5cefc001..d2259fe9 100644 --- a/qmk/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/qmk/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -1,5 +1,3 @@ -AUTO_SHIFT_ENABLE = yes -AUTO_SHIFT_MODIFIERS = no RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/qmk/keyboards/lfkeyboards/smk65/info.json b/qmk/keyboards/lfkeyboards/smk65/info.json index c81cc065..dfba5737 100644 --- a/qmk/keyboards/lfkeyboards/smk65/info.json +++ b/qmk/keyboards/lfkeyboards/smk65/info.json @@ -5,14 +5,11 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { - "key_count": 68, + "LAYOUT_65_ansi": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] }, - - "LAYOUT_iso": { - "key_count": 69, - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + "LAYOUT_65_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/qmk/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c b/qmk/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c index 9c8ebdb6..996bee5f 100644 --- a/qmk/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c +++ b/qmk/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c @@ -1,12 +1,25 @@ +/* +Copyright 2020 LFKeyboards +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 -enum keymap_layout { - VANILLA = 0, - FUNC, - SETTINGS, +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap VANILLA: (Base Layer) Default Layer * ,------------------------------------------------------------.----. @@ -21,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig | * `-----------------------------------------------------------------' */ - [VANILLA] = LAYOUT( - KC_GESC, 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_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_DEL, \ - 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_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ + [_BASE] = LAYOUT_65_ansi( + KC_GESC, 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_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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT ), /* Keymap VANILLA: Function Layer @@ -42,35 +55,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig | * `-----------------------------------------------------------------' */ - [FUNC] = LAYOUT( - KC_GRV, 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_F13, KC_F14, \ - MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ - AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD, \ - KC_FN5, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, \ - _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI \ - ), + [_FN] = LAYOUT_65_ansi( + KC_GRV, 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_F13, KC_F14, + MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD, + KC_FN5, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI + ) }; +#ifndef NO_ACTION_FUNCTION const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click [2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click [3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click [4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click [5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click - }; - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} +}; +#endif diff --git a/qmk/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk b/qmk/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk index d8fe33f6..0cc9a7b7 100644 --- a/qmk/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk +++ b/qmk/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk @@ -1,26 +1,11 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # +AUDIO_ENABLE = no # Audio output +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Disable RGB underlight -RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812 -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -TAP_DANCE_ENABLE = no - -ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled -WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms +ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled +WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms ifeq ($(strip $(ISSI_ENABLE)), yes) @@ -30,4 +15,3 @@ endif ifeq ($(strip $(WATCHDOG_ENABLE)), yes) TMK_COMMON_DEFS += -DWATCHDOG_ENABLE endif - diff --git a/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c b/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c index ebf08512..c93abfd3 100644 --- a/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c +++ b/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c @@ -1,12 +1,25 @@ +/* +Copyright 2020 LFKeyboards +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 -enum keymap_layout { - VANILLA = 0, - FUNC, - SETTINGS, +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap VANILLA: (Base Layer) Default Layer * ,------------------------------------------------------------.----. @@ -21,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig | * `-----------------------------------------------------------------' */ - [VANILLA] = LAYOUT_iso( - KC_GESC, 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_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_ENT, KC_DEL, \ - 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_PGUP, \ - 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, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ + [_BASE] = LAYOUT_65_iso( + KC_GESC, 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_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_DEL, + 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_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT ), /* Keymap VANILLA: Function Layer @@ -42,35 +55,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig | * `-----------------------------------------------------------------' */ - [FUNC] = LAYOUT_iso( - KC_GRV, 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_F13, KC_F14, \ - MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_TOG, \ - AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, \ - KC_FN5, _______, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, \ - _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI \ + [_FN] = LAYOUT_65_iso( + KC_GRV, 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_F13, KC_F14, + MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + AU_TOG, KC_FN1, KC_FN3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD, + KC_FN5, _______, KC_FN2, KC_FN4, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI ), }; +#ifndef NO_ACTION_FUNCTION const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click [2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click [3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click [4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click [5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click - }; - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} +}; +#endif diff --git a/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk b/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk index 312dfbc5..0cc9a7b7 100644 --- a/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk +++ b/qmk/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk @@ -1,26 +1,11 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Disable RGB underlight -RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812 -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -TAP_DANCE_ENABLE = no +AUDIO_ENABLE = no # Audio output +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled -WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms +WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms ifeq ($(strip $(ISSI_ENABLE)), yes) @@ -30,21 +15,3 @@ endif ifeq ($(strip $(WATCHDOG_ENABLE)), yes) TMK_COMMON_DEFS += -DWATCHDOG_ENABLE endif - - -# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired -# # -# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight -# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB -# # -# # Set to B, C or D -# LFK_REV = D - -# ifeq ($(LFK_REV), B) -# MCU = atmega32u4 -# else -# MCU = at90usb1286 -# endif -# OPT_DEFS += -DLFK_REV_$(LFK_REV) -# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\" - diff --git a/qmk/keyboards/lfkeyboards/smk65/readme.md b/qmk/keyboards/lfkeyboards/smk65/readme.md index 0d04ac5f..50d52472 100644 --- a/qmk/keyboards/lfkeyboards/smk65/readme.md +++ b/qmk/keyboards/lfkeyboards/smk65/readme.md @@ -1,14 +1,17 @@ -SMK65 -=== +# SMK65 65% layout based on Mat3o's Whitefox, but with support for SMK switches. -Keyboard Maintainer: [LFKeyboards](https://github.com/lfkeyboards) -Hardware Supported: SMK65 -Hardware Availability: [LFKeyboards.com](https://www.lfkeyboards.com/) +* Keyboard Maintainer: [LFKeyboards](https://github.com/lfkeyboards) +* Hardware Supported: SMK65 +* Hardware Availability: [LFKeyboards.com](https://www.lfkeyboards.com/) Make example for this keyboard (after setting up your build environment): make lfkeyboards/smk65:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. \ No newline at end of file +Flashing example for this keyboard: + + make lfkeyboards/smk65: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). \ No newline at end of file diff --git a/qmk/keyboards/lfkeyboards/smk65/revb/config.h b/qmk/keyboards/lfkeyboards/smk65/revb/config.h new file mode 100644 index 00000000..0d4fe40f --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revb/config.h @@ -0,0 +1,116 @@ +/* +Copyright 2020 LFKeyboards +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4C46 // "LF" +#define PRODUCT_ID 0x565B // "s65b" +#define DEVICE_VER 0x0006 +#define MANUFACTURER LFKeyboards +#define PRODUCT SMK65v2 + +// RevA +// #define DIODE_DIRECTION COL2ROW +// #define MATRIX_ROWS 5 +// #define MATRIX_COLS 16 +// #define MATRIX_ROW_PINS {B7, F7, F6, F5, F4} +// #define MATRIX_COL_PINS {F0, F1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C7, B3, B2, B1, B0} +// #define UNUSED_PINS {} + +// RevB +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 +#define MATRIX_ROW_PINS {D6, D7, E0, C3, C4} +#define MATRIX_COL_PINS {F2, C5, E5, E4, B7, B6, B5, B4, B3, B2, B1, B0, E1, C0, C1, C2} +#define UNUSED_PINS {} +#define RGBLED_NUM 20 // Number of LEDs + +//RevB only: + +#define AUDIO_VOICES +#define C6_AUDIO +// #define B5_AUDIO + +#define BACKLIGHT_LEVELS 8 +#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255} + +#define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile +#define RGBLED_NUM 20 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/lfkeyboards/smk65/revb/revb.c b/qmk/keyboards/lfkeyboards/smk65/revb/revb.c new file mode 100644 index 00000000..7498febe --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revb/revb.c @@ -0,0 +1,171 @@ +/* +Copyright 2020 LFKeyboards +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 +#include +#include +#include "smk65.h" +#include "keymap.h" +#include "debug.h" +#include "issi.h" +#include "TWIlib.h" +#include "lighting.h" + +uint16_t click_hz = CLICK_HZ; +uint16_t click_time = CLICK_MS; +uint8_t click_toggle = CLICK_ENABLED; + + +void matrix_init_kb(void) +{ + matrix_init_user(); + +#ifdef AUDIO_ENABLE + // audio_init() sets PB5 to output and drives it low, which breaks our matrix + // so reset PB5 to input + cbi(DDRB, 5); + sbi(PORTB, 5); +#else + // If we're not using the audio pin, drive it low + sbi(DDRC, 6); + cbi(PORTC, 6); +#endif + +#ifdef ISSI_ENABLE + issi_init(); +#endif +} + +void matrix_scan_kb(void) +{ +#ifdef WATCHDOG_ENABLE + wdt_reset(); +#endif + matrix_scan_user(); +} + +void click(uint16_t freq, uint16_t duration){ +#ifdef AUDIO_ENABLE + if(freq >= 100 && freq <= 20000 && duration < 100){ + play_note(freq, 10); + for (uint16_t i = 0; i < duration; i++){ + _delay_ms(1); + } + stop_all_notes(); + } +#endif +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) +{ + // Test code that turns on the switch led for the key that is pressed + // set_backlight_by_keymap(record->event.key.col, record->event.key.row); + if (click_toggle && record->event.pressed){ + click(click_hz, click_time); + } + if (keycode == RESET) { + reset_keyboard_kb(); + } else { + } + return process_record_user(keycode, record); +} + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ +#ifdef AUDIO_ENABLE + int8_t sign = 1; +#endif + if(id == LFK_ESC_TILDE){ + // Send ~ on shift-esc + void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key; + uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); + method(shifted ? KC_GRAVE : KC_ESCAPE); + send_keyboard_report(); + }else if(event->event.pressed){ + switch(id){ + case LFK_SET_DEFAULT_LAYER: + // set/save the current base layer to eeprom, falls through to LFK_CLEAR + eeconfig_update_default_layer(1UL << opt); + default_layer_set(1UL << opt); + case LFK_CLEAR: + // Go back to default layer + layer_clear(); + break; +#ifdef AUDIO_ENABLE + case LFK_CLICK_FREQ_LOWER: + sign = -1; // continue to next statement + case LFK_CLICK_FREQ_HIGHER: + click_hz += sign * 100; + click(click_hz, click_time); + break; + case LFK_CLICK_TOGGLE: + if(click_toggle){ + click_toggle = 0; + click(4000, 100); + click(1000, 100); + }else{ + click_toggle = 1; + click(1000, 100); + click(4000, 100); + } + break; + case LFK_CLICK_TIME_SHORTER: + sign = -1; // continue to next statement + case LFK_CLICK_TIME_LONGER: + click_time += sign; + click(click_hz, click_time); + break; +#endif + case LFK_DEBUG_SETTINGS: + dprintf("Click:\n"); + dprintf(" toggle: %d\n", click_toggle); + dprintf(" freq(hz): %d\n", click_hz); + dprintf(" duration(ms): %d\n", click_time); + break; + } + } +} + +void reset_keyboard_kb(){ +#ifdef WATCHDOG_ENABLE + MCUSR = 0; + wdt_disable(); + wdt_reset(); +#endif + reset_keyboard(); +} + +// LFK lighting info +const uint8_t switch_matrices[] = {0, 1}; +const uint8_t rgb_matrices[] = {6, 7}; +// const uint8_t rgb_sequence[] = { +// 14, 24, 23, 22, 21, 20, 19, 18, 26, 25, 28, 29, +// 30, 31, 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 +// }; +const uint8_t rgb_sequence[] = { + 25, 28, 29, + 30, 31, 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 +}; +// Maps switch LEDs from Row/Col to ISSI matrix. +// Value breakdown: +// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +// / \ ISSI Col | ISSI Row | +// matrix idx +// const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = +// KEYMAP( +// 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91, +// 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1, +// 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, +// 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2, +// 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1); diff --git a/qmk/keyboards/lfkeyboards/smk65/revb/revb.h b/qmk/keyboards/lfkeyboards/smk65/revb/revb.h new file mode 100644 index 00000000..3d3e5181 --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revb/revb.h @@ -0,0 +1,134 @@ +/* +Copyright 2020 LFKeyboards +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 . +*/ + +#pragma once + +/* if the kb.h file exists (because we're running from qmkbuilder) include it */ +#ifdef __has_include +#if __has_include("kb.h") +#include "kb.h" +#endif +#endif + +#include "quantum.h" +#include "matrix.h" +#include + +#ifndef cbi +#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) +#endif + +#ifndef sbi +#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) +#endif + + +typedef struct RGB_Color { + uint16_t red; + uint16_t green; + uint16_t blue; +} RGB_Color; + +typedef struct Layer_Info { + uint32_t layer; + uint32_t mask; + RGB_Color color; +} Layer_Info; + +extern const uint32_t layer_count; +extern const Layer_Info layer_info[]; + +enum action_functions { + LFK_CLEAR = 0, // Resets all layers + LFK_ESC_TILDE, // esc+lshift = ~ + LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom + LFK_CLICK_TOGGLE, // Adjusts click duration + LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency + LFK_CLICK_FREQ_LOWER, // Adjusts click frequency + LFK_CLICK_TIME_LONGER, // Adjusts click duration + LFK_CLICK_TIME_SHORTER, // Adjusts click duration + LFK_DEBUG_SETTINGS, // prints LED and click settings to HID + LFK_LED_TEST // cycles through switch and RGB LEDs +}; + +#define CLICK_HZ 500 +#define CLICK_MS 2 +#define CLICK_ENABLED 0 + +void reset_keyboard_kb(void); +void click(uint16_t freq, uint16_t duration); + +// readability +#define ___ KC_NO + +/* Vanilla Keymap */ +// This a shortcut to help you visually see your layout. +/* +* ,-------------------------------------------------------------------------------. +* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G | +* |-------------------------------------------------------------------------------| +* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G | +* |-------------------------------------------------------------------------------| +* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G | +* |-------------------------------------------------------------------------------| +* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G | +* |-------------------------------------------------------------------------------| +* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E | +* `-------------------------------------------------------------------------------' +*/ +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_65_ansi( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ + k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ + k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ +) { \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ + { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ +} + +#define LAYOUT_65_iso( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2G, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k2F, k3G, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ + k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ +) { \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ +} + +// TODO: remove backwards compatibility with previous keymaps +#define LAYOUT LAYOUT_65_ansi +#define LAYOUT_iso( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ + k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ +) { \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, ___, k1G }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ +} diff --git a/qmk/keyboards/lfkeyboards/smk65/revb/rules.mk b/qmk/keyboards/lfkeyboards/smk65/revb/rules.mk new file mode 100644 index 00000000..9e823724 --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revb/rules.mk @@ -0,0 +1,16 @@ +# MCU name +MCU = at90usb646 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812 +AUDIO_ENABLE = no # Audio output + +# Extra source files for IS3731 lighting +SRC += TWIlib.c issi.c lighting.c diff --git a/qmk/keyboards/lfkeyboards/smk65/revf/config.h b/qmk/keyboards/lfkeyboards/smk65/revf/config.h new file mode 100644 index 00000000..d2cb5226 --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revf/config.h @@ -0,0 +1,134 @@ +/* +Copyright 2020 LFKeyboards +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4C46 // "LF" +#define PRODUCT_ID 0x565F // "s65f" +#define DEVICE_VER 0x0006 +#define MANUFACTURER LFKeyboards +#define PRODUCT SMK65v2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B0, B3, B2, B1, F5 } +#define MATRIX_COL_PINS { E6, F4, B7, D5, D3, D2, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +//#define RGB_DI_PIN E2 +//#ifdef RGB_DI_PIN +# define RGBLED_NUM 28 +//# define RGBLIGHT_HUE_STEP 8 +//# define RGBLIGHT_SAT_STEP 8 +//# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/qmk/keyboards/lfkeyboards/smk65/revf/keymaps/via/keymap.c b/qmk/keyboards/lfkeyboards/smk65/revf/keymaps/via/keymap.c new file mode 100644 index 00000000..ca2fe748 --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revf/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2020 LFKeyboards +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, 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_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_DEL, + 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_BSLS, KC_ENT, KC_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_GRV, 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_F13, KC_F14, KC_F15, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/lfkeyboards/smk65/revf/keymaps/via/rules.mk b/qmk/keyboards/lfkeyboards/smk65/revf/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revf/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/lfkeyboards/smk65/revf/revf.h b/qmk/keyboards/lfkeyboards/smk65/revf/revf.h new file mode 100644 index 00000000..35238fdc --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revf/revf.h @@ -0,0 +1,71 @@ +/* +Copyright 2020 LFKeyboards +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 . +*/ + +#pragma once + +#include "quantum.h" + +// readability +#define ___ KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_65_ansi( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ + k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ + k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ +) { \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ + { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ +} + +#define LAYOUT_65_iso( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2G, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k2F, k3G, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ + k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ +) { \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___, k3G }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ +} + +#define LAYOUT_all( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, k3G, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ + k51, k52, k53, k55, k57, k59, k5B, k5C, k5D, k5E, k3E, k4E \ +) { \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k51, k52, k53, ___, k55, ___, k57, ___, k59, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ +} diff --git a/qmk/keyboards/lfkeyboards/smk65/revf/rules.mk b/qmk/keyboards/lfkeyboards/smk65/revf/rules.mk new file mode 100644 index 00000000..1d20f1e2 --- /dev/null +++ b/qmk/keyboards/lfkeyboards/smk65/revf/rules.mk @@ -0,0 +1,11 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +RGBLIGHT_ENABLE = no # TODO: Enable keyboard RGB underglow +RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812 diff --git a/qmk/keyboards/lfkeyboards/smk65/rules.mk b/qmk/keyboards/lfkeyboards/smk65/rules.mk index d3f009e4..26bf8cd8 100644 --- a/qmk/keyboards/lfkeyboards/smk65/rules.mk +++ b/qmk/keyboards/lfkeyboards/smk65/rules.mk @@ -1,15 +1,20 @@ -# MCU name -MCU = at90usb646 +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu +DEFAULT_FOLDER = lfkeyboards/smk65/revb -# Extra source files for IS3731 lighting -SRC = TWIlib.c issi.c lighting.c +LAYOUTS = 65_ansi 65_iso diff --git a/qmk/keyboards/lfkeyboards/smk65/smk65.h b/qmk/keyboards/lfkeyboards/smk65/smk65.h index 4fe5300c..534b763d 100644 --- a/qmk/keyboards/lfkeyboards/smk65/smk65.h +++ b/qmk/keyboards/lfkeyboards/smk65/smk65.h @@ -1,107 +1,23 @@ -#ifndef SMK65_H -#define SMK65_H +/* +Copyright 2020 LFKeyboards +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 . +*/ -/* if the kb.h file exists (because we're running from qmkbuilder) include it */ -#ifdef __has_include -#if __has_include("kb.h") -#include "kb.h" -#endif -#endif +#pragma once #include "quantum.h" -#include "matrix.h" -#include -#ifndef cbi -#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) +#ifdef KEYBOARD_lfkeyboards_smk65_revb + #include "revb.h" +#elif KEYBOARD_lfkeyboards_smk65_revf + #include "revf.h" #endif - -#ifndef sbi -#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) -#endif - - -typedef struct RGB_Color { - uint16_t red; - uint16_t green; - uint16_t blue; -} RGB_Color; - -typedef struct Layer_Info { - uint32_t layer; - uint32_t mask; - RGB_Color color; -} Layer_Info; - -extern const uint32_t layer_count; -extern const Layer_Info layer_info[]; - -enum action_functions { - LFK_CLEAR = 0, // Resets all layers - LFK_ESC_TILDE, // esc+lshift = ~ - LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom - LFK_CLICK_TOGGLE, // Adjusts click duration - LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency - LFK_CLICK_FREQ_LOWER, // Adjusts click frequency - LFK_CLICK_TIME_LONGER, // Adjusts click duration - LFK_CLICK_TIME_SHORTER, // Adjusts click duration - LFK_DEBUG_SETTINGS, // prints LED and click settings to HID - LFK_LED_TEST // cycles through switch and RGB LEDs -}; - -#define CLICK_HZ 500 -#define CLICK_MS 2 -#define CLICK_ENABLED 0 - -void reset_keyboard_kb(void); -void click(uint16_t freq, uint16_t duration); - -// readability -#define ___ KC_NO - -/* Vanilla Keymap */ -// This a shortcut to help you visually see your layout. -/* -* ,-------------------------------------------------------------------------------. -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G | -* |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G | -* |-------------------------------------------------------------------------------| -* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G | -* |-------------------------------------------------------------------------------| -* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G | -* |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E | -* `-------------------------------------------------------------------------------' -*/ -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ - k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ - k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ -) { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ - { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ - { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ -} - -#define LAYOUT_iso( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ - k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ -) { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, ___, k1G }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ - { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ }, \ -} - -#endif //SMK65_H diff --git a/qmk/keyboards/lily58/keymaps/bcat/keymap.c b/qmk/keyboards/lily58/keymaps/bcat/keymap.c index 294f9e6c..69864cd0 100644 --- a/qmk/keyboards/lily58/keymaps/bcat/keymap.c +++ b/qmk/keyboards/lily58/keymaps/bcat/keymap.c @@ -13,9 +13,9 @@ enum layer { #define LY_RSE MO(LAYER_RAISE) #define KY_CSPC LCTL(KC_SPC) -#define KY_LOCK LGUI(KC_L) -#define KY_WINL LGUI(KC_LEFT) -#define KY_WINR LGUI(KC_RGHT) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/qmk/keyboards/lily58/keymaps/bcat/readme.md b/qmk/keyboards/lily58/keymaps/bcat/readme.md index 6235ff13..84c2fc33 100644 --- a/qmk/keyboards/lily58/keymaps/bcat/readme.md +++ b/qmk/keyboards/lily58/keymaps/bcat/readme.md @@ -22,7 +22,7 @@ browser back/forward navigation keys. ## Lower layer -![Lower layer layout](https://i.imgur.com/JVF1p1Q.png) +![Lower layer layout](https://i.imgur.com/sNKWpUC.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) diff --git a/qmk/keyboards/lily58/keymaps/drasbeck/config.h b/qmk/keyboards/lily58/keymaps/drasbeck/config.h new file mode 100644 index 00000000..ffaf5f4b --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/drasbeck/config.h @@ -0,0 +1,46 @@ +/* +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ diff --git a/qmk/keyboards/lily58/keymaps/drasbeck/keymap.c b/qmk/keyboards/lily58/keymaps/drasbeck/keymap.c new file mode 100644 index 00000000..0fc1bfb7 --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/drasbeck/keymap.c @@ -0,0 +1,166 @@ +/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. + */ + +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_NUBS, KC_LCTL + ), + + [_LOWER] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_MINS, KC_EQL, KC_RBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RO, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_RAISE] = LAYOUT( + KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC, + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_RO, KC_SFTENT, + KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS + ), + + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +int RGB_current_mode; + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif +} + +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When you add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +//const char *read_keylog(void); +//const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + //oled_write_ln(read_keylog(), false); + //oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + } +} +#endif // OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + // index 1 == minion side + if (index == 1) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} +#endif diff --git a/qmk/keyboards/lily58/keymaps/drasbeck/readme.md b/qmk/keyboards/lily58/keymaps/drasbeck/readme.md new file mode 100644 index 00000000..51d09910 --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/drasbeck/readme.md @@ -0,0 +1,14 @@ +## Danish (Dansk) layout for the Lily58 Pro +Keyboard: Lily58 Pro +Keys: Lily58 Pro is 6×4+5keys column-staggered split keyboard, optinal with a rotary encoder. +Flash instructions: Flash each side of the keyboard, minding whether the side uses a Pro Micro or Elite-C controller. + +### Layout +Danish special characters on main layer, moving other characters to mainly raised layer. + +Layer 0 = default +Layer 1 = lower +Layer 2 = raise + +![keymap](https://drasbeck.dk/public/keymap_lily58pro_danskish.png) + diff --git a/qmk/keyboards/lily58/keymaps/drasbeck/rules.mk b/qmk/keyboards/lily58/keymaps/drasbeck/rules.mk new file mode 100644 index 00000000..ff8b816e --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/drasbeck/rules.mk @@ -0,0 +1,28 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE = yes # OLED display +ENCODER_ENABLE = yes # Enable encoder + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/qmk/keyboards/lily58/keymaps/muuko/config.h b/qmk/keyboards/lily58/keymaps/muuko/config.h new file mode 100644 index 00000000..e963355b --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/muuko/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#define EE_HANDS +#define USE_SERIAL_PD2 + +#define OLED_TIMEOUT 300000 + +#define NO_MUSIC_MODE + +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 120 + +#ifdef COMBO_COUNT +#undef COMBO_COUNT +#endif +#define COMBO_COUNT 2 +#define COMBO_TERM 20 diff --git a/qmk/keyboards/lily58/keymaps/muuko/keymap.c b/qmk/keyboards/lily58/keymaps/muuko/keymap.c new file mode 100644 index 00000000..b8afa0aa --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/muuko/keymap.c @@ -0,0 +1,184 @@ +/* Copyright 2020 @muuko + * + * 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 +#include +#include + +#define IDLE_FRAMES 5 +#define IDLE_SPEED 20 +#define TAP_FRAMES 2 +#define TAP_SPEED 40 +#define ANIM_FRAME_DURATION 200 +#define ANIM_SIZE 512 + +char wpm[16]; +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +static long int oled_timeout = 300000; + +enum combos { ESCAPE_COMBO, DELETE_COMBO }; +const uint16_t PROGMEM escape_combo[] = { KC_GRV, KC_1, COMBO_END }; +const uint16_t PROGMEM delete_combo[] = { KC_DOT, KC_SLSH, COMBO_END }; +combo_t key_combos[COMBO_COUNT] = { + [ESCAPE_COMBO] = COMBO(escape_combo, KC_ESC), + [DELETE_COMBO] = COMBO(delete_combo, KC_DEL) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCA_T(KC_MINS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, RGUI_T(KC_EQL), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_BSLS), + KC_LGUI, KC_LALT, LT(1, KC_DEL), KC_SPC, KC_ENT, KC_BSPC, MO(1), TG(1) + ), + [1] = LAYOUT( + 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_TAB, KC_MNXT, KC_HOME, KC_UP, KC_PGUP, KC_VOLU, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PSLS, LCTL(KC_RGUI), + KC_LCTL, KC_MPLY, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PAST, RCTL_T(KC_PEQL), + KC_LSFT, KC_MPRV, KC_END, KC_DEL, KC_PGDN, KC_MUTE, KC_LPRN, KC_RPRN, KC_P0, KC_P1, KC_P2, KC_P3, C_S_T(KC_PDOT), KC_RSFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; + else return rotation; +} + +static void render_status(void) { + oled_write_P(PSTR(" layer "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(" 0"), false); + break; + case 1: + oled_write_P(PSTR(" 1"), false); + break; + default: + oled_write_P(PSTR(" ?"), false); + break; + } + + oled_write_P(PSTR("\n\n "), false); + sprintf(wpm, "%03d", get_current_wpm()); + oled_write(wpm, false); + oled_write_P(PSTR(" wpm"), false); +} + +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32, + 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64, + 32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,195,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159, + 95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1, + 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32, + 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + + void animation_phase(void) { + if (get_current_wpm() <= IDLE_SPEED) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + } + + if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) { + oled_write_raw_P(prep[0], ANIM_SIZE); + } + + if (get_current_wpm() >= TAP_SPEED) { + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + } + } + + sprintf(wpm, "%03d", get_current_wpm()); + + if (strcmp(wpm, "000") != 0) { + anim_sleep = timer_read32(); + } else { + if (timer_elapsed32(anim_sleep) > oled_timeout) { + anim_sleep = 0; + } + } + + if (timer_elapsed32(anim_sleep) > oled_timeout) { + oled_off(); + } else { + oled_on(); + + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + + animation_phase(); + } + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_anim(); + } +} +#endif diff --git a/qmk/keyboards/lily58/keymaps/muuko/rules.mk b/qmk/keyboards/lily58/keymaps/muuko/rules.mk new file mode 100644 index 00000000..3f958dff --- /dev/null +++ b/qmk/keyboards/lily58/keymaps/muuko/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes +WPM_ENABLE = yes +EXTRAKEY_ENABLE = yes +COMBO_ENABLE = yes diff --git a/qmk/keyboards/littlealby/mute/config.h b/qmk/keyboards/littlealby/mute/config.h new file mode 100644 index 00000000..302b02a2 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/config.h @@ -0,0 +1,45 @@ +/* Copyright 2019 albybarber + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4142 // "AB" +#define PRODUCT_ID 0x4D55 // "MU" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Little Alby +#define PRODUCT Mute + +#define USB_MAX_POWER_CONSUMPTION 100 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* Default pinout */ +/* See arduino micro pinout: https://content.arduino.cc/assets/Pinout-Micro_latest.png + * for pins e.g. + * PB5 = digital pin 9 / analog pin 9 + */ +#define DIRECT_PINS { \ + {B5} \ +} +#define UNUSED_PINS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B6 +#define RGBLED_NUM 1 +#endif diff --git a/qmk/keyboards/littlealby/mute/info.json b/qmk/keyboards/littlealby/mute/info.json new file mode 100644 index 00000000..47a936d2 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Little Alby", + "keyboard_folder": "mute", + "url": "", + "maintainer": "albybarber", + "width": 1, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [ {"x": 0, "y": 0 }] + } + } +} diff --git a/qmk/keyboards/littlealby/mute/keymaps/default/keymap.c b/qmk/keyboards/littlealby/mute/keymaps/default/keymap.c new file mode 100644 index 00000000..c6cf9836 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2019 albybarber + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + SGUI(KC_A) + ) +}; diff --git a/qmk/keyboards/littlealby/mute/keymaps/default/readme.md b/qmk/keyboards/littlealby/mute/keymaps/default/readme.md new file mode 100644 index 00000000..9ff48950 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/default/readme.md @@ -0,0 +1,8 @@ +# Default keymap for arduino micro for Zoom + +Default for Mute is to use ```PB5 / digital pin 9 / analog pin 9``` + +Key commands that are emulated for Zoom is `CTL + SHIFT + W` + +## Example pinout +![Pinout](https://assets.codepen.io/18215/littleAlby_bb.png) diff --git a/qmk/keyboards/littlealby/mute/keymaps/g_meet/keymap.c b/qmk/keyboards/littlealby/mute/keymaps/g_meet/keymap.c new file mode 100644 index 00000000..38624a01 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/g_meet/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2019 albybarber + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RCTL(KC_D) + ) +}; diff --git a/qmk/keyboards/littlealby/mute/keymaps/g_meet/readme.md b/qmk/keyboards/littlealby/mute/keymaps/g_meet/readme.md new file mode 100644 index 00000000..24732c67 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/g_meet/readme.md @@ -0,0 +1,8 @@ +# Default keymap for arduino micro for Google Meet + +Default for Mute is to use ```PB5 / digital pin 9 / analog pin 9``` + +Key commands that are emulated for google meet is `CTL + d` + +## Example pinout +![Pinout](https://assets.codepen.io/18215/littleAlby_bb.png) diff --git a/qmk/keyboards/littlealby/mute/keymaps/ms_teams/keymap.c b/qmk/keyboards/littlealby/mute/keymaps/ms_teams/keymap.c new file mode 100644 index 00000000..bb2cf114 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/ms_teams/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2019 albybarber + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + SGUI(KC_M) + ) +}; diff --git a/qmk/keyboards/littlealby/mute/keymaps/ms_teams/readme.md b/qmk/keyboards/littlealby/mute/keymaps/ms_teams/readme.md new file mode 100644 index 00000000..a5874386 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/ms_teams/readme.md @@ -0,0 +1,8 @@ +# Default keymap for arduino micro for Microsoft teams + +Default for Mute is to use ```PB5 / digital pin 9 / analog pin 9``` + +Key commands that are emulated for Microsoft teams is `CTL + SHIFT + M` + +## Example pinout +![Pinout](https://assets.codepen.io/18215/littleAlby_bb.png) diff --git a/qmk/keyboards/littlealby/mute/keymaps/zoom/keymap.c b/qmk/keyboards/littlealby/mute/keymaps/zoom/keymap.c new file mode 100644 index 00000000..c6cf9836 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/zoom/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2019 albybarber + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + SGUI(KC_A) + ) +}; diff --git a/qmk/keyboards/littlealby/mute/keymaps/zoom/readme.md b/qmk/keyboards/littlealby/mute/keymaps/zoom/readme.md new file mode 100644 index 00000000..9ff48950 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/keymaps/zoom/readme.md @@ -0,0 +1,8 @@ +# Default keymap for arduino micro for Zoom + +Default for Mute is to use ```PB5 / digital pin 9 / analog pin 9``` + +Key commands that are emulated for Zoom is `CTL + SHIFT + W` + +## Example pinout +![Pinout](https://assets.codepen.io/18215/littleAlby_bb.png) diff --git a/qmk/keyboards/littlealby/mute/mute.c b/qmk/keyboards/littlealby/mute/mute.c new file mode 100644 index 00000000..4a207b8f --- /dev/null +++ b/qmk/keyboards/littlealby/mute/mute.c @@ -0,0 +1,16 @@ +/* Copyright 2019 albybatber + * + * 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 "mute.h" diff --git a/qmk/keyboards/littlealby/mute/mute.h b/qmk/keyboards/littlealby/mute/mute.h new file mode 100644 index 00000000..ea8acd81 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/mute.h @@ -0,0 +1,24 @@ +/* Copyright 2019 albybarber + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00 \ +) { \ + { K00 } \ +} diff --git a/qmk/keyboards/littlealby/mute/rules.mk b/qmk/keyboards/littlealby/mute/rules.mk new file mode 100644 index 00000000..0ea77b05 --- /dev/null +++ b/qmk/keyboards/littlealby/mute/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/littlealby/readme.md b/qmk/keyboards/littlealby/readme.md new file mode 100644 index 00000000..039b09a5 --- /dev/null +++ b/qmk/keyboards/littlealby/readme.md @@ -0,0 +1,34 @@ +# Little Alby + +Little Alby is a keyboard library using QMK used to create Arduino based keyboards. + +## Keyboard Layouts + +[Mute:](keyboards/littlealby/mute) +A single button layout that can be used as a mute audio keyboard shortcut for popular video conferencing programs e.g. [Zoom](keyboards/littlealby/mute/keymaps/zoom/readme.md), [Microsoft teams](keyboards/littlealby/mute/keymaps/ms_teams/readme.md), [Google meet](keyboards/littlealby/mute/keymaps/g_meet/readme.md) + + +## Arduino Micro pinout +![ARDUINO MICRO pinout](https://content.arduino.cc/assets/Pinout-Micro_latest.png) + +Keyboard Maintainer: [albybarber](https://github.com/albybarber) + +Keyboard Maintainers spirit guide : [Olivia](https://github.com/olivia) + +Hardware: +* [ARDUINO MICRO - 5v](https://store.arduino.cc/usa/arduino-micro) or [Pro Micro - 5V/16MHz](https://www.sparkfun.com/products/12640) + +## Building Code +Make example for this keyboard (after setting up your build environment): + + make littlealby/mute:default + + // Builds for specific programs + make littlealby/mute:zoom + make littlealby/mute:ms_teams + make littlealby/mute:g_meet + +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). + +## Credits ++ [2% Milk by spaceman - heavly inspired by](https://github.com/qmk/qmk_firmware/tree/master/keyboards/spaceman/2_milk) diff --git a/qmk/keyboards/longnald/corin/config.h b/qmk/keyboards/longnald/corin/config.h new file mode 100644 index 00000000..12be8ba2 --- /dev/null +++ b/qmk/keyboards/longnald/corin/config.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * 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 3 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5633 +#define PRODUCT_ID 0x1024 +#define DEVICE_VER 0x0004 +#define MANUFACTURER Longnald +#define PRODUCT Corin + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F4, F0, B2, B3, D5 } +#define MATRIX_COL_PINS { F7, F6, F1, F5, B1, E6, D4, B7, D1, D2, D0, B4, B6, C6, C7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 64 +# define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_SAT_STEP 20 +# define RGBLIGHT_VAL_STEP 40 +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_SLEEP +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +#endif diff --git a/qmk/keyboards/longnald/corin/corin.c b/qmk/keyboards/longnald/corin/corin.c new file mode 100644 index 00000000..fabe3686 --- /dev/null +++ b/qmk/keyboards/longnald/corin/corin.c @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * 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 3 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 "corin.h" \ No newline at end of file diff --git a/qmk/keyboards/longnald/corin/corin.h b/qmk/keyboards/longnald/corin/corin.h new file mode 100644 index 00000000..fa727c3c --- /dev/null +++ b/qmk/keyboards/longnald/corin/corin.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * 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 3 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_64_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/qmk/keyboards/longnald/corin/info.json b/qmk/keyboards/longnald/corin/info.json new file mode 100644 index 00000000..e0faf220 --- /dev/null +++ b/qmk/keyboards/longnald/corin/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Corin", + "url": "https://github.com/longnald/corin", + "maintainer": "Seaton Jiang ", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_ansi": { + "layout": [ + { "label": "K00 (F4,F7)", "x": 0, "y": 0 }, + { "label": "K01 (F4,F6)", "x": 1, "y": 0 }, + { "label": "K02 (F4,F1)", "x": 2, "y": 0 }, + { "label": "K03 (F4,F5)", "x": 3, "y": 0 }, + { "label": "K04 (F4,B1)", "x": 4, "y": 0 }, + { "label": "K05 (F4,E6)", "x": 5, "y": 0 }, + { "label": "K06 (F4,D6)", "x": 6, "y": 0 }, + { "label": "K07 (F4,B7)", "x": 7, "y": 0 }, + { "label": "K08 (F4,D1)", "x": 8, "y": 0 }, + { "label": "K09 (F4,D2)", "x": 9, "y": 0 }, + { "label": "K0A (F4,D0)", "x": 10, "y": 0 }, + { "label": "K0B (F4,B4)", "x": 11, "y": 0 }, + { "label": "K0C (F4,B6)", "x": 12, "y": 0 }, + { "label": "K0E (F4,C7)", "x": 13, "y": 0, "w": 2 }, + { "label": "K10 (F0,F7)", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K12 (F0,F1)", "x": 1.5, "y": 1 }, + { "label": "K13 (F0,F5)", "x": 2.5, "y": 1 }, + { "label": "K14 (F0,B1)", "x": 3.5, "y": 1 }, + { "label": "K15 (F0,E6)", "x": 4.5, "y": 1 }, + { "label": "K16 (F0,D6)", "x": 5.5, "y": 1 }, + { "label": "K17 (F0,B7)", "x": 6.5, "y": 1 }, + { "label": "K18 (F0,D1)", "x": 7.5, "y": 1 }, + { "label": "K19 (F0,D2)", "x": 8.5, "y": 1 }, + { "label": "K1A (F0,D0)", "x": 9.5, "y": 1 }, + { "label": "K1B (F0,B4)", "x": 10.5, "y": 1 }, + { "label": "K1C (F0,B6)", "x": 11.5, "y": 1 }, + { "label": "K1D (F0,C6)", "x": 12.5, "y": 1 }, + { "label": "K1E (F0,C7)", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "K20 (B2,F7)", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K22 (B2,F1)", "x": 1.75, "y": 2 }, + { "label": "K23 (B2,F5)", "x": 2.75, "y": 2 }, + { "label": "K24 (B2,B1)", "x": 3.75, "y": 2 }, + { "label": "K25 (B2,E6)", "x": 4.75, "y": 2 }, + { "label": "K26 (B2,D6)", "x": 5.75, "y": 2 }, + { "label": "K27 (B2,B7)", "x": 6.75, "y": 2 }, + { "label": "K28 (B2,D1)", "x": 7.75, "y": 2 }, + { "label": "K29 (B2,D2)", "x": 8.75, "y": 2 }, + { "label": "K2A (B2,D0)", "x": 9.75, "y": 2 }, + { "label": "K2B (B2,B4)", "x": 10.75, "y": 2 }, + { "label": "K2C (B2,B6)", "x": 11.75, "y": 2 }, + { "label": "K2D (B2,C6)", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "K31 (B3,F6)", "x": 0, "y": 3, "w": 2 }, + { "label": "K32 (B3,F1)", "x": 2, "y": 3 }, + { "label": "K33 (B3,F5)", "x": 3, "y": 3 }, + { "label": "K34 (B3,B1)", "x": 4, "y": 3 }, + { "label": "K35 (B3,E6)", "x": 5, "y": 3 }, + { "label": "K36 (B3,D6)", "x": 6, "y": 3 }, + { "label": "K37 (B3,B7)", "x": 7, "y": 3 }, + { "label": "K38 (B3,D1)", "x": 8, "y": 3 }, + { "label": "K39 (B3,D2)", "x": 9, "y": 3 }, + { "label": "K3A (B3,D0)", "x": 10, "y": 3 }, + { "label": "K3B (B3,B4)", "x": 11, "y": 3 }, + { "label": "K3C (B3,B6)", "x": 12, "y": 3 }, + { "label": "K3D (B3,C6)", "x": 13, "y": 3 }, + { "label": "K3E (B3,C7)", "x": 14, "y": 3 }, + { "label": "K40 (D5,F7)", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41 (D5,F6)", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K43 (D5,F5)", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K46 (D5,D6)", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K4A (D5,D0)", "x": 10, "y": 4 }, + { "label": "K4B (D5,B4)", "x": 11, "y": 4 }, + { "label": "K4C (D5,B6)", "x": 12, "y": 4 }, + { "label": "K4D (D5,C6)", "x": 13, "y": 4 }, + { "label": "K4E (D5,C7)", "x": 14, "y": 4 } + ] + } + } +} diff --git a/qmk/keyboards/longnald/corin/keymaps/default/keymap.c b/qmk/keyboards/longnald/corin/keymaps/default/keymap.c new file mode 100644 index 00000000..c8906efc --- /dev/null +++ b/qmk/keyboards/longnald/corin/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * 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 3 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_ansi( + 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_BSPC, + 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_HOME, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_ansi( + KC_GRV, 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_DEL, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_PGDN, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT_64_ansi( + KC_NO, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_G, RGB_M_SW, RGB_M_SN, KC_NO, KC_NO, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, KC_NO, + KC_NO, KC_NO, LAG_NRM, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LAG_SWP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + MO(3), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = LAYOUT_64_ansi( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/qmk/keyboards/longnald/corin/readme.md b/qmk/keyboards/longnald/corin/readme.md new file mode 100644 index 00000000..116baa7d --- /dev/null +++ b/qmk/keyboards/longnald/corin/readme.md @@ -0,0 +1,15 @@ +# Corin + +![Corin view](https://github.com/longnald/corin/raw/master/view/view-1.jpg) + +Corin is a 64-key keyboard that adds 4 more arrow keys than a regular 60% keyboard made and sold by Seaton Jiang. + +- Keyboard Maintainer: [Longnald](https://github.com/longnald) & [Seaton Jiang](https://github.com/seatonjiang) +- Hardware Supported: [Corin PCB (uses 32U4)](https://github.com/longnald/corin) +- Hardware Availability: [wwww.longnald.com](https://wwww.longnald.com/) + +Make example for this keyboard (after setting up your build environment): + + make longnald/corin:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/qmk/keyboards/longnald/corin/rules.mk b/qmk/keyboards/longnald/corin/rules.mk new file mode 100644 index 00000000..965087c1 --- /dev/null +++ b/qmk/keyboards/longnald/corin/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/majistic/config.h b/qmk/keyboards/majistic/config.h new file mode 100644 index 00000000..4ced5dd8 --- /dev/null +++ b/qmk/keyboards/majistic/config.h @@ -0,0 +1,57 @@ + +/* +Copyright 2020 yossiyossy + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6E55 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yossiyossy +#define PRODUCT maJIStic + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, F4, F5 } // F4, F5 is dummy +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS_RIGHT { B6, B2, B3, B1, F7, F6, F5, F4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/majistic/info.json b/qmk/keyboards/majistic/info.json new file mode 100644 index 00000000..2ae92678 --- /dev/null +++ b/qmk/keyboards/majistic/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "maJIStic", + "url": "https://github.com/yossiyossy/maJIStic", + "maintainer": "yossiyossy", + "width": 15.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0, "w":1.5}, + {"label":"2", "x":1.5, "y":0}, + {"label":"3", "x":2.5, "y":0}, + {"label":"4", "x":3.5, "y":0}, + {"label":"5", "x":4.5, "y":0}, + {"label":"6", "x":5.5, "y":0}, + {"label":"7", "x":7.5, "y":0}, + {"label":"8", "x":8.5, "y":0}, + {"label":"9", "x":9.5, "y":0}, + {"label":"0", "x":10.5, "y":0}, + {"label":"-", "x":11.5, "y":0}, + {"label":"^", "x":12.5, "y":0}, + {"label":"\\", "x":13.5, "y":0}, + {"label":"BS", "x":14.5, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":7, "y":1}, + {"label":"U", "x":8, "y":1}, + {"label":"I", "x":9, "y":1}, + {"label":"O", "x":10, "y":1}, + {"label":"P", "x":11, "y":1}, + {"label":"@", "x":12, "y":1}, + {"label":"[", "x":13, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.25}, + {"label":"A", "x":1.25, "y":2}, + {"label":"S", "x":2.25, "y":2}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2}, + {"label":"G", "x":5.25, "y":2}, + {"label":"H", "x":7.25, "y":2}, + {"label":"J", "x":8.25, "y":2}, + {"label":"K", "x":9.25, "y":2}, + {"label":"L", "x":10.25, "y":2}, + {"label":";", "x":11.25, "y":2}, + {"label":":", "x":12.25, "y":2}, + {"label":"]", "x":13.25, "y":2}, + {"label":"Enter", "x":14.25, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.75}, + {"label":"Z", "x":1.75, "y":3}, + {"label":"X", "x":2.75, "y":3}, + {"label":"C", "x":3.75, "y":3}, + {"label":"V", "x":4.75, "y":3}, + {"label":"B", "x":5.75, "y":3}, + {"label":"N", "x":7.75, "y":3}, + {"label":"M", "x":8.75, "y":3}, + {"label":",", "x":9.75, "y":3}, + {"label":".", "x":10.75, "y":3}, + {"label":"/", "x":11.75, "y":3}, + {"label":"up", "x":12.75, "y":3}, + {"label":"Shift", "x":13.75, "y":3, "w":1.75}, + {"label":"Ctrl", "x":0, "y":4}, + {"label":"Alt", "x":1, "y":4}, + {"label":"command", "x":2, "y":4, "w":1.25}, + {"label":"EISU", "x":3.25, "y":4, "w":1.25}, + {"label":"", "x":4.5, "y":4, "w":1.75}, + {"label":"", "x":7.25, "y":4, "w":1.5}, + {"label":"KANA", "x":8.75, "y":4, "w":1.5}, + {"label":"command", "x":10.25, "y":4, "w":1.5}, + {"label":"left", "x":11.75, "y":4}, + {"label":"down", "x":12.75, "y":4}, + {"label":"right", "x":13.75, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/majistic/keymaps/default/config.h b/qmk/keyboards/majistic/keymaps/default/config.h new file mode 100644 index 00000000..4db5715c --- /dev/null +++ b/qmk/keyboards/majistic/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2020 yossiyossy + * + * 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 . + */ + +#pragma once diff --git a/qmk/keyboards/majistic/keymaps/default/keymap.c b/qmk/keyboards/majistic/keymaps/default/keymap.c new file mode 100644 index 00000000..e26a631d --- /dev/null +++ b/qmk/keyboards/majistic/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 yossiyossy + * + * 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 +#include "keymap_jp.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LOWER, +}; + +enum custom_keycodes { + L_SPC = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_ENT , \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_LANG2, LT(_LOWER, KC_SPC), LT(_LOWER, KC_SPC), KC_LANG1, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + [_LOWER] = LAYOUT( + 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_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, JP_UNDS, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMU, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_VOLD, _______ \ + ), +}; diff --git a/qmk/keyboards/majistic/keymaps/default/readme.md b/qmk/keyboards/majistic/keymaps/default/readme.md new file mode 100644 index 00000000..65ee11cd --- /dev/null +++ b/qmk/keyboards/majistic/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maJIStic diff --git a/qmk/keyboards/majistic/majistic.c b/qmk/keyboards/majistic/majistic.c new file mode 100644 index 00000000..7ceba7cf --- /dev/null +++ b/qmk/keyboards/majistic/majistic.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yossiyossy + * + * 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 "majistic.h" diff --git a/qmk/keyboards/majistic/majistic.h b/qmk/keyboards/majistic/majistic.h new file mode 100644 index 00000000..77c4a491 --- /dev/null +++ b/qmk/keyboards/majistic/majistic.h @@ -0,0 +1,47 @@ +/* Copyright 2020 yossiyossy + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT(\ + l00, l01, l02, l03, l04, l05, r00, r01, r02, r03, r04, r05, r06, r07, \ + l10, l11, l12, l13, l14, l15, r10, r11, r12, r13, r14, r15, r16, \ + l20, l21, l22, l23, l24, l25, r20, r21, r22, r23, r24, r25, r26, r17, \ + l30, l31, l32, l33, l34, l35, r30, r31, r32, r33, r34, r35, r36, \ + l40, l41, l42, l43, l44, r40, r41, r42, r43, r44, r45 \ +) {\ + { l00, l01, l02, l03, l04, l05, KC_NO, KC_NO }, \ + { l10, l11, l12, l13, l14, l15, KC_NO, KC_NO }, \ + { l20, l21, l22, l23, l24, l25, KC_NO, KC_NO}, \ + { l30, l31, l32, l33, l34, l35, KC_NO, KC_NO}, \ + { l40, l41, l42, l43, l44, KC_NO, KC_NO, KC_NO}, \ + { r00, r01, r02, r03, r04, r05, r06, r07 }, \ + { r10, r11, r12, r13, r14, r15, r16, r17 }, \ + { r20, r21, r22, r23, r24, r25, r26, KC_NO }, \ + { r30, r31, r32, r33, r34, r35, r36, KC_NO }, \ + { r40, r41, r42, r43, r44, r45, KC_NO, KC_NO } \ +} diff --git a/qmk/keyboards/majistic/readme.md b/qmk/keyboards/majistic/readme.md new file mode 100644 index 00000000..05916af4 --- /dev/null +++ b/qmk/keyboards/majistic/readme.md @@ -0,0 +1,15 @@ +# maJIStic + +![maJIStic](https://raw.githubusercontent.com/yossiyossy/maJIStic/master/images/main_image.jpg) + +maJIStic is a split, JIS, magic keyboard like, hot-swappable keybaord! + +* Keyboard Maintainer: [yossiyossy](https://github.com/yossiyossy) +* Hardware Supported: [pcb](https://github.com/yossiyossy/maJIStic/tree/master/pcb), [case](https://github.com/yossiyossy/maJIStic/tree/master/case/dxf) +* Hardware Availability: [booth](https://yossiyossy.booth.pm/items/2325429) + +Make example for this keyboard (after setting up your build environment): + + make majistic:default + +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). diff --git a/qmk/keyboards/majistic/rules.mk b/qmk/keyboards/majistic/rules.mk new file mode 100644 index 00000000..2440fc90 --- /dev/null +++ b/qmk/keyboards/majistic/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes diff --git a/qmk/keyboards/manta60/info.json b/qmk/keyboards/manta60/info.json index 6934b026..9362869e 100644 --- a/qmk/keyboards/manta60/info.json +++ b/qmk/keyboards/manta60/info.json @@ -3,7 +3,7 @@ "url": "https://github.com/KamoNanban", "maintainer": "kamonanban", "width": 17, - "height": 4.5, + "height": 5.5, "layouts": { "LAYOUT": { "layout": [ @@ -14,13 +14,13 @@ {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"=", "x":6, "y":0}, - {"label":"-", "x":11, "y":0}, - {"label":"^", "x":12, "y":0}, - {"label":"&", "x":13, "y":0}, - {"label":"*", "x":14, "y":0}, - {"label":"(", "x":15, "y":0}, - {"label":")", "x":16, "y":0}, - {"label":"\\", "x":17, "y":0}, + {"label":"-", "x":10, "y":0}, + {"label":"^", "x":11, "y":0}, + {"label":"&", "x":12, "y":0}, + {"label":"*", "x":13, "y":0}, + {"label":"(", "x":14, "y":0}, + {"label":")", "x":15, "y":0}, + {"label":"\\", "x":16, "y":0}, {"label":"-", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, @@ -28,13 +28,13 @@ {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"[", "x":6, "y":1}, - {"label":"]", "x":11, "y":1}, - {"label":"Y", "x":12, "y":1}, - {"label":"U", "x":13, "y":1}, - {"label":"I", "x":14, "y":1}, - {"label":"O", "x":15, "y":1}, - {"label":"P", "x":16, "y":1}, - {"label":"@", "x":17, "y":1}, + {"label":"]", "x":10, "y":1}, + {"label":"Y", "x":11, "y":1}, + {"label":"U", "x":12, "y":1}, + {"label":"I", "x":13, "y":1}, + {"label":"O", "x":14, "y":1}, + {"label":"P", "x":15, "y":1}, + {"label":"@", "x":16, "y":1}, {"label":"Tab", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, @@ -42,39 +42,39 @@ {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":",", "x":6, "y":2}, - {"label":".", "x":11, "y":2}, - {"label":"H", "x":12, "y":2}, - {"label":"J", "x":13, "y":2}, - {"label":"K", "x":14, "y":2}, - {"label":"L", "x":15, "y":2}, - {"label":"UP", "x":16, "y":2}, - {"label":";", "x":17, "y":2}, + {"label":".", "x":10, "y":2}, + {"label":"H", "x":11, "y":2}, + {"label":"J", "x":12, "y":2}, + {"label":"K", "x":13, "y":2}, + {"label":"L", "x":14, "y":2}, + {"label":"UP", "x":15, "y":2}, + {"label":";", "x":16, "y":2}, {"label":"Shft", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"Alt", "x":5, "y":3}, - {"label":"B", "x":12, "y":3}, - {"label":"N", "x":13, "y":3}, - {"label":"M", "x":14, "y":3}, - {"label":"LEFT", "x":15, "y":3}, - {"label":"DOWN", "x":16, "y":3}, - {"label":"RIGHT", "x":17, "y":3}, - {"label":"LOWER", "x":0, "y":4.5}, - {"x":1, "y":4.5}, - {"label":"Alt", "x":4, "y":4.5}, - {"label":"Ctrl", "x":5, "y":4.5}, - {"label":"SPC", "x":6, "y":4.5}, - {"label":"cmd", "x":7, "y":4.5}, - {"label":"Enter", "x":8, "y":4.5}, - {"label":"BS", "x":11, "y":4.5}, - {"label":"DEL", "x":12, "y":4.5}, - {"label":"SPC", "x":13, "y":4.5}, - {"label":"Ctrl", "x":14, "y":4.5}, - {"label":"Alt", "x":15, "y":4.5}, - {"x":16, "y":4.5}, - {"label":"RAISE", "x":17, "y":4.5} + {"label":"B", "x":11, "y":3}, + {"label":"N", "x":12, "y":3}, + {"label":"M", "x":13, "y":3}, + {"label":"LEFT", "x":14, "y":3}, + {"label":"DOWN", "x":15, "y":3}, + {"label":"RIGHT", "x":16, "y":3}, + {"label":"LOWER", "x":0, "y":4}, + {"x":1, "y":4}, + {"label":"Alt", "x":4, "y":4}, + {"label":"Ctrl", "x":5, "y":4.25}, + {"label":"SPC", "x":6, "y":3.5, "h":2}, + {"label":"cmd", "x":7, "y":3.5}, + {"label":"Enter", "x":7, "y":4.5}, + {"label":"BS", "x":9, "y":4.5}, + {"label":"DEL", "x":9, "y":3.5}, + {"label":"SPC", "x":10, "y":3.5, "h":2}, + {"label":"Ctrl", "x":11, "y":4.25}, + {"label":"Alt", "x":12, "y":4}, + {"x":15, "y":4}, + {"label":"RAISE", "x":16, "y":4} ] } } diff --git a/qmk/keyboards/massdrop/alt/keymaps/default/keymap.c b/qmk/keyboards/massdrop/alt/keymaps/default/keymap.c index 52fd35b4..0d3e7ccb 100644 --- a/qmk/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/qmk/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -10,8 +10,6 @@ enum alt_keycodes { MD_BOOT, //Restart into bootloader after hold timeout }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_65_ansi_blocker( 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_BSPC, KC_DEL, \ @@ -38,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/qmk/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/qmk/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 6523790f..9894caf4 100644 --- a/qmk/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/qmk/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -21,8 +21,6 @@ enum alt_keycodes { MD_BOOT //Restart into bootloader after hold timeout //Working }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( 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_BSPC, KC_DEL, \ @@ -49,14 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) @@ -186,7 +176,7 @@ led_instruction_t led_instructions[] = { //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below - + //All LEDs use the user's selected pattern (this is the factory default) { .flags = LED_FLAG_USE_ROTATE_PATTERN }, @@ -195,7 +185,7 @@ led_instruction_t led_instructions[] = { //Specific LEDs use specified RGB values while all others are off // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, - + //All LEDs use the user's selected pattern //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1) diff --git a/qmk/keyboards/massdrop/alt/keymaps/mac/keymap.c b/qmk/keyboards/massdrop/alt/keymaps/mac/keymap.c index 9f575b4f..70ce6198 100644 --- a/qmk/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/qmk/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -10,8 +10,6 @@ enum alt_keycodes { MD_BOOT, //Restart into bootloader after hold timeout }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( 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_BSPC, KC_DEL, \ @@ -38,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/qmk/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/qmk/keyboards/massdrop/alt/keymaps/mac_md/keymap.c index 439e7939..b3626c1b 100644 --- a/qmk/keyboards/massdrop/alt/keymaps/mac_md/keymap.c +++ b/qmk/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -21,8 +21,6 @@ enum alt_keycodes { MD_BOOT //Restart into bootloader after hold timeout //Working }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( 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_BSPC, KC_DEL, \ @@ -49,14 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/qmk/keyboards/massdrop/alt/readme.md b/qmk/keyboards/massdrop/alt/readme.md index 57e2e5f1..bf33b204 100644 --- a/qmk/keyboards/massdrop/alt/readme.md +++ b/qmk/keyboards/massdrop/alt/readme.md @@ -14,7 +14,7 @@ Make example for this keyboard (after setting up your build environment): For information on flashing this keyboard, visit the following links: -[Massdrop Loader Releases](https://github.com/Massdrop/mdloader/releases/tag/0.0.1) +[Massdrop Loader Releases](https://github.com/Massdrop/mdloader/releases) [Massdrop Loader Repository and Instructions](https://github.com/Massdrop/mdloader) 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). diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index b7a46920..6e16c3a5 100644 --- a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -1,67 +1,134 @@ +/* +QMK Firmware Massdrop CTRL M-AS Keymap +Copyright (C) 2020 matthewrobo + +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 3 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 . +*/ + #pragma once -#define FORCE_NKRO +#define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +#define MODS_ALT (get_mods() & MOD_MASK_ALT) +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) + +// #define NO_DEBUG // Disable debugging +// #define NO_PRINT // Disable printing/debugging using hid_listen +// #define NO_ACTION_LAYER // Disable layers +// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features +// #define NO_ACTION_ONESHOT // Disable one-shot modifiers +// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro +// #define TERMINAL_HELP +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_WHEEL_DELAY 0 +#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. +// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. +// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) +// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state +#define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too #define PERMISSIVE_HOLD -#define TAPPING_TERM 150 - -#define TAP_HOLD_CAPS_DELAY 0 +// #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings +// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release +// #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle +// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details +// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details +// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) +// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. +// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall +// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. +// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out +// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered +// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. +// #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. +// #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. +// #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. #define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_ALPHAS_MODS // Sets the default mode, if none has been set +// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue +// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation +// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) +// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// #define RGBLIGHT_ANIMATIONS // Run RGB animations +// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. +// #define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. +// #define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. +// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. +// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. +// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. +// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 +// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds +// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation +// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel +// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation +// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by +// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls +// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation -#define QMK_KEYS_PER_SCAN 4 - -// #define RGB_MATRIX_KEYRELEASES - -// some speed shit -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) -#define NO_PRINT -#endif // !NO_PRINT - -#define NO_ACTION_ONESHOT -#define TAPPING_FORCE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT +// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. +// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +// #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c index 448793cf..a4ce649d 100644 --- a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c @@ -1,10 +1,28 @@ +/* +QMK Firmware Massdrop CTRL M-AS Keymap +Copyright (C) 2020 matthewrobo + +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 3 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 . +*/ + #ifdef RGB_MATRIX_ENABLE -#include "ctrl.h" - -#include "led_matrix.h" -#include "rgb_matrix.h" -#include "config_led.h" +# include "ctrl.h" +# include "led_matrix.h" +# include "rgb_matrix.h" +# include "config_led.h" +// clang-format off led_config_t g_led_config = { { { 0, 1, 2, 3, 4, 5, 6, 7 }, { 16, 17, 18, 19, 20, 21, 22, 23 }, @@ -70,13 +88,10 @@ led_config_t g_led_config = { { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } }; +// clang-format on - -#ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) -{ - led_matrix_indicators(); -} -#endif // USB_LED_INDICATOR_ENABLE +# ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) { led_matrix_indicators(); } +# endif // USB_LED_INDICATOR_ENABLE #endif diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index 447b0aca..c89607b3 100644 --- a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -1,396 +1,286 @@ -#include QMK_KEYBOARD_H +/* +QMK Firmware Massdrop CTRL M-AS Keymap +Copyright (C) 2020 matthewrobo -enum ctrl_layers { - _QWERTY, - _NAV, - _FNC -}; +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 3 of the License, or +(at your option) any later version. -enum ctrl_keycodes { - U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout - MAS_TOG, - MAS_CRM, - MAS_PRP, - MAS_RED, - MAS_GRN, - MAS_BLU, - MAS_CYN, - MAS_MGT, - MAS_YEL, - MAS_KEY, - MAS_WHT, -}; +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. -#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode -#define LT_CAPS LT(_NAV, KC_CAPS) -#define _V_V_V_ KC_TRNS -extern bool autoshift_enabled; - - -keymap_config_t keymap_config; +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "keymap.h" +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( - 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_PSCR, KC_SLCK, KC_PAUS, \ - 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ - LT_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FNC), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [_NAV] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PMNS, KC_PPLS, _______, _______, _______, _______, \ - _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, KC_P4, KC_P5, KC_P6, KC_PSLS, _______, _______, KC_EQL, _______, _______, _______, \ - _V_V_V_, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PPLS, _______, \ - _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_P0, KC_PDOT, KC_PSLS, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [_FNC] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MSEL, KC_ASTG, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_VOLU, \ - _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, MAS_MGT, MAS_BLU, MAS_WHT, RGB_RMOD, RGB_MOD, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - _______, RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, MAS_RED, MAS_KEY, MAS_CYN, MAS_PRP, _______, _______, \ - MAS_TOG, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, MAS_YEL, MAS_GRN, MAS_CRM, _______, _______, RGB_VAI, \ - _______, _______, _______, _______, _______, _V_V_V_, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI \ - ), - /* - [X] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [X] = LAYOUT( - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, \ - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \ - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \ - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, \ - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, \ - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 \ - ), - */ + [_KL] = LAYOUT( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + LT_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_NL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PMNS, KC_PPLS, _______, _______, _______, _______, + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, KC_P4, KC_P5, KC_P6, KC_PSLS, _______, _______, KC_EQL, _______, _______, _______, + _LAYER_, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_P0, KC_PDOT, KC_PSLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MSEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_VOLU, + _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, MAS_MGT, MAS_BLU, MAS_WHT, RGB_RMOD,RGB_MOD, _______, KC_MPRV, KC_MNXT, KC_VOLD, + _______, RGB_RMOD,RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, MAS_RED, MAS_KEY, MAS_CYN, MAS_PRP, _______, _______, + _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, MAS_YEL, MAS_GRN, MAS_CRM, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _LAYER_, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI + ), + /* + [DEFAULT] = LAYOUT( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [RGB] = LAYOUT( + ESC: 0, F1: 1, F2: 2, F3: 3, F4: 4, F5: 5, F6: 6, F7: 7, F8: 8, F9: 9, F10: 10, F11: 11, F12: 12, PSCR: 13, SLCK: 14, PAUS: 15, + GRV: 16, 1: 17, 2: 18, 3: 19, 4: 20, 5: 21, 6: 22, 7: 23, 8: 24, 9: 25, 0: 26, MINS: 27, EQL: 28, BSPC: 29, INS: 30, HOME: 31, PGUP: 32, + TAB: 33, Q: 34, W: 35, E: 36, R: 37, T: 38, Y: 39, U: 40, I: 41, O: 42, P: 43, LBRC: 44, RBRC: 45, BSLS: 46, DEL: 47, END: 48, PGDN: 49, + CAPS: 50, A: 51, S: 52, D: 53, F: 54, G: 55, H: 56, J: 57, K: 58, L: 59, SCLN: 60, QUOT: 61, ENT: 62, + LSFT: 63, Z: 64, X: 65, C: 66, V: 67, B: 68, N: 69, M: 70, COMM: 71, DOT: 72, SLSH: 73, RSFT: 74, UP: 75, + LCTL: 76, LGUI: 77, LALT: 78, SPC: 79, RALT: 80, Fn: 81, APP: 82, RCTL: 83, LEFT: 84, DOWN: 85, RGHT: 86 + ), + [MATRIX] = LAYOUT( + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 + ), + */ }; +#ifdef _______ +# undef _______ +# define _______ {0,0,0} -void rgb_matrix_indicators_user(void) -{ - uint8_t this_led = host_keyboard_leds(); - - if (!g_suspend_state && rgb_matrix_config.enable) { - switch (biton32(layer_state)) { - case _NAV: - if (this_led & (1 << USB_LED_NUM_LOCK)) { - rgb_matrix_set_color(41, 0xFF, 0x00, 0x00); - } else { - rgb_matrix_set_color(41, 0x00, 0x00, 0x00); - } - - // layer indicator - rgb_matrix_set_color(50, 0xFF, 0xFF, 0xFF); - rgb_matrix_set_color(101, 0xFF, 0xFF, 0xFF); - // ESDF - rgb_matrix_set_color(36, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(52, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(53, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(54, 0xFF, 0x00, 0x00); - // home/end - rgb_matrix_set_color(35, 0x00, 0xFF, 0x00); - rgb_matrix_set_color(37, 0x00, 0xFF, 0x00); - // pgup/dn - rgb_matrix_set_color(34, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(51, 0x00, 0x00, 0xFF); - // numpad - rgb_matrix_set_color(23, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(40, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(42, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(57, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(58, 0xFF, 0xFF, 0x00); - rgb_matrix_set_color(59, 0xFF, 0xFF, 0x00); - // zero - rgb_matrix_set_color(69, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(70, 0xFF, 0x00, 0x00); - rgb_matrix_set_color(71, 0xFF, 0x00, 0x00); - // dot - rgb_matrix_set_color(72, 0x00, 0x00, 0xFF); - // math shit - rgb_matrix_set_color(26, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(27, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(28, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(43, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(46, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(60, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(61, 0x00, 0x00, 0xFF); - rgb_matrix_set_color(73, 0x00, 0x00, 0xFF); - break; - - case _FNC: { - HSV hsv = { rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v }; - HSV hui = hsv; - HSV hud = hsv; - HSV sai = hsv; - HSV sad = hsv; - HSV vai = hsv; - HSV vad = hsv; - hui.h = hsv.h + 8; - hud.h = hsv.h - 8; - sai.s = hsv.s + 16 > 255 ? 255u : hsv.s + 16; - sad.s = hsv.s - 16 < 0 ? 0 : hsv.s - 16; - vai.v = hsv.v + 16 > 255 ? 255 : hsv.v + 16; - vad.v = hsv.v - 16 < 0 ? 0 : hsv.v - 16; - RGB rgb = hsv_to_rgb(hsv); - RGB rgbHUI = hsv_to_rgb(hui); - RGB rgbHUD = hsv_to_rgb(hud); - RGB rgbSAI = hsv_to_rgb(sai); - RGB rgbSAD = hsv_to_rgb(sad); - RGB rgbVAI = hsv_to_rgb(vai); - RGB rgbVAD = hsv_to_rgb(vad); - rgb_matrix_set_color(81, 0xFF, 0xFF, 0xFF); // layer indicator - rgb_matrix_set_color(91, 0xFF, 0xFF, 0xFF); - rgb_matrix_set_color(93, 0x00, 0x00, 0x00); - rgb_matrix_set_color(94, rgb.r, rgb.g, rgb.b); - rgb_matrix_set_color(95, rgb.r, rgb.g, rgb.b); - rgb_matrix_set_color(96, 0x00, 0x00, 0x00); - rgb_matrix_set_color(68, 0xFF, 0x00, 0x00); // MD_BOOT - rgb_matrix_set_color(69, 0xFF, 0x00, 0x40); // TG_NKRO - rgb_matrix_set_color(32, 0x00, 0x80, 0xFF); // KC_VOLU - rgb_matrix_set_color(49, 0x00, 0x80, 0xFF); - rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); // KC_MUTE - rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // KC_MSTP - rgb_matrix_set_color(47, 0xFF, 0x40, 0x00); // KC_MPRV - rgb_matrix_set_color(48, 0xFF, 0x40, 0x00); - rgb_matrix_set_color(14, 0x00, 0xFF, 0x00); // KC_MSEL - rgb_matrix_set_color(31, 0x00, 0xFF, 0x00); // KC_MPLY - - if (this_led & (1 << !autoshift_enabled)) { - rgb_matrix_set_color(15, 0xFF, 0x00, 0x00); // KC_ASTG - } else { - rgb_matrix_set_color(15, 0xFF, 0xFF, 0x00); - } - - rgb_matrix_set_color(44, 0xFF, 0x80, 0x00); //RGB_MOD - rgb_matrix_set_color(45, 0xFF, 0x80, 0x00); - rgb_matrix_set_color(34, 0xFF, 0x80, 0x00); //RGB_MOD - rgb_matrix_set_color(51, 0xFF, 0x80, 0x00); - rgb_matrix_set_color(63, 0xFF, 0x40, 0x00); //RGB_TOG - rgb_matrix_set_color(64, rgb.r, rgb.g, rgb.b); //MAS_TOG - rgb_matrix_set_color(36, rgbHUI.r, rgbHUI.g, rgbHUI.b); //RGB_HUI - rgb_matrix_set_color(53, rgbHUD.r, rgbHUD.g, rgbHUD.b); - rgb_matrix_set_color(37, rgbSAI.r, rgbSAI.g, rgbSAI.b); //RGB_SAI - rgb_matrix_set_color(54, rgbSAD.r, rgbSAD.g, rgbSAD.b); - rgb_matrix_set_color(38, rgbVAI.r, rgbVAI.g, rgbVAI.b); //RGB_VAI - rgb_matrix_set_color(55, rgbVAD.r, rgbVAD.g, rgbVAD.b); - rgb_matrix_set_color(79, rgb.r, rgb.g, rgb.b); // config display - rgb_matrix_set_color(75, rgbVAI.r, rgbVAI.g, rgbVAI.b); //RGB_VAI - rgb_matrix_set_color(85, rgbVAD.r, rgbVAD.g, rgbVAD.b); - rgb_matrix_set_color(35, 0x80, 0x80, 0x80); //RGB_SPI - rgb_matrix_set_color(52, 0x80, 0x80, 0x80); - rgb_matrix_set_color(84, 0x80, 0x80, 0x80); //RGB_SPI - rgb_matrix_set_color(86, 0x80, 0x80, 0x80); - rgb_matrix_set_color(41, 0xF0, 0x00, 0xFF); //MAS_MGT - rgb_matrix_set_color(42, 0x00, 0x02, 0xFF); //MAS_BLU - rgb_matrix_set_color(57, 0xFF, 0x00, 0x00); //MAS_RED - rgb_matrix_set_color(58, 0x00, 0x00, 0x00); //MAS_KEY - rgb_matrix_set_color(59, 0x00, 0xFF, 0xF7); //MAS_CYN - rgb_matrix_set_color(70, 0xFF, 0xDA, 0x00); //MAS_YEL - rgb_matrix_set_color(71, 0x00, 0xFF, 0x01); //MAS_GRN - rgb_matrix_set_color(72, 0xFF, 0xA5, 0x18); //MAS_CRM - rgb_matrix_set_color(60, 0x81, 0x3C, 0xFF); //MAS_PRP - rgb_matrix_set_color(43, 0xFF, 0xFF, 0xFF); //MAS_WHT - } - break; - } - } -} +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [_NL] = { + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, GOLD, GOLD, GOLD, GREEN, GREEN, GREEN, _______, _______, _______, _______, + _______, TEAL, CYAN, AZURE, CYAN, _______, _______, GOLD, RED, GOLD, GREEN, _______, _______, GREEN, _______, _______, _______, + WHITE, TEAL, AZURE, AZURE, AZURE, _______, _______, GOLD, GOLD, GOLD, GREEN, GREEN, _______, + _______, _______, _______, _______, _______, _______, RED, RED, RED, GREEN, GREEN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + }, + [_FL] = { + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RED, GREEN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RED, GREEN, AZURE, + _______, GOLD, CORAL, _______, _______, _______, _______, _______, MAGENT, BLUE, WHITE, GOLD, GOLD, _______, ORANGE, ORANGE, AZURE, + _______, GOLD, CORAL, _______, _______, _______, _______, RED, {1,0,0}, CYAN, M9B59B5, _______, _______, + _______, RED, _______, _______, _______, RED, PINK, YELLOW, GREEN, CREAM, _______, _______, _______, + _______, _______, _______, _______, _______, WHITE, _______, _______, CORAL, _______, CORAL + }, +}; +# undef _______ +# define _______ KC_TRNS +#endif +// clang-format on // Runs just one time when the keyboard initializes. -void matrix_init_user(void) -{ - autoshift_disable(); - rgb_matrix_sethsv(128, 255, 255); - // rgb_matrix_sethsv(192, 112, 255); - // rgb_matrix_mode(4); +void matrix_init_user(void) { + rgb_enabled_flag = true; // Initially, keyboard RGB is enabled. Change to false config.h initializes RGB disabled. }; +void keyboard_post_init_user(void) { rgb_matrix_enable(); } + // Runs constantly in the background, in a loop. -void matrix_scan_user(void) -{ -}; +void matrix_scan_user(void){}; -#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + switch (keycode) { + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + } -bool process_record_user(uint16_t keycode, keyrecord_t* record) -{ - static uint32_t key_timer; - - switch (keycode) { - case U_T_AUTO: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { - TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); - } - - return false; - - case U_T_AGCR: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { - TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); - } - - return false; - - case DBG_TOG: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); - } - - return false; - - case DBG_MTRX: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); - } - - return false; - - case DBG_KBD: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); - } - - return false; - - case DBG_MOU: - if (record->event.pressed) { - TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); - } - - return false; - - case MD_BOOT: - if (record->event.pressed) { - key_timer = timer_read32(); - } else { - if (timer_elapsed32(key_timer) >= 500) { - reset_keyboard(); - } - } - - return false; - - case MAS_TOG: - if (record->event.pressed) { - switch (rgb_matrix_get_flags()) { - case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); - rgb_matrix_set_color_all(0, 0, 0); - } - break; - - case LED_FLAG_KEYLIGHT: { - rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); - rgb_matrix_set_color_all(0, 0, 0); - } - break; - - case LED_FLAG_UNDERGLOW: { - rgb_matrix_set_flags(LED_FLAG_NONE); - rgb_matrix_disable_noeeprom(); - } - break; - - default: { - rgb_matrix_set_flags(LED_FLAG_ALL); - } - break; - } - } - - return false; - - case MAS_CRM: - if (record->event.pressed) { - rgb_matrix_sethsv(32, 160, 255); - } - - return false; - - case MAS_PRP: - if (record->event.pressed) { - rgb_matrix_sethsv(192, 112, 255); - } - - return false; - - case MAS_RED: - if (record->event.pressed) { - rgb_matrix_sethsv(0, 255, 255); - } - - return false; - - case MAS_GRN: - if (record->event.pressed) { - rgb_matrix_sethsv(88, 255, 255); - } - - return false; - - case MAS_BLU: - if (record->event.pressed) { - rgb_matrix_sethsv(168, 255, 255); - } - - return false; - - case MAS_CYN: - if (record->event.pressed) { - rgb_matrix_sethsv(128, 255, 255); - } - - return false; - - case MAS_MGT: - if (record->event.pressed) { - rgb_matrix_sethsv(216, 255, 255); - } - - return false; - - case MAS_YEL: - if (record->event.pressed) { - rgb_matrix_sethsv(40, 255, 255); - } - - return false; - - case MAS_KEY: - if (record->event.pressed) { - rgb_matrix_sethsv(0, 0, 0); - } - - return false; - - case MAS_WHT: - if (record->event.pressed) { - rgb_matrix_sethsv(128, 0, 255); - } - - return false; - - default: - return true; //Process all other keycodes normally - } + if (record->event.pressed) { + switch (keycode) { + case DBG_TOG: + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + return false; + case DBG_MTRX: + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + return false; + case DBG_KBD: + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + return false; + case DBG_MOU: + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + return false; + case RGB_TOG: + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } break; + case LED_FLAG_UNDERGLOW: { + // This line is for LED idle timer. It disables the toggle so you can turn off LED completely if you like + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } break; + } + return false; + // ======================================================== CUSTOM KEYCOADS BELOW ======================================================== + case MAS_CRM: + rgb_matrix_sethsv(HSV_CREAM); + return false; + case MAS_PRP: + rgb_matrix_sethsv(HSV_9B59B5); + return false; + case MAS_RED: + rgb_matrix_sethsv(HSV_RED); + return false; + case MAS_GRN: + rgb_matrix_sethsv(HSV_GREEN); + return false; + case MAS_BLU: + rgb_matrix_sethsv(HSV_BLUE); + return false; + case MAS_CYN: + rgb_matrix_sethsv(HSV_CYAN); + return false; + case MAS_MGT: + rgb_matrix_sethsv(HSV_MAGENTA); + return false; + case MAS_YEL: + rgb_matrix_sethsv(HSV_YELLOW); + return false; + case MAS_KEY: + rgb_matrix_sethsv(0, 0, 0); + return false; + case MAS_WHT: + rgb_matrix_sethsv(128, 0, 255); + return false; + default: + return true; // Process all other keycodes normally + } + } + return true; } +void set_layer_color(int layer) { + if (layer == 0) { + return; + } + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = pgm_read_byte(&ledmap[layer][i][0]), + .s = pgm_read_byte(&ledmap[layer][i][1]), + .v = pgm_read_byte(&ledmap[layer][i][2]), + }; + if (hsv.h || hsv.s || hsv.v) { + RGB rgb = hsv_to_rgb(hsv); + float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; + rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b); + } else if (layer == _FL) { + HSV hsv2 = {rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; + HSV hui = hsv2; + HSV hud = hsv2; + HSV sai = hsv2; + HSV sad = hsv2; + HSV vai = hsv2; + HSV vad = hsv2; + hui.h = hsv2.h + 8; + hud.h = hsv2.h - 8; + sai.s = hsv2.s + 16 > 255 ? 255 : hsv2.s + 16; + sad.s = hsv2.s - 16 < 0 ? 0 : hsv2.s - 16; + vai.v = hsv2.v + 16 > 255 ? 255 : hsv2.v + 16; + vad.v = hsv2.v - 16 < 0 ? 0 : hsv2.v - 16; + RGB rgbHUI = hsv_to_rgb(hui); + RGB rgbHUD = hsv_to_rgb(hud); + RGB rgbSAI = hsv_to_rgb(sai); + RGB rgbSAD = hsv_to_rgb(sad); + RGB rgbVAI = hsv_to_rgb(vai); + RGB rgbVAD = hsv_to_rgb(vad); + + switch (i) { + case 36: + rgb_matrix_set_color(i, rgbHUI.r, rgbHUI.g, rgbHUI.b); + break; + case 53: + rgb_matrix_set_color(i, rgbHUD.r, rgbHUD.g, rgbHUD.b); + break; + case 54: + rgb_matrix_set_color(i, rgbSAI.r, rgbSAI.g, rgbSAI.b); + break; + case 37: + rgb_matrix_set_color(i, rgbSAD.r, rgbSAD.g, rgbSAD.b); + break; + case 38: + rgb_matrix_set_color(i, rgbVAI.r, rgbVAI.g, rgbVAI.b); + break; + case 55: + rgb_matrix_set_color(i, rgbVAD.r, rgbVAD.g, rgbVAD.b); + break; + case 75: + rgb_matrix_set_color(i, rgbVAI.r, rgbVAI.g, rgbVAI.b); + break; + case 85: + rgb_matrix_set_color(i, rgbVAD.r, rgbVAD.g, rgbVAD.b); + break; + } + } + } +} + +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { + return; + } + set_layer_color(get_highest_layer(layer_state)); +} diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.h b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.h new file mode 100644 index 00000000..e37f0d60 --- /dev/null +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.h @@ -0,0 +1,86 @@ +/* +QMK Firmware Massdrop CTRL M-AS Keymap +Copyright (C) 2020 matthewrobo + +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 3 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 + +// HID has not yet been implemented for this keyboard +// #include "raw_hid.h" + +#define MILLISECONDS_IN_SECOND 1000 + +// These are just to make it neater to use builtin HSV values in the keymap +// clang-format off +#define WHITE {HSV_WHITE} +#define RED {HSV_RED} +#define CORAL {HSV_CORAL} +#define ORANGE {HSV_ORANGE} +#define GOLDEN {HSV_GOLDENROD} +#define GOLD {HSV_GOLD} +#define YELLOW {HSV_YELLOW} +#define CHART {HSV_CHARTREUSE} +#define GREEN {HSV_GREEN} +#define SPRING {HSV_SPRINGGREEN} +#define TURQ {HSV_TURQUOISE} +#define TEAL {HSV_TEAL} +#define CYAN {HSV_CYAN} +#define AZURE {HSV_AZURE} +#define BLUE {HSV_BLUE} +#define PURPLE {HSV_PURPLE} +#define MAGENT {HSV_MAGENTA} +#define PINK {HSV_PINK} +#define HSV_CREAM 24, 240, 255 +#define CREAM {HSV_CREAM} +#define HSV_9B59B5 208, 192, 255 +#define M9B59B5 {HSV_9B59B5} +// clang-format on + +#define LT_CAPS LT(_NL, KC_CAPS) +#define _LAYER_ KC_TRNS + +//========================================================== CONFIGURABLE DEFAULTS ========================================================== +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; +bool disable_layer_color; + +bool rgb_enabled_flag; // Current LED state flag. If false then LED is off. + +enum layout_names { + _KL = 0, // Keys Layout: The main keyboard layout that has all the characters + _NL, // Navigation Layout: Cursor keys and numpad inputs + _FL, // Function Layout: The function key activated layout with default functions and some added ones +}; + +enum ctrl_keycodes { + U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, // USB Toggle Automatic GCR control + DBG_TOG, // DEBUG Toggle On / Off + DBG_MTRX, // DEBUG Toggle Matrix Prints + DBG_KBD, // DEBUG Toggle Keyboard Prints + DBG_MOU, // DEBUG Toggle Mouse Prints + MD_BOOT, // Restart into bootloader after hold timeout + MAS_CRM, + MAS_PRP, + MAS_RED, + MAS_GRN, + MAS_BLU, + MAS_CYN, + MAS_MGT, + MAS_YEL, + MAS_KEY, + MAS_WHT, +}; diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/readme.md b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/readme.md new file mode 100644 index 00000000..380d078e --- /dev/null +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/readme.md @@ -0,0 +1,14 @@ +# Massdrop CTRL - M-AS + +Based on the ["endgame" keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop/ctrl/keymaps/endgame). + +## Layers + +### Base Layer +![Base Layer](https://i.imgur.com/qMXpYUb.png) + +### Navigation Layer +![Navigation Layer](https://i.imgur.com/RSp12Sh.png) + +### Function Layer +![Function Layer](https://i.imgur.com/dp7zs0I.png) diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rgb_matrix_user.inc b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rgb_matrix_user.inc new file mode 100644 index 00000000..d837502c --- /dev/null +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rgb_matrix_user.inc @@ -0,0 +1,51 @@ +/* +QMK Firmware Massdrop CTRL M-AS Keymap +Copyright (C) 2020 matthewrobo + +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 3 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 . +*/ + +// !!! DO NOT ADD #pragma once !!! // + +// Step 1. +// Declare custom effects using the RGB_MATRIX_EFFECT macro +// (note the lack of semicolon after the macro!) +RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE2) +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE2) +RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS2) +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS2) + +// Step 2. +// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV SOLID_REACTIVE_WIDE_math2(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist > 255 || dist > 32 ? 255 : tick - dist; + hsv.v = qadd8(hsv.v, 255 - effect); + return hsv; +} + +static HSV SOLID_REACTIVE_NEXUS_math2(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist > 255 || ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) ? 255 : tick - dist; + hsv.v = qadd8(hsv.v, 255 - effect); + hsv.h = rgb_matrix_config.hsv.h + dy / 4; + return hsv; +} + +bool SOLID_REACTIVE_WIDE2(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math2); } +bool SOLID_REACTIVE_MULTIWIDE2(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math2); } +bool SOLID_REACTIVE_NEXUS2(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math2); } +bool SOLID_REACTIVE_MULTINEXUS2(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math2); } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk index 063d135a..1eb11fde 100644 --- a/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk +++ b/qmk/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk @@ -1,3 +1,17 @@ -NKRO_ENABLE = yes # USB Nkey Rollover -AUTO_SHIFT_ENABLE = yes # Auto Shift -SRC += config_led.c +#RGBLIGHT_ENABLE = no #Not for MD boards.This is here in case you forget. +COMMAND_ENABLE = no # Commands for debug and configuration +#BOOTMAGIC_ENABLE = full #Virtual DIP switch configuration +#BOOTMAGIC_ENABLE = lite +#AUTO_SHIFT_ENABLE = yes #Auto Shift +NKRO_ENABLE = yes # USB Nkey Rollover +DYNAMIC_MACRO_ENABLE = no # Dynamic macro recording and play +MOUSEKEY_ENABLE = no # Enable mouse control keycodes. Increases firmware size. +TAP_DANCE_ENABLE = no # Enable tap dance keys +CONSOLE_ENABLE = no # Enable debugging console. Increases firmware size. +SRC += config_led.c # Used to add files to the compilation/linking list. +TERMINAL_ENABLE = no +EXTRAKEY_ENABLE = yes # Audio control and System control +#RAW_ENABLE = yes #Raw HID has not yet been implemented for this keyboard +#COMBO_ENABLE #Key combo feature +#LEADER_ENABLE #Enable leader key chording +RGB_MATRIX_CUSTOM_USER = yes diff --git a/qmk/keyboards/massdrop/ctrl/readme.md b/qmk/keyboards/massdrop/ctrl/readme.md index 656ef9ac..be1e3932 100644 --- a/qmk/keyboards/massdrop/ctrl/readme.md +++ b/qmk/keyboards/massdrop/ctrl/readme.md @@ -14,7 +14,7 @@ Make example for this keyboard (after setting up your build environment): For information on flashing this keyboard, visit the following links: -[Massdrop Loader Releases](https://github.com/Massdrop/mdloader/releases/tag/0.0.1) +[Massdrop Loader Releases](https://github.com/Massdrop/mdloader/releases) [Massdrop Loader Repository and Instructions](https://github.com/Massdrop/mdloader) -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). \ No newline at end of file +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). diff --git a/qmk/keyboards/masterworks/classy_tkl/info.json b/qmk/keyboards/masterworks/classy_tkl/info.json new file mode 100644 index 00000000..5cf93dfb --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/info.json @@ -0,0 +1,279 @@ +{ + "keyboard_name": "Classy TKL", + "url": "https://geekhack.org/index.php?topic=105933", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5 }, + { "label": "Backspace2", "x": 14, "y": 1.5 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 1.75 }, + { "label": "Shift2", "x": 14, "y": 4.5, "w": 1 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 1.5, "y": 5.5, "w": 1 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 12.5, "y": 5.5, "w": 1 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_iso_wkl": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "\u00ac", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "\"", "x": 2, "y": 1.5 }, + { "label": "\u00a3", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "@", "x": 11.75, "y": 3.5 }, + { "label": "~", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "AltGr", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + } + } +} diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default/config.h b/qmk/keyboards/masterworks/classy_tkl/keymaps/default/config.h new file mode 100644 index 00000000..e328e5a3 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c b/qmk/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c new file mode 100644 index 00000000..a8765605 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_NO, KC_BSPC, KC_INS , KC_HOME, 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_DEL , KC_END, 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default/readme.md b/qmk/keyboards/masterworks/classy_tkl/keymaps/default/readme.md new file mode 100644 index 00000000..72b4eb54 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Classy TKL diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h new file mode 100644 index 00000000..e328e5a3 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c new file mode 100644 index 00000000..bb7b256f --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_wkl( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS , KC_HOME, 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_DEL , KC_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md new file mode 100644 index 00000000..72b4eb54 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Classy TKL diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h new file mode 100644 index 00000000..e328e5a3 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c new file mode 100644 index 00000000..1456ee02 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso_wkl( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS , KC_HOME, 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_DEL , KC_END, 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_NUHS, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md new file mode 100644 index 00000000..a4b8c86b --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ISO keymap for the Classy TKL diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c b/qmk/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c new file mode 100644 index 00000000..c26f147e --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Mathias Andersson + +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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_NO, KC_BSPC, KC_INS , KC_HOME, 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_DEL , KC_END, 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT_all( + 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, 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), + [2] = LAYOUT_all( + 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, 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), + [3] = LAYOUT_all( + 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, 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) +}; +// clang-format on diff --git a/qmk/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk b/qmk/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/masterworks/classy_tkl/readme.md b/qmk/keyboards/masterworks/classy_tkl/readme.md new file mode 100644 index 00000000..0557ed7f --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/readme.md @@ -0,0 +1,15 @@ +# Classy TKL + +![Classy TKL](https://i.imgur.com/p1dxfYKl.jpg) + +A short description of the keyboard/project + +* Keyboard Maintainer: [Mathias Andersson](https://github.com/wraul) +* Hardware Supported: [Classy TKL PCB](https://github.com/4pplet/classyTKL) +* Hardware Availability: https://geekhack.org/index.php?topic=105933 + +Make example for this keyboard (after setting up your build environment): + + make masterworks/classy_tkl:default + +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). diff --git a/qmk/keyboards/masterworks/classy_tkl/rev_a/config.h b/qmk/keyboards/masterworks/classy_tkl/rev_a/config.h new file mode 100644 index 00000000..0821b1df --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/rev_a/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Mathias Andersson + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D57 // "MW" = Masterworks +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Masterworks +#define PRODUCT Classy TKL + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS \ + { C7, F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS \ + { B4, D7, D6, D4, C6, D5, D3, D2, D1, D0, B7, B3, B2, B1, B0, E6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 diff --git a/qmk/keyboards/masterworks/classy_tkl/rev_a/rev_a.c b/qmk/keyboards/masterworks/classy_tkl/rev_a/rev_a.c new file mode 100644 index 00000000..58c0393d --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/rev_a/rev_a.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 "rev_a.h" + +#define CAPS_PIN B5 +#define SCROLL_PIN B6 + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(CAPS_PIN, led_state.caps_lock); + writePin(SCROLL_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/qmk/keyboards/masterworks/classy_tkl/rev_a/rev_a.h b/qmk/keyboards/masterworks/classy_tkl/rev_a/rev_a.h new file mode 100644 index 00000000..73e68b59 --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/rev_a/rev_a.h @@ -0,0 +1,79 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +// clang-format off +#define LAYOUT_all( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k3D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, \ + k50, k52, k53, k57, k5B, k5C, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, k52, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E, k5F, k5G }, \ +} + +#define LAYOUT_tkl_ansi_wkl( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k3D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k53, k57, k5B, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, KC_NO, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, KC_NO, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, KC_NO, k5D, k5E, k5F, k5G }, \ +} + +#define LAYOUT_tkl_iso_wkl( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k3D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k2D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k53, k57, k5B, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, KC_NO, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, KC_NO, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, KC_NO, k5D, k5E, k5F, k5G }, \ +} +// clang-format on diff --git a/qmk/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/qmk/keyboards/masterworks/classy_tkl/rev_a/rules.mk new file mode 100644 index 00000000..34bcd87a --- /dev/null +++ b/qmk/keyboards/masterworks/classy_tkl/rev_a/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Supported layouts +LAYOUTS = tkl_ansi_wkl tkl_iso_wkl diff --git a/qmk/keyboards/matrix/cain_re/cain_re.c b/qmk/keyboards/matrix/cain_re/cain_re.c new file mode 100644 index 00000000..e8d0a2b8 --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/cain_re.c @@ -0,0 +1,40 @@ +/** + * cain_re.c + * + Copyright 2020 astro + + 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 "cain_re.h" + +void matrix_init_kb(void) +{ + setPinOutput(NUM_PIN); + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) +{ + bool res = led_update_user(led_state); + if (res) { + writePin(NUM_PIN, led_state.num_lock); + writePin(CAPS_PIN, led_state.caps_lock); + writePin(SCROLL_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/qmk/keyboards/matrix/cain_re/cain_re.h b/qmk/keyboards/matrix/cain_re/cain_re.h new file mode 100644 index 00000000..0228177e --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/cain_re.h @@ -0,0 +1,40 @@ +/** + * cain_re.h + * + Copyright 2020 astro + + 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115, k116, k117, k118, k119, k120, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215, k216, k217, k218, k219, k220, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, \ + k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413, k414, k415, k416, \ + k500, k501, k502, k503, k504, k505, k506, k507, k508, k509, k510, k511, k512, k513 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011}, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111}, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311}, \ + { k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411}, \ + { k012, k113, k112, k212, k213, k312, k412, k413, k414, k415, k316, k315}, \ + { k114, k115, k116, k117, k217, k216, k215, k214, k313, k314, k416, KC_NO}, \ + { k013, k014, k015, k120, k119, k118, k218, k219, k220, k511, k512, k513}, \ + { k500, k501, k502, k503, k504, k505, k506, k507, k508, k509, k510, KC_NO} \ +} diff --git a/qmk/keyboards/matrix/cain_re/config.h b/qmk/keyboards/matrix/cain_re/config.h new file mode 100644 index 00000000..6bacf1c9 --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/config.h @@ -0,0 +1,58 @@ +/** + * config.h + * + Copyright 2020 astro + + 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D58 // MX +#define PRODUCT_ID 0x0106 // cain +#define DEVICE_VER 0x0001 +#define MANUFACTURER Matrix LAB +#define PRODUCT Matrix Cain Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F0, C7, C6, D5, D2, D4, D7, B7, D1 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, B5, B6, B3, B2, B1, D0, B4, D6} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E6 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_LED_MAP { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3 } +#endif + +#define CAPS_PIN D3 +#define NUM_PIN F7 +#define SCROLL_PIN B0 diff --git a/qmk/keyboards/matrix/cain_re/info.json b/qmk/keyboards/matrix/cain_re/info.json new file mode 100644 index 00000000..3f65b7de --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Matrix Cain Keyboard", + "url": "", + "maintainer": "qmk", + "width": 23, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "x":22, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Num Lock", "x":15.5, "y":1.5}, {"label":"/", "x":16.5, "y":1.5}, {"label":"*", "x":17.5, "y":1.5}, {"label":"-", "x":18.5, "y":1.5}, {"label":"Insert", "x":20, "y":1.5}, {"label":"Home", "x":21, "y":1.5}, {"label":"PgUp", "x":22, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"7", "x":15.5, "y":2.5}, {"label":"8", "x":16.5, "y":2.5}, {"label":"9", "x":17.5, "y":2.5}, {"label":"+", "x":18.5, "y":2.5}, {"label":"Delete", "x":20, "y":2.5}, {"label":"End", "x":21, "y":2.5}, {"label":"PgDn", "x":22, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":15.5, "y":3.5}, {"label":"5", "x":16.5, "y":3.5}, {"label":"6", "x":17.5, "y":3.5}, {"label":"+", "x":18.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"1", "x":15.5, "y":4.5}, {"label":"2", "x":16.5, "y":4.5}, {"label":"3", "x":17.5, "y":4.5}, {"label":"Enter", "x":18.5, "y":4.5}, {"label":"\u2191", "x":21, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Win", "x":12.5, "y":5.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"0", "x":15.5, "y":5.5}, {"label":"0", "x":16.5, "y":5.5}, {"label":".", "x":17.5, "y":5.5}, {"label":"Enter", "x":18.5, "y":5.5}, {"label":"\u2190", "x":20, "y":5.5}, {"label":"\u2193", "x":21, "y":5.5}, {"label":"\u2192", "x":22, "y":5.5}] + } + } +} diff --git a/qmk/keyboards/matrix/cain_re/keymaps/default/keymap.c b/qmk/keyboards/matrix/cain_re/keymaps/default/keymap.c new file mode 100644 index 00000000..1f2d3b4e --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/** + * keymap.c + * + Copyright 2020 astro + + 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0]=LAYOUT_all( + 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_PSCR, KC_SLCK, LT(1,KC_PAUS), + + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_INS, KC_HOME, 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_P7, KC_P8, KC_P9, KC_PPLS, KC_DEL, KC_END, 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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LEFT, KC_DOWN, KC_RGHT), + + [1]=LAYOUT_all( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, _______, _______, + KC_NLCK, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, _______,_______,_______,_______, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/qmk/keyboards/matrix/cain_re/readme.md b/qmk/keyboards/matrix/cain_re/readme.md new file mode 100644 index 00000000..13c86ea5 --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/readme.md @@ -0,0 +1,15 @@ +# Matrix Cain replacement PCB + +This was the replacement PCB for the Matrix Cain keyboard. + +This firmware **DOES NOT** support the original PCB shipped with the Cain keyboard. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: Matrix Cain keyboard +* Hardware Availability: Matrix Lab + +Make example for this keyboard (after setting up your build environment): + + make matrix/cain_re:default + +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). diff --git a/qmk/keyboards/matrix/cain_re/rules.mk b/qmk/keyboards/matrix/cain_re/rules.mk new file mode 100644 index 00000000..9bbb324e --- /dev/null +++ b/qmk/keyboards/matrix/cain_re/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/matrix/m20add/rules.mk b/qmk/keyboards/matrix/m20add/rules.mk index 6dba1539..fb97c1d3 100644 --- a/qmk/keyboards/matrix/m20add/rules.mk +++ b/qmk/keyboards/matrix/m20add/rules.mk @@ -1,38 +1,15 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx +# MCU name +MCU = STM32F411 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ MCU_LDSCRIPT = m20add_boot -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx - # Board: it should exist either in /os/hal/boards/ # or /boards BOARD = m20add_bd -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -OPT_DEFS = - -# Options to pass to dfu-util when flashing -#DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -#DFU_SUFFIX_ARGS = -p DF11 -v 0483 - # Build Options # comment out to disable the options. # diff --git a/qmk/keyboards/matrix/noah/info.json b/qmk/keyboards/matrix/noah/info.json index f35bbd58..69fc0fcc 100644 --- a/qmk/keyboards/matrix/noah/info.json +++ b/qmk/keyboards/matrix/noah/info.json @@ -1426,6 +1426,9 @@ "y": 4 } ] + }, + "LAYOUT_65_iso_blocker": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/qmk/keyboards/matrix/noah/keymaps/rys/keymap.c b/qmk/keyboards/matrix/noah/keymaps/rys/keymap.c new file mode 100644 index 00000000..73ee8e1f --- /dev/null +++ b/qmk/keyboards/matrix/noah/keymaps/rys/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Rys Sommefeldt + * + * 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 i s 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_blocker( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │PUp│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PDn│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGUI│LAlt│      Spaaaaaaace       │RAlt│ L1 │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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_BSPC, KC_GRV, + 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_DEL, + 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_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ TOG │PLN│MOD│HU+│HU-│SA+│SA-│VA+│VA-│   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │ │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + RGB_TOG, RGB_M_P, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/matrix/noah/noah.h b/qmk/keyboards/matrix/noah/noah.h index 5d0da798..15810c70 100644 --- a/qmk/keyboards/matrix/noah/noah.h +++ b/qmk/keyboards/matrix/noah/noah.h @@ -48,6 +48,20 @@ {k40, k41, k42,KC_NO,k43,KC_NO,KC_NO, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \ } +#define LAYOUT_65_iso_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c,KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c,KC_NO, KC_NO}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \ + {k40, k41, k42,KC_NO,k43,KC_NO,k44, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \ +} + #define LAYOUT_default_splitspace( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ diff --git a/qmk/keyboards/matrix/noah/rules.mk b/qmk/keyboards/matrix/noah/rules.mk index 80854e67..19e432d2 100644 --- a/qmk/keyboards/matrix/noah/rules.mk +++ b/qmk/keyboards/matrix/noah/rules.mk @@ -1,38 +1,15 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx +# MCU name +MCU = STM32F411 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ MCU_LDSCRIPT = noah_boot -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx - # Board: it should exist either in /os/hal/boards/ # or /boards BOARD = noah_bd -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -OPT_DEFS = - -# Options to pass to dfu-util when flashing -#DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -#DFU_SUFFIX_ARGS = -p DF11 -v 0483 - # Build Options # comment out to disable the options. # @@ -52,3 +29,5 @@ RGBLIGHT_CUSTOM_DRIVER = yes CUSTOM_MATRIX = yes # project specific files SRC += ws2812.c matrix.c + +LAYOUTS = 65_iso_blocker diff --git a/qmk/keyboards/mechlovin/hannah60rgb/config.h b/qmk/keyboards/mechlovin/hannah60rgb/config.h index 5ad16084..6acfa5d4 100644 --- a/qmk/keyboards/mechlovin/hannah60rgb/config.h +++ b/qmk/keyboards/mechlovin/hannah60rgb/config.h @@ -21,11 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x4D4C // ML-Mechlovin -#define PRODUCT_ID 0x6001 -#define DEVICE_VER 0x0001 #define MANUFACTURER Team.Mechlovin -#define PRODUCT Hannah60 RGB -#define DESCRIPTION Team.Mechlovin Hannah60 RGB /* key matrix size */ #define MATRIX_ROWS 5 @@ -44,15 +40,4 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A4, A5, A3, A2, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14 } -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN A15 -#define DRIVER_LED_TOTAL 72 -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/hannah60rgb.h b/qmk/keyboards/mechlovin/hannah60rgb/hannah60rgb.h index 8fd1c679..9944b122 100644 --- a/qmk/keyboards/mechlovin/hannah60rgb/hannah60rgb.h +++ b/qmk/keyboards/mechlovin/hannah60rgb/hannah60rgb.h @@ -1,63 +1,24 @@ -/* -Copyright 2020 Mechlovin' - -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 . -*/ +/* Copyright 2019 Mechlovin + * + * 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 . + */ #pragma once #include "quantum.h" -#define LAYOUT_all( \ -K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ -K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ -K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ -K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ -K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D }, \ -} -#define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ -} -#define LAYOUT_60_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ -} - - -// generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ +#if defined(KEYBOARD_mechlovin_hannah60rgb_rev1) + #include "rev1.h" +#elif defined(KEYBOARD_mechlovin_hannah60rgb_rev2) + #include "rev2.h" +#endif diff --git a/qmk/keyboards/mechlovin/hannah60rgb/readme.md b/qmk/keyboards/mechlovin/hannah60rgb/readme.md index 777be816..e827bda5 100644 --- a/qmk/keyboards/mechlovin/hannah60rgb/readme.md +++ b/qmk/keyboards/mechlovin/hannah60rgb/readme.md @@ -10,6 +10,6 @@ A 60% PCB with per-key RGB, compatible with Poker and Unikorn cases. Make example for this keyboard (after setting up your build environment): - make mechlovin/hannah60rgb:default + make mechlovin/hannah60rgb/rev1:default 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). diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/config.h b/qmk/keyboards/mechlovin/hannah60rgb/rev1/config.h new file mode 100644 index 00000000..20873e71 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/config.h @@ -0,0 +1,18 @@ +#pragma once + +#define PRODUCT_ID 0x6001 +#define DEVICE_VER 0x0001 +#define PRODUCT Hannah60 RGB + +#define RGB_DI_PIN A15 +#ifdef RGB_MATRIX_ENABLE +# define DRIVER_LED_TOTAL 72 +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +#endif \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/info.json b/qmk/keyboards/mechlovin/hannah60rgb/rev1/info.json new file mode 100644 index 00000000..f729ac8f --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/info.json @@ -0,0 +1,222 @@ +{ + "keyboard_name": "hannah60rgb", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + + {"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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 2.75}, + {"x": 6.5, "y": 4, "w": 1.25}, + {"x": 7.75, "y": 4, "w": 2.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 12.5, "y": 4, "w": 1.25}, + {"x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + + {"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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 2.75}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 12.5, "y": 4, "w": 1.25}, + {"x": 13.75, "y": 4, "w": 1.25} + ] + }, + "LAYOUT_60_iso": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 2.75}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 12.5, "y": 4, "w": 1.25}, + {"x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c b/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c new file mode 100644 index 00000000..d3e8d7e6 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Mechlovin' + * + * 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 + +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_BSPC, KC_DEL, + 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, + LT(2,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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + +}; diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c b/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c new file mode 100644 index 00000000..2d72dbd5 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Mechlovin' + * + * 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 + +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_BSPC, KC_DEL, + 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, + LT(2,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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + [1] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [2] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [3] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +}; diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk b/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/rev1.c b/qmk/keyboards/mechlovin/hannah60rgb/rev1/rev1.c new file mode 100644 index 00000000..5acea8c6 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/rev1.c @@ -0,0 +1,54 @@ +/* Copyright 2020 Mechlovin' + * + * 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 "hannah60rgb.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + //Key Matrix to LED Index + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, + {29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 15}, + {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 16, 43}, + {59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 44}, + {60, 61, 62, NO_LED, 63, NO_LED, 64, NO_LED, 67, NO_LED, 68, 69, 70, 71} +}, { + //LED Index to Physical Positon + { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0 }, { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {208, 0}, {216, 0}, + {220, 0}, {211, 16}, {200,16 }, {176,16 }, {160,16}, {144,16}, {128,16}, { 112,16}, { 96,16}, { 80,16}, { 64,16}, { 48,16}, {32, 16}, {16, 16}, {0,16}, + { 0, 32}, { 16, 32}, { 32,32 }, { 48,32 }, { 64,32}, { 80,32}, { 96,32}, { 112,32}, { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {208, 32}, {224,48}, + {208, 48}, {192, 48}, {160,48 }, {144,48 }, {128,48}, {112,48}, {96,48}, { 80,48}, { 64,48}, { 48,48}, { 32,48}, { 16,48}, {8, 48}, {0, 48}, {0,48}, + { 0, 64}, { 16, 64}, { 32,64 }, { 48,64 }, { 64,64}, { 80,64}, { 96,64}, { 112,64}, { 144,64}, { 160,64}, { 192,64}, { 224,64}, +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +} }; + +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(30, 255, 255, 255); + } +} +#endif \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/rev1.h b/qmk/keyboards/mechlovin/hannah60rgb/rev1/rev1.h new file mode 100644 index 00000000..8fd1c679 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/rev1.h @@ -0,0 +1,63 @@ +/* +Copyright 2020 Mechlovin' + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ +K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ +K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D }, \ +} +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ +} +#define LAYOUT_60_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ +} + + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev1/rules.mk b/qmk/keyboards/mechlovin/hannah60rgb/rev1/rules.mk new file mode 100644 index 00000000..20256e20 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev1/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = WS2812 diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/config.h b/qmk/keyboards/mechlovin/hannah60rgb/rev2/config.h new file mode 100644 index 00000000..2bcffbc8 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/config.h @@ -0,0 +1,40 @@ +#pragma once + +#define PRODUCT_ID 0x6002 +#define DEVICE_VER 0x0001 +#define PRODUCT Hannah60 RGB Rev.2 + +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN A15 +# define RGBLED_NUM 18 +# define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +#endif + +//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 44 +#define DRIVER_2_LED_TOTAL 34 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set + +#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) +# define RGB_MATRIX_DISABLE_KEYCODES +#endif \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/info.json b/qmk/keyboards/mechlovin/hannah60rgb/rev2/info.json new file mode 100644 index 00000000..44e08367 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "hannah60rgb", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + + {"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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 12.5, "y": 4, "w": 1.25}, + {"x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c b/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c new file mode 100644 index 00000000..fd55a318 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Mechlovin' + * + * 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 + +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_BSPC, KC_DEL, + 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_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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + +}; diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c b/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c new file mode 100644 index 00000000..c3c7c155 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Mechlovin' + * + * 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 + +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_BSPC, KC_DEL, + 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, + LT(2,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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + [1] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [2] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [3] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +}; diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk b/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/qmk/keyboards/mechlovin/hannah60rgb/rev2/rev2.c new file mode 100644 index 00000000..05469a1b --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -0,0 +1,247 @@ +/* Copyright 2020 Mechlovin' + * + * 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 "rev2.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, //D9-0-0 + {0, C5_2, C6_2, C7_2}, //D59-1-1 + {0, C2_1, C3_1, C4_1}, //D68-2-2 + {0, C5_1, C6_1, C7_1}, //D76-3-3 + {0, C1_2, C2_2, C4_3}, //D10-15-4 + {0, C5_3, C6_3, C7_3}, //D60-16-5 + {0, C1_3, C2_3, C3_3}, //D72-17-6 + {0, C5_4, C6_4, C7_4}, //D77-18-7 + {0, C1_4, C2_4, C3_4}, //D46-30-8 + {0, C4_4, C6_5, C7_5}, //D61-31-9 + {0, C1_5, C2_5, C3_5}, //D73-32-10 + {0, C4_5, C5_5, C7_6}, //D78-33-11 + {0, C1_6, C2_6, C3_6}, //D126-44-12 + {0, C4_6, C5_6, C6_6}, //D51-45-13 + {0, C1_7, C2_7, C3_7}, //D63-46-14 + {0, C4_7, C5_7, C6_7}, //D74-47-15 + {0, C1_8, C2_8, C3_8}, //D56-60-16 + {0, C4_8, C5_8, C6_8}, //D67-61-17 + +// left CB + {0, C2_9, C3_9, C4_9}, //D80-4-18 + {0, C5_9, C6_9, C7_9}, //D84-5-19 + {0, C1_9, C3_10, C4_10}, //D89-6-20 + {0, C5_10, C6_10, C7_10}, //D94-7-21 + {0, C1_10, C2_10, C4_11}, //D81-19-22 + {0, C5_11, C6_11, C7_11}, //D85-20-23 + {0, C1_11, C2_11, C3_11}, //D90-21-24 + {0, C5_12, C6_12, C7_12}, //D95-22-25 + {0, C1_12, C2_12, C3_12}, //D82-34-26 + {0, C4_12, C6_13, C7_13}, //D86-35-27 + {0, C1_13, C2_13, C3_13}, //D91-36-28 + {0, C4_13, C5_13, C7_14}, //D96-37-29 + {0, C1_14, C2_14, C3_14}, //D79-48-30 + {0, C4_14, C5_14, C6_14}, //D83-49-31 + {0, C1_15, C2_15, C3_15}, //D87-50-32 + {0, C4_15, C5_15, C6_15}, //D92-51-33 + {0, C1_16, C2_16, C3_16}, //D75-62-34 + {0, C4_16, C5_16, C6_16}, //D93-63-35 + +// right CA + {1, C2_1, C3_1, C4_1}, //D98-8-36 + {1, C5_1, C6_1, C7_1}, //D102-9-37 + {1, C1_1, C3_2, C4_2}, //D106-10-38 + {1, C5_2, C6_2, C7_2}, //D111-11-39 + {1, C2_9, C3_9, C4_9}, //D116-12-40 + {1, C5_9, C6_9, C7_9}, //D130-13-41 + {1, C1_13, C2_13, C3_13}, //D121-14-42 + {1, C1_2, C2_2, C4_3}, //D99-23-43 + {1, C5_3, C6_3, C7_3}, //D103-24-44 + {1, C1_3, C2_3, C3_3}, //D107-25-45 + {1, C5_4, C6_4, C7_4}, //D112-26-46 + {1, C1_9, C3_10, C4_10}, //D117-27-47 + {1, C5_10, C6_10, C7_10}, //D129-28-48 + {1, C4_13, C5_13, C7_14}, //D122-29-49 + {1, C1_4, C2_4, C3_4}, //D100-38-50 + {1, C4_4, C6_5, C7_5}, //D104-39-51 + {1, C1_5, C2_5, C3_5}, //D108-40-52 + {1, C4_5, C5_5, C7_6}, //D113-41-53 +// right CB + {1, C1_10, C2_10, C4_11}, //D118-42-54 + {1, C5_11, C6_11, C7_11}, //D123-43-55 + {1, C1_6, C2_6, C3_6}, //D97-52-56 + {1, C4_6, C5_6, C6_6}, //D101-53-57 + {1, C1_7, C2_7, C3_7}, //D105-54-58 + {1, C4_7, C5_7, C6_7}, //D109-55-59 + {1, C1_11, C2_11, C3_11}, //D114-56-60 + {1, C5_12, C6_12, C7_12}, //D128-57-61 + {1, C1_14, C2_14, C3_14}, //D119-58-62 + {1, C4_14, C5_14, C6_14}, //D124-59-63 + {1, C1_8, C2_8, C3_8}, //D127-64-64 + {1, C4_8, C5_8, C6_8}, //D110-65-65 + {1, C1_12, C2_12, C3_12}, //D115-66-66 + {1, C4_12, C6_13, C7_13}, //D120-67-67 + {1, C1_15, C2_15, C3_15}, //D125-68-68 + {1, C4_15, C5_15, C6_15}, //D140-69-69 + {0, C8_7, C7_7, C7_8}, //INDICATOR LED-70 + {0, C8_8, C8_1, C8_2}, //INDICATOR LED-71 + {0, C9_7, C8_6, C9_6}, //INDICATOR LED-72 + {0, C9_8, C8_4, C8_5},//INDICATOR LED-73 + {0, C8_15, C9_1, C9_2},//INDICATOR LED-74 + {0, C8_16, C8_3, C9_3},//INDICATOR LED-75 + {0, C9_15, C9_9, C9_10},//INDICATOR LED-76 + {0, C9_16, C9_11, C7_12},//INDICATOR LED-77 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + {0, 1, 2, 3, 18, 19, 20, 21, 36, 37, 38, 39, 40, 41}, + {4, 5, 6, 7, 22, 23, 24, 25, 43, 44, 45, 46, 47, 69}, + {8, 9, 10, 11, 26, 27, 28, 29, 50, 51, 52, 53, 54, 55}, + {13, 14, 15, 30, 31, 32, 33, 56, 57, 58, 59, 60, 62, 63}, + {16, 17, 34, NO_LED, NO_LED, NO_LED, 35, NO_LED, NO_LED, NO_LED, 65, 66, 67, 68}, + }, + { + //LED Index to Physical Positon + { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0}, //9-59-68-76 + { 0, 16}, { 16, 16}, { 32, 16}, { 48, 16}, //10-60-72-77 + { 0, 32}, { 16, 32}, { 32, 32}, { 48, 32}, //46-61-73-78 + { 0, 48}, { 0, 48}, { 12, 48}, { 16, 48}, //126-51-63-74 + { 0, 64}, { 16, 64}, //56-67 + { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, //80-84-89-94 + { 64, 16}, { 80, 16}, { 96,16}, { 112,16}, //81-85-90-95 + { 64, 32}, { 80, 32}, { 96,32}, { 112,32}, //82-86-91-96 + { 32, 48}, { 48, 48}, { 64,48}, { 80,48}, //79-83-87-92 + { 32, 64}, { 80, 64}, //75-93 + { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {220, 0}, {210, 0}, //98-102-106-111-116-121-130 + { 128,16}, {144,16}, {160,16}, {176, 16}, {192, 16}, {220, 16}, {220,16}, //99-103-107-112-117-129-122 + { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {220, 32}, //100-104-108-113-118-123 + { 96,48}, {112,48}, {128, 48}, {144, 48}, {160, 48}, {200, 48}, {220,48}, {220,48}, //97-101-105-109-114-119-128-124 + { 96,64}, {144,64}, {160,64}, {176,64}, {220, 64}, //127-110-115-120-125 + { 220, 0}, //140 +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +} }; + +__attribute__((weak)) void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(8, 255, 255, 255); + rgb_matrix_set_color(70, 255, 0, 0); + } else { + rgb_matrix_set_color(70, 0, 0, 0); + } + if (host_keyboard_led_state().num_lock) { + rgb_matrix_set_color(71, 255, 0, 0); + } else { + rgb_matrix_set_color(71, 0, 0, 0); + } + if (host_keyboard_led_state().scroll_lock) { + rgb_matrix_set_color(72, 255, 0, 0); + } else { + rgb_matrix_set_color(72, 0, 0, 0); + } +} + +__attribute__((weak)) +layer_state_t layer_state_set_user(layer_state_t state) { + // if on layer 1, turn on L1 LED, otherwise off. + if (get_highest_layer(state) == 0) { + rgb_matrix_set_color(73, 255, 0, 0); + } else { + rgb_matrix_set_color(73, 0, 0, 0); + } + // if on layer 2, turn on L2 LED, otherwise off. + if (get_highest_layer(state) == 1) { + rgb_matrix_set_color(74, 255, 0, 0); + } else { + rgb_matrix_set_color(74, 0, 0, 0); + } + + // if on layer 3, turn on L3 LED, otherwise off. + if (get_highest_layer(state) == 2) { + rgb_matrix_set_color(75, 255, 0, 0); + } else { + rgb_matrix_set_color(75, 0, 0, 0); + } + + // if on layer 4, turn on L4 LED, otherwise off. + if (get_highest_layer(state) == 3) { + rgb_matrix_set_color(76, 255, 0, 0); + } else { + rgb_matrix_set_color(76, 0, 0, 0); + } + + // if on layer 5, turn on L5 LED, otherwise off. + if (get_highest_layer(state) == 4) { + rgb_matrix_set_color(77, 255, 0, 0); + } else { + rgb_matrix_set_color(77, 0, 0, 0); + } + + return state; +} + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + #ifdef RGB_MATRIX_DISABLE_KEYCODES + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + case KC_F15: + rgb_matrix_increase_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + default: + break; + } + } + return true; +} diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/rev2.h b/qmk/keyboards/mechlovin/hannah60rgb/rev2/rev2.h new file mode 100644 index 00000000..3382941e --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/rev2.h @@ -0,0 +1,33 @@ +/* +Copyright 2020 Mechlovin' + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ +K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ +K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ +} diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rev2/rules.mk b/qmk/keyboards/mechlovin/hannah60rgb/rev2/rules.mk new file mode 100644 index 00000000..1114e695 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah60rgb/rev2/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = IS31FL3731 \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah60rgb/rules.mk b/qmk/keyboards/mechlovin/hannah60rgb/rules.mk index 1a5441fc..7023e65c 100644 --- a/qmk/keyboards/mechlovin/hannah60rgb/rules.mk +++ b/qmk/keyboards/mechlovin/hannah60rgb/rules.mk @@ -14,14 +14,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs -RGB_MATRIX_ENABLE = WS2812 - # generated by KBFirmware JSON to QMK Parser # https://noroadsleft.github.io/kbf_qmk_converter/ + +DEFAULT_FOLDER = mechlovin/hannah60rgb/rev1 diff --git a/qmk/keyboards/mechlovin/hannah65/config.h b/qmk/keyboards/mechlovin/hannah65/config.h new file mode 100644 index 00000000..6801c30a --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Team Mechlovin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4C +#define MANUFACTURER Team Mechlovin + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { A4, A5, A3, A2, A1 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14, A13 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B8 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define BACKLIGHT_LEVELS 3 diff --git a/qmk/keyboards/mechlovin/hannah65/hannah65.c b/qmk/keyboards/mechlovin/hannah65/hannah65.c new file mode 100644 index 00000000..4f937d8a --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/hannah65.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 "hannah65.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B9); + writePinLow(B9); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B9, led_state.caps_lock); + } + + return true; +} diff --git a/qmk/keyboards/mechlovin/hannah65/hannah65.h b/qmk/keyboards/mechlovin/hannah65/hannah65.h new file mode 100644 index 00000000..576a7851 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/hannah65.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_mechlovin_hannah65_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_mechlovin_hannah65_mechlovin9) +# include "mechlovin9.h" +#endif \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/config.h b/qmk/keyboards/mechlovin/hannah65/mechlovin9/config.h new file mode 100644 index 00000000..df917e3d --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PRODUCT_ID 0x6501 +#define DEVICE_VER 0x0001 +#define PRODUCTION Mechlovin9 \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/info.json b/qmk/keyboards/mechlovin/hannah65/mechlovin9/info.json new file mode 100644 index 00000000..24585920 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "mechlovin9", + "url": "", + "maintainer": "Team Mechlovin", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0}, + {"label":"K1D (B1,D2)", "x":14, "y":0}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2C (B2,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.5}, + {"label":"K41 (B4,B6)", "x":1.5, "y":4}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.5}, + {"label":"K46 (B4,C3)", "x":4, "y":4, "w":7}, + {"label":"K4B (B4,D0)", "x":11, "y":4, "w":1.5}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c new file mode 100644 index 00000000..97a2c807 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 + +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_BSPC, KC_DEL, KC_HOME, + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + +}; + diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md new file mode 100644 index 00000000..324467b0 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for mechlovin9 diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c new file mode 100644 index 00000000..0fae908c --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 + +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_BSPC, KC_DEL, KC_HOME, + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + +}; + diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h b/qmk/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h new file mode 100644 index 00000000..4aebaad0 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E }, \ +} diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/readme.md b/qmk/keyboards/mechlovin/hannah65/mechlovin9/readme.md new file mode 100644 index 00000000..aa6bdc1c --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/mechlovin9/readme.md @@ -0,0 +1,15 @@ +# mechlovin9 + +![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) + +A 65% PCB, compatible with Kyuu. + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Kyuu Keyboard. +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/mechlovin9:default + +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). diff --git a/qmk/keyboards/mechlovin/hannah65/mechlovin9/rules.mk b/qmk/keyboards/mechlovin/hannah65/mechlovin9/rules.mk new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/mechlovin/hannah65/readme.md b/qmk/keyboards/mechlovin/hannah65/readme.md new file mode 100644 index 00000000..25fcd18d --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/readme.md @@ -0,0 +1,15 @@ +# hannah65 + +![hannah65](https://i.imgur.com/qf0BYI2l.png) + +A 65% PCB, compatible with E6.5, Kyuu,... + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Hannah65, STM32F303 +* Hardware Availability: [Mechlovin Store](https://mechlove.com/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/rev1:default + +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). diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/config.h b/qmk/keyboards/mechlovin/hannah65/rev1/config.h new file mode 100644 index 00000000..8d90908c --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PRODUCT_ID 0x6500 +#define DEVICE_VER 0x0001 +#define PRODUCTION Hannah65 \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/info.json b/qmk/keyboards/mechlovin/hannah65/rev1/info.json new file mode 100644 index 00000000..ceb7aceb --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/info.json @@ -0,0 +1,225 @@ +{ + "keyboard_name": "hannah65-rev1", + "url": "", + "maintainer": "Team Mechlovin", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0}, + {"label":"K1D (B1,D2)", "x":14, "y":0}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2C (B2,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,B6)", "x":1.25, "y":3}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2C (B2,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2D (B2,D2)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2C (B2,D1)", "x":12.75, "y":2}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,B6)", "x":1.25, "y":3}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c new file mode 100644 index 00000000..e4960b54 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 + +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_BSPC, KC_DEL, KC_HOME, + 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_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_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + +}; + diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md new file mode 100644 index 00000000..1e8f0ec1 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hannah65 diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c new file mode 100644 index 00000000..34a9cf82 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 + +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_BSPC, KC_DEL, KC_HOME, + 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_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_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + +}; + diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/rev1.h b/qmk/keyboards/mechlovin/hannah65/rev1/rev1.h new file mode 100644 index 00000000..0b6b863d --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rev1/rev1.h @@ -0,0 +1,61 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_iso_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/qmk/keyboards/mechlovin/hannah65/rev1/rules.mk b/qmk/keyboards/mechlovin/hannah65/rev1/rules.mk new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/mechlovin/hannah65/rules.mk b/qmk/keyboards/mechlovin/hannah65/rules.mk new file mode 100644 index 00000000..74157ae7 --- /dev/null +++ b/qmk/keyboards/mechlovin/hannah65/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = mechlovin/hannah65/rev1 \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/hannah910/rev2/rules.mk b/qmk/keyboards/mechlovin/hannah910/rev2/rules.mk index 4f114baa..f66b6105 100644 --- a/qmk/keyboards/mechlovin/hannah910/rev2/rules.mk +++ b/qmk/keyboards/mechlovin/hannah910/rev2/rules.mk @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = 65_ansi_blocker +LAYOUTS = 65_ansi_blocker 65_iso_blocker_split_bs diff --git a/qmk/keyboards/mechlovin/infinity88/config.h b/qmk/keyboards/mechlovin/infinity88/config.h new file mode 100644 index 00000000..df1ea495 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2020 Team Mechlovin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4C // ML +#define PRODUCT_ID 0x8802 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Team.Mechlovin +#define PRODUCT Infinity 88 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { A10, B13, B12, B11, C14, C15 } +#define MATRIX_COL_PINS { C13, B9, B4, B7, B8, B5, B6, A9, A5, A6, A7,B1, B2, B10, B3, B14, B15 } + +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B0 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define RGB_DI_PIN A15 +#define RGBLED_NUM 26 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/infinity88/infinity88.c b/qmk/keyboards/mechlovin/infinity88/infinity88.c new file mode 100644 index 00000000..d342ce9e --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/infinity88.c @@ -0,0 +1,39 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 "infinity88.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(A3); + writePinLow(A3); + setPinOutput(A4); + writePinLow(A4); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(A4, led_state.caps_lock); + writePin(A3, led_state.num_lock); + } + + return true; +} + diff --git a/qmk/keyboards/mechlovin/infinity88/infinity88.h b/qmk/keyboards/mechlovin/infinity88/infinity88.h new file mode 100644 index 00000000..27f4e230 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/infinity88.h @@ -0,0 +1,38 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K3E, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K0D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, KC_NO }, \ + { K50, K51, K52, KC_NO, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/infinity88/info.json b/qmk/keyboards/mechlovin/infinity88/info.json new file mode 100644 index 00000000..d667141b --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/info.json @@ -0,0 +1,105 @@ +{ + "keyboard_name": "infinity88", + "url": "", + "maintainer": "Team Mechlovin", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B0,B6)", "x":0, "y":0}, + {"label":"K01 (B0,F4)", "x":1.25, "y":0}, + {"label":"K02 (B0,C0)", "x":2.25, "y":0}, + {"label":"K03 (B0,C1)", "x":3.25, "y":0}, + {"label":"K04 (B0,C2)", "x":4.25, "y":0}, + {"label":"K05 (B0,C3)", "x":5.5, "y":0}, + {"label":"K06 (B0,C4)", "x":6.5, "y":0}, + {"label":"K07 (B0,C5)", "x":7.5, "y":0}, + {"label":"K08 (B0,C6)", "x":8.5, "y":0}, + {"label":"K09 (B0,C7)", "x":9.75, "y":0}, + {"label":"K0A (B0,D0)", "x":10.75, "y":0}, + {"label":"K0B (B0,D1)", "x":11.75, "y":0}, + {"label":"K0C (B0,D2)", "x":12.75, "y":0}, + {"label":"K3E (B3,D4)", "x":14, "y":0}, + {"label":"K0E (B0,D4)", "x":15.25, "y":0}, + {"label":"K0F (B0,D5)", "x":16.25, "y":0}, + {"label":"K0G (B0,D6)", "x":17.25, "y":0}, + {"label":"K10 (B1,B6)", "x":0, "y":1.25}, + {"label":"K11 (B1,F4)", "x":1, "y":1.25}, + {"label":"K12 (B1,C0)", "x":2, "y":1.25}, + {"label":"K13 (B1,C1)", "x":3, "y":1.25}, + {"label":"K14 (B1,C2)", "x":4, "y":1.25}, + {"label":"K15 (B1,C3)", "x":5, "y":1.25}, + {"label":"K16 (B1,C4)", "x":6, "y":1.25}, + {"label":"K17 (B1,C5)", "x":7, "y":1.25}, + {"label":"K18 (B1,C6)", "x":8, "y":1.25}, + {"label":"K19 (B1,C7)", "x":9, "y":1.25}, + {"label":"K1A (B1,D0)", "x":10, "y":1.25}, + {"label":"K1B (B1,D1)", "x":11, "y":1.25}, + {"label":"K1C (B1,D2)", "x":12, "y":1.25}, + {"label":"K1D (B1,D3)", "x":13, "y":1.25}, + {"label":"K0D (B0,D3)", "x":14, "y":1.25}, + {"label":"K1E (B1,D4)", "x":15.25, "y":1.25}, + {"label":"K1F (B1,D5)", "x":16.25, "y":1.25}, + {"label":"K1G (B1,D6)", "x":17.25, "y":1.25}, + {"label":"K20 (B2,B6)", "x":0, "y":2.25, "w":1.5}, + {"label":"K21 (B2,F4)", "x":1.5, "y":2.25}, + {"label":"K22 (B2,C0)", "x":2.5, "y":2.25}, + {"label":"K23 (B2,C1)", "x":3.5, "y":2.25}, + {"label":"K24 (B2,C2)", "x":4.5, "y":2.25}, + {"label":"K25 (B2,C3)", "x":5.5, "y":2.25}, + {"label":"K26 (B2,C4)", "x":6.5, "y":2.25}, + {"label":"K27 (B2,C5)", "x":7.5, "y":2.25}, + {"label":"K28 (B2,C6)", "x":8.5, "y":2.25}, + {"label":"K29 (B2,C7)", "x":9.5, "y":2.25}, + {"label":"K2A (B2,D0)", "x":10.5, "y":2.25}, + {"label":"K2B (B2,D1)", "x":11.5, "y":2.25}, + {"label":"K2C (B2,D2)", "x":12.5, "y":2.25}, + {"label":"K2D (B2,D3)", "x":13.5, "y":2.25, "w":1.5}, + {"label":"K2E (B2,D4)", "x":15.25, "y":2.25}, + {"label":"K2F (B2,D5)", "x":16.25, "y":2.25}, + {"label":"K2G (B2,D6)", "x":17.25, "y":2.25}, + {"label":"K30 (B3,B6)", "x":0, "y":3.25, "w":1.75}, + {"label":"K31 (B3,F4)", "x":1.75, "y":3.25}, + {"label":"K32 (B3,C0)", "x":2.75, "y":3.25}, + {"label":"K33 (B3,C1)", "x":3.75, "y":3.25}, + {"label":"K34 (B3,C2)", "x":4.75, "y":3.25}, + {"label":"K35 (B3,C3)", "x":5.75, "y":3.25}, + {"label":"K36 (B3,C4)", "x":6.75, "y":3.25}, + {"label":"K37 (B3,C5)", "x":7.75, "y":3.25}, + {"label":"K38 (B3,C6)", "x":8.75, "y":3.25}, + {"label":"K39 (B3,C7)", "x":9.75, "y":3.25}, + {"label":"K3A (B3,D0)", "x":10.75, "y":3.25}, + {"label":"K3B (B3,D1)", "x":11.75, "y":3.25}, + {"label":"K3C (B3,D2)", "x":12.75, "y":3.25}, + {"label":"K3D (B3,D3)", "x":13.75, "y":3.25, "w":1.25}, + {"label":"K40 (B4,B6)", "x":0, "y":4.25, "w":1.25}, + {"label":"K41 (B4,F4)", "x":1.25, "y":4.25}, + {"label":"K42 (B4,C0)", "x":2.25, "y":4.25}, + {"label":"K43 (B4,C1)", "x":3.25, "y":4.25}, + {"label":"K44 (B4,C2)", "x":4.25, "y":4.25}, + {"label":"K45 (B4,C3)", "x":5.25, "y":4.25}, + {"label":"K46 (B4,C4)", "x":6.25, "y":4.25}, + {"label":"K47 (B4,C5)", "x":7.25, "y":4.25}, + {"label":"K48 (B4,C6)", "x":8.25, "y":4.25}, + {"label":"K49 (B4,C7)", "x":9.25, "y":4.25}, + {"label":"K4A (B4,D0)", "x":10.25, "y":4.25}, + {"label":"K4B (B4,D1)", "x":11.25, "y":4.25}, + {"label":"K4C (B4,D2)", "x":12.25, "y":4.25, "w":1.75}, + {"label":"K4D (B4,D3)", "x":14, "y":4.25}, + {"label":"K4F (B4,D5)", "x":16.25, "y":4.25}, + {"label":"K50 (B5,B6)", "x":0, "y":5.25, "w":1.25}, + {"label":"K51 (B5,F4)", "x":1.25, "y":5.25, "w":1.25}, + {"label":"K52 (B5,C0)", "x":2.5, "y":5.25, "w":1.25}, + {"label":"K56 (B5,C4)", "x":3.75, "y":5.25, "w":6.25}, + {"label":"K5A (B5,D0)", "x":10, "y":5.25, "w":1.25}, + {"label":"K5B (B5,D1)", "x":11.25, "y":5.25, "w":1.25}, + {"label":"K5C (B5,D2)", "x":12.5, "y":5.25, "w":1.25}, + {"label":"K5D (B5,D3)", "x":13.75, "y":5.25, "w":1.25}, + {"label":"K5E (B5,D4)", "x":15.25, "y":5.25}, + {"label":"K5F (B5,D5)", "x":16.25, "y":5.25}, + {"label":"K5G (B5,D6)", "x":17.25, "y":5.25} + ] + } + } +} diff --git a/qmk/keyboards/mechlovin/infinity88/keymaps/default/keymap.c b/qmk/keyboards/mechlovin/infinity88/keymaps/default/keymap.c new file mode 100644 index 00000000..5c5696e7 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_F13, KC_PSCR, KC_SLCK, KC_PAUS, + 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, 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_HASH, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI,MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/qmk/keyboards/mechlovin/infinity88/keymaps/default/readme.md b/qmk/keyboards/mechlovin/infinity88/keymaps/default/readme.md new file mode 100644 index 00000000..01ef5550 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for infinity87 diff --git a/qmk/keyboards/mechlovin/infinity88/keymaps/via/keymap.c b/qmk/keyboards/mechlovin/infinity88/keymaps/via/keymap.c new file mode 100644 index 00000000..12980b80 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_F13, KC_PSCR, KC_SLCK, KC_PAUS, + 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, 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_HASH, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + 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, 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 + ), + [2] = LAYOUT_all( + 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, 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 + ), + [3] = LAYOUT_all( + 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, 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 + ) + +}; diff --git a/qmk/keyboards/mechlovin/infinity88/keymaps/via/readme.md b/qmk/keyboards/mechlovin/infinity88/keymaps/via/readme.md new file mode 100644 index 00000000..8867d290 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for infinity87 diff --git a/qmk/keyboards/mechlovin/infinity88/keymaps/via/rules.mk b/qmk/keyboards/mechlovin/infinity88/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/infinity88/readme.md b/qmk/keyboards/mechlovin/infinity88/readme.md new file mode 100644 index 00000000..65f80e80 --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/readme.md @@ -0,0 +1,15 @@ +# infinity87 + +![infinity87](https://i.imgur.com/9JGxJjVl.png) + +A replacement PCB for TKL keyboard. South-facing stabilisers. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Infinity88 STM32F303. +* Hardware Availability: [Mechlovin Store](https://mechlove.com). + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/infinity88:default + +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). diff --git a/qmk/keyboards/mechlovin/infinity88/rules.mk b/qmk/keyboards/mechlovin/infinity88/rules.mk new file mode 100644 index 00000000..7897007c --- /dev/null +++ b/qmk/keyboards/mechlovin/infinity88/rules.mk @@ -0,0 +1,17 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/qmk/keyboards/mechlovin/kanu/keymaps/via/rules.mk b/qmk/keyboards/mechlovin/kanu/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechlovin/kanu/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/mechlovin/kanu/rules.mk b/qmk/keyboards/mechlovin/kanu/rules.mk index 47edeec7..93bf5580 100644 --- a/qmk/keyboards/mechlovin/kanu/rules.mk +++ b/qmk/keyboards/mechlovin/kanu/rules.mk @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = 65_ansi_blocker +LAYOUTS = 65_ansi_blocker 65_iso_blocker_split_bs diff --git a/qmk/keyboards/mechmini/v2/config.h b/qmk/keyboards/mechmini/v2/config.h index 9da3e5f0..f20540b9 100644 --- a/qmk/keyboards/mechmini/v2/config.h +++ b/qmk/keyboards/mechmini/v2/config.h @@ -18,7 +18,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xAF99 #define PRODUCT_ID 0xCA40 #define DEVICE_VER 0x0002 #define MANUFACTURER MECHKEYS diff --git a/qmk/keyboards/mechmini/v2/keymaps/via/keymap.c b/qmk/keyboards/mechmini/v2/keymaps/via/keymap.c new file mode 100644 index 00000000..7c7c2103 --- /dev/null +++ b/qmk/keyboards/mechmini/v2/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + [1] = LAYOUT_ortho( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, M(1), M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + + [2] = LAYOUT_ortho( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_HOME, KC_END, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_PGDN, KC_PGUP, KC_MPLY), + + [3] = LAYOUT_ortho( + 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), + +}; diff --git a/qmk/keyboards/mechmini/v2/keymaps/via/rules.mk b/qmk/keyboards/mechmini/v2/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/mechmini/v2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/melgeek/mj61/config.h b/qmk/keyboards/melgeek/mj61/config.h new file mode 100644 index 00000000..452b1c87 --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "config_common.h" diff --git a/qmk/keyboards/melgeek/mj61/info.json b/qmk/keyboards/melgeek/mj61/info.json new file mode 100644 index 00000000..46085847 --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "MJ61", + "url": "", + "maintainer": "melgeek001365", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/qmk/keyboards/melgeek/mj61/keymaps/default/keymap.c b/qmk/keyboards/melgeek/mj61/keymaps/default/keymap.c new file mode 100644 index 00000000..2237851f --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GESC, 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_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/qmk/keyboards/melgeek/mj61/keymaps/via/keymap.c b/qmk/keyboards/melgeek/mj61/keymaps/via/keymap.c new file mode 100644 index 00000000..409a37c9 --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GESC, 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_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/qmk/keyboards/melgeek/mj61/keymaps/via/rules.mk b/qmk/keyboards/melgeek/mj61/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/melgeek/mj61/mj61.c b/qmk/keyboards/melgeek/mj61/mj61.c new file mode 100644 index 00000000..21853019 --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/mj61.c @@ -0,0 +1,124 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj61.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB1 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB2 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB3 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB4 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB5 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB6 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB7 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB8 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB9 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB10 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB11 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB12 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB13 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB14 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB15 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB16 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB17 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB18 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB19 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB20 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB21 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB22 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB23 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB24 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB25 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB26 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB27 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB28 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB29 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB30 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB31 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB32 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB33 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB34 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB35 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB36 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB37 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB38 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB39 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB40 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB41 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB42 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB43 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB44 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB45 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB46 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB47 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB48 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB49 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB50 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB51 */ + {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB52 */ + {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB53 */ + {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB54 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB55 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB56 */ + {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB57 */ + {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB58 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB59 */ + {0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB60 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB61 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB62 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB63 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED,}, /* R2 */ + { 52, NO_LED, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED }, /* R3 */ + { 53, 54, NO_LED, 55, 61, 56, 62, NO_LED, NO_LED, 57, 58, 59, 60, NO_LED }, /* R4 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} +#endif diff --git a/qmk/keyboards/melgeek/mj61/mj61.h b/qmk/keyboards/melgeek/mj61/mj61.h new file mode 100644 index 00000000..1881196d --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/mj61.h @@ -0,0 +1,35 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K43, K45, K49, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, K41, XXX, K43, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/qmk/keyboards/melgeek/mj61/readme.md b/qmk/keyboards/melgeek/mj61/readme.md new file mode 100644 index 00000000..2db0e71b --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/readme.md @@ -0,0 +1,15 @@ +# MelGeek MJ61 + +![MJ61](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/a0ebad495be43c4c42403878b4af4ac2_1024x1024@2x.jpg?v=1600672895) + +A hotswap 60% RGB Custom Mechanical keyboard. + +* Keyboard Maintainer: [melgeek](https://github.com/melgeek001365) +* Hardware Supported: MJ61 V1.1.2 20200612 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mj61/rev1:default + +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). diff --git a/qmk/keyboards/melgeek/mj61/rev1/config.h b/qmk/keyboards/melgeek/mj61/rev1/config.h new file mode 100644 index 00000000..a0ba953b --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/rev1/config.h @@ -0,0 +1,70 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xED61 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT MJ61 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } +#define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/qmk/keyboards/melgeek/mj61/rev1/rules.mk b/qmk/keyboards/melgeek/mj61/rev1/rules.mk new file mode 100644 index 00000000..ba7f9eac --- /dev/null +++ b/qmk/keyboards/melgeek/mj61/rev1/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/qmk/keyboards/melgeek/mj63/config.h b/qmk/keyboards/melgeek/mj63/config.h new file mode 100644 index 00000000..452b1c87 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "config_common.h" diff --git a/qmk/keyboards/melgeek/mj63/info.json b/qmk/keyboards/melgeek/mj63/info.json new file mode 100644 index 00000000..f608b984 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "MJ63", + "url": "", + "maintainer": "melgeek001365", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_arrow": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3, "w":1.75}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/melgeek/mj63/keymaps/default/keymap.c b/qmk/keyboards/melgeek/mj63/keymaps/default/keymap.c new file mode 100644 index 00000000..2829ae8f --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_arrow( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_60_ansi_arrow( + KC_GRV, 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_DEL, + _______, _______, _______, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_60_ansi_arrow( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/melgeek/mj63/keymaps/via/keymap.c b/qmk/keyboards/melgeek/mj63/keymaps/via/keymap.c new file mode 100644 index 00000000..37e25a83 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_arrow( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_60_ansi_arrow( + KC_GRV, 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_DEL, + _______, _______, _______, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_60_ansi_arrow( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_60_ansi_arrow( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/melgeek/mj63/keymaps/via/rules.mk b/qmk/keyboards/melgeek/mj63/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/melgeek/mj63/mj63.c b/qmk/keyboards/melgeek/mj63/mj63.c new file mode 100644 index 00000000..8b1ff386 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/mj63.c @@ -0,0 +1,17 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj63.h" diff --git a/qmk/keyboards/melgeek/mj63/mj63.h b/qmk/keyboards/melgeek/mj63/mj63.h new file mode 100644 index 00000000..1b12b7b4 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/mj63.h @@ -0,0 +1,35 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_60_ansi_arrow( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3B, K3C, K3D, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D } \ +} diff --git a/qmk/keyboards/melgeek/mj63/readme.md b/qmk/keyboards/melgeek/mj63/readme.md new file mode 100644 index 00000000..59f8b541 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/readme.md @@ -0,0 +1,16 @@ +# MelGeek MJ63 + +![MJ63](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/85c2f4d72137d02d6a211f27a45f1860_1024x1024@2x.jpg?v=1600672885) + +A hotswap 60% RGB Custom Mechanical keyboard with arrows and the size of left shift is 2.0U + +* Keyboard Maintainer: [melgeek001365](https://github.com/melgeek001365) +* Hardware Supported: MJ63 V1.0.0 20200712 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mj63/rev1:default + + +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). diff --git a/qmk/keyboards/melgeek/mj63/rev1/config.h b/qmk/keyboards/melgeek/mj63/rev1/config.h new file mode 100644 index 00000000..4cd8d6a9 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/rev1/config.h @@ -0,0 +1,70 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xEDED +#define PRODUCT_ID 0x6063 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT MJ63 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } +#define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 65 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/qmk/keyboards/melgeek/mj63/rev1/rev1.c b/qmk/keyboards/melgeek/mj63/rev1/rev1.c new file mode 100644 index 00000000..e9f75739 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/rev1/rev1.c @@ -0,0 +1,130 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj63.h" + + +#ifdef RGB_MATRIX_ENABLE + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB10 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB12 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB15 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB16 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB17 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB18 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB19 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB20 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB21 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB22 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB23 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB24 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB25 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB26 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB27 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB28 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB29 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB31 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB32 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB33 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB34 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB35 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB36 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB37 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB38 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB39 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB40 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB41 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB42 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB43 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB44 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB46 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB47 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB48 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB49 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB50 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB51 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB52 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB53 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB54 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB55 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB56 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB57 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB58 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB59 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB60 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB61 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB62 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB63 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB64 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB65 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB66 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED }, /* R2 */ + { 53, NO_LED, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41 }, /* R3 */ + { 61, 60, 59, NO_LED, 64, 62, 63, NO_LED, NO_LED, 58, 57, 56, 55, 54 }, /* R4 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 64}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} + +#endif + diff --git a/qmk/keyboards/melgeek/mj63/rev1/rules.mk b/qmk/keyboards/melgeek/mj63/rev1/rules.mk new file mode 100644 index 00000000..998f1275 --- /dev/null +++ b/qmk/keyboards/melgeek/mj63/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 60_ansi_arrow diff --git a/qmk/keyboards/melgeek/mj64/config.h b/qmk/keyboards/melgeek/mj64/config.h new file mode 100644 index 00000000..29cb95f1 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/config.h @@ -0,0 +1,51 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xEDED +#define PRODUCT_ID 0x6064 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT MJ64 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 diff --git a/qmk/keyboards/melgeek/mj64/info.json b/qmk/keyboards/melgeek/mj64/info.json new file mode 100644 index 00000000..a9a8a504 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "MJ64", + "url": "", + "maintainer": "melgeek001365", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/melgeek/mj64/keymaps/default/keymap.c b/qmk/keyboards/melgeek/mj64/keymaps/default/keymap.c new file mode 100644 index 00000000..6f4d66c5 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_ansi( /* Base */ + KC_GESC, 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_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_BSLASH, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_64_ansi( /* FN */ + KC_GESC, 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_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, KC_HOME, KC_PGUP, EEP_RST, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_INS, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; diff --git a/qmk/keyboards/melgeek/mj64/keymaps/via/keymap.c b/qmk/keyboards/melgeek/mj64/keymaps/via/keymap.c new file mode 100644 index 00000000..79a58b49 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_ansi( /* Base */ + KC_GESC, 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_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_BSLASH, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_64_ansi( /* FN */ + KC_GESC, 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_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, KC_HOME, KC_PGUP, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, NK_TOGG, _______, KC_INS, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_64_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_64_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/melgeek/mj64/keymaps/via/rules.mk b/qmk/keyboards/melgeek/mj64/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/melgeek/mj64/mj64.c b/qmk/keyboards/melgeek/mj64/mj64.c new file mode 100644 index 00000000..8e57f682 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/mj64.c @@ -0,0 +1,17 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj64.h" diff --git a/qmk/keyboards/melgeek/mj64/mj64.h b/qmk/keyboards/melgeek/mj64/mj64.h new file mode 100644 index 00000000..a2f9a586 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/mj64.h @@ -0,0 +1,36 @@ + +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_64_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D } \ +} diff --git a/qmk/keyboards/melgeek/mj64/readme.md b/qmk/keyboards/melgeek/mj64/readme.md new file mode 100644 index 00000000..933115ae --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/readme.md @@ -0,0 +1,16 @@ +# MelGeek MJ64 + +![MJ64](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/1ecb2c575968e4a661825ad3ec97a1ae_1024x1024@2x.jpg?v=1600672890) + +A hotswap 60% RGB Custom Mechanical keyboard with arrow. + +* Keyboard Maintainer: [melgeek001365](https://github.com/melgeek001365) +* Hardware Supported: MJ64 V1.0.2 20200612 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mj64/rev1:default + + +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). diff --git a/qmk/keyboards/melgeek/mj64/rev1/config.h b/qmk/keyboards/melgeek/mj64/rev1/config.h new file mode 100644 index 00000000..fb45ef35 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/rev1/config.h @@ -0,0 +1,39 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } +#define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define DRIVER_1_LED_TOTAL 64 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/qmk/keyboards/melgeek/mj64/rev1/rev1.c b/qmk/keyboards/melgeek/mj64/rev1/rev1.c new file mode 100644 index 00000000..e01765b6 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/rev1/rev1.c @@ -0,0 +1,127 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj64.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB10 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB12 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB15 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB16 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB17 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB18 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB19 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB20 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB21 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB22 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB23 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB24 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB25 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB26 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB27 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB28 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB29 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB31 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB32 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB33 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB34 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB35 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB36 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB37 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB38 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB39 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB40 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB41 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB42 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB43 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB44 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB45 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB46 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB47 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB48 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB49 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB50 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB51 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB52 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB53 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB54 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB55 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB56 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB57 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB58 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB59 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB60 */ + {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB61 */ + {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB62 */ + {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB63 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB64 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED }, /* R2 */ + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41 }, /* R3 */ + { 62, 61, 60, NO_LED, 64, 63, 65, NO_LED, NO_LED, 59, 58, 57, 56, 55 }, /* R4 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} + +#endif diff --git a/qmk/keyboards/melgeek/mj64/rev1/rules.mk b/qmk/keyboards/melgeek/mj64/rev1/rules.mk new file mode 100644 index 00000000..6893fe2e --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 64_ansi diff --git a/qmk/keyboards/melgeek/mj64/rev2/config.h b/qmk/keyboards/melgeek/mj64/rev2/config.h new file mode 100644 index 00000000..8af6833b --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/rev2/config.h @@ -0,0 +1,39 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } +#define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define DRIVER_1_LED_TOTAL 66 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/qmk/keyboards/melgeek/mj64/rev2/rev2.c b/qmk/keyboards/melgeek/mj64/rev2/rev2.c new file mode 100644 index 00000000..c5334d44 --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/rev2/rev2.c @@ -0,0 +1,130 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj64.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB10 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB12 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB15 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB16 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB17 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB18 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB19 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB20 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB21 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB22 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB23 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB24 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB25 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB26 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB27 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB28 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB29 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB31 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB32 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB33 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB34 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB35 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB36 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB37 */ + {1, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB38 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB39 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB40 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB41 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB42 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB43 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB44 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB45 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB46 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB47 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB48 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB49 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB50 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB51 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB52 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB53 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB54 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB55 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB56 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB57 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB58 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB59 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB60 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB61 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB62 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB63 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB64 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB65 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB66 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED }, /* R2 */ + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41 }, /* R3 */ + { 62, 61, 60, NO_LED, 64, 63, 65, NO_LED, NO_LED, 59, 58, 57, 56, 55 }, /* R4 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 64}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} + +#endif + diff --git a/qmk/keyboards/melgeek/mj64/rev2/rules.mk b/qmk/keyboards/melgeek/mj64/rev2/rules.mk new file mode 100644 index 00000000..6893fe2e --- /dev/null +++ b/qmk/keyboards/melgeek/mj64/rev2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 64_ansi diff --git a/qmk/keyboards/melgeek/mojo75/config.h b/qmk/keyboards/melgeek/mojo75/config.h new file mode 100644 index 00000000..452b1c87 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "config_common.h" diff --git a/qmk/keyboards/melgeek/mojo75/info.json b/qmk/keyboards/melgeek/mojo75/info.json new file mode 100644 index 00000000..e9a90ea2 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/info.json @@ -0,0 +1,102 @@ +{ + "keyboard_name": "MoJo75", + "url": "", + "maintainer": "melgeek001365", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1, "w":2}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.5}, + {"x":1.5, "y":2}, + {"x":2.5, "y":2}, + {"x":3.5, "y":2}, + {"x":4.5, "y":2}, + {"x":5.5, "y":2}, + {"x":6.5, "y":2}, + {"x":7.5, "y":2}, + {"x":8.5, "y":2}, + {"x":9.5, "y":2}, + {"x":10.5, "y":2}, + {"x":11.5, "y":2}, + {"x":12.5, "y":2}, + {"x":13.5, "y":2, "w":1.5}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.75}, + {"x":1.75, "y":3}, + {"x":2.75, "y":3}, + {"x":3.75, "y":3}, + {"x":4.75, "y":3}, + {"x":5.75, "y":3}, + {"x":6.75, "y":3}, + {"x":7.75, "y":3}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3, "w":2.25}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":2.25}, + {"x":2.25, "y":4}, + {"x":3.25, "y":4}, + {"x":4.25, "y":4}, + {"x":5.25, "y":4}, + {"x":6.25, "y":4}, + {"x":7.25, "y":4}, + {"x":8.25, "y":4}, + {"x":9.25, "y":4}, + {"x":10.25, "y":4}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":1.75}, + {"x":14, "y":4}, + {"x":15, "y":4}, + + {"x":0, "y":5, "w":1.25}, + {"x":1.25, "y":5, "w":1.25}, + {"x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"x":10, "y":5}, + {"x":11, "y":5}, + {"x":12, "y":5}, + {"x":13, "y":5}, + {"x":14, "y":5}, + {"x":15, "y":5} + ] + } + } +} diff --git a/qmk/keyboards/melgeek/mojo75/keymaps/default/keymap.c b/qmk/keyboards/melgeek/mojo75/keymaps/default/keymap.c new file mode 100644 index 00000000..31589463 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_75_ansi( /* Base */ + KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS, + 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_HOME, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_75_ansi( /* FN */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, EEP_RST, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; + diff --git a/qmk/keyboards/melgeek/mojo75/keymaps/via/keymap.c b/qmk/keyboards/melgeek/mojo75/keymaps/via/keymap.c new file mode 100644 index 00000000..78aec3c9 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_75_ansi( /* Base */ + KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS, + 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_HOME, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_75_ansi( /* FN */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, EEP_RST, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/qmk/keyboards/melgeek/mojo75/keymaps/via/rules.mk b/qmk/keyboards/melgeek/mojo75/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/melgeek/mojo75/mojo75.c b/qmk/keyboards/melgeek/mojo75/mojo75.c new file mode 100644 index 00000000..53db19d1 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/mojo75.c @@ -0,0 +1,18 @@ +/* Copyright 2020 MelGeek + * + * 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 "mojo75.h" + diff --git a/qmk/keyboards/melgeek/mojo75/mojo75.h b/qmk/keyboards/melgeek/mojo75/mojo75.h new file mode 100644 index 00000000..4d141cd9 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/mojo75.h @@ -0,0 +1,37 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_75_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3F, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4C, K4E, K4F, \ + K50, K51, K52, K55, K59, K5A, K5C, K5D, K5E, K5F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, XXX, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, XXX, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, XXX, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, XXX, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, K55, XXX, XXX, XXX, K59, K5A, XXX, K5C, K5D, K5E, K5F } \ +} diff --git a/qmk/keyboards/melgeek/mojo75/readme.md b/qmk/keyboards/melgeek/mojo75/readme.md new file mode 100644 index 00000000..4cd183a6 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/readme.md @@ -0,0 +1,16 @@ +# MelGeek MoJo75 + +![MoJo75](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/ebaa863e3c4a44abd01bd8745190623c_58201a9c-615d-43cb-a611-114bf82d504e_1024x1024@2x.jpg?v=1600672917) + +A hotswap 75% RGB Custom Mechanical keyboard. + +* Keyboard Maintainer: [melgeek001365](https://github.com/melgeek001365) +* Hardware Supported: MoJo75 V1.0.0 20200714 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mojo75/rev1:default + + +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). diff --git a/qmk/keyboards/melgeek/mojo75/rev1/config.h b/qmk/keyboards/melgeek/mojo75/rev1/config.h new file mode 100644 index 00000000..bc5758db --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/rev1/config.h @@ -0,0 +1,72 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xEDED +#define PRODUCT_ID 0x7075 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT MOJO75 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { B11, B10, B1, B0, A7, A6 } +#define MATRIX_COL_PINS { B12, B13, B14, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 92 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 + diff --git a/qmk/keyboards/melgeek/mojo75/rev1/rev1.c b/qmk/keyboards/melgeek/mojo75/rev1/rev1.c new file mode 100644 index 00000000..0e79fdb7 --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/rev1/rev1.c @@ -0,0 +1,159 @@ +/* Copyright 2020 MelGeek + * + * 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 "mojo75.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1 */ + {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB2 */ + {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB3 */ + {0, CS6_SW4, CS5_SW4, CS4_SW4}, /* RGB4 */ + {0, CS6_SW5, CS5_SW5, CS4_SW5}, /* RGB5 */ + {0, CS6_SW6, CS5_SW6, CS4_SW6}, /* RGB6 */ + {0, CS6_SW7, CS5_SW7, CS4_SW7}, /* RGB7 */ + {0, CS6_SW8, CS5_SW8, CS4_SW8}, /* RGB8 */ + {0, CS6_SW9, CS5_SW9, CS4_SW9}, /* RGB9 */ + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB10 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB11 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB12 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB13 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB14 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB15 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB16 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB17 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB18 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB19 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB20 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB21 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB22 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB23 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB24 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB25 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB26 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB27 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB28 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB29 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB30 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB31 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB32 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB33 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB34 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB35 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB36 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB37 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB38 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB39 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB40 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB41 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB42 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB43 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB44 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB45 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB46 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB47 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB48 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB49 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB50 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB51 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB52 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB53 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB54 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB55 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB56 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB57 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB58 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB59 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB60 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB61 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB62 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB63 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB64 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB65 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB66 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB67 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB68 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB69 */ + {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB70 */ + {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB71 */ + {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB72 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB73 */ + {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB74 */ + {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB75 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB76 */ + {0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB77 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB78 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB79 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB80 */ + {0, CS36_SW1, CS35_SW1, CS34_SW1}, /* RGB81 */ + {0, CS36_SW2, CS35_SW2, CS34_SW2}, /* RGB82 */ + {0, CS36_SW4, CS35_SW4, CS34_SW4}, /* RGB83 */ + {0, CS36_SW3, CS35_SW3, CS34_SW3}, /* RGB84 */ + {0, CS36_SW6, CS35_SW6, CS34_SW6}, /* RGB85 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB86 */ + {0, CS39_SW2, CS38_SW2, CS37_SW2}, /* RGB87 */ + {0, CS39_SW3, CS38_SW3, CS37_SW3}, /* RGB89 */ + {0, CS39_SW4, CS38_SW4, CS37_SW4}, /* RGB88 */ + {0, CS39_SW6, CS38_SW6, CS37_SW6}, /* RGB90 */ + {0, CS39_SW1, CS38_SW1, CS37_SW1}, /* RGB91 */ + {0, CS39_SW5, CS38_SW5, CS37_SW5}, /* RGB92 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 54, 55, 56, 57, 58, 59, 60 }, /* R0 */ + { 9, 10, 11, 12, 13, 14, 15, 16, 17, 61, 62, 63, 64, 66, 67, 68 }, /* R1 */ + { 18, 19, 20, 21, 22, 23, 24, 25, 26, 69, 70, 71, 85, 72, 65,/*?*/ 73 }, /* R2 */ + { 27, 28, 29, 30, 31, 32, 33, 34, 35, 74, 75, 76, 77, 78, 79, 90 }, /* R3 */ + { 36, 37, 38, 39, 40, 41, 42, 43, 44, 83, 82, 81, 84, 80, 86, 88 }, /* R4 */ + { 45, 46, 47, 48, 49, NO_LED, NO_LED, 50, NO_LED, NO_LED, 51, 52, 53, 87, 91, 89 }, /* R5 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {240, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, {240, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32}, {240, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, {240, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, {224, 64}, {240, 64}, + {0, 80}, {16, 80}, {32, 80}, {48, 80}, {64, 80}, {80, 80}, {96, 80}, {112, 80}, {128, 80}, {144, 80}, {160, 80}, {176, 80}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} + +#endif + diff --git a/qmk/keyboards/melgeek/mojo75/rev1/rules.mk b/qmk/keyboards/melgeek/mojo75/rev1/rules.mk new file mode 100644 index 00000000..ba7f9eac --- /dev/null +++ b/qmk/keyboards/melgeek/mojo75/rev1/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/qmk/keyboards/melgeek/z70ultra/config.h b/qmk/keyboards/melgeek/z70ultra/config.h new file mode 100644 index 00000000..d5a9d0a8 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xEDED +#define PRODUCT_ID 0x6570 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT Z70Ultra + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 69 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 6 diff --git a/qmk/keyboards/melgeek/z70ultra/info.json b/qmk/keyboards/melgeek/z70ultra/info.json new file mode 100644 index 00000000..9959e638 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/info.json @@ -0,0 +1,160 @@ +{ + "keyboard_name": "Z70Ultra", + "url": "", + "maintainer": "melgeek001365", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_ansi_split_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":3}, + {"x":6.75, "y":4, "w":3}, + {"x":9.75, "y":4, "w":1.5}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/melgeek/z70ultra/keymaps/default/keymap.c b/qmk/keyboards/melgeek/z70ultra/keymaps/default/keymap.c new file mode 100644 index 00000000..e954776d --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( /* Base */ + KC_GESC, 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_HOME, + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( /* FN */ + KC_GRV, 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_DEL, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, _______, + _______, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), +}; diff --git a/qmk/keyboards/melgeek/z70ultra/keymaps/via/keymap.c b/qmk/keyboards/melgeek/z70ultra/keymaps/via/keymap.c new file mode 100644 index 00000000..a822ecde --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 MelGeek + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( /* Base */ + KC_GESC, 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_HOME, + 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( /* FN */ + KC_GRV, 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_DEL, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, _______, + _______, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/melgeek/z70ultra/keymaps/via/rules.mk b/qmk/keyboards/melgeek/z70ultra/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/melgeek/z70ultra/readme.md b/qmk/keyboards/melgeek/z70ultra/readme.md new file mode 100644 index 00000000..f772fcf0 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/readme.md @@ -0,0 +1,15 @@ +# Z70 Ultra + +![z70ultra](https://cdn.shopify.cn/s/files/1/0078/2863/5712/products/7aef4938a6ebf273c53516f8f9579858_1024x1024@2x.jpg?v=1574605157) + +A hotswap 65% RGB Custom Mechanical keyboard. + +* Keyboard Maintainer: [MelGeek](https://github.com/melgeek001365) +* Hardware Supported: Z70 Ultra V1.4 20200422 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/z70ultra/rev1:default + +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). diff --git a/qmk/keyboards/melgeek/z70ultra/rev1/config.h b/qmk/keyboards/melgeek/z70ultra/rev1/config.h new file mode 100644 index 00000000..45930517 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/rev1/config.h @@ -0,0 +1,37 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ + +#define MATRIX_ROW_PINS { B12, B13, B14, B15, A3, B9 } +#define MATRIX_COL_PINS { B11, B10, B1, A10, B5, B4, B3, A15, A2, A1, A0, C15, C14, C13 } +#define UNUSED_PINS + diff --git a/qmk/keyboards/melgeek/z70ultra/rev1/rules.mk b/qmk/keyboards/melgeek/z70ultra/rev1/rules.mk new file mode 100644 index 00000000..cd262021 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 65_ansi_blocker diff --git a/qmk/keyboards/melgeek/z70ultra/rules.mk b/qmk/keyboards/melgeek/z70ultra/rules.mk new file mode 100644 index 00000000..8cc384b9 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = melgeek/z70ultra/rev1 diff --git a/qmk/keyboards/melgeek/z70ultra/z70ultra.c b/qmk/keyboards/melgeek/z70ultra/z70ultra.c new file mode 100644 index 00000000..a98edd93 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/z70ultra.c @@ -0,0 +1,181 @@ +/* Copyright 2020 MelGeek + * + * 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 "z70ultra.h" + + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS28_SW1, CS30_SW1, CS29_SW1}, /* RGB10 */ + {0, CS28_SW2, CS30_SW2, CS29_SW2}, /* RGB11 */ + {0, CS28_SW3, CS30_SW3, CS29_SW3}, /* RGB12 */ + {0, CS28_SW4, CS30_SW4, CS29_SW4}, /* RGB13 */ + {0, CS28_SW5, CS30_SW5, CS29_SW5}, /* RGB14 */ + {0, CS28_SW6, CS30_SW6, CS29_SW6}, /* RGB15 */ + {0, CS28_SW7, CS30_SW7, CS29_SW7}, /* RGB16 */ + {0, CS28_SW8, CS30_SW8, CS29_SW8}, /* RGB17 */ + {0, CS28_SW9, CS30_SW9, CS29_SW9}, /* RGB18 */ + {0, CS31_SW1, CS33_SW1, CS32_SW1}, /* RGB28 */ + {0, CS31_SW2, CS33_SW2, CS32_SW2}, /* RGB29 */ + {0, CS31_SW3, CS33_SW3, CS32_SW3}, /* RGB30 */ + {0, CS31_SW4, CS33_SW4, CS32_SW4}, /* RGB31 */ + {0, CS31_SW5, CS33_SW5, CS32_SW5}, /* RGB32 */ + {0, CS31_SW6, CS33_SW6, CS32_SW6}, /* RGB33 */ + {0, CS25_SW1, CS27_SW1, CS26_SW1}, /* RGB1 */ + {0, CS25_SW2, CS27_SW2, CS26_SW2}, /* RGB2 */ + {0, CS25_SW3, CS27_SW3, CS26_SW3}, /* RGB3 */ + {0, CS25_SW4, CS27_SW4, CS26_SW4}, /* RGB4 */ + {0, CS25_SW5, CS27_SW5, CS26_SW5}, /* RGB5 */ + {0, CS25_SW6, CS27_SW6, CS26_SW6}, /* RGB6 */ + {0, CS25_SW7, CS27_SW7, CS26_SW7}, /* RGB7 */ + {0, CS25_SW8, CS27_SW8, CS26_SW8}, /* RGB8 */ + {0, CS25_SW9, CS27_SW9, CS26_SW9}, /* RGB9 */ + {0, CS34_SW1, CS36_SW1, CS35_SW1}, /* RGB46 */ + {0, CS34_SW2, CS36_SW2, CS35_SW2}, /* RGB47 */ + {0, CS34_SW3, CS36_SW3, CS35_SW3}, /* RGB48 */ + {0, CS34_SW4, CS36_SW4, CS35_SW4}, /* RGB49 */ + {0, CS34_SW5, CS36_SW5, CS35_SW5}, /* RGB50 */ + {0, CS31_SW7, CS33_SW7, CS32_SW7}, /* RGB34 */ + {0, CS22_SW1, CS24_SW1, CS23_SW1}, /* RGB37 */ + {0, CS22_SW2, CS24_SW2, CS23_SW2}, /* RGB38 */ + {0, CS22_SW3, CS24_SW3, CS23_SW3}, /* RGB39 */ + {0, CS22_SW4, CS24_SW4, CS23_SW4}, /* RGB40 */ + {0, CS22_SW5, CS24_SW5, CS23_SW5}, /* RGB41 */ + {0, CS22_SW6, CS24_SW6, CS23_SW6}, /* RGB42 */ + {0, CS22_SW7, CS24_SW7, CS23_SW7}, /* RGB43 */ + {0, CS22_SW8, CS24_SW8, CS23_SW8}, /* RGB44 */ + {0, CS22_SW9, CS24_SW9, CS23_SW9}, /* RGB45 */ + {0, CS34_SW9, CS36_SW9, CS35_SW9}, /* RGB54 */ + {0, CS34_SW8, CS36_SW8, CS35_SW8}, /* RGB53 */ + {0, CS34_SW7, CS36_SW7, CS35_SW7}, /* RGB52 */ + {0, CS34_SW6, CS36_SW6, CS35_SW6}, /* RGB51 */ + {0, CS31_SW8, CS33_SW8, CS32_SW8}, /* RGB35 */ + {0, CS19_SW2, CS21_SW2, CS20_SW2}, /* RGB56 */ + {0, CS19_SW4, CS21_SW4, CS20_SW4}, /* RGB60 */ + {0, CS19_SW5, CS21_SW5, CS20_SW5}, /* RGB59 */ + {0, CS19_SW6, CS21_SW6, CS20_SW6}, /* RGB60 */ + {0, CS19_SW7, CS21_SW7, CS20_SW7}, /* RGB61 */ + {0, CS19_SW8, CS21_SW8, CS20_SW8}, /* RGB62 */ + {0, CS19_SW9, CS21_SW9, CS20_SW9}, /* RGB63 */ + {0, CS19_SW3, CS21_SW3, CS20_SW3}, /* RGB57 */ + {0, CS19_SW1, CS21_SW1, CS20_SW1}, /* RGB55 */ + {0, CS37_SW5, CS39_SW5, CS38_SW5}, /* RGB23 */ + {0, CS37_SW6, CS39_SW6, CS38_SW6}, /* RGB24 */ + {0, CS37_SW7, CS39_SW7, CS38_SW7}, /* RGB25 */ + {0, CS37_SW8, CS39_SW8, CS38_SW8}, /* RGB26 */ + {0, CS31_SW9, CS33_SW9, CS32_SW9}, /* RGB36 */ + + {0, CS6_SW1, CS8_SW1, CS7_SW1}, /* RGB64 */ + {0, CS6_SW3, CS8_SW3, CS7_SW3}, /* RGB66 */ + {0, CS6_SW4, CS8_SW4, CS7_SW4}, /* RGB67 */ + {0, CS6_SW5, CS8_SW5, CS7_SW5}, /* RGB69 */ + {0, CS6_SW6, CS8_SW6, CS7_SW6}, /* RGB70 */ + {0, CS6_SW2, CS8_SW2, CS7_SW2}, /* RGB65 */ + + {0, CS37_SW1, CS39_SW1, CS38_SW1}, /* RGB19 */ + {0, CS37_SW2, CS39_SW2, CS38_SW2}, /* RGB20 */ + {0, CS37_SW3, CS39_SW3, CS38_SW3}, /* RGB21 */ + {0, CS37_SW4, CS39_SW4, CS38_SW4}, /* RGB22 */ + {0, CS37_SW9, CS39_SW9, CS38_SW9}, /* RGB27 */ +}; +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, }, /* R0 */ + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, }, /* R1 */ + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, }, /* R2 */ + { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, }, /* R3 */ + { 58, 59, 60, NO_LED, 61, 62, 63, NO_LED, NO_LED, 64, 65, NO_LED, NO_LED, NO_LED, }, /* R4 */ + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 14, 29, 56, 43, 57, 66, 67, 68, }, /* R5 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, + {0, 80}, {16, 80}, {32, 80}, {48, 80}, {64, 80}, {80, 80}, {96, 80}, {112, 80}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +const is31_led g_is31_indicator_leds[6] = { + {0, CS5_SW1, CS3_SW1, CS4_SW1}, /* RGB71 */ + {0, CS5_SW2, CS3_SW2, CS4_SW2}, /* RGB72 */ + {0, CS5_SW3, CS3_SW3, CS4_SW3}, /* RGB73 */ + {0, CS5_SW4, CS3_SW4, CS4_SW4}, /* RGB74 */ + {0, CS5_SW5, CS3_SW5, CS4_SW5}, /* RGB75 */ + {0, CS5_SW6, CS3_SW6, CS4_SW6}, /* RGB76 */ +}; + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + if (led_state.caps_lock) { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[2], 0xff, 0x00, 0x00); + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[3], 0xff, 0x00, 0x00); + } else { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[2], 0x00, 0x00, 0x00); + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[3], 0x00, 0x00, 0x00); + } + + if (led_state.num_lock) { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[1], 0x00, 0xff, 0x00); + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[4], 0x00, 0xff, 0x00); + } else { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[1], 0x00, 0x00, 0x00); + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[4], 0x00, 0x00, 0x00); + } + + if (led_state.scroll_lock) { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[0], 0x00, 0x00, 0xff); + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[5], 0x00, 0x00, 0xff); + } else { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[0], 0x00, 0x00, 0x00); + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[5], 0x00, 0x00, 0x00); + } + + // flush the indicator to the buffer + IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_1); + } + return true; +} + +void matrix_init_kb(void) { + for (int i = 0; i < DRIVER_INDICATOR_LED_TOTAL; ++i) { + is31_led led = g_is31_indicator_leds[i]; + IS31FL3741_set_scaling_registers(&led, 0xFF, 0xFF, 0xFF); + } + + IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); + + matrix_init_user(); +} + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} +#endif diff --git a/qmk/keyboards/melgeek/z70ultra/z70ultra.h b/qmk/keyboards/melgeek/z70ultra/z70ultra.h new file mode 100644 index 00000000..8f7a8458 --- /dev/null +++ b/qmk/keyboards/melgeek/z70ultra/z70ultra.h @@ -0,0 +1,51 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K45, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, K0E, K1E, K3D, K2E, K3E, K4C, K4D, K4E } \ +} + +#define LAYOUT_ansi_split_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K46, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, K41, K42, XXX, K44, XXX, K46, XXX, XXX, K49, K4A, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, K0E, K1E, K3D, K2E, K3E, K4C, K4D, K4E } \ +} diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c index 0e4f9944..7d66af49 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c index 91d38316..78a77d0f 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c index 0b33e2e4..9f435715 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c index 137fa4a5..85217a94 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/default/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/default/keymap.c index 4870eaa3..85b79f16 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/default/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/default/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c index 89c1db02..4a49bdf0 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c index 5716cdac..1818ea4a 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/qmk/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index e19d3bba..6246ffd2 100644 --- a/qmk/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/qmk/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -49,12 +49,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/qmk/keyboards/metamechs/timberwolf/timberwolf.c b/qmk/keyboards/metamechs/timberwolf/timberwolf.c index c9a750f4..af6d42a5 100644 --- a/qmk/keyboards/metamechs/timberwolf/timberwolf.c +++ b/qmk/keyboards/metamechs/timberwolf/timberwolf.c @@ -27,3 +27,12 @@ bool led_update_kb(led_t led_state) { } return runDefault; } + +__attribute__((weak)) +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} diff --git a/qmk/keyboards/mexsistor/ludmila/config.h b/qmk/keyboards/mexsistor/ludmila/config.h new file mode 100644 index 00000000..b08739d6 --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Kevin M. + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x69CC +#define PRODUCT_ID 0x6BF6 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kevin M. +#define PRODUCT Ludmila Macropad +#define DESCRIPTION Ludmila 4 switch + encoder macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { F0, C7, F7 } +#define MATRIX_COL_PINS { F4, F1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D1 +#define RGBLED_NUM 4 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_ANIMATIONS + +// Encoder +#define ENCODERS_PAD_A { F6 } +#define ENCODERS_PAD_B { F5 } diff --git a/qmk/keyboards/mexsistor/ludmila/info.json b/qmk/keyboards/mexsistor/ludmila/info.json new file mode 100644 index 00000000..c134428f --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "ludmila", + "url": "", + "maintainer": "Kevin M.", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "SW1", "x": 0, "y": 0}, + {"label": "SW3", "x": 1, "y": 0}, + {"label": "Encoder", "x": 3, "y": 0}, + + {"label": "SW2", "x": 0, "y": 1}, + {"label": "SW4", "x": 1, "y": 1} + ] + } + } +} diff --git a/qmk/keyboards/mexsistor/ludmila/keymaps/default/keymap.c b/qmk/keyboards/mexsistor/ludmila/keymaps/default/keymap.c new file mode 100644 index 00000000..ecb66d5d --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 Kevin M. + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum keyboard_layers{ + _BASE = 0, + _CONTROL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( /* Base */ + KC_COPY, KC_PSCREEN, KC_MUTE, + KC_PASTE, KC_ENTER + + ), + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/qmk/keyboards/mexsistor/ludmila/keymaps/default/readme.md b/qmk/keyboards/mexsistor/ludmila/keymaps/default/readme.md new file mode 100644 index 00000000..1fb3e58a --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ludmila diff --git a/qmk/keyboards/mexsistor/ludmila/ludmila.c b/qmk/keyboards/mexsistor/ludmila/ludmila.c new file mode 100644 index 00000000..4125d196 --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/ludmila.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Kevin M. + * + * 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 "ludmila.h" diff --git a/qmk/keyboards/mexsistor/ludmila/ludmila.h b/qmk/keyboards/mexsistor/ludmila/ludmila.h new file mode 100644 index 00000000..fc95a549 --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/ludmila.h @@ -0,0 +1,36 @@ +/* Copyright 2020 Kevin M. + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k20, \ + k10, k11 \ +) { \ + { k00, k01, }, \ + { k10, k11, }, \ + { k20 } \ + } diff --git a/qmk/keyboards/mexsistor/ludmila/matrix.c b/qmk/keyboards/mexsistor/ludmila/matrix.c new file mode 100644 index 00000000..338286a7 --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/matrix.c @@ -0,0 +1,121 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 +#include +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "quantum.h" + +// Encoder things +#define ENC_SW F7 +static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current_row); + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values + + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + + +void matrix_init_custom(void) { + // initialize key pins + setPinInput(ENC_SW); + init_pins(); +} + +bool matrix_scan_custom(void) { + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } + + // Read encoder switches, already debounced + changed |= read_encoder_switches(matrix, 2); + + return changed; +} + +static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Debounce the encoder buttons using a shift register + static uint8_t btn_1_array; + bool btn_1_pressed = 0; + btn_1_array <<= 1; + btn_1_array |= readPin(ENC_SW); + (btn_1_array == 0b11111111) ? (btn_1_pressed = 1) : (btn_1_pressed = 0); + + // Populate the matrix row with the state of the encoder + current_matrix[current_row] |= btn_1_pressed ? (1 << 0) : 0; + + return (last_row_value != current_matrix[current_row]); +} diff --git a/qmk/keyboards/mexsistor/ludmila/readme.md b/qmk/keyboards/mexsistor/ludmila/readme.md new file mode 100644 index 00000000..93742ee7 --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/readme.md @@ -0,0 +1,19 @@ +# ludmila + +![ludmila](https://mexsistor.com/wp-content/uploads/2020/09/IMG_2249-scaled.jpg) + +Ludmila v1 is a 4 Key Macropad with one rotary encoder. + +* Keyboard Maintainer: [Kevin M.](https://github.com/mexsistor) +* Hardware Supported: Ludmila PCB (atmega32u4) +* Hardware Availability: [Kevin M.](https://mexsistor.com/producto/ludmilapad/) + +Make example for this keyboard (after setting up your build environment): + + make mexsistor/ludmila:default + +Flashing example for this keyboard: + + make mexsistor/ludmila: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). diff --git a/qmk/keyboards/mexsistor/ludmila/rules.mk b/qmk/keyboards/mexsistor/ludmila/rules.mk new file mode 100644 index 00000000..60667506 --- /dev/null +++ b/qmk/keyboards/mexsistor/ludmila/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +CUSTOM_MATRIX = lite +SRC = matrix.c +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/qmk/keyboards/minimacro5/config.h b/qmk/keyboards/minimacro5/config.h new file mode 100644 index 00000000..b48b5df2 --- /dev/null +++ b/qmk/keyboards/minimacro5/config.h @@ -0,0 +1,62 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER leafcutterlabs +#define PRODUCT miniMACRO5 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * 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) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F4, B6, B2, D7, B4 } \ +} +//speed for double tap +#define TAPPING_TERM 200 + +#define UNUSED_PINS + +/* rotary encoder 1,2,3 closest to usb port is 0*/ +#define ENCODERS_PAD_B { D3, F6, F7, D4, C6} +#define ENCODERS_PAD_A { F5, D2, D1, D0, E6} +#define ENCODER_RESOLUTION 2 //default/suggested + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B5 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 // Number of LEDs diff --git a/qmk/keyboards/minimacro5/info.json b/qmk/keyboards/minimacro5/info.json new file mode 100644 index 00000000..1cc2a2e4 --- /dev/null +++ b/qmk/keyboards/minimacro5/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "minimacro5", + "url": "", + "maintainer": "qmk", + "width": 5, + "height": 1, + "layouts": { + "LAYOUT_ortho_1x5": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":5, "y":0}] + } + } +} diff --git a/qmk/keyboards/minimacro5/keymaps/default/keymap.c b/qmk/keyboards/minimacro5/keymaps/default/keymap.c new file mode 100644 index 00000000..acd7f328 --- /dev/null +++ b/qmk/keyboards/minimacro5/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_1); + } else { + tap_code(KC_2); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_9); + } else { + tap_code(KC_0); + } + } +} + +// +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_A, KC_B, KC_C, KC_D, KC_E + ) +}; diff --git a/qmk/keyboards/minimacro5/keymaps/kabraxcis/keymap.c b/qmk/keyboards/minimacro5/keymaps/kabraxcis/keymap.c new file mode 100644 index 00000000..a65bc9ff --- /dev/null +++ b/qmk/keyboards/minimacro5/keymaps/kabraxcis/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 dezlidezlidezli + * + * 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 + +enum layers { + _MAIN, +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + +// +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_ortho_1x5( + KC_CAPS, KC_MNXT, KC_MPLY, KC_MPRV, KC_CAPS + ) +}; diff --git a/qmk/keyboards/minimacro5/keymaps/media/keymap.c b/qmk/keyboards/minimacro5/keymaps/media/keymap.c new file mode 100644 index 00000000..f36954b0 --- /dev/null +++ b/qmk/keyboards/minimacro5/keymaps/media/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_9); + } else { + tap_code(KC_0); + } + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP + ) +}; diff --git a/qmk/keyboards/minimacro5/keymaps/voaraq/keymap.c b/qmk/keyboards/minimacro5/keymaps/voaraq/keymap.c new file mode 100644 index 00000000..e0dca977 --- /dev/null +++ b/qmk/keyboards/minimacro5/keymaps/voaraq/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 dezlidezlidezli + * + * 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 + +enum layers { + _MAIN, +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_1); + } else { + tap_code(KC_2); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + +// +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MUTE + ) +}; diff --git a/qmk/keyboards/minimacro5/minimacro5.c b/qmk/keyboards/minimacro5/minimacro5.c new file mode 100644 index 00000000..7f9c5af1 --- /dev/null +++ b/qmk/keyboards/minimacro5/minimacro5.c @@ -0,0 +1 @@ +#include "minimacro5.h" diff --git a/qmk/keyboards/minimacro5/minimacro5.h b/qmk/keyboards/minimacro5/minimacro5.h new file mode 100644 index 00000000..2d61ed89 --- /dev/null +++ b/qmk/keyboards/minimacro5/minimacro5.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_1x5( \ + k01, k02, k03, k04, k05\ + ) { \ + { k01, k02, k03, k04, k05 } \ +} diff --git a/qmk/keyboards/minimacro5/readme.md b/qmk/keyboards/minimacro5/readme.md new file mode 100644 index 00000000..6266d2ba --- /dev/null +++ b/qmk/keyboards/minimacro5/readme.md @@ -0,0 +1,15 @@ +# miniMACRO5 + +A 5 key Macropad based on Arduino Pro Micro with support for a combination of rotary encoders and mechanical switches. + +![](https://i.imgur.com/lxA8DSCl.jpg) + +* Keyboard Maintainer: [LeafCutterLabs](https://github.com/LeafCutterLabs) +* Hardware Supported: Pro Micro 5V/16MHz and compatible. +* Hardware availability: PCB Files are available [here](https://github.com/LeafCutterLabs/miniMACRO5), which you can get produced. + +Make example for this keyboard (after setting up your build environment): + + make minimacro5:default + +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). diff --git a/qmk/keyboards/minimacro5/rules.mk b/qmk/keyboards/minimacro5/rules.mk new file mode 100644 index 00000000..dd66c4fb --- /dev/null +++ b/qmk/keyboards/minimacro5/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes #enable rotary encoders diff --git a/qmk/keyboards/misterknife/knife66/chconf.h b/qmk/keyboards/misterknife/knife66/chconf.h new file mode 100644 index 00000000..03f63da3 --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/misterknife/knife66/config.h b/qmk/keyboards/misterknife/knife66/config.h new file mode 100644 index 00000000..0dd85dfd --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xAC11 +#define PRODUCT_ID 0x4172 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MisterKnife +#define PRODUCT Knife66 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { B15, A8, A3, A2, A1 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN A9 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 200 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define WS2812_PWM_DRIVER PWMD1 // default: PWMD1 +#define WS2812_PWM_CHANNEL 2 // default: 2 +#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/qmk/keyboards/misterknife/knife66/halconf.h b/qmk/keyboards/misterknife/knife66/halconf.h new file mode 100644 index 00000000..adb1a907 --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/misterknife/knife66/info.json b/qmk/keyboards/misterknife/knife66/info.json new file mode 100644 index 00000000..3f61398c --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Knife66", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.5, "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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15.5, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14.25, "y":3.25}, {"x":15.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] + } + } +} diff --git a/qmk/keyboards/misterknife/knife66/keymaps/default/keymap.c b/qmk/keyboards/misterknife/knife66/keymaps/default/keymap.c new file mode 100644 index 00000000..831efca1 --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* +Copyright 2012,2013 Jun Wako + +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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_GESC, 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_DEL, 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_BSPC, KC_PGDN, + KC_LCTL, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + MO(1), KC_LALT, KC_LGUI, KC_LGUI, LT(1, KC_SPC), KC_LGUI, MO(1), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT ), + + [_FN] = LAYOUT_all( + KC_GRV, 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_DEL, KC_DEL, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, RGB_MOD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS, KC_INS, RGB_SPI, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RGB_SPD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_TRNS ), +}; diff --git a/qmk/keyboards/misterknife/knife66/knife66.c b/qmk/keyboards/misterknife/knife66/knife66.c new file mode 100644 index 00000000..0e261b3a --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/knife66.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Thierry Kleist + * + * 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 "knife66.h" diff --git a/qmk/keyboards/misterknife/knife66/knife66.h b/qmk/keyboards/misterknife/knife66/knife66.h new file mode 100644 index 00000000..8868aa3a --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/knife66.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Thierry Kleist + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K414, \ + K400, K401, K402, K404, K405, K407, K408, K409, K410, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314 }, \ + { K400, K401, K402, ____, K404, K405, ____, K407, K408, K409, K410, ____, K412, K413, K414 } \ +} diff --git a/qmk/keyboards/misterknife/knife66/mcuconf.h b/qmk/keyboards/misterknife/knife66/mcuconf.h new file mode 100644 index 00000000..00292cab --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/qmk/keyboards/misterknife/knife66/readme.md b/qmk/keyboards/misterknife/knife66/readme.md new file mode 100644 index 00000000..3ced6ada --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/readme.md @@ -0,0 +1,18 @@ +# Knife66 + +![Knife66](https://i.imgur.com/p7G2g81l.png) + +This is a replacement board for the CA66 keyboard + +* Keyboard Maintainer: [afewyards](https://github.com/afewyards) +* Hardware Availability: [Geekhack](https://geekhack.org/index.php?topic=107331.0) + +Make example for this keyboard (after setting up your build environment): + + make misterknife/knife66:default + +Flashing example for this keyboard: + + make misterknife/knife66: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). diff --git a/qmk/keyboards/misterknife/knife66/rules.mk b/qmk/keyboards/misterknife/knife66/rules.mk new file mode 100644 index 00000000..540a423f --- /dev/null +++ b/qmk/keyboards/misterknife/knife66/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +WS2812_DRIVER = pwm diff --git a/qmk/keyboards/moonlander/config.h b/qmk/keyboards/moonlander/config.h index b77fcbd1..d1c68528 100644 --- a/qmk/keyboards/moonlander/config.h +++ b/qmk/keyboards/moonlander/config.h @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Drashna Jael're + * Copyright 2020 Christopher Courtney (@drashna) * * 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 diff --git a/qmk/keyboards/moonlander/keymaps/default/config.h b/qmk/keyboards/moonlander/keymaps/default/config.h index 95b05a5a..576aae9f 100644 --- a/qmk/keyboards/moonlander/keymaps/default/config.h +++ b/qmk/keyboards/moonlander/keymaps/default/config.h @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Drashna Jael're + * Copyright 2020 Christopher Courtney (@drashna) * * 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 diff --git a/qmk/keyboards/moonlander/keymaps/default/keymap.c b/qmk/keyboards/moonlander/keymaps/default/keymap.c index 67a2cd53..6d98a860 100644 --- a/qmk/keyboards/moonlander/keymaps/default/keymap.c +++ b/qmk/keyboards/moonlander/keymaps/default/keymap.c @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Drashna Jael're + * Copyright 2020 Christopher Courtney (@drashna) * * 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 @@ -35,68 +35,32 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_moonlander( KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), - KC_LSFT, LCTL_T(KC_Z),KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LCTL_T(KC_SLSH), KC_LSFT, - LT(SYMB,KC_GRV),WEBUSB_PAIR,A(KC_LSFT),KC_LEFT, KC_RGHT, LALT_T(KC_APP), RCTL_T(KC_ESC), KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), - KC_SPC, KC_BSPC, KC_LGUI, KC_RALT, KC_TAB, KC_ENT + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), LGUI_T(KC_QUOT), + KC_LSFT, LCTL_T(KC_Z),KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), KC_RSFT, + LT(SYMB,KC_GRV),WEBUSB_PAIR,A(KC_LSFT),KC_LEFT, KC_RGHT, LALT_T(KC_APP), RCTL_T(KC_ESC), KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MO(SYMB), + KC_SPC, KC_BSPC, KC_LGUI, KC_LALT, KC_TAB, KC_ENT ), [SYMB] = LAYOUT_moonlander( - VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, RGB_TOG, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, - RGB_HUD, RGB_VAD, RGB_HUI, TOGGLE_LAYER_COLOR,KC_TRNS, KC_TRNS + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, _______, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______, + EEP_RST, _______, _______, _______, _______, RGB_VAI, RGB_TOG, _______, KC_DOT, KC_0, KC_EQL, _______, + RGB_HUD, RGB_VAD, RGB_HUI, TOGGLE_LAYER_COLOR,_______, _______ ), [MDIA] = LAYOUT_moonlander( - 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_MS_U, 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_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + LED_LEVEL,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______ ), }; -layer_state_t layer_state_set_user(layer_state_t state) { - ML_LED_1(false); - ML_LED_2(false); - ML_LED_3(false); - ML_LED_4(false); - ML_LED_5(false); - ML_LED_6(false); - - switch (get_highest_layer(state)) { - case 1: - ML_LED_1(1); - ML_LED_4(1); - break; - case 2: - ML_LED_2(1); - ML_LED_5(1); - break; - case 3: - ML_LED_3(1); - break; - case 4: - ML_LED_4(1); - break; - case 5: - ML_LED_5(1); - break; - case 6: - ML_LED_6(1); - break; - default: - break; - } - - return state; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { diff --git a/qmk/keyboards/moonlander/keymaps/drashna/config.h b/qmk/keyboards/moonlander/keymaps/drashna/config.h index dd49eaf4..e022722f 100644 --- a/qmk/keyboards/moonlander/keymaps/drashna/config.h +++ b/qmk/keyboards/moonlander/keymaps/drashna/config.h @@ -1,4 +1,4 @@ -/* Copyright 2020 Drashna Jael're +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * 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 @@ -15,7 +15,8 @@ */ - #pragma once #define TAPPING_TERM_PER_KEY +#define WAIT_FOR_USB +// #define NO_USB_STARTUP_CHECK diff --git a/qmk/keyboards/moonlander/keymaps/drashna/keymap.c b/qmk/keyboards/moonlander/keymaps/drashna/keymap.c index b8754673..7daa5248 100644 --- a/qmk/keyboards/moonlander/keymaps/drashna/keymap.c +++ b/qmk/keyboards/moonlander/keymaps/drashna/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 Drashna Jael're +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * 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 @@ -14,8 +14,6 @@ * along with this program. If not, see . */ - - #include "drashna.h" #ifndef UNICODE_ENABLE diff --git a/qmk/keyboards/moonlander/keymaps/shahn-neo/config.h b/qmk/keyboards/moonlander/keymaps/shahn-neo/config.h new file mode 100644 index 00000000..1fbac325 --- /dev/null +++ b/qmk/keyboards/moonlander/keymaps/shahn-neo/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Sönke Hahn + * + * 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 . + */ + +#pragma once + +#define ORYX_CONFIGURATOR diff --git a/qmk/keyboards/moonlander/keymaps/shahn-neo/keymap.c b/qmk/keyboards/moonlander/keymaps/shahn-neo/keymap.c new file mode 100644 index 00000000..27ccdbb6 --- /dev/null +++ b/qmk/keyboards/moonlander/keymaps/shahn-neo/keymap.c @@ -0,0 +1,121 @@ +/* Copyright 2020 Sönke Hahn + * + * 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 +#include "version.h" + +enum layers { + BASE, // default layer + L_3, + L_4, +}; + +enum custom_keycodes { + a_umlaut = ML_SAFE_RANGE, + o_umlaut, + u_umlaut, + eszett, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_moonlander( + XXXXXXX, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , XXXXXXX, XXXXXXX, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , XXXXXXX, + KC_TAB , KC_X , KC_V , KC_L , KC_C , KC_W , XXXXXXX, XXXXXXX, KC_K , KC_H , KC_G , KC_F , KC_Q , eszett , + XXXXXXX, KC_U , KC_I , KC_A , KC_E , KC_O , XXXXXXX, XXXXXXX, KC_S , KC_N , KC_R , KC_T , KC_D , KC_Y , + XXXXXXX, u_umlaut, o_umlaut, a_umlaut, KC_P , KC_Z , KC_B , KC_M , KC_COMM, KC_DOT , KC_J , XXXXXXX, + XXXXXXX, XXXXXXX , XXXXXXX , KC_LGUI , MO(L_4), XXXXXXX, XXXXXXX, MO(L_4), KC_RGUI, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LSFT, MO(L_3), MO(L_3), KC_RSFT, KC_SPC + ), + + [L_3] = LAYOUT_moonlander( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UNDS, KC_LBRC, KC_RBRC, KC_CIRC, XXXXXXX, XXXXXXX, KC_EXLM, KC_LABK, KC_RABK, KC_EQL , KC_AMPR, XXXXXXX, + XXXXXXX, KC_BSLS, KC_SLSH, KC_LCBR, KC_RCBR, KC_ASTR, XXXXXXX, XXXXXXX, KC_QUES, KC_LPRN, KC_RPRN, KC_MINS, KC_COLN, KC_AT , + XXXXXXX, KC_HASH, KC_DLR , KC_PIPE, KC_TILD, KC_GRV , KC_PLUS, KC_PERC, KC_DQUO, KC_QUOT, KC_SCLN, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [L_4] = LAYOUT_moonlander( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_PGUP, KC_BSPC, KC_UP , KC_DEL , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_7 , KC_8 , KC_9 , XXXXXXX, XXXXXXX, + XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , XXXXXXX, XXXXXXX, XXXXXXX, KC_4 , KC_5 , KC_6 , XXXXXXX, XXXXXXX, + XXXXXXX, KC_ESC , KC_TAB , XXXXXXX, KC_ENT , XXXXXXX, XXXXXXX, KC_1 , KC_2 , KC_3 , XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_0 + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + + switch (get_highest_layer(state)) { + case 1: + ML_LED_1(1); + ML_LED_4(1); + break; + case 2: + ML_LED_2(1); + ML_LED_5(1); + break; + case 3: + ML_LED_3(1); + break; + case 4: + ML_LED_4(1); + break; + case 5: + ML_LED_5(1); + break; + case 6: + ML_LED_6(1); + break; + default: + break; + } + + return state; +} + +// only works after executing +// $ xmodmap -e "keycode 138 = Multi_key" +#define compose_key SS_TAP(X_MENU) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case a_umlaut: + SEND_STRING(compose_key "\"a"); + return false; + case o_umlaut: + SEND_STRING(compose_key "\"o"); + return false; + case u_umlaut: + SEND_STRING(compose_key "\"u"); + return false; + case eszett: + SEND_STRING(compose_key "ss"); + return false; + } + } + return true; +} diff --git a/qmk/keyboards/moonlander/keymaps/shahn-neo/readme.md b/qmk/keyboards/moonlander/keymaps/shahn-neo/readme.md new file mode 100644 index 00000000..d2c9c887 --- /dev/null +++ b/qmk/keyboards/moonlander/keymaps/shahn-neo/readme.md @@ -0,0 +1,16 @@ +# Sönke Hahn's Neo layout for the Moonlander keyboard + +This is my personal keyboard layout based on the Neo keyboard layout: +https://en.wikipedia.org/wiki/Neo_(keyboard_layout) +This layout is not meant as a general layout for other people using the +Neo keyboard layout. It's very specific to my personal needs. +It still might be useful as inspiration to other people who want to +create a Neo layout. + +Some notes: + +- I've put the ctrl key, the shift keys and the modifiers to switch to + layer 4 in the middle to be operated by the thumbs. I wanted to avoid + having to use my pinkies on the outer rows of the keyboard. +- The umlauts (äöü) and the ß only work on linux when configuring the + compose key properly. See `compose_key` in `./keymap.c`. diff --git a/qmk/keyboards/moonlander/matrix.c b/qmk/keyboards/moonlander/matrix.c index 774b0118..872643f6 100644 --- a/qmk/keyboards/moonlander/matrix.c +++ b/qmk/keyboards/moonlander/matrix.c @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Drashna Jael're + * Copyright 2020 Christopher Courtney (@drashna) * * 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 @@ -268,3 +268,42 @@ void matrix_print(void) { printf("\n"); } } + +// DO NOT REMOVE +// Needed for proper wake/sleep +void matrix_power_up(void) { + bool temp_launching = is_launching; + // outputs + setPinOutput(B10); + setPinOutput(B11); + setPinOutput(B12); + setPinOutput(B13); + setPinOutput(B14); + setPinOutput(B15); + + // inputs + setPinInputLow(A0); + setPinInputLow(A1); + setPinInputLow(A2); + setPinInputLow(A3); + setPinInputLow(A6); + setPinInputLow(A7); + setPinInputLow(B0); + + mcp23018_init(); + is_launching = temp_launching; + if (!is_launching) { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + } + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + +} diff --git a/qmk/keyboards/moonlander/moonlander.c b/qmk/keyboards/moonlander/moonlander.c index 403e6aef..39f61b5c 100644 --- a/qmk/keyboards/moonlander/moonlander.c +++ b/qmk/keyboards/moonlander/moonlander.c @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Drashna Jael're + * Copyright 2020 Christopher Courtney (@drashna) * * 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 @@ -159,10 +159,10 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -#ifdef ORYX_CONFIGURATOR +#if !defined(MOONLANDER_USER_LEDS) layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); - if (is_launching) return state; + if (is_launching || !keyboard_config.led_level) return state; ML_LED_1(false); ML_LED_2(false); @@ -415,6 +415,24 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { if (!record->event.pressed && !webusb_state.pairing) layer_state_set_kb(layer_state); break; #endif +#if !defined(MOONLANDER_USER_LEDS) + case LED_LEVEL: + if (record->event.pressed) { + keyboard_config.led_level ^= 1; + eeconfig_update_kb(keyboard_config.raw); + if (keyboard_config.led_level) { + layer_state_set_kb(layer_state); + } else { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + } + } + break; +#endif #ifdef RGB_MATRIX_ENABLE case TOGGLE_LAYER_COLOR: if (record->event.pressed) { @@ -449,6 +467,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void matrix_init_kb(void) { keyboard_config.raw = eeconfig_read_kb(); + if (!keyboard_config.led_level && !keyboard_config.led_level_res) { + keyboard_config.led_level = true; + keyboard_config.led_level_res = 0b11; + eeconfig_update_kb(keyboard_config.raw); + } #ifdef RGB_MATRIX_ENABLE if (keyboard_config.rgb_matrix_enable) { rgb_matrix_set_flags(LED_FLAG_ALL); @@ -461,6 +484,8 @@ void matrix_init_kb(void) { void eeconfig_init_kb(void) { // EEPROM is getting reset! keyboard_config.raw = 0; keyboard_config.rgb_matrix_enable = true; + keyboard_config.led_level = true; + keyboard_config.led_level_res = 0b11; eeconfig_update_kb(keyboard_config.raw); eeconfig_init_user(); } diff --git a/qmk/keyboards/moonlander/moonlander.h b/qmk/keyboards/moonlander/moonlander.h index 0e2dc880..08bec5c0 100644 --- a/qmk/keyboards/moonlander/moonlander.h +++ b/qmk/keyboards/moonlander/moonlander.h @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Drashna Jael're + * Copyright 2020 Christopher Courtney (@drashna) * * 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 @@ -63,6 +63,7 @@ extern bool mcp23018_leds[]; enum planck_ez_keycodes { TOGGLE_LAYER_COLOR = SAFE_RANGE, + LED_LEVEL, ML_SAFE_RANGE, }; @@ -75,6 +76,8 @@ typedef union { struct { bool disable_layer_led :1; bool rgb_matrix_enable :1; + bool led_level :1; + uint8_t led_level_res :2; // DO NOT REMOVE }; } keyboard_config_t; diff --git a/qmk/keyboards/mxss/rgblight.c b/qmk/keyboards/mxss/rgblight.c index ec4d70e1..13094585 100644 --- a/qmk/keyboards/mxss/rgblight.c +++ b/qmk/keyboards/mxss/rgblight.c @@ -110,9 +110,9 @@ extern LED_TYPE fleds[2]; hs_set fled_hs[2]; void copyrgb(LED_TYPE *src, LED_TYPE *dst) { - (*dst).r = (*src).r; - (*dst).g = (*src).g; - (*dst).b = (*src).b; + dst->r = src->r; + dst->g = src->g; + dst->b = src->b; } void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { @@ -145,11 +145,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + led1->r = r; + led1->g = g; + led1->b = b; #ifdef RGBW - (*led1).w = 0; + led1->w = 0; #endif } diff --git a/qmk/keyboards/mysticworks/wyvern/config.h b/qmk/keyboards/mysticworks/wyvern/config.h new file mode 100644 index 00000000..82b4939f --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/config.h @@ -0,0 +1,46 @@ +/* Copyright 2020 Albert Dong + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device Descriptor Parameter */ +#define VENDOR_ID 0x4D59 // "MY" - Mystic Works +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mystic Works +#define PRODUCT Wyvern + +/* Key Matrix Size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS {D0,D1,D5,D3,F7,F6,F5,F4,F1,F0} +#define MATRIX_COL_PINS {E6,B0,D4,D6,D7,B4,B5,B6,C6,C7} +#define UNUSED_PINS {B7,D2} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 diff --git a/qmk/keyboards/mysticworks/wyvern/info.json b/qmk/keyboards/mysticworks/wyvern/info.json new file mode 100644 index 00000000..ccf2e6d6 --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/info.json @@ -0,0 +1,477 @@ +{ + "keyboard_name": "Wyvern", + "url": "https://mysticworks.xyz", + "maintainer": "mysticworks", + "width": 20.75, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "y":0}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "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":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":2, "w":1.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_ansi_numpad_right": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1, "h":2}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "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":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2, "w":2.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "h":2}, + {"x":4.25, "y":3, "w":2.25}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_ansi_numpad_left": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1, "h":2}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "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":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2, "w":2.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3, "h":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":2.25}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_iso_numpad_right": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1, "h":2}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "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":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":1, "w":1.25, "h":2}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "h":2}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_iso_numpad_left": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1, "h":2}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "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":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":19.75, "y":1}, + + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":1, "w":1.25, "h":2}, + {"x":19.75, "y":2}, + + {"x":0, "y":3, "h":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/mysticworks/wyvern/keymaps/default/keymap.c b/qmk/keyboards/mysticworks/wyvern/keymaps/default/keymap.c new file mode 100644 index 00000000..9c927e7f --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Albert Dong + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GESC, 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_GRV, KC_BSPC, KC_DEL, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, 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_NUBS, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_NUHS, 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_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/qmk/keyboards/mysticworks/wyvern/keymaps/default/readme.md b/qmk/keyboards/mysticworks/wyvern/keymaps/default/readme.md new file mode 100644 index 00000000..1d4604ba --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Wyvern Default Keymap + +Default keymap for Wyvern- Normal numpad, ANSI layout with 6.25u. F-keys on second layer. diff --git a/qmk/keyboards/mysticworks/wyvern/keymaps/via/keymap.c b/qmk/keyboards/mysticworks/wyvern/keymaps/via/keymap.c new file mode 100644 index 00000000..d92fb562 --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Albert Dong + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GESC, 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_GRV, KC_BSPC, KC_DEL, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, 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_NUBS, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_NUHS, 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_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/qmk/keyboards/mysticworks/wyvern/keymaps/via/readme.md b/qmk/keyboards/mysticworks/wyvern/keymaps/via/readme.md new file mode 100644 index 00000000..02b3ae2a --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Wyvern VIA Keymap + +Keymap for VIA Configurator usage- supports all layouts possible. diff --git a/qmk/keyboards/mysticworks/wyvern/keymaps/via/rules.mk b/qmk/keyboards/mysticworks/wyvern/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/mysticworks/wyvern/readme.md b/qmk/keyboards/mysticworks/wyvern/readme.md new file mode 100644 index 00000000..6587d72b --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/readme.md @@ -0,0 +1,18 @@ +# Wyvern + +A 65% + Southpaw Numpad designed and sold by [Mystic Works](https://mysticworks.xyz). + +## Support +* Keyboard Maintainer: [mysticworks](https://github.com/mysticworks) +* Hardware Supported: Wyvern +* Hardware Availability: Will be posted [here](https://mysticworks.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make mysticworks/wyvern:default + +Flashing example for this keyboard: + + make mysticworks/wyvern: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). diff --git a/qmk/keyboards/mysticworks/wyvern/rules.mk b/qmk/keyboards/mysticworks/wyvern/rules.mk new file mode 100644 index 00000000..6bd8b893 --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/mysticworks/wyvern/wyvern.c b/qmk/keyboards/mysticworks/wyvern/wyvern.c new file mode 100644 index 00000000..015fb5ff --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/wyvern.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Albert Dong + * + * 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 "wyvern.h" + diff --git a/qmk/keyboards/mysticworks/wyvern/wyvern.h b/qmk/keyboards/mysticworks/wyvern/wyvern.h new file mode 100644 index 00000000..ea5b4b30 --- /dev/null +++ b/qmk/keyboards/mysticworks/wyvern/wyvern.h @@ -0,0 +1,129 @@ +/* Copyright 2020 Albert Dong + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define XXX KC_NO + +#define LAYOUT_all( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k90, k81, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_ansi_numpad_right( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k40, k50, k41, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k49, k59, \ + k60, k70, k61, k71, k62, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k81, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, XXX, k52, k53, k54, k55, k56, k57, XXX, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { XXX, XXX, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_ansi_numpad_left( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k49, k59, \ + k60, k70, k61, k71, k62, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k90, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, XXX, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, XXX, k73, k74, k75, k76, k77, XXX, k79 }, \ + { XXX, XXX, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_iso_numpad_right( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k39, \ + k40, k50, k41, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k81, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, XXX, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { XXX, XXX, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_iso_numpad_left( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k39, \ + k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k90, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { XXX, XXX, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} diff --git a/qmk/keyboards/naked60/keymaps/333fred/keymap.c b/qmk/keyboards/naked60/keymaps/333fred/keymap.c index 3331dee9..7185ec78 100644 --- a/qmk/keyboards/naked60/keymaps/333fred/keymap.c +++ b/qmk/keyboards/naked60/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/qmk/keyboards/nebula12/config.h b/qmk/keyboards/nebula12/config.h index 8b460a87..97f489fe 100644 --- a/qmk/keyboards/nebula12/config.h +++ b/qmk/keyboards/nebula12/config.h @@ -41,6 +41,9 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +/* Ensure we jump to bootloader if the RESET keycode was pressed */ +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + /* Setting up 400KHz I2C Clock for a 48MHz system clock */ #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 @@ -95,12 +98,11 @@ along with this program. If not, see . #define RGB_DI_PIN B15 #ifdef RGB_DI_PIN - #define RGBLED_NUM 4 + #define RGBLED_NUM 10 /* If number is smaller, buffer updates too fast causing glitches */ #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_ANIMATIONS #endif diff --git a/qmk/keyboards/nebula12/nebula12.c b/qmk/keyboards/nebula12/nebula12.c index 6deecb8f..b23024ac 100644 --- a/qmk/keyboards/nebula12/nebula12.c +++ b/qmk/keyboards/nebula12/nebula12.c @@ -18,3 +18,12 @@ #endif #include "nebula12.h" + +void board_init(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} + +void keyboard_post_init_user(void) { +rgblight_set_effect_range(0, 4); +} diff --git a/qmk/keyboards/nebula12/rules.mk b/qmk/keyboards/nebula12/rules.mk index c897d9dd..8b58827a 100644 --- a/qmk/keyboards/nebula12/rules.mk +++ b/qmk/keyboards/nebula12/rules.mk @@ -1,7 +1,7 @@ # MCU name MCU = STM32F072 -BOARD = ST_STM32F072B_DISCOVERY +BOARD = GENERIC_STM32_F072XB # Do not put the microcontroller into power saving mode # when we get USB suspend event. We want it to keep updating diff --git a/qmk/keyboards/nebula68/chconf.h b/qmk/keyboards/nebula68/chconf.h new file mode 100644 index 00000000..aac33037 --- /dev/null +++ b/qmk/keyboards/nebula68/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/nebula68/config.h b/qmk/keyboards/nebula68/config.h new file mode 100644 index 00000000..1d6cb5e9 --- /dev/null +++ b/qmk/keyboards/nebula68/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2020 Yiancar + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x5336 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NEBULA68 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 } +// To enable debugger set A13 A14 -> A5 A7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +#define WS2812_PWM_DRIVER PWMD3 // default: PWMD2 +#define WS2812_PWM_CHANNEL 2 // default: 2 +#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. + +#define RGB_DI_PIN A7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 210 /* The maximum brightness level */ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NEBULA68 + +// they aren't really used if RGB_BACKLIGHT_NEBULA65 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 6 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 128 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE +#define VIA_QMK_RGBLIGHT_ENABLE diff --git a/qmk/keyboards/nebula68/halconf.h b/qmk/keyboards/nebula68/halconf.h new file mode 100644 index 00000000..e4952ece --- /dev/null +++ b/qmk/keyboards/nebula68/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/nebula68/info.json b/qmk/keyboards/nebula68/info.json new file mode 100644 index 00000000..2cabbd61 --- /dev/null +++ b/qmk/keyboards/nebula68/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "NEBULA68", + "url": "", + "maintainer": "yiancar", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15.25, "y":1}, + {"x":16.25, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/nebula68/keymaps/default/keymap.c b/qmk/keyboards/nebula68/keymaps/default/keymap.c new file mode 100644 index 00000000..da4479f8 --- /dev/null +++ b/qmk/keyboards/nebula68/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 Yiancar + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_68_ansi( /* Base */ + KC_GESC, 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_INS, 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_DEL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_68_ansi( /* FN */ + KC_GRV, 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_DEL, KC_INS, KC_PGUP, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_DEL, KC_PGDN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */ + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */ + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/qmk/keyboards/nebula68/keymaps/default/readme.md b/qmk/keyboards/nebula68/keymaps/default/readme.md new file mode 100644 index 00000000..a8ae2ac8 --- /dev/null +++ b/qmk/keyboards/nebula68/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for Nebula68. VIA support disabled. + +![Layer 0](https://i.imgur.com/dXyRwb1.png) + +![Layer 1](https://i.imgur.com/4izTAFa.png) + +Default layer is normal ANSI 68% diff --git a/qmk/keyboards/nebula68/keymaps/via/keymap.c b/qmk/keyboards/nebula68/keymaps/via/keymap.c new file mode 100644 index 00000000..da4479f8 --- /dev/null +++ b/qmk/keyboards/nebula68/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 Yiancar + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_68_ansi( /* Base */ + KC_GESC, 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_INS, 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_DEL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_68_ansi( /* FN */ + KC_GRV, 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_DEL, KC_INS, KC_PGUP, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_DEL, KC_PGDN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */ + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_68_ansi( /* Empty for dynamic keymaps */ + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/qmk/keyboards/nebula68/keymaps/via/readme.md b/qmk/keyboards/nebula68/keymaps/via/readme.md new file mode 100644 index 00000000..e45ec36b --- /dev/null +++ b/qmk/keyboards/nebula68/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# The default keymap for Nebula68. VIA support enabled. + +![Layer 0](https://i.imgur.com/dXyRwb1.png) + +![Layer 1](https://i.imgur.com/4izTAFa.png) + +Default layer is normal ANSI 68% diff --git a/qmk/keyboards/nebula68/keymaps/via/rules.mk b/qmk/keyboards/nebula68/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/nebula68/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/nebula68/mcuconf.h b/qmk/keyboards/nebula68/mcuconf.h new file mode 100644 index 00000000..3b1301f0 --- /dev/null +++ b/qmk/keyboards/nebula68/mcuconf.h @@ -0,0 +1,273 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 TRUE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/qmk/keyboards/nebula68/nebula68.c b/qmk/keyboards/nebula68/nebula68.c new file mode 100644 index 00000000..054a269b --- /dev/null +++ b/qmk/keyboards/nebula68/nebula68.c @@ -0,0 +1,20 @@ +/* Copyright 2020 Yiancar + * + * 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 . + */ +#ifndef RGB_BACKLIGHT_NEBULA68 +#error RGB_BACKLIGHT_NEBULA68 not defined, recheck config.h +#endif + +#include "nebula68.h" diff --git a/qmk/keyboards/nebula68/nebula68.h b/qmk/keyboards/nebula68/nebula68.h new file mode 100644 index 00000000..db9c7f26 --- /dev/null +++ b/qmk/keyboards/nebula68/nebula68.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Yiancar + * + * 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 . + */ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" +#include "../wilba_tech/wt_rgb_backlight_keycodes.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_68_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/qmk/keyboards/nebula68/readme.md b/qmk/keyboards/nebula68/readme.md new file mode 100644 index 00000000..b990ed20 --- /dev/null +++ b/qmk/keyboards/nebula68/readme.md @@ -0,0 +1,32 @@ +# Nebula68 + +This is a standard fixed layout 68% PCB. It supports VIA, full per-key RGB and underglow RGB. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A 68% keyboard with STM32F303CC +* Hardware Availability: https://spaceholdings.net/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nebula68:via + +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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nebula65::flash`) diff --git a/qmk/keyboards/nebula68/rules.mk b/qmk/keyboards/nebula68/rules.mk new file mode 100644 index 00000000..399385b3 --- /dev/null +++ b/qmk/keyboards/nebula68/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = STM32F303 + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +RGBLIGHT_ENABLE = yes # Underglow RGB +WS2812_DRIVER = pwm # Underglow RGB Driver + +CIE1931_CURVE = yes + +LAYOUTS = 68_ansi + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c +QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c diff --git a/qmk/keyboards/niu_mini/keymaps/dyesub/keymap.c b/qmk/keyboards/niu_mini/keymaps/dyesub/keymap.c new file mode 100644 index 00000000..d859062d --- /dev/null +++ b/qmk/keyboards/niu_mini/keymaps/dyesub/keymap.c @@ -0,0 +1,74 @@ + /* Copyright 2020 Chus Jara Peinado + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0 + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up | ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | " |Layer1| Space |Layer2| - | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + [0] = LAYOUT_planck_mit( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_QUOT, MO(1), KC_SPC, MO(2), KC_MINS, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1 + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |Reset | + * `-----------------------------------------------------------------------------------' + */ + [1] = LAYOUT_planck_mit( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET + ), + + /* Layer 2 (r_ Indicates RGB Controls) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | [ | ] | \ | " | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | - | = | | | Vol+ |PrtScr| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Vol- | Mute | + * `-----------------------------------------------------------------------------------' + */ + [2] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______, + _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, KC_VOLU, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE + ) +}; diff --git a/qmk/keyboards/niu_mini/keymaps/dyesub/readme.md b/qmk/keyboards/niu_mini/keymaps/dyesub/readme.md new file mode 100644 index 00000000..e276c4d0 --- /dev/null +++ b/qmk/keyboards/niu_mini/keymaps/dyesub/readme.md @@ -0,0 +1,7 @@ +# Dye sub layout + +Simple layout based on the keycaps [DYE SUB](https://kbdfans.com/collections/oem-profile/products/40-layou-dye-sub-keycaps) from KDBFans. + +## Notes +- There is a different ESC key position in this layout. +- The mouse key, backlight and console for debug are disabled (Enable them by just modifying the `rules.mk` file). diff --git a/qmk/keyboards/niu_mini/keymaps/dyesub/rules.mk b/qmk/keyboards/niu_mini/keymaps/dyesub/rules.mk new file mode 100644 index 00000000..c5f09480 --- /dev/null +++ b/qmk/keyboards/niu_mini/keymaps/dyesub/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = no +BACKLIGHT_ENABLE = no diff --git a/qmk/keyboards/nullbitsco/info.json b/qmk/keyboards/nullbitsco/info.json new file mode 100644 index 00000000..193dbfe9 --- /dev/null +++ b/qmk/keyboards/nullbitsco/info.json @@ -0,0 +1,4 @@ +{ + "manufacturer": "nullbits", + "maintainer": "nullbitsco" +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/big_led.c b/qmk/keyboards/nullbitsco/nibble/big_led.c new file mode 100644 index 00000000..eb0d0a50 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/big_led.c @@ -0,0 +1,67 @@ +/* Copyright 2020 Jay Greco + * + * 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 "big_led.h" + +void set_big_LED_r(uint8_t mode) { + switch(mode) { + case LED_ON: + setPinOutput(BIG_LED_R_PIN); + writePin(BIG_LED_R_PIN, GPIO_STATE_HIGH); + break; + + case LED_OFF: + setPinOutput(BIG_LED_R_PIN); + writePin(BIG_LED_R_PIN, GPIO_STATE_LOW); + break; + + default: + break; + } +} + +void set_big_LED_g(uint8_t mode) { + switch(mode) { + case LED_ON: + setPinOutput(BIG_LED_G_PIN); + writePin(BIG_LED_G_PIN, GPIO_STATE_HIGH); + break; + + case LED_OFF: + setPinOutput(BIG_LED_G_PIN); + writePin(BIG_LED_G_PIN, GPIO_STATE_LOW); + break; + + default: + break; + } +} + +void set_big_LED_b(uint8_t mode) { + switch(mode) { + case LED_ON: + setPinOutput(BIG_LED_B_PIN); + writePin(BIG_LED_B_PIN, GPIO_STATE_HIGH); + break; + + case LED_OFF: + setPinOutput(BIG_LED_B_PIN); + writePin(BIG_LED_B_PIN, GPIO_STATE_LOW); + break; + + default: + break; + } +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/big_led.h b/qmk/keyboards/nullbitsco/nibble/big_led.h new file mode 100644 index 00000000..113aaaf1 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/big_led.h @@ -0,0 +1,34 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* Optional big LED pins */ +#define BIG_LED_R_PIN D7 +#define BIG_LED_G_PIN C6 +#define BIG_LED_B_PIN D0 + +#define LED_ON 2 +#define LED_OFF 0 + +#define GPIO_STATE_LOW 0 +#define GPIO_STATE_HIGH 1 + +void + set_big_LED_r(uint8_t mode), + set_big_LED_g(uint8_t mode), + set_big_LED_b(uint8_t mode); \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/bitc_led.c b/qmk/keyboards/nullbitsco/nibble/bitc_led.c new file mode 100644 index 00000000..60ffeea2 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/bitc_led.c @@ -0,0 +1,37 @@ +/* Copyright 2020 Jay Greco + * + * 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 "bitc_led.h" + +void set_bitc_LED(uint8_t mode) { + switch(mode) { + case LED_ON: + setPinOutput(PIN_LED); + writePin(PIN_LED, GPIO_STATE_HIGH); + break; + + case LED_DIM: + setPinInput(PIN_LED); + break; + + case LED_OFF: + setPinOutput(PIN_LED); + writePin(PIN_LED, GPIO_STATE_LOW); + break; + + default: + break; + } +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/bitc_led.h b/qmk/keyboards/nullbitsco/nibble/bitc_led.h new file mode 100644 index 00000000..b3552a7d --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/bitc_led.h @@ -0,0 +1,29 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LED_ON 2 +#define LED_DIM 1 +#define LED_OFF 0 + +#define GPIO_STATE_LOW 0 +#define GPIO_STATE_HIGH 1 + +#define PIN_LED F0 + +void set_bitc_LED(uint8_t mode); \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/config.h b/qmk/keyboards/nullbitsco/nibble/config.h new file mode 100644 index 00000000..3e0adce4 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/config.h @@ -0,0 +1,61 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* Used to set host for remote KB if VUSB detect doesn't work. */ +// #define KEYBOARD_HOST // Force host mode +// #define KEYBOARD_REMOTE // Force remote mode + +// Workaround for freezing after MacOS sleep +#define NO_USB_STARTUP_CHECK + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6E61 +#define PRODUCT_ID 0x6060 + +#define DEVICE_VER 0x0001 +#define MANUFACTURER nullbits +#define PRODUCT NIBBLE + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 +#define MATRIX_MUX_COLS 4 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 10 + +/* + * Keyboard Matrix Assignments + * The nibble uses a demultiplexer for the cols. + * to free up more IOs for awesomeness! + * See matrix.c for more details. +*/ +#define MATRIX_ROW_PINS { B1, B3, B2, B6, D4 } +#define MATRIX_COL_MUX_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { } + +/* Optional SMT LED pins */ +#define RGB_DI_PIN E6 +#define RGBLED_NUM 10 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP + +/* Optional encoder pins */ +#define ENCODERS_PAD_A { B5 } +#define ENCODERS_PAD_B { B4 } \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/info.json b/qmk/keyboards/nullbitsco/nibble/info.json new file mode 100644 index 00000000..bd97361e --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/info.json @@ -0,0 +1,1131 @@ +{ + "keyboard_name": "NIBBLE 65%", + "url": "https://nullbits.co/nibble/", + "width": 17, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "!", + "x": 2, + "y": 0 + }, + { + "label": "@", + "x": 3, + "y": 0 + }, + { + "label": "#", + "x": 4, + "y": 0 + }, + { + "label": "$", + "x": 5, + "y": 0 + }, + { + "label": "%", + "x": 6, + "y": 0 + }, + { + "label": "^", + "x": 7, + "y": 0 + }, + { + "label": "&", + "x": 8, + "y": 0 + }, + { + "label": "*", + "x": 9, + "y": 0 + }, + { + "label": "(", + "x": 10, + "y": 0 + }, + { + "label": ")", + "x": 11, + "y": 0 + }, + { + "label": "_", + "x": 12, + "y": 0 + }, + { + "label": "+", + "x": 13, + "y": 0 + }, + { + "label": "Backspace", + "x": 14, + "y": 0, + "w": 2 + }, + { + "label": "Home", + "x": 16, + "y": 0 + }, + { + "x": 0, + "y": 1 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 2.5, + "y": 1 + }, + { + "label": "W", + "x": 3.5, + "y": 1 + }, + { + "label": "E", + "x": 4.5, + "y": 1 + }, + { + "label": "R", + "x": 5.5, + "y": 1 + }, + { + "label": "T", + "x": 6.5, + "y": 1 + }, + { + "label": "Y", + "x": 7.5, + "y": 1 + }, + { + "label": "U", + "x": 8.5, + "y": 1 + }, + { + "label": "I", + "x": 9.5, + "y": 1 + }, + { + "label": "O", + "x": 10.5, + "y": 1 + }, + { + "label": "P", + "x": 11.5, + "y": 1 + }, + { + "label": "{", + "x": 12.5, + "y": 1 + }, + { + "label": "}", + "x": 13.5, + "y": 1 + }, + { + "label": "Enter", + "x": 14.75, + "y": 1, + "w": 1.25, + "h": 2 + }, + { + "label": "Delete", + "x": 16, + "y": 1 + }, + { + "x": 0, + "y": 2 + }, + { + "label": "Caps Lock", + "x": 1, + "y": 2, + "w": 1.25 + }, + { + "label": "A", + "x": 2.75, + "y": 2 + }, + { + "label": "S", + "x": 3.75, + "y": 2 + }, + { + "label": "D", + "x": 4.75, + "y": 2 + }, + { + "label": "F", + "x": 5.75, + "y": 2 + }, + { + "label": "G", + "x": 6.75, + "y": 2 + }, + { + "label": "H", + "x": 7.75, + "y": 2 + }, + { + "label": "J", + "x": 8.75, + "y": 2 + }, + { + "label": "K", + "x": 9.75, + "y": 2 + }, + { + "label": "L", + "x": 10.75, + "y": 2 + }, + { + "label": ":", + "x": 11.75, + "y": 2 + }, + { + "label": "\"", + "x": 12.75, + "y": 2 + }, + { + "label": "~", + "x": 13.75, + "y": 2 + }, + { + "label": "Page Up", + "x": 16, + "y": 2 + }, + { + "x": 0, + "y": 3 + }, + { + "label": "Shift", + "x": 1, + "y": 3, + "w": 1.25 + }, + { + "label": "|", + "x": 2.25, + "y": 3 + }, + { + "label": "Z", + "x": 3.25, + "y": 3 + }, + { + "label": "X", + "x": 4.25, + "y": 3 + }, + { + "label": "C", + "x": 5.25, + "y": 3 + }, + { + "label": "V", + "x": 6.25, + "y": 3 + }, + { + "label": "B", + "x": 7.25, + "y": 3 + }, + { + "label": "N", + "x": 8.25, + "y": 3 + }, + { + "label": "M", + "x": 9.25, + "y": 3 + }, + { + "label": "<", + "x": 10.25, + "y": 3 + }, + { + "label": ">", + "x": 11.25, + "y": 3 + }, + { + "label": "?", + "x": 12.25, + "y": 3 + }, + { + "label": "Shift", + "x": 13.25, + "y": 3, + "w": 1.75 + }, + { + "label": "\u2191", + "x": 15, + "y": 3 + }, + { + "label": "Page Down", + "x": 16, + "y": 3 + }, + { + "x": 0, + "y": 4 + }, + { + "label": "Ctrl", + "x": 1, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 2.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Space", + "x": 4.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 11, + "y": 4 + }, + { + "label": "Fn", + "x": 12, + "y": 4 + }, + { + "label": "Ctrl", + "x": 13, + "y": 4 + }, + { + "label": "\u2190", + "x": 14, + "y": 4 + }, + { + "label": "\u2193", + "x": 15, + "y": 4 + }, + { + "label": "\u2192", + "x": 16, + "y": 4 + } + ] + }, + "LAYOUT_ansi": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "!", + "x": 2, + "y": 0 + }, + { + "label": "@", + "x": 3, + "y": 0 + }, + { + "label": "#", + "x": 4, + "y": 0 + }, + { + "label": "$", + "x": 5, + "y": 0 + }, + { + "label": "%", + "x": 6, + "y": 0 + }, + { + "label": "^", + "x": 7, + "y": 0 + }, + { + "label": "&", + "x": 8, + "y": 0 + }, + { + "label": "*", + "x": 9, + "y": 0 + }, + { + "label": "(", + "x": 10, + "y": 0 + }, + { + "label": ")", + "x": 11, + "y": 0 + }, + { + "label": "_", + "x": 12, + "y": 0 + }, + { + "label": "+", + "x": 13, + "y": 0 + }, + { + "label": "Backspace", + "x": 14, + "y": 0, + "w": 2 + }, + { + "label": "~", + "x": 16, + "y": 0 + }, + { + "x": 0, + "y": 1 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 2.5, + "y": 1 + }, + { + "label": "W", + "x": 3.5, + "y": 1 + }, + { + "label": "E", + "x": 4.5, + "y": 1 + }, + { + "label": "R", + "x": 5.5, + "y": 1 + }, + { + "label": "T", + "x": 6.5, + "y": 1 + }, + { + "label": "Y", + "x": 7.5, + "y": 1 + }, + { + "label": "U", + "x": 8.5, + "y": 1 + }, + { + "label": "I", + "x": 9.5, + "y": 1 + }, + { + "label": "O", + "x": 10.5, + "y": 1 + }, + { + "label": "P", + "x": 11.5, + "y": 1 + }, + { + "label": "{", + "x": 12.5, + "y": 1 + }, + { + "label": "}", + "x": 13.5, + "y": 1 + }, + { + "label": "|", + "x": 14.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Page Up", + "x": 16, + "y": 1 + }, + { + "x": 0, + "y": 2 + }, + { + "label": "Caps Lock", + "x": 1, + "y": 2, + "w": 1.25 + }, + { + "label": "A", + "x": 2.75, + "y": 2 + }, + { + "label": "S", + "x": 3.75, + "y": 2 + }, + { + "label": "D", + "x": 4.75, + "y": 2 + }, + { + "label": "F", + "x": 5.75, + "y": 2 + }, + { + "label": "G", + "x": 6.75, + "y": 2 + }, + { + "label": "H", + "x": 7.75, + "y": 2 + }, + { + "label": "J", + "x": 8.75, + "y": 2 + }, + { + "label": "K", + "x": 9.75, + "y": 2 + }, + { + "label": "L", + "x": 10.75, + "y": 2 + }, + { + "label": ":", + "x": 11.75, + "y": 2 + }, + { + "label": "\"", + "x": 12.75, + "y": 2 + }, + { + "label": "Enter", + "x": 13.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Page Down", + "x": 16, + "y": 2 + }, + { + "x": 0, + "y": 3 + }, + { + "label": "Shift", + "x": 1, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 3.25, + "y": 3 + }, + { + "label": "X", + "x": 4.25, + "y": 3 + }, + { + "label": "C", + "x": 5.25, + "y": 3 + }, + { + "label": "V", + "x": 6.25, + "y": 3 + }, + { + "label": "B", + "x": 7.25, + "y": 3 + }, + { + "label": "N", + "x": 8.25, + "y": 3 + }, + { + "label": "M", + "x": 9.25, + "y": 3 + }, + { + "label": "<", + "x": 10.25, + "y": 3 + }, + { + "label": ">", + "x": 11.25, + "y": 3 + }, + { + "label": "?", + "x": 12.25, + "y": 3 + }, + { + "label": "Shift", + "x": 13.25, + "y": 3, + "w": 1.75 + }, + { + "label": "\u2191", + "x": 15, + "y": 3 + }, + { + "label": "End", + "x": 16, + "y": 3 + }, + { + "x": 0, + "y": 4 + }, + { + "label": "Ctrl", + "x": 1, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 2.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Space", + "x": 4.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 11, + "y": 4 + }, + { + "label": "Fn", + "x": 12, + "y": 4 + }, + { + "label": "Ctrl", + "x": 13, + "y": 4 + }, + { + "label": "\u2190", + "x": 14, + "y": 4 + }, + { + "label": "\u2193", + "x": 15, + "y": 4 + }, + { + "label": "\u2192", + "x": 16, + "y": 4 + } + ] + }, + "LAYOUT_iso": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "!", + "x": 2, + "y": 0 + }, + { + "label": "@", + "x": 3, + "y": 0 + }, + { + "label": "#", + "x": 4, + "y": 0 + }, + { + "label": "$", + "x": 5, + "y": 0 + }, + { + "label": "%", + "x": 6, + "y": 0 + }, + { + "label": "^", + "x": 7, + "y": 0 + }, + { + "label": "&", + "x": 8, + "y": 0 + }, + { + "label": "*", + "x": 9, + "y": 0 + }, + { + "label": "(", + "x": 10, + "y": 0 + }, + { + "label": ")", + "x": 11, + "y": 0 + }, + { + "label": "_", + "x": 12, + "y": 0 + }, + { + "label": "+", + "x": 13, + "y": 0 + }, + { + "label": "Backspace", + "x": 14, + "y": 0, + "w": 2 + }, + { + "label": "Home", + "x": 16, + "y": 0 + }, + { + "x": 0, + "y": 1 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 2.5, + "y": 1 + }, + { + "label": "W", + "x": 3.5, + "y": 1 + }, + { + "label": "E", + "x": 4.5, + "y": 1 + }, + { + "label": "R", + "x": 5.5, + "y": 1 + }, + { + "label": "T", + "x": 6.5, + "y": 1 + }, + { + "label": "Y", + "x": 7.5, + "y": 1 + }, + { + "label": "U", + "x": 8.5, + "y": 1 + }, + { + "label": "I", + "x": 9.5, + "y": 1 + }, + { + "label": "O", + "x": 10.5, + "y": 1 + }, + { + "label": "P", + "x": 11.5, + "y": 1 + }, + { + "label": "{", + "x": 12.5, + "y": 1 + }, + { + "label": "}", + "x": 13.5, + "y": 1 + }, + { + "label": "Enter", + "x": 14.75, + "y": 1, + "w": 1.25, + "h": 2 + }, + { + "label": "Delete", + "x": 16, + "y": 1 + }, + { + "x": 0, + "y": 2 + }, + { + "label": "Caps Lock", + "x": 1, + "y": 2, + "w": 1.25 + }, + { + "label": "A", + "x": 2.75, + "y": 2 + }, + { + "label": "S", + "x": 3.75, + "y": 2 + }, + { + "label": "D", + "x": 4.75, + "y": 2 + }, + { + "label": "F", + "x": 5.75, + "y": 2 + }, + { + "label": "G", + "x": 6.75, + "y": 2 + }, + { + "label": "H", + "x": 7.75, + "y": 2 + }, + { + "label": "J", + "x": 8.75, + "y": 2 + }, + { + "label": "K", + "x": 9.75, + "y": 2 + }, + { + "label": "L", + "x": 10.75, + "y": 2 + }, + { + "label": ":", + "x": 11.75, + "y": 2 + }, + { + "label": "\"", + "x": 12.75, + "y": 2 + }, + { + "label": "~", + "x": 13.75, + "y": 2 + }, + { + "label": "Page Up", + "x": 16, + "y": 2 + }, + { + "x": 0, + "y": 3 + }, + { + "label": "Shift", + "x": 1, + "y": 3, + "w": 1.25 + }, + { + "label": "|", + "x": 2.25, + "y": 3 + }, + { + "label": "Z", + "x": 3.25, + "y": 3 + }, + { + "label": "X", + "x": 4.25, + "y": 3 + }, + { + "label": "C", + "x": 5.25, + "y": 3 + }, + { + "label": "V", + "x": 6.25, + "y": 3 + }, + { + "label": "B", + "x": 7.25, + "y": 3 + }, + { + "label": "N", + "x": 8.25, + "y": 3 + }, + { + "label": "M", + "x": 9.25, + "y": 3 + }, + { + "label": "<", + "x": 10.25, + "y": 3 + }, + { + "label": ">", + "x": 11.25, + "y": 3 + }, + { + "label": "?", + "x": 12.25, + "y": 3 + }, + { + "label": "Shift", + "x": 13.25, + "y": 3, + "w": 1.75 + }, + { + "label": "\u2191", + "x": 15, + "y": 3 + }, + { + "label": "Page Down", + "x": 16, + "y": 3 + }, + { + "x": 0, + "y": 4 + }, + { + "label": "Ctrl", + "x": 1, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 2.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Space", + "x": 4.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 11, + "y": 4 + }, + { + "label": "Fn", + "x": 12, + "y": 4 + }, + { + "label": "Ctrl", + "x": 13, + "y": 4 + }, + { + "label": "\u2190", + "x": 14, + "y": 4 + }, + { + "label": "\u2193", + "x": 15, + "y": 4 + }, + { + "label": "\u2192", + "x": 16, + "y": 4 + } + ] + } + } +} diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/default/keymap.c b/qmk/keyboards/nullbitsco/nibble/keymaps/default/keymap.c new file mode 100644 index 00000000..6d453e70 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/default/keymap.c @@ -0,0 +1,128 @@ +/* Copyright 2020 Jay Greco + * + * 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 _MA 0 +#define _FN 1 + +enum custom_keycodes { + KC_CUST = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MA] = LAYOUT_ansi( + 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_BSPC, KC_TILD, + KC_F13, 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_DEL, + KC_F14, 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_PGUP, + KC_F15, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_ansi( + RESET, 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_HOME, KC_INS, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Send keystrokes to host keyboard, if connected (see readme) + process_record_remote_kb(keycode, record); + switch(keycode) { + case KC_CUST: //custom macro + if (record->event.pressed) { + } + break; + + case RM_1: //remote macro 1 + if (record->event.pressed) { + } + break; + + case RM_2: //remote macro 2 + if (record->event.pressed) { + } + break; + + case RM_3: //remote macro 3 + if (record->event.pressed) { + } + break; + + case RM_4: //remote macro 4 + if (record->event.pressed) { + } + break; + + } +return true; +} + +// RGB config, for changing RGB settings on non-VIA firmwares +void change_RGB(bool clockwise) { + bool shift = get_mods() & MOD_MASK_SHIFT; + bool alt = get_mods() & MOD_MASK_ALT; + bool ctrl = get_mods() & MOD_MASK_CTRL; + + if (clockwise) { + if (alt) { + rgblight_increase_hue(); + } else if (ctrl) { + rgblight_increase_val(); + } else if (shift) { + rgblight_increase_sat(); + } else { + rgblight_step(); + } + + } else { + if (alt) { + rgblight_decrease_hue(); + } else if (ctrl) { + rgblight_decrease_val(); + } else if (shift) { + rgblight_decrease_sat(); + } else { + rgblight_step_reverse(); + } + } +} + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (layer_state_is(1)) { + //change RGB settings + change_RGB(clockwise); + } + else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + +void matrix_init_user(void) { + // Initialize remote keyboard, if connected (see readme) + matrix_init_remote_kb(); +} + +void matrix_scan_user(void) { + // Scan and parse keystrokes from remote keyboard, if connected (see readme) + matrix_scan_remote_kb(); +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c b/qmk/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c new file mode 100644 index 00000000..46f246d6 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c @@ -0,0 +1,128 @@ +/* Copyright 2020 Jay Greco + * + * 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 _MA 0 +#define _FN 1 + +enum custom_keycodes { + KC_CUST = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MA] = LAYOUT_iso( + 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_BSPC, KC_TILD, + KC_F13, 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_DEL, + KC_F14, 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_PGUP, + KC_F15, 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, KC_PGDN, + KC_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_iso( + RESET, 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_HOME, KC_INS, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Send keystrokes to host keyboard, if connected (see readme) + process_record_remote_kb(keycode, record); + switch(keycode) { + case KC_CUST: //custom macro + if (record->event.pressed) { + } + break; + + case RM_1: //remote macro 1 + if (record->event.pressed) { + } + break; + + case RM_2: //remote macro 2 + if (record->event.pressed) { + } + break; + + case RM_3: //remote macro 3 + if (record->event.pressed) { + } + break; + + case RM_4: //remote macro 4 + if (record->event.pressed) { + } + break; + + } +return true; +} + +// RGB config, for changing RGB settings on non-VIA firmwares +void change_RGB(bool clockwise) { + bool shift = get_mods() & MOD_MASK_SHIFT; + bool alt = get_mods() & MOD_MASK_ALT; + bool ctrl = get_mods() & MOD_MASK_CTRL; + + if (clockwise) { + if (alt) { + rgblight_increase_hue(); + } else if (ctrl) { + rgblight_increase_val(); + } else if (shift) { + rgblight_increase_sat(); + } else { + rgblight_step(); + } + + } else { + if (alt) { + rgblight_decrease_hue(); + } else if (ctrl) { + rgblight_decrease_val(); + } else if (shift) { + rgblight_decrease_sat(); + } else { + rgblight_step_reverse(); + } + } +} + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (layer_state_is(1)) { + //change RGB settings + change_RGB(clockwise); + } + else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + +void matrix_init_user(void) { + // Initialize remote keyboard, if connected (see readme) + matrix_init_remote_kb(); +} + +void matrix_scan_user(void) { + // Scan and parse keystrokes from remote keyboard, if connected (see readme) + matrix_scan_remote_kb(); +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/config.h b/qmk/keyboards/nullbitsco/nibble/keymaps/via/config.h new file mode 100644 index 00000000..961e2aed --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +// Custom config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +// Custom config Usage: +// 1 for enabled encoder modes (1 byte) +// 6 for 3x custom encoder settings, left, right, and press (18 bytes) +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 19 \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/keymap.c b/qmk/keyboards/nullbitsco/nibble/keymaps/via/keymap.c new file mode 100644 index 00000000..1e1b0c03 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/keymap.c @@ -0,0 +1,164 @@ +/* Copyright 2020 Jay Greco + * + * 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 +#include "via_extras.h" + +#define _BASE 0 +#define _VIA1 1 +#define _VIA2 2 +#define _VIA3 3 + +#define KC_DISC_MUTE KC_F23 +#define KC_DISC_DEAF KC_F24 +#define NUM_CUST_KEYCODES (_NUM_CUST_KCS - SAFE_RANGE) +#define VIA_KEYCODE_RANGE 0x5F80 + +enum custom_keycodes { + PROG = SAFE_RANGE, + DISC_MUTE, + DISC_DEAF, + SUPER_ALT_TAB, + _NUM_CUST_KCS, +}; + +// Macro variables +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; +bool muted = false; +bool deafened = false; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_NUBS, KC_GESC, 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_HOME, + KC_F13, 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_DEL, + KC_F14, 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_PGUP, + KC_F15, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_VIA1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_VIA1] = LAYOUT_all( + _______, RESET, 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_HOME, KC_INS, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ), + + [_VIA2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +void map_via_keycode(uint16_t * keycode) { + if (abs(*keycode - VIA_KEYCODE_RANGE) < NUM_CUST_KEYCODES) { //make into macro? + dprintf("VIA custom keycode found, mapping to QMK keycode.\n"); + uint16_t new_keycode = (*keycode - VIA_KEYCODE_RANGE) + SAFE_RANGE; + dprintf("VIA KC: %u QMK KC: %u\n", *keycode, new_keycode); + *keycode = new_keycode; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + map_via_keycode(&keycode); + // Send keystrokes to host keyboard, if connected (see readme) + process_record_remote_kb(keycode, record); + switch(keycode) { + case PROG: + if (record->event.pressed) { + rgblight_disable_noeeprom(); + bootloader_jump(); + } + break; + + case DISC_MUTE: + if (record->event.pressed) { + tap_code(KC_DISC_MUTE); + if (!rgblight_is_enabled()) break; + + if (muted) { + rgblight_enable_noeeprom(); + } else { + rgblight_timer_disable(); + uint8_t val = rgblight_get_val(); + rgblight_sethsv_range(255, 255, val, 0, 1); + } + muted = !muted; + } + break; + + case DISC_DEAF: + if (record->event.pressed) { + tap_code(KC_DISC_DEAF); + if (!rgblight_is_enabled()) break; + + if (deafened) { + rgblight_enable_noeeprom(); + } else { + rgblight_timer_disable(); + uint8_t val = rgblight_get_val(); + rgblight_sethsv_range(255, 255, val, 0, RGBLED_NUM-1); + } + deafened = !deafened; + } + break; + + case SUPER_ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + + default: + break; + } +return true; +} + +void matrix_init_user(void) { + // Initialize remote keyboard, if connected (see readme) + matrix_init_remote_kb(); +} + +void matrix_scan_user(void) { + // Scan and parse keystrokes from remote keyboard, if connected (see readme) + matrix_scan_remote_kb(); + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/nibble_encoder.c b/qmk/keyboards/nullbitsco/nibble/keymaps/via/nibble_encoder.c new file mode 100644 index 00000000..bdea1869 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/nibble_encoder.c @@ -0,0 +1,133 @@ +/* Copyright 2020 Jay Greco + * + * 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 "nibble_encoder.h" + +uint8_t encoder_value = 0x20, + encoder_mode = ENC_MODE_VOLUME, + enabled_encoder_modes = 0x1F; + +uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior) { +#ifdef DYNAMIC_KEYMAP_ENABLE + void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); + uint16_t keycode = eeprom_read_byte(addr) << 8; + keycode |= eeprom_read_byte(addr + 1); + return keycode; +#else + return 0; +#endif +} + +void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code) { +#ifdef DYNAMIC_KEYMAP_ENABLE + void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); + eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); + eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); +#endif +} + +void pre_encoder_mode_change(void) { + dprintf("Changing encoder mode: %u\n", encoder_mode); +} + +void post_encoder_mode_change(void) { + dprintf("Encoder mode: %u\n", encoder_mode); +} + +//??? +void change_encoder_mode(bool clockwise) { + pre_encoder_mode_change(); + if(enabled_encoder_modes == 0){ + enabled_encoder_modes = 0x1F; + } + do { + if(!clockwise){ + if (encoder_mode == 0){ + encoder_mode = _NUM_ENCODER_MODES - 1; + } else{ + encoder_mode = encoder_mode - 1; + } + } else { + encoder_mode = (encoder_mode + 1) % _NUM_ENCODER_MODES; + } + } while(((1 << encoder_mode) & enabled_encoder_modes) == 0); + post_encoder_mode_change(); +} + +uint16_t handle_encoder_cw(void) { + dprintf("Encoder mode: %u\n", encoder_mode); + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + break; + case ENC_MODE_VOLUME: + mapped_code = KC_VOLU; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_NEXT_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_D; + break; + case ENC_MODE_BACKLIGHT: + mapped_code = RGB_VAI; + break; +#ifdef DYNAMIC_KEYMAP_ENABLE + case ENC_MODE_CUSTOM0: + mapped_code = retrieve_custom_encoder_config(0, ENC_CUSTOM_CW); + break; + case ENC_MODE_CUSTOM1: + mapped_code = retrieve_custom_encoder_config(1, ENC_CUSTOM_CW); + break; + case ENC_MODE_CUSTOM2: + mapped_code = retrieve_custom_encoder_config(2, ENC_CUSTOM_CW); + break; +#endif + } + return mapped_code; +} + +uint16_t handle_encoder_ccw(void) { + dprintf("Encoder mode: %u\n", encoder_mode); + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + break; + case ENC_MODE_VOLUME: + mapped_code = KC_VOLD; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PREV_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_U; + break; + case ENC_MODE_BACKLIGHT: + mapped_code = RGB_VAD; + break; +#ifdef DYNAMIC_KEYMAP_ENABLE + case ENC_MODE_CUSTOM0: + mapped_code = retrieve_custom_encoder_config(0, ENC_CUSTOM_CCW); + break; + case ENC_MODE_CUSTOM1: + mapped_code = retrieve_custom_encoder_config(1, ENC_CUSTOM_CCW); + break; + case ENC_MODE_CUSTOM2: + mapped_code = retrieve_custom_encoder_config(2, ENC_CUSTOM_CCW); + break; +#endif + } + return mapped_code; +} diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/nibble_encoder.h b/qmk/keyboards/nullbitsco/nibble/keymaps/via/nibble_encoder.h new file mode 100644 index 00000000..fc1e6143 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/nibble_encoder.h @@ -0,0 +1,50 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "eeprom.h" + +#define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR) +#define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1) + +enum encoder_modes { + ENC_MODE_VOLUME, + ENC_MODE_MEDIA, + ENC_MODE_SCROLL, + ENC_MODE_BRIGHTNESS, + ENC_MODE_BACKLIGHT, + ENC_MODE_CUSTOM0, + ENC_MODE_CUSTOM1, + ENC_MODE_CUSTOM2, + _NUM_ENCODER_MODES, +}; + +enum custom_encoder_behavior { + ENC_CUSTOM_CW = 0, + ENC_CUSTOM_CCW, + ENC_CUSTOM_PRESS +}; + +uint16_t + retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior), + handle_encoder_cw(void), + handle_encoder_ccw(void); + +void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code), + pre_encoder_mode_change(void), + post_encoder_mode_change(void), + change_encoder_mode(bool clockwise); \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/rules.mk b/qmk/keyboards/nullbitsco/nibble/keymaps/via/rules.mk new file mode 100644 index 00000000..ee197efc --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes + +SRC += keymaps/via/nibble_encoder.c +SRC += keymaps/via/via_extras.c \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/via_extras.c b/qmk/keyboards/nullbitsco/nibble/keymaps/via/via_extras.c new file mode 100644 index 00000000..067296b7 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/via_extras.c @@ -0,0 +1,129 @@ +/* Copyright 2020 Jay Greco + * + * 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 "via_extras.h" + +// Encoder Behavior +extern uint8_t encoder_value; +extern uint8_t encoder_mode; +extern uint8_t enabled_encoder_modes; + +void raw_hid_receive_kb( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + dprintf("raw hid recv! command_id: %u\n",*command_id); + switch ( *command_id ) + { + case id_get_keyboard_value: + { + switch( command_data[0]) + { + case id_encoder_modes: + { + command_data[1] = enabled_encoder_modes; + dprintf("[read] enabled_encoder_modes: %u\n", enabled_encoder_modes); + } + break; + + case id_encoder_custom: + { + uint8_t custom_encoder_idx = command_data[1]; + uint16_t keycode = retrieve_custom_encoder_config(custom_encoder_idx, ENC_CUSTOM_CW); + command_data[2] = keycode >> 8; + command_data[3] = keycode & 0xFF; + keycode = retrieve_custom_encoder_config(custom_encoder_idx, ENC_CUSTOM_CCW); + command_data[4] = keycode >> 8; + command_data[5] = keycode & 0xFF; + keycode = retrieve_custom_encoder_config(custom_encoder_idx, ENC_CUSTOM_PRESS); + command_data[6] = keycode >> 8; + command_data[7] = keycode & 0xFF; + } + break; + + default: + { + *command_id = id_unhandled; + } + break; + } + } + break; + case id_set_keyboard_value: + { + switch(command_data[0]){ + case id_encoder_modes: + { + enabled_encoder_modes = command_data[1]; + dprintf("[write] enabled_encoder_modes: %u\n", enabled_encoder_modes); + eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, enabled_encoder_modes); + } + break; + + case id_encoder_custom: + { + uint8_t custom_encoder_idx = command_data[1]; + uint8_t encoder_behavior = command_data[2]; + uint16_t keycode = (command_data[3] << 8) | command_data[4]; + set_custom_encoder_config(custom_encoder_idx, encoder_behavior, keycode); + } + break; + + default: + { + *command_id = id_unhandled; + } + break; + } + } + break; + + default: + { + // Unhandled message. + *command_id = id_unhandled; + } + break; + } +} + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (layer_state_is(1)) { + change_encoder_mode(clockwise); + return; + } + uint16_t mapped_code = 0; + if (clockwise) { + mapped_code = handle_encoder_cw(); + } else { + mapped_code = handle_encoder_ccw(); + } + if(mapped_code != 0){ + tap_code16(mapped_code); + } +} + +void custom_config_load(void){ +#ifdef DYNAMIC_KEYMAP_ENABLE + enabled_encoder_modes = eeprom_read_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES); +#endif +} + +void via_init_kb(void) +{ + dprintf("VIA is enabled.\n"); + custom_config_load(); +} diff --git a/qmk/keyboards/nullbitsco/nibble/keymaps/via/via_extras.h b/qmk/keyboards/nullbitsco/nibble/keymaps/via/via_extras.h new file mode 100644 index 00000000..83c3c131 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/keymaps/via/via_extras.h @@ -0,0 +1,39 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#include "nibble_encoder.h" +#include "via.h" +#include "raw_hid.h" +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +enum nibble_keyboard_value_id { + id_encoder_modes = 0x80, + id_unused_mode_1, + id_encoder_custom, + id_unused_mode_2 +}; + +// Encoder Behavior +extern uint8_t encoder_value, + encoder_mode, + enabled_encoder_modes; + +void raw_hid_receive_kb(uint8_t *data, uint8_t length), + encoder_update_kb(uint8_t index, bool clockwise), + custom_config_load(void), + via_init_kb(void); \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/matrix.c b/qmk/keyboards/nullbitsco/nibble/matrix.c new file mode 100644 index 00000000..8ec9da28 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/matrix.c @@ -0,0 +1,95 @@ +/* Copyright 2020 Jay Greco + * + * 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 "quantum.h" + +#define COL_SHIFTER ((uint32_t)1) + +// Column pins +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_MUX_COLS] = MATRIX_COL_MUX_PINS; + +// Internal functions + +static void init_pins(void) { + // Set cols to outputs, low + for (uint8_t pin = 0; pin < MATRIX_MUX_COLS; pin++) { + setPinOutput(col_pins[pin]); + } + + // Unselect cols + for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) { + writePinLow(col_pins[bit]); + } + + // Set rows to input, pullup + for (uint8_t pin = 0; pin < MATRIX_ROWS; pin++) { + setPinInputHigh(row_pins[pin]); + } +} + +static void select_col(uint8_t col) +{ + for (uint8_t bit = 0; bit < MATRIX_MUX_COLS; bit++) { + uint8_t state = (col & (0b1 << bit)) >> bit; + writePin(col_pins[bit], state); + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + select_col(current_col); + wait_us(5); + + // Read each row sequentially + for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) + { + matrix_row_t last_row_value = current_matrix[row_index]; + + if (!readPin(row_pins[row_index])) + { + current_matrix[row_index] |= (COL_SHIFTER << current_col); + } + else + { + current_matrix[row_index] &= ~(COL_SHIFTER << current_col); + } + + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + return matrix_changed; +} + +// Matrix scan functions + +void matrix_init_custom(void) { + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + + //Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } + + return (uint8_t)changed; +} \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/nibble.c b/qmk/keyboards/nullbitsco/nibble/nibble.c new file mode 100644 index 00000000..409edd44 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/nibble.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Jay Greco + * + * 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 +#include "bitc_led.h" + +// Use Bit-C LED to show CAPS LOCK status +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + set_bitc_LED(led_state.caps_lock ? LED_DIM : LED_OFF); + } + return res; +} diff --git a/qmk/keyboards/nullbitsco/nibble/nibble.h b/qmk/keyboards/nullbitsco/nibble/nibble.h new file mode 100644 index 00000000..9744ae74 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/nibble.h @@ -0,0 +1,63 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#define ___ KC_NO + +#include "quantum.h" +#include "remote_kb.h" + +#define LAYOUT_all( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ + K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ +) { \ + {K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ + {K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ + {K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \ + {K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, ___, K3F, K3G}, \ + {K41, K42, K43, K44, ___, ___, K47, ___, ___, K4A, K4B, K4C, K4D, ___, K4F, K4G}, \ +} + +#define LAYOUT_ansi( \ + K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ + K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ +) { \ + {___, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ + {K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ + {K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \ + {K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, ___, K3F, K3G}, \ + {K41, K42, K43, K44, ___, ___, K47, ___, ___, K4A, K4B, K4C, K4D, ___, K4F, K4G}, \ +} + +#define LAYOUT_iso( \ + K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1G, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1F, K2F, K2G, \ + K31, K32, K01, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ + K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ +) { \ + {K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ + {K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ + {K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \ + {K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, ___, K3F, K3G}, \ + {K41, K42, K43, K44, ___, ___, K47, ___, ___, K4A, K4B, K4C, K4D, ___, K4F, K4G}, \ +} diff --git a/qmk/keyboards/nullbitsco/nibble/readme.md b/qmk/keyboards/nullbitsco/nibble/readme.md new file mode 100644 index 00000000..92825847 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/readme.md @@ -0,0 +1,19 @@ +# NIBBLE + +![NIBBLE](https://nullbits.co/static/img/nibble1.jpg) + +A unique, tweakable 65% keyboard kit built by nullbits. [More info at nullbits.co](https://nullbits.co/nibble/) + +* Keyboard Maintainer: [Jay Greco](https://github.com/jaygreco) +* Hardware Supported: NIBBLE Rev1, Pro Micro comaptible MCUs. +* Hardware Availability: [nullbits.co](https://nullbits.co/) + +Note: If you are seeing issues with MacOS and keyboard hangs after sleep, make sure `NO_USB_STARTUP_CHECK = yes` is set in your rules.mk. + +Adds experimental "Remote Keyboard" functionality, which forwards keystrokes from an external macropad, keyboard, or numpad over UART/TRRS, removing the need for an additional USB connection. + +Make example for this keyboard (after setting up your build environment): + + make nullbitsco/nibble:default + +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). diff --git a/qmk/keyboards/nullbitsco/nibble/remote_kb.c b/qmk/keyboards/nullbitsco/nibble/remote_kb.c new file mode 100644 index 00000000..2e36f5f2 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/remote_kb.c @@ -0,0 +1,177 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ + +/* +Remote keyboard is an experimental feature that allows for connecting another +keyboard, macropad, numpad, or accessory without requiring an additional USB connection. +The "remote keyboard" forwards its keystrokes using UART serial over TRRS. Dynamic VUSB +detect allows the keyboard automatically switch to host or remote mode depending on +which is connected to the USB port. + +Possible functionality includes the ability to send data from the host to the remote using +a reverse link, allowing for LED sync, configuration, and more data sharing between devices. +This will require a new communication protocol, as the current one is limited. +*/ + +#include "remote_kb.h" + +uint8_t + msg[UART_MSG_LEN], + msg_idx = 0; + +bool + is_host = true; + +// Private functions + +static bool vbus_detect(void) { + #if defined(__AVR_ATmega32U4__) + //returns true if VBUS is present, false otherwise. + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(10); + return (USBSTA & (1<> 8) & 0xFF; + msg[IDX_PRESSED] = pressed; + msg[IDX_CHECKSUM] = chksum8(msg, UART_MSG_LEN-1); + + for (int i=0; ievent.pressed); + } +} + +// Public functions + +void matrix_init_remote_kb(void) { + uart_init(SERIAL_UART_BAUD); + is_host = vbus_detect(); +} + +void process_record_remote_kb(uint16_t keycode, keyrecord_t *record) { + #if defined (KEYBOARD_HOST) + handle_host_outgoing(); + + #elif defined(KEYBOARD_REMOTE) + handle_remote_outgoing(keycode, record); + + #else //auto check with VBUS + if (is_host) { + handle_host_outgoing(); + } + else { + handle_remote_outgoing(keycode, record); + } + #endif +} + +void matrix_scan_remote_kb(void) { + #if defined(KEYBOARD_HOST) + handle_host_incoming(); + + #elif defined (KEYBOARD_REMOTE) + handle_remote_incoming(); + + #else //auto check with VBUS + if (is_host) { + handle_host_incoming(); + } + else { + handle_remote_incoming(); + } + #endif +} diff --git a/qmk/keyboards/nullbitsco/nibble/remote_kb.h b/qmk/keyboards/nullbitsco/nibble/remote_kb.h new file mode 100644 index 00000000..e2b24655 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/remote_kb.h @@ -0,0 +1,53 @@ +/* Copyright 2020 Jay Greco + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#include "tmk_core/common/uart.h" + +#define SERIAL_UART_BAUD 153600 //low error rate for 32u4 @ 16MHz + +#define UART_PREAMBLE 0x69 +#define UART_MSG_LEN 5 +#define UART_NULL 0 + +#define IDX_PREAMBLE 0 +#define IDX_KCLSB 1 +#define IDX_KCMSB 2 +#define IDX_PRESSED 3 +#define IDX_CHECKSUM 4 + +#define IS_HID_KC(x) ((x > 0) && (x < 0xFF)) +#define IS_RM_KC(x) ((x >= RM_BASE) && (x <= 0xFFFF)) + +#define RM_BASE 0xFFFF-16 +enum remote_macros { + RM_1 = RM_BASE, + RM_2, RM_3, + RM_4, RM_5, + RM_6, RM_7, + RM_8, RM_9, + RM_10, RM_11, + RM_12, RM_13, + RM_14, RM_15, +}; + + +// Public functions +void + matrix_init_remote_kb(void), + process_record_remote_kb(uint16_t keycode, keyrecord_t *record), + matrix_scan_remote_kb(void); \ No newline at end of file diff --git a/qmk/keyboards/nullbitsco/nibble/rules.mk b/qmk/keyboards/nullbitsco/nibble/rules.mk new file mode 100644 index 00000000..683e2908 --- /dev/null +++ b/qmk/keyboards/nullbitsco/nibble/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +ENCODER_ENABLE = yes # Use rotary encoder +LTO_ENABLE = yes # Link-time optimization +CUSTOM_MATRIX = lite # Lite custom matrix + +# Project specific files +SRC += matrix.c \ + bitc_led.c \ + big_led.c \ + remote_kb.c \ + tmk_core/common/uart.c diff --git a/qmk/keyboards/opendeck/32/info.json b/qmk/keyboards/opendeck/32/info.json new file mode 100644 index 00000000..755b4ae2 --- /dev/null +++ b/qmk/keyboards/opendeck/32/info.json @@ -0,0 +1,46 @@ +{ + "keyboard_name": "OpenDeck 32", + "width": 8, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x8": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + + { "x":0, "y":1 }, + { "x":1, "y":1 }, + { "x":2, "y":1 }, + { "x":3, "y":1 }, + { "x":4, "y":1 }, + { "x":5, "y":1 }, + { "x":6, "y":1 }, + { "x":7, "y":1 }, + + { "x":0, "y":2 }, + { "x":1, "y":2 }, + { "x":2, "y":2 }, + { "x":3, "y":2 }, + { "x":4, "y":2 }, + { "x":5, "y":2 }, + { "x":6, "y":2 }, + { "x":7, "y":2 }, + + { "x":0, "y":3 }, + { "x":1, "y":3 }, + { "x":2, "y":3 }, + { "x":3, "y":3 }, + { "x":4, "y":3 }, + { "x":5, "y":3 }, + { "x":6, "y":3 }, + { "x":7, "y":3 } + ] + } + } +} diff --git a/qmk/keyboards/opendeck/32/keymaps/default/keymap.c b/qmk/keyboards/opendeck/32/keymaps/default/keymap.c new file mode 100644 index 00000000..60cf2d5b --- /dev/null +++ b/qmk/keyboards/opendeck/32/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 cmdremily + * + * 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 _BL 0 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BL] = LAYOUT_ortho_4x8( + LSFT(KC_F13), LSFT(KC_F17), LSFT(KC_F21), LCTL(KC_F13), LCTL(KC_F17), LCTL(KC_F21), LALT(KC_F13), LALT(KC_F17), + LSFT(KC_F14), LSFT(KC_F18), LSFT(KC_F22), LCTL(KC_F14), LCTL(KC_F18), LCTL(KC_F22), LALT(KC_F14), LALT(KC_F18), + LSFT(KC_F15), LSFT(KC_F19), LSFT(KC_F23), LCTL(KC_F15), LCTL(KC_F19), LCTL(KC_F23), LALT(KC_F15), LALT(KC_F19), + LSFT(KC_F16), LSFT(KC_F20), LSFT(KC_F24), LCTL(KC_F16), LCTL(KC_F20), LCTL(KC_F24), LALT(KC_F16), LALT(KC_F20) + ) +}; +// clang-format on + +void suspend_power_down_user(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_user(void) { + rgb_matrix_set_suspend_state(false); +} diff --git a/qmk/keyboards/opendeck/32/keymaps/default/readme.md b/qmk/keyboards/opendeck/32/keymaps/default/readme.md new file mode 100644 index 00000000..4ccf0b46 --- /dev/null +++ b/qmk/keyboards/opendeck/32/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for OpenDeck32 diff --git a/qmk/keyboards/opendeck/32/rev1/config.h b/qmk/keyboards/opendeck/32/rev1/config.h new file mode 100644 index 00000000..9f8ed742 --- /dev/null +++ b/qmk/keyboards/opendeck/32/rev1/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020 cmdremily + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x4345 +#define PRODUCT_ID 0x2EC0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER OpenDeck +#define PRODUCT OpenDeck32 + +// Key matrix (TtB, LtR) +#define MATRIX_ROWS 4 +#define MATRIX_COLS 8 +#define MATRIX_COL_PINS \ + { B4, D7, D6, D4, F7, F6, F5, F4 } +#define MATRIX_ROW_PINS \ + { C7, C6, B6, B5 } +#define DIODE_DIRECTION COL2ROW + +// RGB matrix +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL (4 * 8 * 3) +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL +#define RGB_MATRIX_DISABLE_KEYCODES + +// Set 0 if debouncing isn't needed +#define DEBOUNCE 5 + +#define FORCE_NKRO + +// Slim down the ROM +#define NO_ACTION_LAYER +#define NO_ACTION_TAPPING +#define NO_ACTION_ONESHOT diff --git a/qmk/keyboards/opendeck/32/rev1/rev1.c b/qmk/keyboards/opendeck/32/rev1/rev1.c new file mode 100644 index 00000000..297af907 --- /dev/null +++ b/qmk/keyboards/opendeck/32/rev1/rev1.c @@ -0,0 +1,145 @@ +/* Copyright 2020 cmdremily + * + * 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 "rev1.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + /* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + // clang-format off + {0, C4_1, C5_1, C6_1}, + {0, C4_2, C5_2, C6_2}, + {0, C4_3, C5_3, C6_3}, + {0, C1_4, C2_4, C3_4}, + {0, C4_9, C5_9, C6_9}, + {0, C4_10, C5_10, C6_10}, + {0, C4_11, C5_11, C6_11}, + {0, C1_12, C2_12, C3_12}, + + {0, C7_1, C8_1, C9_1}, + {0, C7_2, C8_2, C9_2}, + {0, C7_3, C8_3, C9_3}, + {0, C7_4, C8_4, C9_4}, + {0, C7_9, C8_9, C9_9}, + {0, C7_10, C8_10, C9_10}, + {0, C7_11, C8_11, C9_11}, + {0, C7_12, C8_12, C9_12}, + + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + + {0, C7_5, C8_5, C9_5}, + {0, C7_6, C8_6, C9_6}, + {0, C4_7, C5_7, C6_7}, + {0, C4_8, C5_8, C6_8}, + {0, C7_13, C8_13, C9_13}, + {0, C7_14, C8_14, C9_14}, + {0, C4_15, C5_15, C6_15}, + {0, C4_16, C5_16, C6_16}, + // clang-format on +}; + +#define P(x,y) {(x*224 / (MATRIX_COLS - 1)), (y*64 / (MATRIX_ROWS - 1))} +// clang-format off +led_config_t g_led_config = { + // Key Matrix to LED Index + { + {0, 1, 2, 3, 4, 5, 6, 7}, + {8, 9, 10, 11, 12, 13, 14, 15}, + {16, 17, 18, 19, 20, 21, 22, 23}, + {24, 25, 26, 27, 28, 29, 30, 31} + }, { + // LED Index to Physical Position + P(0, 0), P(1, 0), P(2, 0), P(3, 0), P(4, 0), P(5, 0), P(6, 0), P(7, 0), + P(0, 1), P(1, 1), P(2, 1), P(3, 1), P(4, 1), P(5, 1), P(6, 1), P(7, 1), + P(0, 2), P(1, 2), P(2, 2), P(3, 2), P(4, 2), P(5, 2), P(6, 2), P(7, 2), + P(0, 3), P(1, 3), P(2, 3), P(3, 3), P(4, 3), P(5, 3), P(6, 3), P(7, 3), + }, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + } +}; +#undef P + +// clang-format on + +// Set custom key colors here, in order to change the RGB effect, either reserve some keys +// in the keymap to adjust the pattern (see QMK docs, incompatible with wrapper keys) or +// change the default pattern in config.h. +/* +void rgb_matrix_indicators_kb(void) { + //rgb_matrix_set_color(0, 255, 255, 255); + //rgb_matrix_set_color_all(0x86,0xff,0xff); +} +*/ + +void keyboard_pre_init_kb(void) { + // Light power LED + setPinOutput(POWER_LED_PIN); + writePinLow(POWER_LED_PIN); + + // Enable RGB driver IC + setPinOutput(RGB_DISABLE_N_PIN); + writePinHigh(RGB_DISABLE_N_PIN); + + // We don't use this feature of the IS31FL3731 but it is electrically connected + // Make sure not to drive it + setPinInput(RGB_IRQ_N_PIN); +} + +void keyboard_post_init_user() { + // RGB enabled by default, no way to turn off. No need to expend EEPROM write cycles here. + rgb_matrix_enable_noeeprom(); +} +#endif + +#if defined(KC_WRAPPER_KEY) + +static uint8_t g_key_wrapper_tracker = 0; + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record) { return false; } + if (record->event.pressed && keycode != KC_WRAPPER_KEY) { + register_code(KC_WRAPPER_KEY); + register_code(keycode); + g_key_wrapper_tracker++; + return false; + } + return true; +} + +void post_process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!record->event.pressed && keycode != KC_WRAPPER_KEY) { + --g_key_wrapper_tracker; + if (g_key_wrapper_tracker <= 0) { + unregister_code(KC_WRAPPER_KEY); + g_key_wrapper_tracker = 0; + } + } + post_process_record_user(keycode, record); +} +#endif diff --git a/qmk/keyboards/opendeck/32/rev1/rev1.h b/qmk/keyboards/opendeck/32/rev1/rev1.h new file mode 100644 index 00000000..9c208df8 --- /dev/null +++ b/qmk/keyboards/opendeck/32/rev1/rev1.h @@ -0,0 +1,45 @@ +/* Copyright 2020 cmdremily + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define POWER_LED_PIN F1 +#define RGB_DISABLE_N_PIN D2 +#define RGB_IRQ_N_PIN D3 + +// If you want something similar to what Taran from LMG does in https://github.com/TaranVH/2nd-keyboard +// you can create a "wrapper key" by uncommenting the row below and chosing your wrapper keycode. +// You can then change the keymap in ../keymaps/default/keymap.c to adjust what key is sent inside the +// wrapper. +// Note: The default is to not wrap and to send F13-F24 with combinations of shift/control/alt as these +// are immediately usable in most software (e.g. OBS and DCSB for streaming) without using AHK. +//#define KC_WRAPPER_KEY KC_F24 + +// clang-format off +#define LAYOUT_ortho_4x8( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37 \ +) { \ + {Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07}, \ + {Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17}, \ + {Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27}, \ + {Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37} \ +} +// clang-format on diff --git a/qmk/keyboards/opendeck/32/rev1/rules.mk b/qmk/keyboards/opendeck/32/rev1/rules.mk new file mode 100644 index 00000000..f4f4fa8a --- /dev/null +++ b/qmk/keyboards/opendeck/32/rev1/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = IS31FL3731 + +LTO_ENABLE = yes diff --git a/qmk/keyboards/opendeck/info.json b/qmk/keyboards/opendeck/info.json new file mode 100644 index 00000000..7ee0ba60 --- /dev/null +++ b/qmk/keyboards/opendeck/info.json @@ -0,0 +1,4 @@ +{ + "url": "https://github.com/cmdremily/OpenDeck", + "maintainer": "cmdremily" +} diff --git a/qmk/keyboards/opendeck/readme.md b/qmk/keyboards/opendeck/readme.md new file mode 100644 index 00000000..fb2d01e8 --- /dev/null +++ b/qmk/keyboards/opendeck/readme.md @@ -0,0 +1,19 @@ +# OpenDeck + +A OSH/OSW stream deck for streamers + +* Keyboard Maintainer: [cmdremily](https://github.com/cmdremily/) +* Hardware Supported: OpenDeck32 +* Hardware Availability: [OSH on GitHub](https://github.com/cmdremily/OpenDeck) + +Make example for this keyboard (after setting up your build environment): + + make opendeck/32/rev1:default + +Flashing example for this keyboard: + + make opendeck/32/rev1:default:flash + +then press the reset switch on the PCB. + +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). diff --git a/qmk/keyboards/opus/config.h b/qmk/keyboards/opus/config.h new file mode 100644 index 00000000..52ed10bc --- /dev/null +++ b/qmk/keyboards/opus/config.h @@ -0,0 +1,45 @@ +/* Copyright 2020 rtwayland + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x434B +#define PRODUCT_ID 0x4F50 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rtwayland +#define PRODUCT Opus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* PCB pin-out */ +#define MATRIX_ROW_PINS {B1, B3, B2, B6} +#define MATRIX_COL_PINS {D1, D0, D4, C6, D7, E6, B4, B5, F4, F5, F6, F7} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 diff --git a/qmk/keyboards/opus/info.json b/qmk/keyboards/opus/info.json new file mode 100644 index 00000000..1b2da113 --- /dev/null +++ b/qmk/keyboards/opus/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "opus", + "maintainer": "rtwayland", + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Tab", "x": 0, "y": 0.4 }, + { "label": "Q", "x": 1, "y": 0.4 }, + { "label": "W", "x": 2, "y": 0.2 }, + { "label": "E", "x": 3, "y": 0 }, + { "label": "R", "x": 4, "y": 0.4 }, + { "label": "T", "x": 5, "y": 0.5 }, + + { "label": "Y", "x": 10, "y": 0.5 }, + { "label": "U", "x": 11, "y": 0.4 }, + { "label": "I", "x": 12, "y": 0 }, + { "label": "O", "x": 13, "y": 0.2 }, + { "label": "P", "x": 14, "y": 0.4 }, + { "label": "Back Space", "x": 15, "y": 0.4 }, + + { "label": "Ctrl / Esc", "x": 0, "y": 1.4 }, + { "label": "A", "x": 1, "y": 1.4 }, + { "label": "S", "x": 2, "y": 1.2 }, + { "label": "D", "x": 3, "y": 1 }, + { "label": "F", "x": 4, "y": 1.4 }, + { "label": "G", "x": 5, "y": 1.5 }, + + { "label": "H", "x": 10, "y": 1.5 }, + { "label": "J", "x": 11, "y": 1.4 }, + { "label": "K", "x": 12, "y": 1 }, + { "label": "L", "x": 13, "y": 1.2 }, + { "label": ";", "x": 14, "y": 1.4 }, + { "label": "'", "x": 15, "y": 1.4 }, + + { "label": "GUI", "x": 0, "y": 2.4 }, + { "label": "Z", "x": 1, "y": 2.4 }, + { "label": "X", "x": 2, "y": 2.2 }, + { "label": "C", "x": 3, "y": 2 }, + { "label": "V", "x": 4, "y": 2.4 }, + { "label": "B", "x": 5, "y": 2.5 }, + + { "label": "N", "x": 10, "y": 2.5 }, + { "label": "M", "x": 11, "y": 2.4 }, + { "label": ",", "x": 12, "y": 2 }, + { "label": ".", "x": 13, "y": 2.2 }, + { "label": "/", "x": 14, "y": 2.4 }, + { "label": "Enter", "x": 15, "y": 2.4 }, + + { "label": "Lower", "x": 4.8, "y": 3.7 }, + { "label": "Shift", "x": 5.8, "y": 3.5 }, + { "label": "Tab", "x": 6.8, "y": 3.6 }, + + { "label": "Enter", "x": 8.2, "y": 3.6 }, + { "label": "Space", "x": 9.2, "y": 3.5 }, + { "label": "Raise", "x": 10.2, "y": 3.7 } + ] + } + } +} diff --git a/qmk/keyboards/opus/keymaps/default/keymap.c b/qmk/keyboards/opus/keymaps/default/keymap.c new file mode 100644 index 00000000..aaa1a899 --- /dev/null +++ b/qmk/keyboards/opus/keymaps/default/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 rtwayland + * + * 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 + +enum layer_names { + _BASE, + _SYMBOL, + _NUM, + _NAV, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_ESC), KC_A, KC_S, KC_D, LT(2,KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LALT, LGUI_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LGUI_T(KC_SLSH), KC_ENT, + MO(3), KC_LSFT, LALT_T(KC_TAB), LT(3,KC_ENT), LT(1,KC_SPC), KC_BSPC + ), + [_SYMBOL] = LAYOUT( + LCTL(KC_C), KC_TILD, KC_AT, KC_LCBR, KC_RCBR, KC_HASH, KC_ASTR, KC_CIRC, KC_AMPR, KC_PIPE, KC_BSLS, LCTL(KC_GRV), + KC_LCTL, KC_GRV, KC_MINS, KC_LPRN, KC_RPRN, KC_EXLM, KC_QUES, KC_DLR, KC_LT, KC_GT, KC_SLSH, KC_DQUO, + KC_LALT, KC_LGUI, KC_UNDS, KC_LBRC, KC_RBRC, KC_PLUS, KC_P0, KC_EQL, KC_PERC, KC_COLN, KC_NO, KC_NO, + KC_TRNS, KC_LSFT, KC_NO, KC_TRNS, KC_TRNS, KC_NO + ), + [_NUM] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL, + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_PLUS, KC_4, KC_5, KC_6, KC_MINS, KC_PERC, + KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_DOT, KC_PENT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_BSPC + ), + [_NAV] = LAYOUT( + KC_NO, KC_NO, LALT(KC_RGHT), SGUI(KC_LBRC), SGUI(KC_RBRC), KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_NO, + KC_NO, KC_LCTL, KC_LALT, KC_LSFT, KC_LGUI, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LALT(KC_LEFT), KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_SPC, KC_BSPC + ) +}; diff --git a/qmk/keyboards/opus/keymaps/default/readme.md b/qmk/keyboards/opus/keymaps/default/readme.md new file mode 100644 index 00000000..ba3f26ed --- /dev/null +++ b/qmk/keyboards/opus/keymaps/default/readme.md @@ -0,0 +1,17 @@ +# The default keymap for Opus + +## Base Layer + +![opus base layer](https://i.imgur.com/zsmlS96.png) + +## Symbol Layer + +![opus symbol layer](https://i.imgur.com/Fu10HBx.jpg) + +## Num Layer + +![opus num layer](https://i.imgur.com/1hvYqi0.jpg) + +## Nav Layer + +![opus nav layer](https://i.imgur.com/JqOdXhG.jpg) diff --git a/qmk/keyboards/opus/keymaps/thefoxcodes/config.h b/qmk/keyboards/opus/keymaps/thefoxcodes/config.h new file mode 100644 index 00000000..824ec5bd --- /dev/null +++ b/qmk/keyboards/opus/keymaps/thefoxcodes/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 rtwayland + * + * 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 . + */ + +#pragma once + +// place overrides here +#define USB_MAX_POWER_CONSUMPTION 100 +#define TAPPING_TERM 200 \ No newline at end of file diff --git a/qmk/keyboards/opus/keymaps/thefoxcodes/keymap.c b/qmk/keyboards/opus/keymaps/thefoxcodes/keymap.c new file mode 100644 index 00000000..e0adb2af --- /dev/null +++ b/qmk/keyboards/opus/keymaps/thefoxcodes/keymap.c @@ -0,0 +1,94 @@ +/* Copyright 2020 rtwayland + * + * 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 + +enum layer_names { + _BASE, + _SYMBOL, + _NUM, + _NAV, + _MEDIA, + _WORD, + _FKEYS, + _NUMPAD, + _MOUSE +}; + +enum { + TD_PLAY_DO_NOT_DISTURB +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + LT(4, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD(TD_PLAY_DO_NOT_DISTURB), + LCTL_T(KC_ESC), KC_A, KC_S, KC_D, LT(2, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(4, KC_QUOT), + MO(5), LGUI_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LGUI_T(KC_SLSH), MO(5), + MO(3), KC_LSFT, LALT_T(KC_TAB), LT(3, KC_ENT), LT(1, KC_SPC), KC_BSPC + ), + [_SYMBOL] = LAYOUT( + LCTL(KC_C), KC_TILD, KC_AT, KC_LCBR, KC_RCBR, KC_HASH, KC_ASTR, KC_CIRC, KC_AMPR, KC_PIPE, KC_BSLS, LCTL(KC_GRV), + KC_LCTL, KC_GRV, KC_MINS, KC_LPRN, KC_RPRN, KC_EXLM, KC_QUES, KC_DLR, KC_LT, KC_GT, KC_SLSH, KC_DQUO, + KC_LALT, KC_LGUI, KC_UNDS, KC_LBRC, KC_RBRC, KC_PLUS, KC_P0, KC_EQL, KC_PERC, KC_COLN, KC_NO, KC_NO, + KC_NO, KC_LSFT, LALT_T(KC_TAB), KC_NO, KC_TRNS, KC_NO + ), + [_NUM] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL, + KC_LCTL, KC_NO, MO(7), MO(6), KC_TRNS, KC_NO, KC_PLUS, KC_4, KC_5, KC_6, KC_MINS, KC_PERC, + KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_DOT, KC_PENT, + KC_NO, KC_LSFT, LALT_T(KC_TAB), KC_NO, KC_SPC, KC_BSPC + ), + [_NAV] = LAYOUT( + KC_NO, KC_NO, LALT(KC_RGHT), SGUI(KC_LBRC), SGUI(KC_RBRC), KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_NO, + KC_NO, KC_LCTL, KC_LALT, KC_LSFT, KC_LGUI, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LALT(KC_LEFT), KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_SPC, KC_BSPC + ), + [_MEDIA] = LAYOUT( + KC_TRNS, SGUI(KC_5), SGUI(KC_3), SGUI(KC_4), MEH(KC_4), KC_VOLU, LCA(KC_U), LCAG(KC_LEFT), LCAG(KC_RGHT), LCA(KC_I), LCA(KC_EQL), LALT(LGUI(KC_POWER)), + KC_CAPS, KC_F11, KC_MPRV, KC_MNXT, KC_MPLY, KC_VOLD, LCA(KC_LEFT), LCA(KC_DOWN), LCA(KC_UP), LCA(KC_RIGHT), LCA(KC_MINS), KC_TRNS, + KC_BRID, KC_BRIU, LGUI(KC_MINS), LGUI(KC_PLUS), LGUI(KC_GRV), KC_MUTE, LCA(KC_J), LCA(KC_ENT), LCA(KC_C), LCA(KC_K), MEH(KC_UP), RESET, + LCTL(LSFT(KC_TAB)), LCTL(KC_TAB), KC_NO, KC_NO, MEH(KC_RGHT), MEH(KC_LEFT) + ), + [_WORD] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, LALT(LSFT(KC_MINS)), KC_NO, LALT(LGUI(KC_F)), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, LALT(KC_MINS), KC_NO, SGUI(LALT(KC_V)), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL + ), + [_FKEYS] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12, KC_F7, KC_F8, KC_F9, KC_F17, KC_F20, + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_F11, KC_F4, KC_F5, KC_F6, KC_F16, KC_F19, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F10, KC_F1, KC_F2, KC_F3, KC_F13, KC_F18, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [_NUMPAD] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PEQL, + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PERC, + KC_LALT, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PENT, + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_LPRN, KC_RPRN + ), + [_MOUSE] = LAYOUT( + KC_NO, KC_NO, KC_NO, SGUI(KC_LBRC), SGUI(KC_RBRC), KC_NO, KC_HOME, KC_WH_U, KC_WH_D, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_ACL2, KC_WWW_BACK, KC_ACL0, KC_WWW_FORWARD, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_WH_R, KC_WH_L, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2 + ), +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_PLAY_DO_NOT_DISTURB] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_F6) +}; \ No newline at end of file diff --git a/qmk/keyboards/opus/keymaps/thefoxcodes/readme.md b/qmk/keyboards/opus/keymaps/thefoxcodes/readme.md new file mode 100644 index 00000000..c1d2a0b9 --- /dev/null +++ b/qmk/keyboards/opus/keymaps/thefoxcodes/readme.md @@ -0,0 +1 @@ +# thefoxcodes keymap diff --git a/qmk/keyboards/opus/keymaps/thefoxcodes/rules.mk b/qmk/keyboards/opus/keymaps/thefoxcodes/rules.mk new file mode 100644 index 00000000..1ba2fa8f --- /dev/null +++ b/qmk/keyboards/opus/keymaps/thefoxcodes/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/opus/opus.c b/qmk/keyboards/opus/opus.c new file mode 100644 index 00000000..5a188cf8 --- /dev/null +++ b/qmk/keyboards/opus/opus.c @@ -0,0 +1,17 @@ +/* Copyright 2020 rtwayland + * + * 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 "opus.h" diff --git a/qmk/keyboards/opus/opus.h b/qmk/keyboards/opus/opus.h new file mode 100644 index 00000000..ec82c5bc --- /dev/null +++ b/qmk/keyboards/opus/opus.h @@ -0,0 +1,39 @@ +/* Copyright 2020 rtwayland + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k33, k34, k35, k36, k37, k38 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { KC_NO, KC_NO, KC_NO, k33, k34, k35, k36, k37, k38, KC_NO, KC_NO, KC_NO } \ +} diff --git a/qmk/keyboards/opus/readme.md b/qmk/keyboards/opus/readme.md new file mode 100644 index 00000000..aebe3162 --- /dev/null +++ b/qmk/keyboards/opus/readme.md @@ -0,0 +1,15 @@ +# Opus + +![opus](https://i.imgur.com/1jXSUbrl.jpg) + +This is a 40%, non-split, ergonomic, hot-swap keyboard. +The columns are angled to follow the natural angle of the hand. + +* Keyboard Maintainer: [rtwayland](https://github.com/rtwayland) +* Hardware Supported: Pro-micro. Elite-C. + +Make example for this keyboard (after setting up your build environment): + + make opus:default + +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). diff --git a/qmk/keyboards/opus/rules.mk b/qmk/keyboards/opus/rules.mk new file mode 100644 index 00000000..ad6298c9 --- /dev/null +++ b/qmk/keyboards/opus/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/pabile/p18/config.h b/qmk/keyboards/pabile/p18/config.h index f7c258a5..d8d5a95f 100644 --- a/qmk/keyboards/pabile/p18/config.h +++ b/qmk/keyboards/pabile/p18/config.h @@ -1,3 +1,21 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + + #pragma once #include "config_common.h" diff --git a/qmk/keyboards/pabile/p20/readme.md b/qmk/keyboards/pabile/p20/readme.md index 256a4772..e94005b0 100644 --- a/qmk/keyboards/pabile/p20/readme.md +++ b/qmk/keyboards/pabile/p20/readme.md @@ -1,16 +1,16 @@ # P20 ![Linear grid](https://github.com/pabile/Pabile20/blob/master/_bak/layout-grid.jpg) -![Numeric pad](https://github.com/pabile/Pabile20/blob/master/_bak/layout-numpad.jpg) -A 5x4 grid keyboard with 2 rotary encoders. +A 5x4 grid macro numeric pad with up to 3 optional rotary encoders. * Keyboard Maintainer: [pabile](https://github.com/pabile) -* Hardware Supported: Pabile P20 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile20) +* Hardware Supported: Pabile P20 PCB, Pro Micro, Rotary Encoders, Alps/MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p20) Make example for this keyboard (after setting up your build environment): - make pabile/p20:default + make pabile/p20/ver1:default # for ver1 + make pabile/p20/ver2:default # for ver2 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). diff --git a/qmk/keyboards/pabile/p20/ver1/config.h b/qmk/keyboards/pabile/p20/ver1/config.h new file mode 100644 index 00000000..94c60010 --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver1/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver1 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } +#define MATRIX_COL_PINS { D0, B2, D4, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5, F7 } +#define ENCODERS_PAD_B { F6, B1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/qmk/keyboards/pabile/p20/ver1/keymaps/default/keymap.c b/qmk/keyboards/pabile/p20/ver1/keymaps/default/keymap.c new file mode 100644 index 00000000..6b815e72 --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver1/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_PSLS, KC_PMNS, KC_PAST, KC_MPLY, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_TAB, + LT(2,KC_P0), KC_PCMM, KC_PDOT, LT(1,KC_PENT)), + [1] = LAYOUT_ortho_5x4( + KC_NLCK, KC_UNDS, KC_NO, KC_NO, + KC_AMPR, KC_ASTR, KC_LPRN, KC_EQL, + KC_DLR, KC_PERC, KC_CIRC, KC_NO, + KC_EXLM, KC_AT, KC_HASH, KC_NO, + KC_RPRN, KC_NO, KC_PSLS, KC_NO), + [2] = LAYOUT_ortho_5x4( + KC_NLCK, KC_NO, KC_NO, KC_NO, + KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, + KC_MS_L, KC_MS_D, KC_MS_R, KC_TAB, + KC_WH_U, KC_NO, KC_WH_D, KC_NO, + KC_NO, KC_NO, KC_DEL, KC_ESC) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_WH_U); /*mouse wheel up*/ + } else { + tap_code(KC_WH_D); /*mouse wheel down */ + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLD); /*volume down*/ + } else { + tap_code(KC_VOLU); /*volume up*/ + } + } +} diff --git a/qmk/keyboards/pabile/p20/ver1/rules.mk b/qmk/keyboards/pabile/p20/ver1/rules.mk new file mode 100644 index 00000000..d8e01b84 --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver1/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device +ENCODER_ENABLE = yes + +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/qmk/keyboards/pabile/p20/ver1/ver1.c b/qmk/keyboards/pabile/p20/ver1/ver1.c new file mode 100644 index 00000000..65e11630 --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver1/ver1.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "ver1.h" diff --git a/qmk/keyboards/pabile/p20/ver1/ver1.h b/qmk/keyboards/pabile/p20/ver1/ver1.h new file mode 100644 index 00000000..36ec781f --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver1/ver1.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/qmk/keyboards/pabile/p20/ver2/config.h b/qmk/keyboards/pabile/p20/ver2/config.h new file mode 100644 index 00000000..09970018 --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver2/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/pabile/p20/ver2/keymaps/default/keymap.c b/qmk/keyboards/pabile/p20/ver2/keymaps/default/keymap.c new file mode 100644 index 00000000..2c2af0da --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver2/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2020 Pabile + +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 + +enum custom_keycodes { + DBLZERO = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_TAB, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_DEL, + KC_P0, DBLZERO, KC_PDOT, KC_PENT) +}; diff --git a/qmk/keyboards/pabile/p20/ver2/rules.mk b/qmk/keyboards/pabile/p20/ver2/rules.mk new file mode 100644 index 00000000..da59201f --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver2/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device +ENCODER_ENABLE = no + +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/qmk/keyboards/pabile/p20/ver2/ver2.c b/qmk/keyboards/pabile/p20/ver2/ver2.c new file mode 100644 index 00000000..fa7e1f2e --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver2/ver2.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "ver2.h" diff --git a/qmk/keyboards/pabile/p20/ver2/ver2.h b/qmk/keyboards/pabile/p20/ver2/ver2.h new file mode 100644 index 00000000..36ec781f --- /dev/null +++ b/qmk/keyboards/pabile/p20/ver2/ver2.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/qmk/keyboards/pabile/p40/config.h b/qmk/keyboards/pabile/p40/config.h index f4252f7a..02ebb67e 100644 --- a/qmk/keyboards/pabile/p40/config.h +++ b/qmk/keyboards/pabile/p40/config.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + #pragma once #include "config_common.h" diff --git a/qmk/keyboards/pabile/p40/info.json b/qmk/keyboards/pabile/p40/info.json index 42f9b482..d05d7732 100644 --- a/qmk/keyboards/pabile/p40/info.json +++ b/qmk/keyboards/pabile/p40/info.json @@ -7,46 +7,46 @@ "layouts": { "LAYOUT_ortho_4x10": { "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":4, "y":0}, - {"x":5, "y":0}, - {"x":6, "y":0}, - {"x":7, "y":0}, - {"x":8, "y":0}, - {"x":9, "y":0}, - {"x":0.25, "y":1}, - {"x":1.25, "y":1}, - {"x":2.25, "y":1}, - {"x":3.25, "y":1}, - {"x":4.25, "y":1}, - {"x":5.25, "y":1}, - {"x":6.25, "y":1}, - {"x":7.25, "y":1}, - {"x":8.25, "y":1}, - {"x":9.25, "y":1}, - {"x":0.5, "y":2}, - {"x":1.5, "y":2}, - {"x":2.5, "y":2}, - {"x":3.5, "y":2}, - {"x":4.5, "y":2}, - {"x":5.5, "y":2}, - {"x":6.5, "y":2}, - {"x":7.5, "y":2}, - {"x":8.5, "y":2}, - {"x":9.5, "y":2}, - {"x":0.75, "y":3}, - {"x":1.75, "y":3}, - {"x":2.75, "y":3}, - {"x":3.75, "y":3}, - {"x":4.75, "y":3}, - {"x":5.75, "y":3}, - {"x":6.75, "y":3}, - {"x":7.75, "y":3}, - {"x":8.75, "y":3}, - {"x":9.75, "y":3}] + {"w":1, "x":0, "y":0}, + {"w":1, "x":1, "y":0}, + {"w":1, "x":2, "y":0}, + {"w":1, "x":3, "y":0}, + {"w":1, "x":4, "y":0}, + {"w":1, "x":5, "y":0}, + {"w":1, "x":6, "y":0}, + {"w":1, "x":7, "y":0}, + {"w":1, "x":8, "y":0}, + {"w":1, "x":9, "y":0}, + {"w":1, "x":0.25, "y":1}, + {"w":1, "x":1.25, "y":1}, + {"w":1, "x":2.25, "y":1}, + {"w":1, "x":3.25, "y":1}, + {"w":1, "x":4.25, "y":1}, + {"w":1, "x":5.25, "y":1}, + {"w":1, "x":6.25, "y":1}, + {"w":1, "x":7.25, "y":1}, + {"w":1, "x":8.25, "y":1}, + {"w":1, "x":9.25, "y":1}, + {"w":1, "x":0.5, "y":2}, + {"w":1, "x":1.5, "y":2}, + {"w":1, "x":2.5, "y":2}, + {"w":1, "x":3.5, "y":2}, + {"w":1, "x":4.5, "y":2}, + {"w":1, "x":5.5, "y":2}, + {"w":1, "x":6.5, "y":2}, + {"w":1, "x":7.5, "y":2}, + {"w":1, "x":8.5, "y":2}, + {"w":1, "x":9.5, "y":2}, + {"w":1, "x":0.75, "y":3}, + {"w":1, "x":1.75, "y":3}, + {"w":1, "x":2.75, "y":3}, + {"w":1, "x":3.75, "y":3}, + {"w":1, "x":4.75, "y":3}, + {"w":1, "x":5.75, "y":3}, + {"w":1, "x":6.75, "y":3}, + {"w":1, "x":7.75, "y":3}, + {"w":1, "x":8.75, "y":3}, + {"w":1, "x":9.75, "y":3}] } } } diff --git a/qmk/keyboards/pabile/p40/readme.md b/qmk/keyboards/pabile/p40/readme.md index 33a657f3..14673d75 100644 --- a/qmk/keyboards/pabile/p40/readme.md +++ b/qmk/keyboards/pabile/p40/readme.md @@ -6,10 +6,11 @@ A compact 4x10 (40%) staggered DIY keyboard kit. * Keyboard Maintainer: [pabile](https://github.com/pabile) * Hardware Supported: Pabile P40 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40) +* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p40) Make example for this keyboard (after setting up your build environment): make pabile/p40:default + 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). diff --git a/qmk/keyboards/pabile/p40_ortho/config.h b/qmk/keyboards/pabile/p40_ortho/config.h new file mode 100644 index 00000000..4fd8e7a5 --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/config.h @@ -0,0 +1,40 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6669 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P40 Ortho Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* pin-out */ +#define MATRIX_ROW_PINS { D1, D0, F4, F5 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B2, B3, B1, F7, F6 } + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/pabile/p40_ortho/info.json b/qmk/keyboards/pabile/p40_ortho/info.json new file mode 100644 index 00000000..a4d757be --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x10": { + "layout": [ + {"label":"Q", "x":0, "y":0}, + {"label":"W", "x":1, "y":0}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0}, + {"label":"T", "x":4, "y":0}, + {"label":"Y", "x":5, "y":0}, + {"label":"U", "x":6, "y":0}, + {"label":"I", "x":7, "y":0}, + {"label":"O", "x":8, "y":0}, + {"label":"P", "x":9, "y":0}, + {"label":"A", "x":0, "y":1}, + {"label":"S", "x":1, "y":1}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1}, + {"label":"G", "x":4, "y":1}, + {"label":"H", "x":5, "y":1}, + {"label":"J", "x":6, "y":1}, + {"label":"K", "x":7, "y":1}, + {"label":"L", "x":8, "y":1}, + {"label":"-", "x":9, "y":1}, + {"label":"Z", "x":0, "y":2}, + {"label":"X", "x":1, "y":2}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2}, + {"label":"B", "x":4, "y":2}, + {"label":"N", "x":5, "y":2}, + {"label":"M", "x":6, "y":2}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2}, + {"label":"?", "x":9, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Shift", "x":3, "y":3}, + {"label":"←", "x":4, "y":3}, + {"x":5, "y":3}, + {"label":"Enter", "x":6, "y":3}, + {"label":"Alt", "x":7, "y":3}, + {"label":"Super", "x":8, "y":3}, + {"label":"Ctrl", "x":9, "y":3}] + } + } +} diff --git a/qmk/keyboards/pabile/p40_ortho/keymaps/default/keymap.c b/qmk/keyboards/pabile/p40_ortho/keymaps/default/keymap.c new file mode 100644 index 00000000..ac41acf2 --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2020 Pabile + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3,KC_MINS), + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(4,KC_SLSH), + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP, KC_DEL, KC_ESC), + [1] = LAYOUT_ortho_4x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [2] = LAYOUT_ortho_4x10( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [3] = LAYOUT_ortho_4x10( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [4] = LAYOUT_ortho_4x10( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) +}; diff --git a/qmk/keyboards/pabile/p40_ortho/p40_ortho.c b/qmk/keyboards/pabile/p40_ortho/p40_ortho.c new file mode 100644 index 00000000..b6573bd8 --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/p40_ortho.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "p40_ortho.h" diff --git a/qmk/keyboards/pabile/p40_ortho/p40_ortho.h b/qmk/keyboards/pabile/p40_ortho/p40_ortho.h new file mode 100644 index 00000000..dd2c899d --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/p40_ortho.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x10( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39} \ +} +#define LAYOUT_ortho_4x10_1x2u_c( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \ + {k30, k31, k32, k33, k34, KC_NO, k36, k37, k38, k39} \ +} diff --git a/qmk/keyboards/pabile/p40_ortho/readme.md b/qmk/keyboards/pabile/p40_ortho/readme.md new file mode 100644 index 00000000..736c5b49 --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/readme.md @@ -0,0 +1,15 @@ +# P40 Ortho + +![prototype photo1](https://github.com/pabile/p40_ortho/blob/master/files/p40-ortho-003.jpg) + +A compact 4x10 (40%) ortho-linear DIY keyboard kit. + +* Keyboard Maintainer: [pabile](https://github.com/pabile) +* Hardware Supported: Pabile P40 PCB, Pro Micro, ALPS / MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40) + +Make example for this keyboard (after setting up your build environment): + + make pabile/p40_ortho:default + +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). diff --git a/qmk/keyboards/pabile/p40_ortho/rules.mk b/qmk/keyboards/pabile/p40_ortho/rules.mk new file mode 100644 index 00000000..ba0ad23c --- /dev/null +++ b/qmk/keyboards/pabile/p40_ortho/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device diff --git a/qmk/keyboards/pabile/p42/config.h b/qmk/keyboards/pabile/p42/config.h new file mode 100644 index 00000000..2f7c5ce3 --- /dev/null +++ b/qmk/keyboards/pabile/p42/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6670 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P42 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* pin-out for PROMICRO */ +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, D2, D3, F7, B1, B3, B2, B6 } + +/* pin-out for BLUEFRUIT +#define MATRIX_ROW_PINS { F7, F6, F5, F4 } +#define MATRIX_COL_PINS { F1, F0, B1, B2, B3, D2, C7, D6, B7, B6, B5 } +*/ + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/pabile/p42/info.json b/qmk/keyboards/pabile/p42/info.json new file mode 100644 index 00000000..77bce4ba --- /dev/null +++ b/qmk/keyboards/pabile/p42/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "P42", + "url": "https://pabileonline.blogspot.com/", + "maintainer": "Pabile", + "width": 11.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"label":",", "x":7, "y":2}, {"label":".", "x":8, "y":2}, {"x":9, "y":2}, {"x":10.25, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10.25, "y":3}] + } + } +} diff --git a/qmk/keyboards/pabile/p42/keymaps/default/keymap.c b/qmk/keyboards/pabile/p42/keymaps/default/keymap.c new file mode 100644 index 00000000..39c9e639 --- /dev/null +++ b/qmk/keyboards/pabile/p42/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +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_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3,KC_MINS), + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), LT(4,KC_ENT), KC_DEL, KC_RALT, KC_RCTL, KC_ESC), + [1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [2] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + [3] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + [4] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS) +}; diff --git a/qmk/keyboards/pabile/p42/p42.c b/qmk/keyboards/pabile/p42/p42.c new file mode 100644 index 00000000..63bf51bd --- /dev/null +++ b/qmk/keyboards/pabile/p42/p42.c @@ -0,0 +1 @@ +#include "p42.h" diff --git a/qmk/keyboards/pabile/p42/p42.h b/qmk/keyboards/pabile/p42/p42.h new file mode 100644 index 00000000..41aed042 --- /dev/null +++ b/qmk/keyboards/pabile/p42/p42.h @@ -0,0 +1,33 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210,\ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, KC_NO}, \ + {k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, KC_NO}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310} \ +} diff --git a/qmk/keyboards/pabile/p42/readme.md b/qmk/keyboards/pabile/p42/readme.md new file mode 100644 index 00000000..5ad0036b --- /dev/null +++ b/qmk/keyboards/pabile/p42/readme.md @@ -0,0 +1,15 @@ +# P42 + +![prototype photo1](https://github.com/pabile/P42/blob/master/docs/p42-001-small.jpg) + +42-key Ortho-linear keyboard + +* Keyboard Maintainer: [pabile](https://github.com/pabile) +* Hardware Supported: Pabile P42 PCB, Pro Micro, Bluefruit LE, Hotswap Sockets +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/) + +Make example for this keyboard (after setting up your build environment): + + make pabile/p42:default + +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). diff --git a/qmk/keyboards/pabile/p42/rules.mk b/qmk/keyboards/pabile/p42/rules.mk new file mode 100644 index 00000000..ba0ad23c --- /dev/null +++ b/qmk/keyboards/pabile/p42/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device diff --git a/qmk/keyboards/percent/booster/keymaps/via/keymap.c b/qmk/keyboards/percent/booster/keymaps/via/keymap.c new file mode 100644 index 00000000..cc2efa32 --- /dev/null +++ b/qmk/keyboards/percent/booster/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 MechMerlin + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_5x4( + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [2] = LAYOUT_numpad_5x4( + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_numpad_5x4( + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/percent/booster/keymaps/via/rules.mk b/qmk/keyboards/percent/booster/keymaps/via/rules.mk new file mode 100644 index 00000000..35a31dea --- /dev/null +++ b/qmk/keyboards/percent/booster/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no diff --git a/qmk/keyboards/percent/canoe_gen2/canoe_gen2.c b/qmk/keyboards/percent/canoe_gen2/canoe_gen2.c new file mode 100644 index 00000000..47ade5dd --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -0,0 +1,141 @@ +/* +Copyright 2020 Evy Dekkers + +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 "canoe_gen2.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + + return true; +} + +#ifdef RGB_MATRIX_ENABLE +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +led_config_t g_led_config = { { + // Key Matrix to LED Index + // 15, 44, 46, 48, + // 74, 75, 76 + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, + { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 13, 31 }, + { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 30, 45, 47 }, + { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }, + { 64, 65, 66, NO_LED, NO_LED, NO_LED, 67, NO_LED, NO_LED, 69, 70, NO_LED, 71, 72, 73 } +}, { + // LED Index to Physical Position + { 7, 8 }, // Esc + { 22, 8 }, // 1 + { 37, 8 }, // 2 + { 52, 8 }, // 3 + { 67, 8 }, // 4 + { 82, 8 }, // 5 + { 97, 8 }, // 6 + { 112, 8 }, // 7 + { 127, 8 }, // 8 + { 142, 8 }, // 9 + { 157, 8 }, // 0 + { 172, 8 }, // - + { 187, 8 }, // = + { 202, 8 }, // split bs + { 209, 8 }, // bs + { 217, 8 }, // split bs + { 231, 8 }, // ins + { 11, 24 }, // tab + { 30, 24 }, // q + { 45, 24 }, // w + { 60, 24 }, // e + { 75, 24 }, // r + { 90, 24 }, // t + { 104, 24 }, // y + { 119, 24 }, // u + { 134, 24 }, // i + { 149, 24 }, // o + { 164, 24 }, // p + { 179, 24 }, // [ + { 194, 24 }, // ] + { 212, 24 }, // backslash + { 231, 24 }, // del + { 11, 40 }, // caps + { 34, 40 }, // a + { 49, 40 }, // s + { 64, 40 }, // d + { 79, 40 }, // f + { 94, 40 }, // g + { 108, 40 }, // h + { 123, 40 }, // j + { 138, 40 }, // k + { 153, 40 }, // l + { 168, 40 }, // ; + { 183, 40 }, // ' + { 198, 40 }, // iso hash + { 200, 40 }, // ansi enter + { 215, 32 }, // iso enter + { 231, 40 }, // pgup + { 9, 56 }, // iso shift + { 17, 56 }, // ansi shift + { 26, 56 }, // iso nubs + { 41, 56 }, // z + { 56, 56 }, // x + { 71, 56 }, // c + { 86, 56 }, // v + { 101, 56 }, // b + { 116, 56 }, // n + { 131, 56 }, // m + { 146, 56 }, // , + { 161, 56 }, // . + { 175, 56 }, // ? + { 196, 56 }, // shift + { 217, 56 }, // up + { 231, 56 }, // pgdn + { 10, 72 }, // ctrl + { 29, 72 }, // win + { 48, 72 }, // alt + { 103, 72 }, // space + { 112, 72 }, // space + { 161, 72 }, // alt + { 176, 72 }, // fn + { 202, 72 }, // left + { 217, 72 }, // down + { 231, 72 }, // right + { 7, 40 }, // top 1 + { 119, 40 }, // top 2 + { 231, 40 } // top 3 +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, + 2, 2, 2 +} }; +#endif diff --git a/qmk/keyboards/percent/canoe_gen2/canoe_gen2.h b/qmk/keyboards/percent/canoe_gen2/canoe_gen2.h new file mode 100644 index 00000000..d4582eef --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/canoe_gen2.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 Evy Dekkers + +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 . +*/ + +#pragma once +#include "quantum.h" + +// readability +#define ___ KC_NO + +#define LAYOUT_all LAYOUT_65_iso_blocker_split_bs + +#define LAYOUT_65_ansi_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k1d, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, ___, k4c, k4d, k4e} \ +} + +#define LAYOUT_65_iso_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k1d, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, ___, k4c, k4d, k4e} \ +} diff --git a/qmk/keyboards/percent/canoe_gen2/config.h b/qmk/keyboards/percent/canoe_gen2/config.h new file mode 100644 index 00000000..bac5ebb3 --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 Evy Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x9C12 +#define PRODUCT_ID 0x89F0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Percent Studio +#define PRODUCT Canoe Gen2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B1,B3,B2,F5,F4} +#define MATRIX_COL_PINS {B0,D0,C6,B6,B5,B4,D7,D6,D4,D5,D3,D2,D1,F6,F7} +#define UNUSED_PINS + +/* Uncomment if your encoder doesn't react to every turn or skips */ +//#define ENCODER_RESOLUTION 2 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +/* Backlight configuration + */ +#define RGB_DI_PIN B7 +#define DRIVER_LED_TOTAL 77 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT +#define RGB_MATRIX_STARTUP_HUE 0 +#define RGB_MATRIX_STARTUP_SAT 255 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_STARTUP_SPD 127 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true diff --git a/qmk/keyboards/percent/canoe_gen2/info.json b/qmk/keyboards/percent/canoe_gen2/info.json new file mode 100644 index 00000000..fc8ba3e0 --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/info.json @@ -0,0 +1,162 @@ +{ + "keyboard_name": "Canoe Gen2", + "url": "", + "maintainer": "evyd13", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/percent/canoe_gen2/keymaps/default/keymap.c b/qmk/keyboards/percent/canoe_gen2/keymaps/default/keymap.c new file mode 100644 index 00000000..bd30836d --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* +Copyright 2020 Evy Dekkers + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_split_bs( + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_split_bs( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______), + +}; diff --git a/qmk/keyboards/percent/canoe_gen2/keymaps/via/keymap.c b/qmk/keyboards/percent/canoe_gen2/keymaps/via/keymap.c new file mode 100644 index 00000000..20fcddd5 --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Evy Dekkers + +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 + +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_DEL, + 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_BSLS, KC_ENT, KC_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/qmk/keyboards/percent/canoe_gen2/keymaps/via/rules.mk b/qmk/keyboards/percent/canoe_gen2/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/percent/canoe_gen2/readme.md b/qmk/keyboards/percent/canoe_gen2/readme.md new file mode 100644 index 00000000..ae8bf7f1 --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/readme.md @@ -0,0 +1,17 @@ +# Canoe Gen2 + +Canoe Gen2 is a 65% from Percent with per key RGB and an adjustable foot angle. The PCB can be put into reset mode by pressing the button on the back. + +* Keyboard Maintainer: [Evyd13](https://github.com/evyd13) +* Hardware Supported: (Black) Canoe Gen2 PCB +* Hardware Availability: https://percent.studio/products/canoe-gen2 + +Make example for this keyboard (after setting up your build environment): + + make percent/canoe_gen2:default + +Flashing example for this keyboard: + + make percent/canoe_gen2: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). diff --git a/qmk/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc b/qmk/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc new file mode 100644 index 00000000..df0a0b15 --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc @@ -0,0 +1,67 @@ +/* +Copyright 2020 Evy Dekkers + +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 . +*/ + +RGB_MATRIX_EFFECT(indicator_gradient) +RGB_MATRIX_EFFECT(indicator_cycle_all) +RGB_MATRIX_EFFECT(indicator_static) + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static bool indicator_static(effect_params_t* params) { + HSV hsv = rgb_matrix_config.hsv; + RGB rgb = hsv_to_rgb(hsv); + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min ; i < 74; i++) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } + for (uint8_t i = 74 ; i < led_max; i++) { + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 16); + for (uint8_t i = led_min; i < led_max; i++) { + if (i < 74) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } else { + RGB_MATRIX_TEST_LED_FLAGS(); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, (i - 74), time)); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +static HSV indicator_gradient_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].x - time; + return hsv; +} + +bool indicator_gradient(effect_params_t* params) { return effect_runner_indicator(params, &indicator_gradient_math); } + +static HSV indicator_cycle_all_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = time; + return hsv; +} + +bool indicator_cycle_all(effect_params_t* params) { return effect_runner_indicator(params, &indicator_cycle_all_math); } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/qmk/keyboards/percent/canoe_gen2/rules.mk b/qmk/keyboards/percent/canoe_gen2/rules.mk new file mode 100644 index 00000000..bde9a08f --- /dev/null +++ b/qmk/keyboards/percent/canoe_gen2/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 + +LAYOUTS = 65_ansi_blocker_split_bs 65_iso_blocker_split_bs +RGB_MATRIX_CUSTOM_KB = yes diff --git a/qmk/keyboards/phoenix/rules.mk b/qmk/keyboards/phoenix/rules.mk index 6c6c8446..968c6548 100644 --- a/qmk/keyboards/phoenix/rules.mk +++ b/qmk/keyboards/phoenix/rules.mk @@ -1,3 +1,9 @@ +# MCU name +MCU = STM32F401 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + # Build Options # change yes to no to disable # @@ -17,32 +23,4 @@ SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart KEYBOARD_SHARED_EP = yes -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 - OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE diff --git a/qmk/keyboards/planck/ez/config.h b/qmk/keyboards/planck/ez/config.h index 0cb428dd..91723e18 100644 --- a/qmk/keyboards/planck/ez/config.h +++ b/qmk/keyboards/planck/ez/config.h @@ -17,6 +17,14 @@ #pragma once +#undef VENDOR_ID +#define VENDOR_ID 0x3297 +#undef PRODUCT_ID +#define PRODUCT_ID 0xC6CE +#undef MANUFACTURER +#define MANUFACTURER ZSA Technology Labs +#undef PRODUCT +#define PRODUCT Planck EZ /* USB Device descriptor parameter */ #define DEVICE_VER 0x0000 diff --git a/qmk/keyboards/planck/ez/ez.c b/qmk/keyboards/planck/ez/ez.c index 8369ce50..5371c785 100644 --- a/qmk/keyboards/planck/ez/ez.c +++ b/qmk/keyboards/planck/ez/ez.c @@ -18,7 +18,6 @@ #include "hal.h" keyboard_config_t keyboard_config; - #ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations diff --git a/qmk/keyboards/planck/ez/ez.h b/qmk/keyboards/planck/ez/ez.h index 352deb64..f989cd93 100644 --- a/qmk/keyboards/planck/ez/ez.h +++ b/qmk/keyboards/planck/ez/ez.h @@ -17,6 +17,10 @@ #include "planck.h" +#ifdef KEYBOARD_planck_ez_glow +# include "glow.h" +#endif + #define LAYOUT_planck_1x2uC( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ diff --git a/qmk/keyboards/planck/ez/glow/config.h b/qmk/keyboards/planck/ez/glow/config.h new file mode 100644 index 00000000..21a339da --- /dev/null +++ b/qmk/keyboards/planck/ez/glow/config.h @@ -0,0 +1,24 @@ +/* + * Copyright 2018 Jack Humbert + * + * 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 . + */ + +#pragma once + +#undef PRODUCT_ID +#define PRODUCT_ID 0xC6CF + +#undef PRODUCT +#define PRODUCT Planck EZ Glow diff --git a/qmk/keyboards/planck/ez/glow/glow.c b/qmk/keyboards/planck/ez/glow/glow.c new file mode 100644 index 00000000..1813ccae --- /dev/null +++ b/qmk/keyboards/planck/ez/glow/glow.c @@ -0,0 +1 @@ +#include "glow.h" diff --git a/qmk/keyboards/planck/ez/glow/glow.h b/qmk/keyboards/planck/ez/glow/glow.h new file mode 100644 index 00000000..d8a01f43 --- /dev/null +++ b/qmk/keyboards/planck/ez/glow/glow.h @@ -0,0 +1,3 @@ +#pragma once + +#include "ez.h" diff --git a/qmk/keyboards/planck/ez/glow/rules.mk b/qmk/keyboards/planck/ez/glow/rules.mk new file mode 100644 index 00000000..575a9c8f --- /dev/null +++ b/qmk/keyboards/planck/ez/glow/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = IS31FL3737 diff --git a/qmk/keyboards/planck/ez/readme.md b/qmk/keyboards/planck/ez/readme.md index df8d1b46..247bf744 100644 --- a/qmk/keyboards/planck/ez/readme.md +++ b/qmk/keyboards/planck/ez/readme.md @@ -14,6 +14,12 @@ Make example for this keyboard (after setting up your build environment): 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). +# Planck EZ Glow + +For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example: + + make planck/ez/glow:default + ## Planck EZ Configuration (from Oryx) ### Indicator LEDs diff --git a/qmk/keyboards/planck/ez/rules.mk b/qmk/keyboards/planck/ez/rules.mk index ff4d8dae..cd8354b2 100644 --- a/qmk/keyboards/planck/ez/rules.mk +++ b/qmk/keyboards/planck/ez/rules.mk @@ -24,10 +24,8 @@ API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = no # Custom matrix file # SERIAL_LINK_ENABLE = yes ENCODER_ENABLE = yes -RGB_MATRIX_ENABLE = IS31FL3737 LAYOUTS = ortho_4x12 planck_mit LAYOUTS_HAS_RGB = no diff --git a/qmk/keyboards/planck/keymaps/csc027/keymap.c b/qmk/keyboards/planck/keymaps/csc027/keymap.c index 38e3e074..71155eca 100644 --- a/qmk/keyboards/planck/keymaps/csc027/keymap.c +++ b/qmk/keyboards/planck/keymaps/csc027/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 #include "csc027.h" @@ -32,11 +49,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______________________MOUSE_L4_____________________, ______________________MOUSE_R4_____________________ ), - [_GT] = LAYOUT_wrapper( - _______________________GIT_L1______________________, _______________________GIT_R1______________________, - _______________________GIT_L2______________________, _______________________GIT_R2______________________, - _______________________GIT_L3______________________, _______________________GIT_R3______________________, - _______________________GIT_L4______________________, _______________________GIT_R4______________________ + [_WT] = LAYOUT_wrapper( + ________________WINDOWS_TERMINAL_L1________________, ________________WINDOWS_TERMINAL_R1________________, + ________________WINDOWS_TERMINAL_L2________________, ________________WINDOWS_TERMINAL_R2________________, + ________________WINDOWS_TERMINAL_L3________________, ________________WINDOWS_TERMINAL_R3________________, + ________________WINDOWS_TERMINAL_L4________________, ________________WINDOWS_TERMINAL_R4________________ ), [_CN] = LAYOUT_wrapper( diff --git a/qmk/keyboards/planck/keymaps/dcompact/keymap.c b/qmk/keyboards/planck/keymaps/dcompact/keymap.c index cb4cd3f5..0b48f30a 100644 --- a/qmk/keyboards/planck/keymaps/dcompact/keymap.c +++ b/qmk/keyboards/planck/keymaps/dcompact/keymap.c @@ -26,6 +26,20 @@ #define WKSP_U LALT(LCTL(KC_UP)) #define WKSP_R LALT(LCTL(KC_RGHT)) +#define AM_CYC A(S(KC_SPC)) +#define AM_SHR A(S(KC_COMM)) +#define AM_GRW A(S(KC_DOT)) +#define AM_REL A(S(KC_Z)) +#define AM_LFT A(S(KC_H)) +#define AM_RGH A(S(KC_L)) +#define AM_CW A(S(KC_K)) +#define AM_CCW A(S(KC_J)) +#define AM_TLL A(S(KC_1)) +#define AM_TLW A(S(KC_2)) +#define AM_BSP A(S(KC_3)) +#define AM_FUL A(S(KC_4)) + + extern keymap_config_t keymap_config; enum planck_layers { @@ -78,19 +92,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. - * | | | | | | | | Home |PgDwn | PgUp | End | | + * | |AmCycl|AmShrk|AmGrow|AmReld| | | Home |PgDwn | PgUp | End | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |PrScr | Menu | | | | | Left | Down | Up |Right | | + * | |AmLeft|AmCcw |AmCw |AmRght| | | Left | Down | Up |Right | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |CapsLk|NumLck| Ins | | | |WkLeft|WkDown| WkUp |WkRigh| | + * | |AmTall|AmTllW|AmBsp |AmFull| | |WkLeft|WkDown| WkUp |WkRigh| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | |Raise | | | | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, - XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, - XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, + XXXXXXX, AM_CYC, AM_SHR, AM_GRW, AM_REL, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, AM_LFT, AM_CCW, AM_CW, AM_RGH, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + XXXXXXX, AM_TLL, AM_TLW, AM_BSP, AM_FUL, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), diff --git a/qmk/keyboards/planck/keymaps/eosti/config.h b/qmk/keyboards/planck/keymaps/eosti/config.h new file mode 100644 index 00000000..54813bf0 --- /dev/null +++ b/qmk/keyboards/planck/keymaps/eosti/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Reid Sox-Harris + * + * 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 . + */ + +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +// #define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages + #define ENCODER_RESOLUTION 4 + diff --git a/qmk/keyboards/planck/keymaps/eosti/keymap.c b/qmk/keyboards/planck/keymaps/eosti/keymap.c new file mode 100644 index 00000000..3f1c750c --- /dev/null +++ b/qmk/keyboards/planck/keymaps/eosti/keymap.c @@ -0,0 +1,122 @@ +/* Copyright 2020 Reid Sox-Harris + * + * 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 +#include "muse.h" + +enum planck_layers { + _QWERTY, + _GAME, + _UPPER, + _LOWER, + _UTILS +}; + +enum planck_keycodes { + TMUX_WN = SAFE_RANGE, + TMUX_WL +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TMUX_WN: // Moves to the next tmux window + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") "n"); + } + break; + + case TMUX_WL: // Moves to the last tmux window + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") "n"); + } + break; + } + return true; +}; + +#define UPPER MO(_UPPER) +#define LOWER MO(_LOWER) +#define UTILS MO(_UTILS) +#define GAME TG(_GAME) + +#define WM_R LCTL(KC_RGHT) // Moves the MacOS WM window to the right +#define WM_L LCTL(KC_LEFT) // ...and to the left +#define WM_MC LCTL(KC_UP) // Opens MacOS Mission Control +#define WEB_R LGUI(KC_RCBR) // Move one tab to the right, works on Firefox, Chrome +#define WEB_L LGUI(KC_LCBR) // ...and to the left +#define TMUX_U RALT(KC_UP) // Changes focus in tmux, requires a keybinding in tmux.conf +#define TMUX_D RALT(KC_DOWN) +#define TMUX_R RALT(KC_RGHT) +#define TMUX_L RALT(KC_LEFT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_planck_grid( + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, KC_NO, KC_LCTL, KC_LGUI, UPPER, KC_ENT, KC_SPC, LOWER, KC_RALT, KC_VOLU, KC_VOLD, KC_MUTE + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + [_GAME] = LAYOUT_planck_grid( + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + [_UPPER] = LAYOUT_planck_grid( + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, WEB_L, WEB_R, WM_MC, WM_L, WM_R, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, KC_BSLS, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, KC_LABK, KC_LBRC, KC_LPRN, KC_LCBR, KC_RCBR, KC_RPRN, KC_RBRC, KC_RABK, KC_PGDN, _______, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, UPPER, _______, _______, UTILS, _______, KC_MPRV, KC_MPLY, KC_MNXT + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + [_LOWER] = LAYOUT_planck_grid( + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, TMUX_WL, TMUX_WN, KC_NO, KC_NO, KC_NO, TMUX_L, TMUX_D, TMUX_U, TMUX_R, KC_NO, KC_PIPE, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_DEL, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, UTILS, _______, _______, LOWER, _______, _______, _______, _______ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + [_UTILS] = LAYOUT_planck_grid( + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_NO, KC_INS, KC_HOME, AU_ON, KC_NO, GAME, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_SLEP, KC_DEL, KC_END, AU_OFF, KC_NO, RESET, + // ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, UTILS, _______, _______, UTILS, _______, _______, _______, _______ + // └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/qmk/keyboards/planck/keymaps/eosti/readme.md b/qmk/keyboards/planck/keymaps/eosti/readme.md new file mode 100644 index 00000000..eb775c52 --- /dev/null +++ b/qmk/keyboards/planck/keymaps/eosti/readme.md @@ -0,0 +1,9 @@ +# eosti's Planck (rev6) Keymap +## Features +* QWERTY main layout +* Gaming sublayer that switches space and enter for ease of WASDing +* Common programming enclosers {([<>])} easily accessable +* Vim-style HJKL arrow navigation +* tmux keybindings for easy navigation +* Plays well with my Iris Rev.3 keymap for ease of switching +* I like it diff --git a/qmk/keyboards/planck/keymaps/eosti/rules.mk b/qmk/keyboards/planck/keymaps/eosti/rules.mk new file mode 100644 index 00000000..dcf16bef --- /dev/null +++ b/qmk/keyboards/planck/keymaps/eosti/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/qmk/keyboards/planck/keymaps/pevecyan/keymap.c b/qmk/keyboards/planck/keymaps/pevecyan/keymap.c index 57f9f0e7..d2a0c851 100644 --- a/qmk/keyboards/planck/keymaps/pevecyan/keymap.c +++ b/qmk/keyboards/planck/keymaps/pevecyan/keymap.c @@ -44,7 +44,7 @@ enum planck_keycodes { #define CAPS MO(_CAPS) #define ALTGR MO(_ALTGR) #define MEMA MO(_MEMA) -#define CARON LT(_CARON, SI_QOT) +#define CARON LT(_CARON, SI_QUOT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -52,56 +52,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | CAPS | A | S | D | F | G | H | J | K | L | ; | " | + * | CAPS | A | S | D | F | G | H | J | K | L |CARON |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Y | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Y | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | GUI | Alt | GUI |LOWER | Space |RAISE | ALTGR| MEMA | F12 | F5 | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, KC_BSPC, CAPS, SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, CARON, KC_ENT, - KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT , - KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, MEMA, KC_F12, KC_F5 + KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT, + KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, MEMA, KC_F12, KC_F5 ), /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | " | # | $ | % | & | / | ( | ) | = | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | ? | * | ` | + | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | < | > | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - SI_TILD, SI_EXLM, SI_DQOT, KC_HASH, SI_DLR, SI_PERC, SI_AMPR, SI_SLSH, SI_LPRN, SI_RPRN, SI_EQL, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_MINS, KC_PPLS, KC_ENT, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), + SI_TILD, SI_EXLM, SI_DQUO, KC_HASH, SI_DLR, SI_PERC, SI_AMPR, SI_SLSH, SI_LPRN, SI_RPRN, SI_EQL, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, SI_QUES, SI_ASTR, SI_GRV, SI_PLUS, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, SI_LABK, SI_RABK, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | | | | | | | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * | | | | | | | |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_planck_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | @@ -120,18 +121,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_ALTGR] = LAYOUT_planck_grid( - _______, ALTG(KC_Q), ALTG(KC_W), ALTG(KC_E), _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, ALTG(KC_F), ALTG(KC_G), _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, ALTG(KC_V), ALTG(KC_B), ALTG(KC_N), _______, ALTG(KC_COMM), ALTG(KC_DOT), _______, _______ , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* Altgr <> + * ,-----------------------------------------------------------------------------------. + * | | \ | | | € | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | [ | ] | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | @ | { | } | | < | > | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ALTGR] = LAYOUT_planck_grid(k + _______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_CAPS] = LAYOUT_planck_grid( - KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, _______, _______, KC_DEL , - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_DEL , + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_RIGHT), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MEMA] = LAYOUT_planck_grid( @@ -142,9 +154,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_CARON] = LAYOUT_planck_grid( - _______, _______, _______, _______, _______, _______, SI_ZV , _______, _______, _______, _______, _______, - _______, _______, SI_SV, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, SI_CV, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, SI_ZCAR , _______, _______, _______, _______, _______, + _______, _______, SI_SCAR, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, SI_CCAR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/qmk/keyboards/planck/keymaps/sigul/keymap.c b/qmk/keyboards/planck/keymaps/sigul/keymap.c index b4b983d9..0bc0d9e0 100644 --- a/qmk/keyboards/planck/keymaps/sigul/keymap.c +++ b/qmk/keyboards/planck/keymaps/sigul/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | | _ | = | | | | + * |Enter | F1 | F2 | F3 | F4 | F5 | | _ | = | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F6 | F7 | F8 | F9 | |NUMPAD| | | { | } | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_ortho_4x12( IT_TILDE, IT_EXLM, IT_AT, IT_SHRP, IT_DLR, IT_PERC, IT_CRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EACC), IT_OACC, IT_AACC, + KC_ENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EACC), IT_OACC, IT_AACC, _______, KC_F6, KC_F7, KC_F8, KC_F9, _______, NUMPAD, S(IT_UACC), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -68,8 +68,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT_ortho_4x12( IT_GRAVE, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______, - _______, _______, SECRET2, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EACC, IT_IACC, IT_UACC, - KC_CAPS, _______, SECRET0, SECRET3, SECRET4, _______, NUMPAD, _______, _______, IT_LBRC, IT_RBRC, IT_BSLS, + _______, _______, SECRET0, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EACC, IT_IACC, IT_UACC, + KC_CAPS, _______, SECRET2, SECRET3, SECRET4, _______, NUMPAD, SECRET5, _______, IT_LBRC, IT_RBRC, IT_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), diff --git a/qmk/keyboards/planck/keymaps/winternebs/config.h b/qmk/keyboards/planck/keymaps/winternebs/config.h new file mode 100644 index 00000000..eec8a937 --- /dev/null +++ b/qmk/keyboards/planck/keymaps/winternebs/config.h @@ -0,0 +1,61 @@ +/* Copyright 2020 winterNebs + * + * 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 . + */ + +#pragma once +/* +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif +*/ +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +//#define ENCODER_RESOLUTION 4 + +//Mouse stuff +#define MOUSEKEY_DELAY 60 +#define MOUSEKEY_INTERVAL 8 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 0 +#define FORCE_NKRO diff --git a/qmk/keyboards/planck/keymaps/winternebs/keymap.c b/qmk/keyboards/planck/keymaps/winternebs/keymap.c new file mode 100644 index 00000000..259603fa --- /dev/null +++ b/qmk/keyboards/planck/keymaps/winternebs/keymap.c @@ -0,0 +1,162 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 + + +enum planck_layers { + _QWERTY, + _WORKMAN, + _LOWER, + _ADJUST, +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + LOWER, +}; + +#define ADJUST MO(_ADJUST) +//#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space |Space |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT +), +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | H | T | G | Y | N | E | O | I | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space | Bksp |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_WORKMAN] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up | UP |Pg Dn | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |PrScr | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______ , + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_UP, KC_PGDN, + _______, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,----------------------------------------------------------------------------------- + * |RESET |DEBUG| |Aud on|Audoff| | | | | | |Reset | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |QWERTY|WORKMAN| | | Help | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Home | End | VOL+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NKRO | | | | | | | | Prev | VOL- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + RESET, DEBUG, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, QWERTY, WORKMAN , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_VOLU, KC_MPLY, + MAGIC_TOGGLE_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT +) +}; + + + + +bool held[7][6] = {{false}}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.key.row != 3 && record->event.key.row != 7 ){ + held[record->event.key.row][record->event.key.col] = record->event.pressed; + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + case LOWER: + if(record->event.pressed){ + print("registered\n"); + for(int i = 0; i < 7; i++){ + for(int j = 0; j < 6; j++){ + if(held[i][j]){ + tap_code(pgm_read_word(&keymaps[_LOWER][i][j])); + } + } + } + layer_on(_LOWER); + return false; + } + + layer_off(_LOWER); + return false; + break; + } + return true; +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + } +} diff --git a/qmk/keyboards/planck/keymaps/winternebs/readme.md b/qmk/keyboards/planck/keymaps/winternebs/readme.md new file mode 100644 index 00000000..d2040854 --- /dev/null +++ b/qmk/keyboards/planck/keymaps/winternebs/readme.md @@ -0,0 +1 @@ +# winterNebs' Planck keymap diff --git a/qmk/keyboards/planck/keymaps/winternebs/rules.mk b/qmk/keyboards/planck/keymaps/winternebs/rules.mk new file mode 100644 index 00000000..dcf16bef --- /dev/null +++ b/qmk/keyboards/planck/keymaps/winternebs/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/qmk/keyboards/plexus75/config.h b/qmk/keyboards/plexus75/config.h new file mode 100644 index 00000000..5c123c43 --- /dev/null +++ b/qmk/keyboards/plexus75/config.h @@ -0,0 +1,72 @@ +/* Copyright 2020 Nathan Spears + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7070 +#define PRODUCT_ID 0x5338 +#define DEVICE_VER 0x0001 +#define MANUFACTURER nasp +#define PRODUCT Plexus75 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + + +#define MATRIX_ROW_PINS { D2, B3, B1, F1, F0 } +#define MATRIX_COL_PINS { B2, B0, D1, F7, F6, F5, F4, D4, D6, D7, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +// ws2812 options +#define RGB_DI_PIN D3 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 14 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) diff --git a/qmk/keyboards/plexus75/info.json b/qmk/keyboards/plexus75/info.json new file mode 100644 index 00000000..21b275ca --- /dev/null +++ b/qmk/keyboards/plexus75/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "Plexus75", + "url": "", + "maintainer": "npspears", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_2x2u": { + "layout": [{"label":"=", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"[", "x":6, "y":0}, {"label":"]", "x":7, "y":0}, {"label":"`", "x":8, "y":0}, {"label":"6", "x":9, "y":0}, {"label":"7", "x":10, "y":0}, {"label":"8", "x":11, "y":0}, {"label":"9", "x":12, "y":0}, {"label":"9", "x":13, "y":0}, {"label":"-", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"7", "x":6, "y":1}, {"label":"8", "x":7, "y":1}, {"label":"9", "x":8, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"Back Space", "x":14, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"4", "x":6, "y":2}, {"label":"5", "x":7, "y":2}, {"label":"6", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":";", "x":13, "y":2}, {"label":"'", "x":14, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"label":"1", "x":6, "y":3}, {"label":"2", "x":7, "y":3}, {"label":"3", "x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":",", "x":11, "y":3}, {"label":".", "x":12, "y":3}, {"label":"/", "x":13, "y":3}, {"label":"Return", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"OS", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4}, {"x":5, "y":4, "w":2}, {"x":7, "y":4}, {"x":8, "y":4, "w":2}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"OS", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_2x3u": { + "layout": [{"label":"=", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"[", "x":6, "y":0}, {"label":"]", "x":7, "y":0}, {"label":"`", "x":8, "y":0}, {"label":"6", "x":9, "y":0}, {"label":"7", "x":10, "y":0}, {"label":"8", "x":11, "y":0}, {"label":"9", "x":12, "y":0}, {"label":"9", "x":13, "y":0}, {"label":"-", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"7", "x":6, "y":1}, {"label":"8", "x":7, "y":1}, {"label":"9", "x":8, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"Back Space", "x":14, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"4", "x":6, "y":2}, {"label":"5", "x":7, "y":2}, {"label":"6", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":";", "x":13, "y":2}, {"label":"'", "x":14, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"label":"1", "x":6, "y":3}, {"label":"2", "x":7, "y":3}, {"label":"3", "x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":",", "x":11, "y":3}, {"label":".", "x":12, "y":3}, {"label":"/", "x":13, "y":3}, {"label":"Return", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"OS", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":3}, {"x":7, "y":4}, {"x":8, "y":4, "w":3}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"OS", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_7u": { + "layout": [{"label":"=", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"[", "x":6, "y":0}, {"label":"]", "x":7, "y":0}, {"label":"`", "x":8, "y":0}, {"label":"6", "x":9, "y":0}, {"label":"7", "x":10, "y":0}, {"label":"8", "x":11, "y":0}, {"label":"9", "x":12, "y":0}, {"label":"9", "x":13, "y":0}, {"label":"-", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"7", "x":6, "y":1}, {"label":"8", "x":7, "y":1}, {"label":"9", "x":8, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"Back Space", "x":14, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"4", "x":6, "y":2}, {"label":"5", "x":7, "y":2}, {"label":"6", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":";", "x":13, "y":2}, {"label":"'", "x":14, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"label":"1", "x":6, "y":3}, {"label":"2", "x":7, "y":3}, {"label":"3", "x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":",", "x":11, "y":3}, {"label":".", "x":12, "y":3}, {"label":"/", "x":13, "y":3}, {"label":"Return", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"OS", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"label":"", "x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"OS", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} + + + + diff --git a/qmk/keyboards/plexus75/keymaps/default/config.h b/qmk/keyboards/plexus75/keymaps/default/config.h new file mode 100644 index 00000000..9028fcf9 --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* + * 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 . + */ + +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/qmk/keyboards/plexus75/keymaps/default/keymap.c b/qmk/keyboards/plexus75/keymaps/default/keymap.c new file mode 100644 index 00000000..def8d0d3 --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default/keymap.c @@ -0,0 +1,94 @@ +/* + * 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 + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +// Layer shorthand +enum layer_names { + _BASE, + _FN, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------------------' + * | = | 1 | 2 | 3 | 4 | 5 | [ | ] | ` | 6 | 7 | 8 | 9 | 0 | - | + * |-----------+--------+--------+------- +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | BCKSPC | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC(CTRL) | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ; | ' | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------- +--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | ENTER | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PRNSCRN | LGUI | LALT | TT(_FN) | SPACE | O | SPACE | TT(_FN1) | RALT | RGUI | CAPS | + * '-----------------------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_2x2u( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PSCR, KC_LGUI, KC_LALT, TT(_FN), KC_SPC, KC_P0, KC_SPC, TT(_FN1), KC_RALT, KC_RGUI, KC_CAPS + ), + + /* Function Layer + * .-------------------------------------------------------------------------------------------------------------------------------------' + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------| + * | | | MENU | | | | | | | | | | PRT SC | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+----------------| + * | | | | | | | | | | | | | | RESET | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+----------------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+----------------| + * | | RESET | RESET | | | | | | | | | | | + * '-------------------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_2x2u( + KC_GRV, 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_F13, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, _______, + RESET, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 2nd Function Layer + * .-------------------------------------------------------------------------------------------------------------------------------------' + * | | |RGB ON OFF|HUE INC|HUE DEC|SAT INC |SAT DEC | | | | | | | |PRNSCRN | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+----------------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | BCKSPC | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+----------------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+----------------| + * | | RESET | RESET | | | | | | | | | | | + * '-------------------------------------------------------------------------------------------------------------------------------------' + */ + [_FN1] = LAYOUT_2x2u( + _______, _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, _______, + RESET, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/qmk/keyboards/plexus75/keymaps/default/readme.md b/qmk/keyboards/plexus75/keymaps/default/readme.md new file mode 100644 index 00000000..39dccf08 --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Plexus75 with 2x2u bars diff --git a/qmk/keyboards/plexus75/keymaps/default_3u/keymap.c b/qmk/keyboards/plexus75/keymaps/default_3u/keymap.c new file mode 100644 index 00000000..d467c63a --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default_3u/keymap.c @@ -0,0 +1,90 @@ +/* + * 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 + +// Layer shorthand +enum layer { + _BASE, + _FN, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------------------' + * | = | 1 | 2 | 3 | 4 | 5 | [ | ] | ` | 6 | 7 | 8 | 9 | 0 | - | + * |-----------+--------+--------+------- +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | BCKSPC | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC(CTRL) | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ; | ' | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------- +--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | ENTER | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PRNSCRN | LGUI | LALT | TT(_FN) | TT(_FN1) | SPACE | RALT | RGUI | CAPS | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_2x3u( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PSCR, KC_LGUI, KC_LALT, TT(_FN), TT(_FN1), KC_SPC, KC_RALT, KC_RGUI, KC_CAPS + ), + + /* Function Layer + * .-------------------------------------------------------------------------------------------------------------------------------------' + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------| + * | | | MENU | | | | | | | | | | PRT SC | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+----------------| + * | | | | | | | | | | | | | | RESET | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+----------------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+----------------| + * | RESET | | | | | | | | | + * '-------------------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_2x3u( + KC_GRV, 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_F13, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 2nd Function Layer + * .-------------------------------------------------------------------------------------------------------------------------------------' + * | | |RGB ON OFF|HUE INC|HUE DEC|SAT INC |SAT DEC | | | | | | | |PRNSCRN | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+----------------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | BCKSPC | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+----------------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+----------------| + * | RESET | RESET | | | | | | | | + * '-------------------------------------------------------------------------------------------------------------------------------------' + */ + [_FN1] = LAYOUT_2x3u( + _______, _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, _______, + RESET, RESET, _______, _______, _______, _______, _______, _______, _______ + ), + + }; diff --git a/qmk/keyboards/plexus75/keymaps/default_3u/readme.md b/qmk/keyboards/plexus75/keymaps/default_3u/readme.md new file mode 100644 index 00000000..e7b84c5b --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default_3u/readme.md @@ -0,0 +1 @@ +# The default_3u bar keymap for Plexus75 \ No newline at end of file diff --git a/qmk/keyboards/plexus75/keymaps/default_7u/keymap.c b/qmk/keyboards/plexus75/keymaps/default_7u/keymap.c new file mode 100644 index 00000000..0c2fa678 --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default_7u/keymap.c @@ -0,0 +1,68 @@ +/* + * 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 + +// Layer shorthand +enum layer { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------------------' + * | = | 1 | 2 | 3 | 4 | 5 | [ | ] | ` | 6 | 7 | 8 | 9 | 0 | - | + * |-----------+--------+--------+------- +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | BCKSPC | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC(CTRL) | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ; | ' | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------- +--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | ENTER | + * |-----------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | LGUI | LALT | SPACE | RALT | MO (FN) | APP | + *'------------------------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_7u( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_GRV, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_MENU + ), + + /* Function Layer + * .-------------------------------------------------------------------------------------------------------------------------------------' + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------| + * | | | MENU | | | | | | | | | | PRT SC | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+----------------| + * | | | | | | | | | | | | | | RESET | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+----------------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+----------------| + * | | | | | | | | + *'--------------------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_7u( + KC_GRV, 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_F13, KC_DEL, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/qmk/keyboards/plexus75/keymaps/default_7u/readme.md b/qmk/keyboards/plexus75/keymaps/default_7u/readme.md new file mode 100644 index 00000000..a80769aa --- /dev/null +++ b/qmk/keyboards/plexus75/keymaps/default_7u/readme.md @@ -0,0 +1,2 @@ +# The default_ortho_7u keymap for Plexus75 + diff --git a/qmk/keyboards/plexus75/plexus75.h b/qmk/keyboards/plexus75/plexus75.h new file mode 100644 index 00000000..0f4cee68 --- /dev/null +++ b/qmk/keyboards/plexus75/plexus75.h @@ -0,0 +1,65 @@ +/* Copyright 2020 Nathan Spears + * + * 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 . + */ + + +#pragma once + +#include "quantum.h" + +#define LAYOUT_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, \ + k41, k42, k44, k45, k46, k47, k48, k49, k410, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 }, \ + { KC_NO, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k410, KC_NO, k412, k413, KC_NO } \ +} + +#define LAYOUT_2x3u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, \ + k41, k42, k44, k45, k47, k48, k410, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 }, \ + { KC_NO, k41, k42, KC_NO, k44, k45, KC_NO, k47, k48, KC_NO, k410, KC_NO, k412, k413, KC_NO } \ +} + +#define LAYOUT_7u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, \ + k41, k42, k44, k47, k410, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 }, \ + { KC_NO, k41, k42, KC_NO, k44, KC_NO, KC_NO, k47, KC_NO, KC_NO, k410, KC_NO, k412, k413, KC_NO } \ +} diff --git a/qmk/keyboards/plexus75/readme.md b/qmk/keyboards/plexus75/readme.md new file mode 100644 index 00000000..4cc2ff2b --- /dev/null +++ b/qmk/keyboards/plexus75/readme.md @@ -0,0 +1,15 @@ +# Plexus75 + +![Plexus75](https://i.imgur.com/c06EAxJl.jpg) + +The Plexus75 is a 60% ortholinear keyboard based on the XD75 but instead of an all 1u bottom row the Plexus75 has a more traditional bottom row similar to reg. 60% boards. + +* Keyboard Maintainer: [Nasp](https://github.com/npspears) +* Hardware Supported: Plexus75 PCB +* Hardware Availability: https://forms.gle/uSqeNRgJEEQNk4C97 + +Make example for this keyboard (after setting up your build environment): + + make plexus75:default + +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). diff --git a/qmk/keyboards/plexus75/rules.mk b/qmk/keyboards/plexus75/rules.mk new file mode 100644 index 00000000..169778df --- /dev/null +++ b/qmk/keyboards/plexus75/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode diff --git a/qmk/keyboards/ploopyco/mouse/config.h b/qmk/keyboards/ploopyco/mouse/config.h new file mode 100644 index 00000000..db1c7d00 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/config.h @@ -0,0 +1,83 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5043 +#define PRODUCT_ID 0x4D6F +#define DEVICE_VER 0x0001 +#define MANUFACTURER PloopyCo +#define PRODUCT Mouse + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define DIRECT_PINS \ + { \ + { D4, D2, E6, B6, D7, C6, C7, B7 } \ + } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS \ + { B4, D6, F1, F5, F6, F7 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high + a polling rate as possible. */ +#define USB_POLLING_INTERVAL_MS 1 +#define USB_MAX_POWER_CONSUMPTION 100 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 3 + +#define RGB_DI_PIN B5 +#define RGBLED_NUM 4 +#define RGBLIGHT_LIMIT_VAL 40 +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + +// #define DEBUG_LED_PIN F7 diff --git a/qmk/keyboards/ploopyco/mouse/info.json b/qmk/keyboards/ploopyco/mouse/info.json new file mode 100644 index 00000000..142bf2be --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "PloopyCo Mouse", + "url": "www.ploopy.co", + "maintainer": "drashna", + "manufacturer": "Ploopy Corporation", + "width": 8, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":1, "y":0, "h":2}, + {"x":2, "y":0, "h":2}, + {"x":3, "y":0.25, "h":1.25}, + {"x":4, "y":0, "h":2}, + {"x":5, "y":0, "h":2}, + {"x":0, "y":0}, + {"x":0, "y":1}, + {"x":3, "y":1.5} + ] + } + } +} diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/default/keymap.c b/qmk/keyboards/ploopyco/mouse/keymaps/default/keymap.c new file mode 100644 index 00000000..8145ffb1 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + +// safe range starts at `PLOOPY_SAFE_RANGE` instead. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_V), KC_BTN4, KC_BTN5, DPI_CONFIG) +}; diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/default/readme.md b/qmk/keyboards/ploopyco/mouse/keymaps/default/readme.md new file mode 100644 index 00000000..4618c83c --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for PloopyCo Mouse diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/drag_scroll/keymap.c b/qmk/keyboards/ploopyco/mouse/keymaps/drag_scroll/keymap.c new file mode 100644 index 00000000..438e2406 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/drag_scroll/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + +// used for tracking the state +bool is_drag_scroll = false; + +enum custom_keycodes { + DRAG_SCROLL = PLOOPY_SAFE_RANGE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_V), KC_BTN4, KC_BTN5, DPI_CONFIG) +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DRAG_SCROLL: + if (record->event.pressed) { + // this toggles the state each time you tap it + is_drag_scroll ^= 1; + } + break; + } + return true; +} + +// The real magic is here. +// This function is called to translate the processed sensor movement +// from the mouse sensor and translates it into x and y movement for +// the mouse report. Normally. So if "drag scroll" is toggled on, +// moving the ball scrolls instead. You could remove the x or y here +// to only scroll in one direction, if you wanted, as well. In fact, +// there is no reason that you need to send this to the mouse report. +// You could have it register a key, instead. +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + if (is_drag_scroll) { + mouse_report->h = x; + mouse_report->v = y; + } else { + mouse_report->x = x; + mouse_report->y = y; + } +} diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/drag_scroll/readme.md b/qmk/keyboards/ploopyco/mouse/keymaps/drag_scroll/readme.md new file mode 100644 index 00000000..ddf5eb70 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/drag_scroll/readme.md @@ -0,0 +1,3 @@ +# The Drag Scroll keymap for PloopyCo Mouse + +This is a sample keymap showing off what you can do with the custom callback drivers. diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/via/config.h b/qmk/keyboards/ploopyco/mouse/keymaps/via/config.h new file mode 100644 index 00000000..0ba4c7e0 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/via/keymap.c b/qmk/keyboards/ploopyco/mouse/keymaps/via/keymap.c new file mode 100644 index 00000000..cd8b7f6c --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_V), KC_BTN4, KC_BTN5, C(KC_Z)), + [1] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [3] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [4] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [5] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [6] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [7] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/qmk/keyboards/ploopyco/mouse/keymaps/via/rules.mk b/qmk/keyboards/ploopyco/mouse/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/ploopyco/mouse/mouse.c b/qmk/keyboards/ploopyco/mouse/mouse.c new file mode 100644 index 00000000..fad4807c --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/mouse.c @@ -0,0 +1,282 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + +#ifndef OPT_DEBOUNCE +# define OPT_DEBOUNCE 5 // (ms) Time between scroll events +#endif +#ifndef SCROLL_BUTT_DEBOUNCE +# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events +#endif +#ifndef OPT_THRES +# define OPT_THRES 150 // (0-1024) Threshold for actication +#endif +#ifndef OPT_SCALE +# define OPT_SCALE 1 // Multiplier for wheel +#endif +#ifndef PLOOPY_DPI_OPTIONS +# define PLOOPY_DPI_OPTIONS { 1200, 1600, 2400 } +# ifndef PLOOPY_DPI_DEFAULT +# define PLOOPY_DPI_DEFAULT 1 +# endif +#endif +#ifndef PLOOPY_DPI_DEFAULT +# define PLOOPY_DPI_DEFAULT 0 +#endif + +keyboard_config_t keyboard_config; +uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; +#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) + +// TODO: Implement libinput profiles +// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html +// Compile time accel selection +// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC + +// Trackball State +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +uint16_t lastScroll = 0; // Previous confirmed wheel event +uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed +uint8_t OptLowPin = OPT_ENC1; +bool debug_encoder = false; + +__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { + // TODO: Replace this with interrupt driven code, polling is S L O W + // Lovingly ripped from the Ploopy Source + + // If the mouse wheel was just released, do not scroll. + if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) { + return; + } + + // Limit the number of scrolls per unit time. + if (timer_elapsed(lastScroll) < OPT_DEBOUNCE) { + return; + } + + // Don't scroll if the middle button is depressed. + if (is_scroll_clicked) { +#ifndef IGNORE_SCROLL_CLICK + return; +#endif + } + + lastScroll = timer_read(); + uint16_t p1 = adc_read(OPT_ENC1_MUX); + uint16_t p2 = adc_read(OPT_ENC2_MUX); + if (debug_encoder) dprintf("OPT1: %d, OPT2: %d\n", p1, p2); + + uint8_t dir = opt_encoder_handler(p1, p2); + + if (dir == 0) return; + process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); +} + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { + dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); + } + if (debug_mouse) { + dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); + } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + // apply multiplier + // data.dx *= mouse_multiplier; + // data.dy *= mouse_multiplier; + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + process_mouse_user(mouse_report, data.dx, data.dy); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (debug_mouse) { + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + } + + // Update Timer to prevent accidental scrolls + if ((record->event.key.col == 1) && (record->event.key.row == 0)) { + lastMidClick = timer_read(); + is_scroll_clicked = record->event.pressed; + } + + if (!process_record_user(keycode, record)) { return false; } + + if (keycode == DPI_CONFIG && record->event.pressed) { + keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; + eeconfig_update_kb(keyboard_config.raw); + pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + } +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + if (keycode == KC_MS_BTN1) + currentReport.buttons |= MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons |= MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons |= MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons |= MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons |= MOUSE_BTN5; + } else { + if (keycode == KC_MS_BTN1) + currentReport.buttons &= ~MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons &= ~MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons &= ~MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons &= ~MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons &= ~MOUSE_BTN5; + } + pointing_device_set_report(currentReport); + pointing_device_send(); + } +#endif + + return true; +} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + setPinInput(OPT_ENC1); + setPinInput(OPT_ENC2); + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ +#ifdef UNUSED_PINS + const pin_t unused_pins[] = UNUSED_PINS; + + for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + setPinOutput(unused_pins[i]); + writePinLow(unused_pins[i]); + } +#endif + + // This is the debug LED. +#if defined(DEBUG_LED_PIN) + setPinOutput(DEBUG_LED_PIN); + writePin(DEBUG_LED_PIN, debug_enable); +#endif + + keyboard_pre_init_user(); +} + +void pointing_device_init(void) { + // initialize ball sensor + pmw_spi_init(); + // initialize the scroll wheel's optical encoder + opt_encoder_init(); +} + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + process_wheel(&mouse_report); + process_mouse(&mouse_report); + + pointing_device_set_report(mouse_report); + if (has_report_changed(mouse_report, pointing_device_get_report())) { + pointing_device_send(); + } +} + +void eeconfig_init_kb(void) { + keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; + eeconfig_update_kb(keyboard_config.raw); +} + +void matrix_init_kb(void) { + // is safe to just read DPI setting since matrix init + // comes before pointing device init. + keyboard_config.raw = eeconfig_read_kb(); + if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { + eeconfig_init_kb(); + } + matrix_init_user(); +} + +void keyboard_post_init_kb(void) { + pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + + keyboard_post_init_user(); +} diff --git a/qmk/keyboards/ploopyco/mouse/mouse.h b/qmk/keyboards/ploopyco/mouse/mouse.h new file mode 100644 index 00000000..f80449c1 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/mouse.h @@ -0,0 +1,54 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "spi_master.h" +#include "pmw3360.h" +#include "analog.h" +#include "opt_encoder.h" +#include "pointing_device.h" + +// Sensor defs +#define OPT_ENC1 F0 +#define OPT_ENC2 F4 +#define OPT_ENC1_MUX 0 +#define OPT_ENC2_MUX 4 + +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); +void process_wheel(report_mouse_t* mouse_report); +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); + +#define LAYOUT(BLL, BL, BM, BR, BRR, BF, BB, BDPI) \ + { {BL, BM, BR, BF, BB, BRR, BLL, BDPI}, } + +typedef union { + uint32_t raw; + struct { + uint8_t dpi_config; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; + +enum ploopy_keycodes { + DPI_CONFIG = SAFE_RANGE, + PLOOPY_SAFE_RANGE, +}; diff --git a/qmk/keyboards/ploopyco/mouse/readme.md b/qmk/keyboards/ploopyco/mouse/readme.md new file mode 100644 index 00000000..a9b4b581 --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/readme.md @@ -0,0 +1,77 @@ +# Ploopyco Mouse + +![Ploopyco Mouse](https://www.ploopy.co/uploads/1/2/7/6/127652558/s905404500980887952_p10_i19_w1414.jpeg) + +It's a DIY, QMK Powered Trackball!!!! + +Everything works. However the scroll wheel has some issues and acts very odd. + +* Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: ATMega32u4 8MHz(3.3v) +* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/mouse:default:flash + +To jump to the bootloader, hold down "Button 4" (the "forward" button on the left side) + +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). + +# Customzing your PloopyCo Trackball + +While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. + +The default behavior for this is: + +```c +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} +``` + +This should allow you to more heavily customize the behavior. + +Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. + +Additionally, you can change the DPI/CPI or speed of the krackball by calling `pmw_set_cpi` at any time. Additionally, there is a `DPI_CONFIG` macro that will cycle through an array of options for the DPI. This is set to 1200, 1600, and 2400, but can be changed. 1600 is also set to the default. + +To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIONS` to set the array, and `PLOOPY_DPI_DEFAULT`. + +```c +#define PLOOPY_DPI_OPTIONS { 1200, 1600, 2400 } +#define PLOOPY_DPI_DEFAULT 1 +``` +The `PLOOPY_DPI_OPTIONS` array sets the values that you want to be able to cycle through, and the order they are in. The "default" define lets the firmware know which of these options is the default and should be loaded by default. + +The `DPI_CONFIG` macro will cycle through the values in the array, each time you hit it. And it stores this value in persistent memory, so it will load it the next time the device powers up. + + +# Programming QMK-DFU onto the PloopyCo Mouse + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | diff --git a/qmk/keyboards/ploopyco/mouse/rules.mk b/qmk/keyboards/ploopyco/mouse/rules.mk new file mode 100644 index 00000000..db72641d --- /dev/null +++ b/qmk/keyboards/ploopyco/mouse/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +POINTING_DEVICE_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys + +QUANTUM_LIB_SRC += analog.c spi_master.c +SRC += pmw3360.c opt_encoder.c diff --git a/qmk/keyboards/ploopyco/opt_encoder.c b/qmk/keyboards/ploopyco/opt_encoder.c new file mode 100644 index 00000000..44bcd5eb --- /dev/null +++ b/qmk/keyboards/ploopyco/opt_encoder.c @@ -0,0 +1,211 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2020 Ploopy Corporation + * + * 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 "opt_encoder.h" + +/* Setup function for the scroll wheel. Initializes + the relevant variables. */ +void opt_encoder_init(void) { + state = HIHI; + lohif = false; + hilof = false; + lowA = 1023; + highA = 0; + cLowA = false; + cHighA = false; + lowIndexA = 0; + highIndexA = 0; + lowOverflowA = false; + highOverflowA = false; + lowB = 1023; + highB = 0; + cLowB = false; + cHighB = false; + lowIndexB = 0; + highIndexB = 0; + lowOverflowB = false; + highOverflowB = false; + scrollThresholdA = 0; + scrollThresholdB = 0; +} + +int opt_encoder_handler(int curA, int curB) { + if (lowOverflowA == false || highOverflowA == false) calculateThresholdA(curA); + if (lowOverflowB == false || highOverflowB == false) calculateThresholdB(curB); + + bool LO = false; + bool HI = true; + bool sA, sB; + int ret = 0; + + if (curA < scrollThresholdA) + sA = LO; + else + sA = HI; + + if (curB < scrollThresholdB) + sB = LO; + else + sB = HI; + + if (state == HIHI) { + if (sA == LO && sB == HI) { + state = LOHI; + if (hilof) { + ret = 1; + hilof = false; + } + } else if (sA == HI && sB == LO) { + state = HILO; + if (lohif) { + ret = -1; + lohif = false; + } + } + } + + else if (state == HILO) { + if (sA == HI && sB == HI) { + state = HIHI; + hilof = true; + lohif = false; + } else if (sA == LO && sB == LO) { + state = LOLO; + hilof = true; + lohif = false; + } + } + + else if (state == LOLO) { + if (sA == HI && sB == LO) { + state = HILO; + if (lohif) { + ret = 1; + lohif = false; + } + } else if (sA == LO && sB == HI) { + state = LOHI; + if (hilof) { + ret = -1; + hilof = false; + } + } + } + + else { // state must be LOHI + if (sA == HI && sB == HI) { + state = HIHI; + lohif = true; + hilof = false; + } else if (sA == LO && sB == LO) { + state = LOLO; + lohif = true; + hilof = false; + } + } + + return ret; +} + +void calculateThresholdA(int curA) { scrollThresholdA = calculateThreshold(curA, &lowA, &highA, &cLowA, &cHighA, arLowA, arHighA, &lowIndexA, &highIndexA, &lowOverflowA, &highOverflowA); } + +void calculateThresholdB(int curB) { scrollThresholdB = calculateThreshold(curB, &lowB, &highB, &cLowB, &cHighB, arLowB, arHighB, &lowIndexB, &highIndexB, &lowOverflowB, &highOverflowB); } + +int calculateThreshold(int cur, int* low, int* high, bool* cLow, bool* cHigh, int arLow[], int arHigh[], int* lowIndex, int* highIndex, bool* lowOverflow, bool* highOverflow) { + if (cur < *low) *low = cur; + if (cur > *high) *high = cur; + + int curThresh = thresholdEquation(*low, *high); + int range = *high - *low; + + // The range is enforced to be over a certain limit because noise + // can cause erroneous readings, making these calculations unstable. + if (range >= SCROLL_THRESH_RANGE_LIM) { + if (cur < curThresh) { + if (*cHigh == true) { + // We were just high, and now we crossed to low. + // high reflects a sample of a high reading. + arHigh[*highIndex] = *high; + incrementIndex(highIndex, highOverflow); + int midpoint = ((*high - *low) / 2) + *low; + *low = midpoint; + *high = midpoint; + *cLow = false; + *cHigh = false; + } else { + *cLow = true; + } + } + if (cur > curThresh) { + if (*cLow == true) { + // We were just low, and now we crossed to high. + // low reflects a sample of a low reading. + arLow[*lowIndex] = *low; + incrementIndex(lowIndex, lowOverflow); + int midpoint = ((*high - *low) / 2) + *low; + *low = midpoint; + *high = midpoint; + *cLow = false; + *cHigh = false; + } else { + *cHigh = true; + } + } + } + + int calcHigh = 0; + if (*highOverflow == true) { + for (int i = 0; i < SCROLLER_AR_SIZE; i++) { + calcHigh += arHigh[i]; + } + calcHigh = calcHigh / SCROLLER_AR_SIZE; + } else if (*highIndex != 0) { + for (int i = 0; i < *highIndex; i++) { + calcHigh += arHigh[i]; + } + calcHigh = calcHigh / *highIndex; + } else { + calcHigh = *high; + } + + int calcLow = 0; + if (*lowOverflow == true) { + for (int i = 0; i < SCROLLER_AR_SIZE; i++) { + calcLow += arLow[i]; + } + calcLow = calcLow / SCROLLER_AR_SIZE; + } else if (*lowIndex != 0) { + for (int i = 0; i < *lowIndex; i++) { + calcLow += arLow[i]; + } + calcLow = calcLow / *lowIndex; + } else { + calcLow = *low; + } + + return thresholdEquation(calcLow, calcHigh); +} + +int thresholdEquation(int lo, int hi) { return ((hi - lo) / 3) + lo; } + +void incrementIndex(int* index, bool* ovflw) { + if (*index < SCROLLER_AR_SIZE - 1) + (*index)++; + else { + *index = 0; + *ovflw = true; + } +} diff --git a/qmk/keyboards/ploopyco/opt_encoder.h b/qmk/keyboards/ploopyco/opt_encoder.h new file mode 100644 index 00000000..23a170d5 --- /dev/null +++ b/qmk/keyboards/ploopyco/opt_encoder.h @@ -0,0 +1,66 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ +#pragma once + +#include + +#ifndef SCROLLER_AR_SIZE +# define SCROLLER_AR_SIZE 31 +#endif + +#ifndef SCROLL_THRESH_RANGE_LIM +# define SCROLL_THRESH_RANGE_LIM 10 +#endif + +enum State { HIHI, HILO, LOLO, LOHI }; + +enum State state; + +/* Variables used for scroll wheel functionality. */ +bool lohif; +bool hilof; +int lowA; +int highA; +bool cLowA; +bool cHighA; +int lowIndexA; +int highIndexA; +bool lowOverflowA; +bool highOverflowA; +int lowB; +int highB; +bool cLowB; +bool cHighB; +int lowIndexB; +int highIndexB; +bool lowOverflowB; +bool highOverflowB; +int scrollThresholdA; +int scrollThresholdB; +int arLowA[SCROLLER_AR_SIZE]; +int arHighA[SCROLLER_AR_SIZE]; +int arLowB[SCROLLER_AR_SIZE]; +int arHighB[SCROLLER_AR_SIZE]; + +void calculateThresholdA(int curA); +void calculateThresholdB(int curB); +int calculateThreshold(int cur, int* low, int* high, bool* cLow, bool* cHigh, int arLow[], int arHigh[], int* lowIndex, int* highIndex, bool* lowOverflow, bool* highOverflow); +int thresholdEquation(int lo, int hi); +void incrementIndex(int* index, bool* ovflw); + +void opt_encoder_init(void); +int opt_encoder_handler(int curA, int curB); diff --git a/qmk/keyboards/ploopyco/pmw3360.c b/qmk/keyboards/ploopyco/pmw3360.c new file mode 100644 index 00000000..1bd03e8b --- /dev/null +++ b/qmk/keyboards/ploopyco/pmw3360.c @@ -0,0 +1,225 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 "pmw3360.h" +#include "pmw3360_firmware.h" + +#ifdef CONSOLE_ENABLE +# include "print.h" +#endif +bool _inBurst = false; + +#ifndef PMW_CPI +# define PMW_CPI 1600 +#endif +#ifndef SPI_DIVISOR +# define SPI_DIVISOR 2 +#endif +#ifndef ROTATIONAL_TRANSFORM_ANGLE +# define ROTATIONAL_TRANSFORM_ANGLE 0x00 +#endif + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } +#endif + + +bool spi_start_adv(void) { + bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); + wait_us(1); + return status; +} + +void spi_stop_adv(void) { + wait_us(1); + spi_stop(); +} + +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { + if (reg_addr != REG_Motion_Burst) { + _inBurst = false; + } + + spi_start_adv(); + // send address of the register, with MSBit = 1 to indicate it's a write + spi_status_t status = spi_write(reg_addr | 0x80); + status = spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + spi_stop(); + return status; +} + +uint8_t spi_read_adv(uint8_t reg_addr) { + spi_start_adv(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f); + + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + spi_stop(); + return data; +} + +void pmw_set_cpi(uint16_t cpi) { + int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 + + spi_start_adv(); + spi_write_adv(REG_Config1, cpival); + spi_stop(); +} + +bool pmw_spi_init(void) { + spi_init(); + _inBurst = false; + + spi_stop(); + spi_start_adv(); + spi_stop(); + + spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first + wait_ms(300); + + spi_start_adv(); + wait_us(40); + spi_stop_adv(); + wait_us(40); + + spi_write_adv(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + + spi_read_adv(REG_Motion); + spi_read_adv(REG_Delta_X_L); + spi_read_adv(REG_Delta_X_H); + spi_read_adv(REG_Delta_Y_L); + spi_read_adv(REG_Delta_Y_H); + + pmw_upload_firmware(); + + spi_stop_adv(); + + wait_ms(10); + pmw_set_cpi(PMW_CPI); + + wait_ms(1); + + return pmw_check_signature(); +} + +void pmw_upload_firmware(void) { + spi_write_adv(REG_Config2, 0x00); + + spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); + + spi_write_adv(REG_SROM_Enable, 0x1d); + + wait_ms(10); + + spi_write_adv(REG_SROM_Enable, 0x18); + + spi_start_adv(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + + unsigned char c; + for (int i = 0; i < firmware_length; i++) { + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + wait_us(200); + + spi_read_adv(REG_SROM_ID); + + spi_write_adv(REG_Config2, 0x00); + + spi_stop(); + wait_ms(10); +} + +bool pmw_check_signature(void) { + uint8_t pid = spi_read_adv(REG_Product_ID); + uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); + uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); + return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 +} + +report_pmw_t pmw_read_burst(void) { + if (!_inBurst) { +#ifdef CONSOLE_ENABLE + dprintf("burst on"); +#endif + spi_write_adv(REG_Motion_Burst, 0x00); + _inBurst = true; + } + + spi_start_adv(); + spi_write(REG_Motion_Burst); + wait_us(35); // waits for tSRAD + + report_pmw_t data; + data.motion = 0; + data.dx = 0; + data.mdx = 0; + data.dy = 0; + data.mdx = 0; + + data.motion = spi_read(); + spi_write(0x00); // skip Observation + data.dx = spi_read(); + data.mdx = spi_read(); + data.dy = spi_read(); + data.mdy = spi_read(); + + spi_stop(); + +#ifdef CONSOLE_ENABLE + print_byte(data.motion); + print_byte(data.dx); + print_byte(data.mdx); + print_byte(data.dy); + print_byte(data.mdy); + dprintf("\n"); +#endif + + data.isMotion = (data.motion & 0x80) != 0; + data.isOnSurface = (data.motion & 0x08) == 0; + data.dx |= (data.mdx << 8); + data.dx = data.dx * -1; + data.dy |= (data.mdy << 8); + // data.dy = data.dy * -1; + + spi_stop(); + + if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. + _inBurst = false; + } + + return data; +} diff --git a/qmk/keyboards/ploopyco/pmw3360.h b/qmk/keyboards/ploopyco/pmw3360.h new file mode 100644 index 00000000..c1d5e3ba --- /dev/null +++ b/qmk/keyboards/ploopyco/pmw3360.h @@ -0,0 +1,103 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "spi_master.h" + +// Registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Raw_Data_Sum 0x08 +#define REG_Maximum_Raw_data 0x09 +#define REG_Minimum_Raw_data 0x0A +#define REG_Shutter_Lower 0x0B +#define REG_Shutter_Upper 0x0C +#define REG_Control 0x0D +#define REG_Config1 0x0F +#define REG_Config2 0x10 +#define REG_Angle_Tune 0x11 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate_Lower 0x15 +#define REG_Rest1_Rate_Upper 0x16 +#define REG_Rest1_Downshift 0x17 +#define REG_Rest2_Rate_Lower 0x18 +#define REG_Rest2_Rate_Upper 0x19 +#define REG_Rest2_Downshift 0x1A +#define REG_Rest3_Rate_Lower 0x1B +#define REG_Rest3_Rate_Upper 0x1C +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_Raw_Data_Dump 0x29 +#define REG_SROM_ID 0x2A +#define REG_Min_SQ_Run 0x2B +#define REG_Raw_Data_Threshold 0x2C +#define REG_Config5 0x2F +#define REG_Power_Up_Reset 0x3A +#define REG_Shutdown 0x3B +#define REG_Inverse_Product_ID 0x3F +#define REG_LiftCutoff_Tune3 0x41 +#define REG_Angle_Snap 0x42 +#define REG_LiftCutoff_Tune1 0x4A +#define REG_Motion_Burst 0x50 +#define REG_LiftCutoff_Tune_Timeout 0x58 +#define REG_LiftCutoff_Tune_Min_Length 0x5A +#define REG_SROM_Load_Burst 0x62 +#define REG_Lift_Config 0x63 +#define REG_Raw_Data_Burst 0x64 +#define REG_LiftCutoff_Tune2 0x65 + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte); +#endif + +typedef struct { + int8_t motion; + bool isMotion; // True if a motion is detected. + bool isOnSurface; // True when a chip is on a surface + int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) + int8_t mdx; + int16_t dy; // displacement on y directions. + int8_t mdy; +} report_pmw_t; + + + +bool spi_start_adv(void); +void spi_stop_adv(void); +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); +uint8_t spi_read_adv(uint8_t reg_addr); +bool pmw_spi_init(void); +void pmw_set_cpi(uint16_t cpi); +void pmw_upload_firmware(void); +bool pmw_check_signature(void); +report_pmw_t pmw_read_burst(void); + + +#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) +#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) +#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/qmk/keyboards/ploopyco/pmw3360_firmware.h b/qmk/keyboards/ploopyco/pmw3360_firmware.h new file mode 100644 index 00000000..cca5a6a4 --- /dev/null +++ b/qmk/keyboards/ploopyco/pmw3360_firmware.h @@ -0,0 +1,300 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +// clang-format off +// Firmware Blob foor PMW3360 +const uint16_t firmware_length = 4094; +// clang-format off +const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 +0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, +0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, +0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, +0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, +0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, +0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, +0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, +0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, +0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, +0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, +0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, +0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, +0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, +0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, +0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, +0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, +0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, +0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, +0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, +0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, +0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, +0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, +0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, +0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, +0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, +0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, +0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, +0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, +0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, +0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, +0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, +0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, +0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, +0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, +0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, +0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, +0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, +0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, +0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, +0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, +0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, +0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, +0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, +0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, +0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, +0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, +0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, +0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, +0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, +0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, +0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, +0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, +0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, +0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, +0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, +0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, +0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, +0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, +0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, +0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, +0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, +0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, +0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, +0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, +0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, +0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, +0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, +0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, +0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, +0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, +0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, +0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, +0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, +0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, +0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, +0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, +0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, +0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, +0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, +0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, +0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, +0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, +0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, +0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, +0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, +0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, +0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, +0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, +0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, +0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, +0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, +0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, +0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, +0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, +0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, +0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, +0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, +0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, +0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, +0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, +0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, +0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, +0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, +0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, +0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, +0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, +0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, +0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, +0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, +0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, +0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, +0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, +0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, +0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, +0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, +0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, +0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, +0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, +0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, +0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, +0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, +0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, +0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, +0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, +0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, +0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, +0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, +0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, +0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, +0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, +0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, +0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, +0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, +0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, +0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, +0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, +0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, +0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, +0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, +0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, +0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, +0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, +0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, +0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, +0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, +0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, +0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, +0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, +0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, +0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, +0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, +0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, +0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, +0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, +0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, +0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, +0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, +0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, +0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, +0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, +0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, +0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, +0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, +0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, +0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, +0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, +0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, +0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, +0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, +0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, +0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, +0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, +0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, +0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, +0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, +0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, +0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, +0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, +0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, +0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, +0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, +0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, +0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, +0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, +0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, +0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, +0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, +0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, +0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, +0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, +0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, +0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, +0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, +0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, +0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, +0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, +0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, +0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, +0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, +0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, +0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, +0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, +0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, +0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, +0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, +0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, +0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, +0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, +0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, +0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, +0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, +0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, +0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, +0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, +0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, +0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, +0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, +0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, +0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, +0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, +0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, +0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, +0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, +0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, +0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, +0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, +0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, +0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, +0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, +0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, +0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, +0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, +0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, +0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, +0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, +0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, +0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, +0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, +0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, +0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, +0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, +0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, +0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, +0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, +0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, +0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, +0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, +0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, +0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, +0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, +0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, +0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, +0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, +0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, +0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, +0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, +0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, +0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, +0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, +0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, +0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, +0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, +0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, +0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, +0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, +0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, +0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, +0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, +0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, +0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, +0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, +0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, +0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; + +// clang-format off diff --git a/qmk/keyboards/ploopyco/trackball/config.h b/qmk/keyboards/ploopyco/trackball/config.h new file mode 100644 index 00000000..66189c33 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/config.h @@ -0,0 +1,60 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5043 +#define PRODUCT_ID 0x5442 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PloopyCo +#define PRODUCT Trackball + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high + a polling rate as possible. */ +#define USB_POLLING_INTERVAL_MS 1 +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 3 + +#define ROTATIONAL_TRANSFORM_ANGLE 20 + +// If board has a debug LED, you can enable it by defining this +// #define DEBUG_LED_PIN F7 diff --git a/qmk/keyboards/ploopyco/trackball/info.json b/qmk/keyboards/ploopyco/trackball/info.json new file mode 100644 index 00000000..c5e4527d --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "PloopyCo Trackball", + "url": "www.ploopy.co", + "maintainer": "drashna", + "manufacturer": "Ploopy Corporation", + "width": 8, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0, "h":2}, + {"x":1, "y":0.25, "h":1.5}, + {"x":2, "y":0, "h":2}, + {"x":3.5, "y":0, "h":2}, + {"x":4.5, "y":0, "h":2} + ] + } + } +} diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/default/keymap.c b/qmk/keyboards/ploopyco/trackball/keymaps/default/keymap.c new file mode 100644 index 00000000..40f70ab9 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + +// safe range starts at `PLOOPY_SAFE_RANGE` instead. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_BTN1, KC_BTN3, KC_BTN2, + KC_BTN4, KC_BTN5 + ), +}; diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/default/readme.md b/qmk/keyboards/ploopyco/trackball/keymaps/default/readme.md new file mode 100644 index 00000000..f965ef3c --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Ploopyco Trackball diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/drag_scroll/keymap.c b/qmk/keyboards/ploopyco/trackball/keymaps/drag_scroll/keymap.c new file mode 100644 index 00000000..7784bc85 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/drag_scroll/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + +// used for tracking the state +bool is_drag_scroll = false; + +enum custom_keycodes { + DRAG_SCROLL = PLOOPY_SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DRAG_SCROLL: + if (record->event.pressed) { + // this toggles the state each time you tap it + is_drag_scroll ^= 1; + } + break; + } + return true; +} + +// The real magic is here. +// This function is called to translate the processed sensor movement +// from the mouse sensor and translates it into x and y movement for +// the mouse report. Normally. So if "drag scroll" is toggled on, +// moving the ball scrolls instead. You could remove the x or y here +// to only scroll in one direction, if you wanted, as well. In fact, +// there is no reason that you need to send this to the mouse report. +// You could have it register a key, instead. +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + if (is_drag_scroll) { + mouse_report->h = x; + mouse_report->v = y; + } else { + mouse_report->x = x; + mouse_report->y = y; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_BTN1, KC_BTN3, KC_BTN2, + KC_BTN4, LT(1, KC_BTN5) + ), + [1] = LAYOUT( + DRAG_SCROLL, _______, _______, + _______, _______ + ) +}; diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/drag_scroll/readme.md b/qmk/keyboards/ploopyco/trackball/keymaps/drag_scroll/readme.md new file mode 100644 index 00000000..cafa11bf --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/drag_scroll/readme.md @@ -0,0 +1,3 @@ +# The Drag Scroll keymap for Ploopyco Trackball + +This is a sample keymap showing off what you can do with the custom callback drivers. diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/via/config.h b/qmk/keyboards/ploopyco/trackball/keymaps/via/config.h new file mode 100644 index 00000000..0ba4c7e0 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/via/keymap.c b/qmk/keyboards/ploopyco/trackball/keymaps/via/keymap.c new file mode 100644 index 00000000..31539be2 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/via/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN5 ), + [1] = LAYOUT( _______, _______, _______, _______, _______ ), + [2] = LAYOUT( _______, _______, _______, _______, _______ ), + [3] = LAYOUT( _______, _______, _______, _______, _______ ), + [4] = LAYOUT( _______, _______, _______, _______, _______ ), + [5] = LAYOUT( _______, _______, _______, _______, _______ ), + [6] = LAYOUT( _______, _______, _______, _______, _______ ), + [7] = LAYOUT( _______, _______, _______, _______, _______ ) +}; diff --git a/qmk/keyboards/ploopyco/trackball/keymaps/via/rules.mk b/qmk/keyboards/ploopyco/trackball/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/ploopyco/trackball/readme.md b/qmk/keyboards/ploopyco/trackball/readme.md new file mode 100644 index 00000000..a38fec21 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/readme.md @@ -0,0 +1,85 @@ +# Ploopyco Trackball + +![Ploopyco Trackball](https://i.redd.it/j7z0y83txps31.jpg) + +It's a DIY, QMK Powered Trackball!!!! + +Everything works. However the scroll wheel has some issues and acts very odd. + +* Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: ATMega32u4 8MHz(3.3v) +* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/trackball/rev1:default:flash + make ploopyco/trackball/rev1_005:default:flash + +To jump to the bootloader, hold down "Button 4" (immediate right of the trackball) + +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). + +## Revisions + +There are two main revisions for the PloopyCo Tracball, everything up to 1.004, and 1.005. + +In the 1.005 revision, button for was changed from pin B5 to B6, and the debug LED pin was changed from F7 to B5. + +The PCB should indicate which revision this is. + +# Customzing your PloopyCo Trackball + +While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. + +The default behavior for this is: + +```c +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} +``` + +This should allow you to more heavily customize the behavior. + +Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. + +Additionally, you can change the DPI/CPI or speed of the trackball by calling `pmw_set_cpi` at any time. Additionally, there is a `DPI_CONFIG` macro that will cycle through an array of options for the DPI. This is set to 1200, 1600, and 2400, but can be changed. 1600 is also set to the default. + +To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIONS` to set the array, and `PLOOPY_DPI_DEFAULT`. + +```c +#define PLOOPY_DPI_OPTIONS { 1200, 1600, 2400 } +#define PLOOPY_DPI_DEFAULT 1 +``` +The `PLOOPY_DPI_OPTIONS` array sets the values that you want to be able to cycle through, and the order they are in. The "default" define lets the firmware know which of these options is the default and should be loaded by default. + +The `DPI_CONFIG` macro will cycle through the values in the array, each time you hit it. And it stores this value in persistent memory, so it will load it the next time the device powers up. + +# Programming QMK-DFU onto the PloopyCo Trackball + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | diff --git a/qmk/keyboards/ploopyco/trackball/rev1/config.h b/qmk/keyboards/ploopyco/trackball/rev1/config.h new file mode 100644 index 00000000..2908f096 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/rev1/config.h @@ -0,0 +1,42 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define DIRECT_PINS \ + { \ + { D4, D2, E6, B5, D7 } \ + } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS \ + { D1, D3, B4, B6, B7, D6, C7, F6, F5, F3, F7 } + +// If board has a debug LED, you can enable it by defining this +#define DEBUG_LED_PIN F7 diff --git a/qmk/keyboards/ploopyco/trackball/rev1/rev1.h b/qmk/keyboards/ploopyco/trackball/rev1/rev1.h new file mode 100644 index 00000000..a82c20a1 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/rev1/rev1.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "trackball.h" diff --git a/qmk/keyboards/ploopyco/trackball/rev1/rules.mk b/qmk/keyboards/ploopyco/trackball/rev1/rules.mk new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/ploopyco/trackball/rev1_005/config.h b/qmk/keyboards/ploopyco/trackball/rev1_005/config.h new file mode 100644 index 00000000..83e70181 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/rev1_005/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define DIRECT_PINS \ + { \ + { D4, D2, E6, B6, D7 } \ + } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS \ + { D1, D3, B4, B7, D6, C7, F6, F5, F3, F7 } + +// If board has a debug LED, you can enable it by defining this +#define RGB_DI_PIN B5 +#define RGBLED_NUM 3 +#define RGBLIGHT_LIMIT_VAL 40 +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/qmk/keyboards/ploopyco/trackball/rev1_005/rev1_005.h b/qmk/keyboards/ploopyco/trackball/rev1_005/rev1_005.h new file mode 100644 index 00000000..a82c20a1 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/rev1_005/rev1_005.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "trackball.h" diff --git a/qmk/keyboards/ploopyco/trackball/rev1_005/rules.mk b/qmk/keyboards/ploopyco/trackball/rev1_005/rules.mk new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/ploopyco/trackball/rules.mk b/qmk/keyboards/ploopyco/trackball/rules.mk new file mode 100644 index 00000000..9e252fbd --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +POINTING_DEVICE_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys + +QUANTUM_LIB_SRC += analog.c spi_master.c +SRC += pmw3360.c opt_encoder.c + +DEFAULT_FOLDER = ploopyco/trackball/rev1_005 diff --git a/qmk/keyboards/ploopyco/trackball/trackball.c b/qmk/keyboards/ploopyco/trackball/trackball.c new file mode 100644 index 00000000..7b7b6802 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/trackball.c @@ -0,0 +1,283 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 "trackball.h" + +#ifndef OPT_DEBOUNCE +# define OPT_DEBOUNCE 5 // (ms) Time between scroll events +#endif +#ifndef SCROLL_BUTT_DEBOUNCE +# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events +#endif +#ifndef OPT_THRES +# define OPT_THRES 150 // (0-1024) Threshold for actication +#endif +#ifndef OPT_SCALE +# define OPT_SCALE 1 // Multiplier for wheel +#endif +#ifndef PLOOPY_DPI_OPTIONS +# define PLOOPY_DPI_OPTIONS { 1200, 1600, 2400 } +# ifndef PLOOPY_DPI_DEFAULT +# define PLOOPY_DPI_DEFAULT 1 +# endif +#endif +#ifndef PLOOPY_DPI_DEFAULT +# define PLOOPY_DPI_DEFAULT 0 +#endif + +keyboard_config_t keyboard_config; +uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; +#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) + +// TODO: Implement libinput profiles +// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html +// Compile time accel selection +// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC + +// Trackball State +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +uint16_t lastScroll = 0; // Previous confirmed wheel event +uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed +uint8_t OptLowPin = OPT_ENC1; +bool debug_encoder = false; + +__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { + // TODO: Replace this with interrupt driven code, polling is S L O W + // Lovingly ripped from the Ploopy Source + + // If the mouse wheel was just released, do not scroll. + if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) { + return; + } + + // Limit the number of scrolls per unit time. + if (timer_elapsed(lastScroll) < OPT_DEBOUNCE) { + return; + } + + // Don't scroll if the middle button is depressed. + if (is_scroll_clicked) { +#ifndef IGNORE_SCROLL_CLICK + return; +#endif + } + + lastScroll = timer_read(); + uint16_t p1 = adc_read(OPT_ENC1_MUX); + uint16_t p2 = adc_read(OPT_ENC2_MUX); + if (debug_encoder) dprintf("OPT1: %d, OPT2: %d\n", p1, p2); + + uint8_t dir = opt_encoder_handler(p1, p2); + + if (dir == 0) return; + process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); +} + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { + dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); + } + if (debug_mouse) { + dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); + } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + // apply multiplier + // data.dx *= mouse_multiplier; + // data.dy *= mouse_multiplier; + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + process_mouse_user(mouse_report, data.dx, data.dy); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (true) { + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + } + + // Update Timer to prevent accidental scrolls + if ((record->event.key.col == 1) && (record->event.key.row == 0)) { + lastMidClick = timer_read(); + is_scroll_clicked = record->event.pressed; + } + + if (!process_record_user(keycode, record)) { return false; } + + if (keycode == DPI_CONFIG && record->event.pressed) { + keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; + eeconfig_update_kb(keyboard_config.raw); + pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + } + +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + if (keycode == KC_MS_BTN1) + currentReport.buttons |= MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons |= MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons |= MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons |= MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons |= MOUSE_BTN5; + } else { + if (keycode == KC_MS_BTN1) + currentReport.buttons &= ~MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons &= ~MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons &= ~MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons &= ~MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons &= ~MOUSE_BTN5; + } + pointing_device_set_report(currentReport); + pointing_device_send(); + } +#endif + + return true; +} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + setPinInput(OPT_ENC1); + setPinInput(OPT_ENC2); + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ +#ifdef UNUSED_PINS + const pin_t unused_pins[] = UNUSED_PINS; + + for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + setPinOutput(unused_pins[i]); + writePinLow(unused_pins[i]); + } +#endif + + // This is the debug LED. +#if defined(DEBUG_LED_PIN) + setPinOutput(DEBUG_LED_PIN); + writePin(DEBUG_LED_PIN, debug_enable); +#endif + + keyboard_pre_init_user(); +} + +void pointing_device_init(void) { + // initialize ball sensor + pmw_spi_init(); + // initialize the scroll wheel's optical encoder + opt_encoder_init(); +} + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + process_wheel(&mouse_report); + process_mouse(&mouse_report); + + pointing_device_set_report(mouse_report); + if (has_report_changed(mouse_report, pointing_device_get_report())) { + pointing_device_send(); + } +} + +void eeconfig_init_kb(void) { + keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; + eeconfig_update_kb(keyboard_config.raw); +} + +void matrix_init_kb(void) { + // is safe to just read DPI setting since matrix init + // comes before pointing device init. + keyboard_config.raw = eeconfig_read_kb(); + if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { + eeconfig_init_kb(); + } + matrix_init_user(); +} + +void keyboard_post_init_kb(void) { + pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + + keyboard_post_init_user(); +} diff --git a/qmk/keyboards/ploopyco/trackball/trackball.h b/qmk/keyboards/ploopyco/trackball/trackball.h new file mode 100644 index 00000000..c58be6c8 --- /dev/null +++ b/qmk/keyboards/ploopyco/trackball/trackball.h @@ -0,0 +1,59 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "spi_master.h" +#include "pmw3360.h" +#include "analog.h" +#include "opt_encoder.h" +#include "pointing_device.h" +#if defined(KEYBOARD_ploopyco_trackball_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_ploopyco_trackball_rev1_005) +# include "rev1_005.h" +#endif + +// Sensor defs +#define OPT_ENC1 F0 +#define OPT_ENC2 F4 +#define OPT_ENC1_MUX 0 +#define OPT_ENC2_MUX 4 + +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); +void process_wheel(report_mouse_t* mouse_report); +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); + +#define LAYOUT(BL, BM, BR, BF, BB) \ + { {BL, BM, BR, BF, BB}, } + +typedef union { + uint32_t raw; + struct { + uint8_t dpi_config; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; + +enum ploopy_keycodes { + DPI_CONFIG = SAFE_RANGE, + PLOOPY_SAFE_RANGE, +}; diff --git a/qmk/keyboards/polilla/chconf.h b/qmk/keyboards/polilla/chconf.h new file mode 100644 index 00000000..9d569170 --- /dev/null +++ b/qmk/keyboards/polilla/chconf.h @@ -0,0 +1,711 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/polilla/halconf.h b/qmk/keyboards/polilla/halconf.h new file mode 100644 index 00000000..f95565b9 --- /dev/null +++ b/qmk/keyboards/polilla/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT FALSE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION FALSE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/polilla/info.json b/qmk/keyboards/polilla/info.json new file mode 100644 index 00000000..9299e19a --- /dev/null +++ b/qmk/keyboards/polilla/info.json @@ -0,0 +1,315 @@ +{ + "keyboard_name": "Polilla", + "url": "", + "maintainer": "elagil", + "width": 16, + "height": 5.375, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "0,0", + "x": 0.5, + "y": 0.5 + }, + { + "label": "0,1", + "x": 1.5, + "y": 0.5 + }, + { + "label": "0,2", + "x": 2.5, + "y": 0.375 + }, + { + "label": "0,3", + "x": 3.5, + "y": 0.25 + }, + { + "label": "0,4", + "x": 4.5, + "y": 0.25 + }, + { + "label": "0,5", + "x": 5.5, + "y": 0.25 + }, + { + "label": "0,6", + "x": 10, + "y": 0.25 + }, + { + "label": "0,7", + "x": 11, + "y": 0.25 + }, + { + "label": "0,8", + "x": 12, + "y": 0.25 + }, + { + "label": "0,9", + "x": 13, + "y": 0.375 + }, + { + "label": "0,10", + "x": 14, + "y": 0.5 + }, + { + "label": "0,11", + "x": 15, + "y": 0.5 + }, + { + "label": "1,0", + "x": 0.5, + "y": 1.5 + }, + { + "label": "1,1", + "x": 1.5, + "y": 1.5 + }, + { + "label": "1,2", + "x": 2.5, + "y": 1.375 + }, + { + "label": "1,3", + "x": 3.5, + "y": 1.25 + }, + { + "label": "1,4", + "x": 4.5, + "y": 1.25 + }, + { + "label": "1,5", + "x": 5.5, + "y": 1.25 + }, + { + "label": "1,6", + "x": 10, + "y": 1.25 + }, + { + "label": "1,7", + "x": 11, + "y": 1.25 + }, + { + "label": "1,8", + "x": 12, + "y": 1.25 + }, + { + "label": "1,9", + "x": 13, + "y": 1.375 + }, + { + "label": "1,10", + "x": 14, + "y": 1.5 + }, + { + "label": "1,11", + "x": 15, + "y": 1.5 + }, + { + "label": "2,0", + "x": 0.5, + "y": 2.5 + }, + { + "label": "2,1", + "x": 1.5, + "y": 2.5 + }, + { + "label": "2,2", + "x": 2.5, + "y": 2.375 + }, + { + "label": "2,3", + "x": 3.5, + "y": 2.25 + }, + { + "label": "2,4", + "x": 4.5, + "y": 2.25 + }, + { + "label": "2,5", + "x": 5.5, + "y": 2.25 + }, + { + "label": "2,6", + "x": 10, + "y": 2.25 + }, + { + "label": "2,7", + "x": 11, + "y": 2.25 + }, + { + "label": "2,8", + "x": 12, + "y": 2.25 + }, + { + "label": "2,9", + "x": 13, + "y": 2.375 + }, + { + "label": "2,10", + "x": 14, + "y": 2.5 + }, + { + "label": "2,11", + "x": 15, + "y": 2.5 + }, + { + "label": "3,0", + "x": 0.5, + "y": 3.5 + }, + { + "label": "3,1", + "x": 1.5, + "y": 3.5 + }, + { + "label": "3,2", + "x": 2.5, + "y": 3.375 + }, + { + "label": "3,3", + "x": 3.5, + "y": 3.25 + }, + { + "label": "3,4", + "x": 4.5, + "y": 3.25 + }, + { + "label": "3,5", + "x": 5.5, + "y": 3.25 + }, + { + "label": "3,6", + "x": 10, + "y": 3.25 + }, + { + "label": "3,7", + "x": 11, + "y": 3.25 + }, + { + "label": "3,8", + "x": 12, + "y": 3.25 + }, + { + "label": "3,9", + "x": 13, + "y": 3.375 + }, + { + "label": "3,10", + "x": 14, + "y": 3.5 + }, + { + "label": "3,11", + "x": 15, + "y": 3.5 + }, + { + "label": "4,0", + "x": 2.5, + "y": 4.375 + }, + { + "label": "4,1", + "x": 3.5, + "y": 4.25 + }, + { + "label": "4,2", + "x": 4.5, + "y": 4.25 + }, + { + "label": "4,3", + "x": 5.5, + "y": 4.25 + }, + { + "label": "4,4", + "x": 6.5, + "y": 4, + "h": 1.5 + }, + { + "label": "4,5", + "x": 6.5, + "y": 3 + }, + { + "label": "4,6", + "x": 9, + "y": 3 + }, + { + "label": "4,7", + "x": 9, + "y": 4, + "h": 1.5 + }, + { + "label": "4,8", + "x": 10, + "y": 4.25 + }, + { + "label": "4,9", + "x": 11, + "y": 4.25 + }, + { + "label": "4,10", + "x": 12, + "y": 4.25 + }, + { + "label": "4,11", + "x": 13, + "y": 4.375 + } + ] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/polilla/mcuconf.h b/qmk/keyboards/polilla/mcuconf.h new file mode 100644 index 00000000..924ccb9e --- /dev/null +++ b/qmk/keyboards/polilla/mcuconf.h @@ -0,0 +1,187 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_MCOPRE STM32_MCOPRE_DIV1 +#define STM32_PLLNODIV STM32_PLLNODIV_DIV2 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI16_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI17_20_IRQ_PRIORITY 3 +#define STM32_IRQ_EXTI21_22_IRQ_PRIORITY 3 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_CKMODE STM32_ADC_CKMODE_ADCCLK +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI1 FALSE +#define STM32_I2S_SPI1_MODE (STM32_I2S_MODE_MASTER | \ + STM32_I2S_MODE_RX) +#define STM32_I2S_SPI1_IRQ_PRIORITY 2 +#define STM32_I2S_SPI1_DMA_PRIORITY 1 +#define STM32_I2S_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2S_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* MCUCONF_H */ diff --git a/qmk/keyboards/polilla/polilla.c b/qmk/keyboards/polilla/polilla.c new file mode 100644 index 00000000..b8bfba2d --- /dev/null +++ b/qmk/keyboards/polilla/polilla.c @@ -0,0 +1,17 @@ +/* Copyright 2020 elagil + * + * 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 "polilla.h" \ No newline at end of file diff --git a/qmk/keyboards/polilla/polilla.h b/qmk/keyboards/polilla/polilla.h new file mode 100644 index 00000000..39a706ee --- /dev/null +++ b/qmk/keyboards/polilla/polilla.h @@ -0,0 +1,42 @@ +/* Copyright 2020 elagil + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix.k + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L41, L42, L43, L44, L45, R41, R42, R43, R44, R45 \ +) { \ + { L00, L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, R06 },\ + { L10, L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, R16 },\ + { L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26 },\ + { L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36 },\ + { L41, L42, L43, L44, L45, L36, R30, R41, R42, R43, R44, R45 },\ +} diff --git a/qmk/keyboards/polilla/readme.md b/qmk/keyboards/polilla/readme.md new file mode 100644 index 00000000..8da942eb --- /dev/null +++ b/qmk/keyboards/polilla/readme.md @@ -0,0 +1,16 @@ +# Polilla (the moth) + +The Polilla is a split ortholinear keyboard with 60 keys in a 6x4 layout + 6 thumb keys (per side). + +* Keyboard Maintainer: [elagil](https://github.com/elagil) +* Hardware Supported: [polilla](https://github.com/elagil/polilla) + +Make example for this keyboard (after setting up your build environment): + + make polilla/rev1:default + +For compiling a via-compatible keymap, use: + + make polilla/rev1:via + +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). diff --git a/qmk/keyboards/polilla/rev1/config.h b/qmk/keyboards/polilla/rev1/config.h new file mode 100644 index 00000000..66658844 --- /dev/null +++ b/qmk/keyboards/polilla/rev1/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2020 elagil + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6166 // af +#define PRODUCT_ID 0x0010 +#define DEVICE_VER 0x0001 +#define MANUFACTURER elagil +#define PRODUCT Polilla + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B1, B0, A7, F1, A0 } +#define MATRIX_COL_PINS { A6, A5, A4, A3, A2, A1, F0, B7, B6, B5, B4, B3 } + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/polilla/rev1/keymaps/default/keymap.c b/qmk/keyboards/polilla/rev1/keymaps/default/keymap.c new file mode 100644 index 00000000..de0385e7 --- /dev/null +++ b/qmk/keyboards/polilla/rev1/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2020 elagil + * + * 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 + +enum layers { + BASE, + _F1, + _F2 +}; + +#define ALT_BSL MT(MOD_RALT, KC_BSLS) + +#define PRE_WRD LCTL(KC_LEFT) // jump to next word +#define NXT_WRD LCTL(KC_RGHT) // jump to previous word + +#define NXT_WDL LCTL(KC_DEL) // delete next word +#define PRE_WDL LCTL(KC_BSPC) // delete previous word + +#define MF1 MO(_F1) // F1 layer access +#define MF2 MO(_F2) // F2 layer access + +/* + * This default keymap is aimed at users of the US or US international layout + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE + * ,-----------------------------------------. ,-----------------------------------------. + * | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | A | S | D | F | G | | H | J | K | L | ;: | '" | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | Esc | | Ent | N | M | ,< | .> | /? | Sft | + * `------------------------------------------------' `------------------------------------------------' + * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | RWIN | Caps | + * `----------------------------------' `----------------------------------' + */ + [BASE] = LAYOUT( /* qwerty */ + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LBRC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GESC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_LGUI, MF1, KC_BSPC, KC_LCTL, ALT_BSL, KC_SPC, MF2, KC_RWIN, KC_CAPS + ), + + /* F2 + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | Volu | | | | |PRE W | UP |NXT W | PGUP | F12| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | | Prev | Play | Next | | | HOME | LEFT | DOWN |RIGHT | END | | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | | | | Vold | | | | | | |DEL PW| Ins |DEL NW| PGDN | | + * `------------------------------------------------' `------------------------------------------------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_F2] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, KC_PGUP, KC_F12, + KC_DEL, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, + _______, XXXXXXX, XXXXXXX, KC_VOLD, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* F1 + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGUP |PRE W | UP |NXT W | | | | 7 | 8 | 9 | | F12| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | HOME | LEFT | DOWN |RIGHT | END | | + | 4 | 5 | 6 | - | | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | | PGDN |DEL PW| Ins |DEL NW| | | | NEnt | * | 1 | 2 | 3 | / | | + * `------------------------------------------------' `------------------------------------------------' + * | | | | | | | | 0 | | | NLck | + * `----------------------------------' `----------------------------------' + */ + [_F1] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + XXXXXXX, KC_PGUP, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, KC_F12, + KC_DEL, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, + _______, KC_PGDN, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, _______, KC_PENT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + _______, _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_NLCK + ) +}; diff --git a/qmk/keyboards/polilla/rev1/keymaps/via/keymap.c b/qmk/keyboards/polilla/rev1/keymaps/via/keymap.c new file mode 100644 index 00000000..8f4558b3 --- /dev/null +++ b/qmk/keyboards/polilla/rev1/keymaps/via/keymap.c @@ -0,0 +1,124 @@ +/* Copyright 2020 elagil + * + * 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 + +enum layers { + BASE, + _F1, + _F2, + _F3 +}; + +#define ALT_BSL MT(MOD_RALT, KC_BSLS) + +#define PRE_WRD LCTL(KC_LEFT) // jump to next word +#define NXT_WRD LCTL(KC_RGHT) // jump to previous word + +#define NXT_WDL LCTL(KC_DEL) // delete next word +#define PRE_WDL LCTL(KC_BSPC) // delete previous word + +#define MF1 MO(_F1) // F1 layer access +#define MF2 MO(_F2) // F2 layer access + +/* + * This default keymap is aimed at users of the US or US international layout + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE + * ,-----------------------------------------. ,-----------------------------------------. + * | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | A | S | D | F | G | | H | J | K | L | ;: | '" | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | Esc | | Ent | N | M | ,< | .> | /? | Sft | + * `------------------------------------------------' `------------------------------------------------' + * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | RWIN | Caps | + * `----------------------------------' `----------------------------------' + */ + [BASE] = LAYOUT( /* qwerty */ + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LBRC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GESC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_LGUI, MF1, KC_BSPC, KC_LCTL, ALT_BSL, KC_SPC, MF2, KC_RWIN, KC_CAPS + ), + + /* F2 + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | Volu | | | | |PRE W | UP |NXT W | PGUP | F12| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | | Prev | Play | Next | | | HOME | LEFT | DOWN |RIGHT | END | | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | | | | Vold | | | | | | |DEL PW| Ins |DEL NW| PGDN | | + * `------------------------------------------------' `------------------------------------------------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_F2] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, KC_PGUP, KC_F12, + KC_DEL, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, + _______, XXXXXXX, XXXXXXX, KC_VOLD, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* F1 + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGUP |PRE W | UP |NXT W | | | | 7 | 8 | 9 | | F12| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | HOME | LEFT | DOWN |RIGHT | END | | + | 4 | 5 | 6 | - | | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | | PGDN |DEL PW| Ins |DEL NW| | | | NEnt | * | 1 | 2 | 3 | / | | + * `------------------------------------------------' `------------------------------------------------' + * | | | | | | | | 0 | | | NLck | + * `----------------------------------' `----------------------------------' + */ + [_F1] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + XXXXXXX, KC_PGUP, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, KC_F12, + KC_DEL, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, + _______, KC_PGDN, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, _______, KC_PENT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + _______, _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_NLCK + ), + + /* F3 + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_F3] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/qmk/keyboards/polilla/rev1/keymaps/via/rules.mk b/qmk/keyboards/polilla/rev1/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/polilla/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/polilla/rev1/rules.mk b/qmk/keyboards/polilla/rev1/rules.mk new file mode 100644 index 00000000..f755f9d1 --- /dev/null +++ b/qmk/keyboards/polilla/rev1/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F042 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/polilla/rules.mk b/qmk/keyboards/polilla/rules.mk new file mode 100644 index 00000000..0d72c40b --- /dev/null +++ b/qmk/keyboards/polilla/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = polilla/rev1 \ No newline at end of file diff --git a/qmk/keyboards/preonic/keymaps/codecoffeecode/keymap.c b/qmk/keyboards/preonic/keymaps/codecoffeecode/keymap.c new file mode 100644 index 00000000..9264927e --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 codecoffeecode + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Main Layer + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = LAYOUT_preonic_1x2uC( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | - | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[1] = LAYOUT_preonic_1x2uC( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[2] = LAYOUT_preonic_1x2uC( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +)}; diff --git a/qmk/keyboards/preonic/keymaps/codecoffeecode/readme.md b/qmk/keyboards/preonic/keymaps/codecoffeecode/readme.md new file mode 100644 index 00000000..9ec7e954 --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/codecoffeecode/readme.md @@ -0,0 +1 @@ +# This layout is largely based on codecoffeecode's niu_mini layout \ No newline at end of file diff --git a/qmk/keyboards/preonic/keymaps/default/keymap.c b/qmk/keyboards/preonic/keymaps/default/keymap.c index d8bb2d5f..7ee985ea 100644 --- a/qmk/keyboards/preonic/keymaps/default/keymap.c +++ b/qmk/keyboards/preonic/keymaps/default/keymap.c @@ -50,12 +50,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_preonic_grid( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -71,12 +71,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT_preonic_grid( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +[_COLEMAK] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Dvorak @@ -92,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT_preonic_grid( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +[_DVORAK] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -113,12 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_preonic_grid( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +[_LOWER] = LAYOUT_preonic_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), /* Raise @@ -134,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_preonic_grid( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +[_RAISE] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), /* Adjust (Lower + Raise) @@ -155,12 +155,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_preonic_grid( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/qmk/keyboards/preonic/keymaps/drasbeck/config.h b/qmk/keyboards/preonic/keymaps/drasbeck/config.h new file mode 100644 index 00000000..042096f1 --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/drasbeck/config.h @@ -0,0 +1,49 @@ +/* +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. +*/ + +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND) }//, + // SONG(COLEMAK_SOUND), + // SONG(DVORAK_SOUND) + //} +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/qmk/keyboards/preonic/keymaps/drasbeck/keymap.c b/qmk/keyboards/preonic/keymaps/drasbeck/keymap.c new file mode 100644 index 00000000..d2d30ffa --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/drasbeck/keymap.c @@ -0,0 +1,240 @@ +/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_NO, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_NUBS, KC_LCTL, KC_NO, KC_NO +), + +[_COLEMAK] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_DVORAK] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_LOWER] = LAYOUT_preonic_grid( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , KC_PGUP, KC_MINS, KC_EQL, KC_RBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_RO, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_RAISE] = LAYOUT_preonic_grid( + KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC, + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_RO, KC_SFTENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + writePinHigh(E6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/qmk/keyboards/preonic/keymaps/drasbeck/readme.md b/qmk/keyboards/preonic/keymaps/drasbeck/readme.md new file mode 100644 index 00000000..4975ae8b --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/drasbeck/readme.md @@ -0,0 +1,17 @@ +# drasbeck's Preonic keymap +Danish layout with Danish characters on default layer. + +``` +Default +,-----------------------------------------------------------------------------------. +|KC_GRV| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | +|------+------+------+------+------+------+------+------+------+------+------+------| +| TAB | q | w | e | r | t | y | u | i | o | p | å | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ESC | a | s | d | f | g | h | j | k | l | æ | ø | +|------+------+------+------+------+------|------+------+------+------+------+------| +|L SHFT| z | x | c | v | b | n | m | , | . | - |SFTENT| +|------+------+------+------+------+------+------+------+------+------+------+------| +|L CTRL| | L ALT| L GUI| LOWER| SPACE | RAISE| NUBS | L CTL| | | +`-----------------------------------------------------------------------------------' +``` diff --git a/qmk/keyboards/preonic/keymaps/drasbeck/rules.mk b/qmk/keyboards/preonic/keymaps/drasbeck/rules.mk new file mode 100644 index 00000000..dcf16bef --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/drasbeck/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/qmk/keyboards/preonic/keymaps/dudeofawesome/keymap.c b/qmk/keyboards/preonic/keymaps/dudeofawesome/keymap.c index 3d1cec74..2d2a252b 100644 --- a/qmk/keyboards/preonic/keymaps/dudeofawesome/keymap.c +++ b/qmk/keyboards/preonic/keymaps/dudeofawesome/keymap.c @@ -256,10 +256,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef BACKLIGHT_ENABLE backlight_step(); #endif - PORTE &= ~(1<<6); + #ifdef __AVR__ + writePinLow(E6); + #endif } else { unregister_code(KC_RSFT); - PORTE |= (1<<6); + #ifdef __AVR__ + writePinHigh(E6); + #endif } return false; } diff --git a/qmk/keyboards/preonic/keymaps/pezhore/config.h b/qmk/keyboards/preonic/keymaps/pezhore/config.h new file mode 100644 index 00000000..8b541544 --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/pezhore/config.h @@ -0,0 +1,53 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#pragma once +#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX, UC_MAC +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/qmk/keyboards/preonic/keymaps/pezhore/keymap.c b/qmk/keyboards/preonic/keymaps/pezhore/keymap.c new file mode 100644 index 00000000..39b045d6 --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/pezhore/keymap.c @@ -0,0 +1,307 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _FN, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + LOWER = SAFE_RANGE, + RAISE, + SHRUG, // ¯\_(ツ)_/¯ + TFLIP, // (╯°□°)╯︵ ┻━┻ + POOP, // 💩 + DPOINT, // (ಠ_ಠ) + STRUT // ᕕ( ᐛ )ᕗ +}; + +#define TG_NUMP TG(_NUMPAD) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | FN | Ctrl | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* FN + * ,-----------------------------------------------------------------------------------. + * |RGBTgl|Brigt-|Brigt+| | | | | | | | | POOP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB+ | Hue- | Hue+ | | | | | | | |PrtScr|UC_MOD| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | RGB- | Sat- | Sat+ | | | | | | | | |UC_Wnc| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Effct-|Effct+| | | | | | | | |UC_Lin| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |SHRUG |TFLIP |DPOINT|STRUT | | | | |TgNmpd| |UC_Mac| + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_preonic_grid( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, POOP, + RGB_MOD, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, UC_MOD, + RGB_RMOD, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_WC, + _______, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_LN, + _______, SHRUG, TFLIP, DPOINT, STRUT, _______, _______, _______, _______, TG_NUMP, _______, UC_M_MA +), + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | | | | | | |NumLk | 7 | 8 | 9 | / | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | | | | | | | 4 | 5 | 6 | * | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | | | | | | | 1 | 2 | 3 | - | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | = | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_BSPC, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_DEL, + KC_TAB, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PEQL, KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Raise | Home | PgDn | PgUp | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case SHRUG: + if (record->event.pressed) { + send_unicode_string("¯\\_(ツ)_/¯"); + } + return false; + break; + case TFLIP: + if (record->event.pressed) { + send_unicode_string("(╯°□°)╯︵ ┻━┻"); + } + return false; + break; + case POOP: + if (record->event.pressed) { + send_unicode_string("💩"); + } + return false; + break; + case DPOINT: + if (record->event.pressed) { + send_unicode_string("(ಠ_ಠ)"); + } + return false; + break; + case STRUT: + if (record->event.pressed) { + send_unicode_string("ᕕ( ᐛ )ᕗ"); + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/qmk/keyboards/preonic/keymaps/pezhore/readme.md b/qmk/keyboards/preonic/keymaps/pezhore/readme.md new file mode 100644 index 00000000..e911968d --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/pezhore/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/qmk/keyboards/preonic/keymaps/pezhore/rules.mk b/qmk/keyboards/preonic/keymaps/pezhore/rules.mk new file mode 100644 index 00000000..23198218 --- /dev/null +++ b/qmk/keyboards/preonic/keymaps/pezhore/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +#UNICODEMAP_ENABLE = yes +UNICODE_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/primekb/meridian/chconf.h b/qmk/keyboards/primekb/meridian/chconf.h new file mode 100644 index 00000000..03f63da3 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/primekb/meridian/config.h b/qmk/keyboards/primekb/meridian/config.h new file mode 100644 index 00000000..9194023a --- /dev/null +++ b/qmk/keyboards/primekb/meridian/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2020 Holten Campbell + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x004D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Prime Keyboards +#define PRODUCT Meridian + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 3 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 diff --git a/qmk/keyboards/primekb/meridian/halconf.h b/qmk/keyboards/primekb/meridian/halconf.h new file mode 100644 index 00000000..adb1a907 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/primekb/meridian/info.json b/qmk/keyboards/primekb/meridian/info.json new file mode 100644 index 00000000..3397ae50 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Meridian", + "url": "https://www.primekb.com", + "maintainer": "holtenc", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_unified_bs_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Backspace", "x":14.5, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}] + }, + "LAYOUT_split_bs_rshift": { + "layout":[{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Del", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":1.75}, {"label":"Fn", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}] + } + } +} diff --git a/qmk/keyboards/primekb/meridian/keymaps/default/keymap.c b/qmk/keyboards/primekb/meridian/keymaps/default/keymap.c new file mode 100644 index 00000000..2ea91eeb --- /dev/null +++ b/qmk/keyboards/primekb/meridian/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Holten Campbell + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_bs_rshift( + 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_BSPC, KC_DEL, + 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_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_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_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_split_bs_rshift( + RESET, 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_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/primekb/meridian/keymaps/via/keymap.c b/qmk/keyboards/primekb/meridian/keymaps/via/keymap.c new file mode 100644 index 00000000..9c314d65 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Holten Campbell + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_bs_rshift( + 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_BSPC, KC_DEL, + 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_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_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_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_split_bs_rshift( + RESET, 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_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/primekb/meridian/keymaps/via/rules.mk b/qmk/keyboards/primekb/meridian/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/primekb/meridian/mcuconf.h b/qmk/keyboards/primekb/meridian/mcuconf.h new file mode 100644 index 00000000..048eb4df --- /dev/null +++ b/qmk/keyboards/primekb/meridian/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/qmk/keyboards/primekb/meridian/meridian.c b/qmk/keyboards/primekb/meridian/meridian.c new file mode 100644 index 00000000..8d94faf9 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/meridian.c @@ -0,0 +1,68 @@ +/* +Copyright 2020 Holten Campbell + +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 "meridian.h" + +//Initialize B12 for in-switch caps lock +void keyboard_pre_init_kb(void){ + setPinOutput(B12); + keyboard_pre_init_user(); +} + +//Initialize all RGB indicators to 'off' +__attribute__((weak)) +void keyboard_post_init_user(void) { + rgblight_setrgb_at(0, 0, 0, 0); // [..., 0] = top LED + rgblight_setrgb_at(0, 0, 0, 1); // [..., 1] = middle LED + rgblight_setrgb_at(0, 0, 0, 2); // [..., 2] = bottom LED +} + +//Indicator light function +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + // writePin(B12, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator + if (led_state.caps_lock) { + rgblight_setrgb_at(0, 255, 0, 0); //green + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } + if (led_state.num_lock) { + rgblight_setrgb_at(0, 0, 255, 1); //blue + } else { + rgblight_setrgb_at(0, 0, 0, 1); + } + if (led_state.scroll_lock) { + rgblight_setrgb_at(255, 0, 0, 2); //red + } else { + rgblight_setrgb_at(0, 0, 0, 2); + } +} + return res; +} + +//Below is an exmaple of layer indication using one of the RGB indicatiors. As configured, uses the bottom indicator (2) to light up red when layer 1 is in use. +/* +layer_state_t layer_state_set_kb(layer_state_t state) { + if (get_highest_layer(state) == 1) { + rgblight_setrgb_at(255, 0, 0, 2); + } else { + rgblight_setrgb_at(0, 0, 0, 2); + } + return state; +} +*/ diff --git a/qmk/keyboards/primekb/meridian/meridian.h b/qmk/keyboards/primekb/meridian/meridian.h new file mode 100644 index 00000000..e6a155dd --- /dev/null +++ b/qmk/keyboards/primekb/meridian/meridian.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 Holten Campbell + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define K_NO KC_NO + +#define LAYOUT_unified_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K404, K407, K409, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K_NO, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K_NO}, \ + { K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \ +} + +#define LAYOUT_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K407, K409, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \ +} diff --git a/qmk/keyboards/primekb/meridian/readme.md b/qmk/keyboards/primekb/meridian/readme.md new file mode 100644 index 00000000..0e3339a5 --- /dev/null +++ b/qmk/keyboards/primekb/meridian/readme.md @@ -0,0 +1,12 @@ +# ai03 x PrimeKB Meridian + +![Meridian](https://i.imgur.com/c90ZTJJl.jpg) + +* Keyboard Maintainer: [Holten Campbell](https://github.com/holtenc) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make primekb/meridian:default + +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). diff --git a/qmk/keyboards/primekb/meridian/rules.mk b/qmk/keyboards/primekb/meridian/rules.mk new file mode 100644 index 00000000..9e2f958b --- /dev/null +++ b/qmk/keyboards/primekb/meridian/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/primekb/prime_e/config.h b/qmk/keyboards/primekb/prime_e/config.h index 4a355efd..343a9dc0 100644 --- a/qmk/keyboards/primekb/prime_e/config.h +++ b/qmk/keyboards/primekb/prime_e/config.h @@ -21,11 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x5052 -#define PRODUCT_ID 0x0051 -#define DEVICE_VER 0x0001 #define MANUFACTURER PrimeKB -#define PRODUCT Prime_E -#define DESCRIPTION Ergo_45 /* key matrix size */ #define MATRIX_ROWS 4 @@ -34,15 +30,10 @@ along with this program. If not, see . /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { E6, C7, B5, B4 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN B7 -#define BACKLIGHT_LEVELS 5 - - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/qmk/keyboards/primekb/prime_e/prime_e.h b/qmk/keyboards/primekb/prime_e/prime_e.h index 4af70fbe..8de0af46 100644 --- a/qmk/keyboards/primekb/prime_e/prime_e.h +++ b/qmk/keyboards/primekb/prime_e/prime_e.h @@ -19,7 +19,6 @@ #include "quantum.h" - #define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K112, \ @@ -31,4 +30,3 @@ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 }, \ { K300, K301, KC_NO, K303, K304, KC_NO, K306, KC_NO, K308, KC_NO, KC_NO, K311, K312 } \ } - diff --git a/qmk/keyboards/primekb/prime_e/readme.md b/qmk/keyboards/primekb/prime_e/readme.md index 6abe0bed..3503ad41 100644 --- a/qmk/keyboards/primekb/prime_e/readme.md +++ b/qmk/keyboards/primekb/prime_e/readme.md @@ -4,13 +4,17 @@ An ergonomic 45%. -Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) -Hardware Supported: Prime_E PCB, ATMega32u4 -Hardware Availability: Group Buy, Retail +*Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) +*Hardware Supported: + * [Prime_E Standard](std/) PCBs, ATmega32u4 (in switch LED backlights) + * [Prime_E RGB](rgb/) PCBs, Atmega32u4 (RGB underglow) +*Hardware Availability: [Store Link](https://www.primekb.com) Make example for this keyboard (after setting up your build environment): - make prime_e:default - make prime_e:via (when using VIA configurator) + *make primekb/prime_e/std:default + *make primekb/prime_e/rgb:default + *make primekb/prime_e/std:via + *make primekb/prime_e/rgb:via 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). diff --git a/qmk/keyboards/primekb/prime_e/rgb/config.h b/qmk/keyboards/primekb/prime_e/rgb/config.h new file mode 100644 index 00000000..a562ffba --- /dev/null +++ b/qmk/keyboards/primekb/prime_e/rgb/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2019 Holten Campbell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x0052 +#define DEVICE_VER 0x0001 +#define PRODUCT Prime_E RGB + +#define RGB_DI_PIN B7 +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS diff --git a/qmk/keyboards/primekb/prime_e/rgb/readme.md b/qmk/keyboards/primekb/prime_e/rgb/readme.md new file mode 100644 index 00000000..7d7c5332 --- /dev/null +++ b/qmk/keyboards/primekb/prime_e/rgb/readme.md @@ -0,0 +1,15 @@ +# Prime_E + +![Prime_E](https://imgur.com/7Rl4JOA.jpg) + +An ergonomic 45%. + +* Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) +* Hardware Supported:Prime_E RGB PCBs, ATmega32u4 +* Hardware Availability: [Store Link](https://www.primekb.com) + +Make example for this keyboard (after setting up your build environment): + + make primekb/prime_e/rgb:default + +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). diff --git a/qmk/keyboards/primekb/prime_e/rgb/rules.mk b/qmk/keyboards/primekb/prime_e/rgb/rules.mk new file mode 100644 index 00000000..725c0ceb --- /dev/null +++ b/qmk/keyboards/primekb/prime_e/rgb/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/qmk/keyboards/primekb/prime_e/rules.mk b/qmk/keyboards/primekb/prime_e/rules.mk index 0a08cc2c..e9045dba 100644 --- a/qmk/keyboards/primekb/prime_e/rules.mk +++ b/qmk/keyboards/primekb/prime_e/rules.mk @@ -23,11 +23,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = primekb/prime_e/std diff --git a/qmk/keyboards/primekb/prime_e/std/config.h b/qmk/keyboards/primekb/prime_e/std/config.h new file mode 100644 index 00000000..a711e35b --- /dev/null +++ b/qmk/keyboards/primekb/prime_e/std/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2019 Holten Campbell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x0051 +#define DEVICE_VER 0x0001 +#define PRODUCT Prime_E + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 5 diff --git a/qmk/keyboards/primekb/prime_e/std/readme.md b/qmk/keyboards/primekb/prime_e/std/readme.md new file mode 100644 index 00000000..d1c2fd84 --- /dev/null +++ b/qmk/keyboards/primekb/prime_e/std/readme.md @@ -0,0 +1,15 @@ +# Prime_E + +![Prime_E](https://imgur.com/7Rl4JOA.jpg) + +An ergonomic 45%. + +* Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) +* Hardware Supported: Prime_E Standard PCBs, Atmega32u4 +* Hardware Availability: [Store Link](https://www.primekb.com) + +Make example for this keyboard (after setting up your build environment): + + make primekb/prime_e/std:default + +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). diff --git a/qmk/keyboards/primekb/prime_e/std/rules.mk b/qmk/keyboards/primekb/prime_e/std/rules.mk new file mode 100644 index 00000000..f938676f --- /dev/null +++ b/qmk/keyboards/primekb/prime_e/std/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no diff --git a/qmk/keyboards/projectkb/alice/alice.h b/qmk/keyboards/projectkb/alice/alice.h index 907f020e..00bec92b 100644 --- a/qmk/keyboards/projectkb/alice/alice.h +++ b/qmk/keyboards/projectkb/alice/alice.h @@ -3,8 +3,9 @@ #include "quantum.h" #define KNO KC_NO +#define LAYOUT_default LAYOUT_alice -#define LAYOUT_default( \ +#define LAYOUT_alice( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ K10, K11, K12, K13, K14, K15, K16, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ K20, K21, K22, K23, K24, K25, K26, K28, K29, K2A, K2B, K2C, K2D, K2F, \ diff --git a/qmk/keyboards/projectkb/alice/info.json b/qmk/keyboards/projectkb/alice/info.json index a94c1352..99311265 100644 --- a/qmk/keyboards/projectkb/alice/info.json +++ b/qmk/keyboards/projectkb/alice/info.json @@ -5,7 +5,7 @@ "width": 19.75, "height": 5.25, "layouts": { - "LAYOUT_default": { + "LAYOUT_alice": { "layout": [ {"label":"Esc", "x":0.5, "y":0}, {"label":"`", "x":1.75, "y":0.25}, diff --git a/qmk/keyboards/projectkb/alice/keymaps/default/keymap.c b/qmk/keyboards/projectkb/alice/keymaps/default/keymap.c index a56f24f3..1566f128 100644 --- a/qmk/keyboards/projectkb/alice/keymaps/default/keymap.c +++ b/qmk/keyboards/projectkb/alice/keymaps/default/keymap.c @@ -25,7 +25,7 @@ along with this program. If not, see . #define _FN1 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_default( + [_BASE] = LAYOUT_alice( KC_ESC, KC_TILD, 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_DEL, 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, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_SPC, MO(_FN1), KC_SPC, KC_RALT, KC_RCTL ), - [_FN1] = LAYOUT_default( + [_FN1] = LAYOUT_alice( RGB_TOG, _______, 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_DEL, RGB_MOD, _______, _______, KC_UP, _______, _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, _______, _______, _______, RGB_RMOD, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, diff --git a/qmk/keyboards/projectkb/alice/keymaps/via/keymap.c b/qmk/keyboards/projectkb/alice/keymaps/via/keymap.c index ff084d1f..57095e99 100644 --- a/qmk/keyboards/projectkb/alice/keymaps/via/keymap.c +++ b/qmk/keyboards/projectkb/alice/keymaps/via/keymap.c @@ -24,28 +24,28 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_default( + [0] = LAYOUT_alice( KC_ESC, KC_TILD, 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_DEL, 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_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_RGUI, KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL ), - [1] = LAYOUT_default( + [1] = LAYOUT_alice( 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT_default( + [2] = LAYOUT_alice( 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT_default( + [3] = LAYOUT_alice( 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, diff --git a/qmk/keyboards/projectkb/alice/rev2/rules.mk b/qmk/keyboards/projectkb/alice/rev2/rules.mk index 258444db..c3123014 100644 --- a/qmk/keyboards/projectkb/alice/rev2/rules.mk +++ b/qmk/keyboards/projectkb/alice/rev2/rules.mk @@ -25,3 +25,4 @@ WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +LAYOUTS = alice diff --git a/qmk/keyboards/ramonimbao/aelith/aelith.c b/qmk/keyboards/ramonimbao/aelith/aelith.c new file mode 100644 index 00000000..e2153f76 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/aelith.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 "aelith.h" diff --git a/qmk/keyboards/ramonimbao/aelith/aelith.h b/qmk/keyboards/ramonimbao/aelith/aelith.h new file mode 100644 index 00000000..47fe9a90 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/aelith.h @@ -0,0 +1,64 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define XXX KC_NO + +// Split backspace +// Split right shift +#define LAYOUT_alice_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \ + k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \ + k41, k43, k44, k46, k49, k4b, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { XXX, k41, XXX, k43, k44, XXX, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \ +} + +// 2u backspace +// Split right shift +#define LAYOUT_alice( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2f, \ + k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \ + k41, k43, k44, k46, k49, k4b, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, XXX, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { XXX, k41, XXX, k43, k44, XXX, k46, XXX, XXX, k49, XXX, k4b, XXX, XXX, XXX, k4f }, \ +} diff --git a/qmk/keyboards/ramonimbao/aelith/config.h b/qmk/keyboards/ramonimbao/aelith/config.h new file mode 100644 index 00000000..0c4c2285 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2020 Ramon Imbao + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xB16B +#define PRODUCT_ID 0xE460 +#define DEVICE_VER 0x0012 +#define MANUFACTURER Ramon Imbao +#define PRODUCT AELITH + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D5, D1, D0, D6, A7 } +#define MATRIX_COL_PINS { D7, C0, C1, C2, C3, C4, C5, C6, C7, A6, A5, A0, A1, A2, A3, A4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/ramonimbao/aelith/info.json b/qmk/keyboards/ramonimbao/aelith/info.json new file mode 100644 index 00000000..e001c1d4 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/info.json @@ -0,0 +1,90 @@ +{ + "keyboard_name": "AELITH", + "url": "", + "maintainer": "Ramon Imbao", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT_alice_split_bs": { + "layout": [ + {"x":0.5, "y":0}, + + {"x":1.75, "y":0}, + {"x":2.75, "y":0}, + {"x":3.75, "y":0}, + {"x":4.75, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + {"x":16, "y":0}, + {"x":17, "y":0}, + {"x":18, "y":0}, + + {"x":0.25, "y":1}, + {"x":1.75, "y":1, "w":1.5}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1}, + {"x":14.5, "y":1}, + {"x":15.5, "y":1}, + {"x":16.5, "y":1}, + {"x":17.5, "y":1, "w":1.5}, + + {"x":0, "y":2}, + + {"x":1.75, "y":2, "w":1.75}, + {"x":3.5, "y":2}, + {"x":4.5, "y":2}, + {"x":5.5, "y":2}, + {"x":6.5, "y":2}, + {"x":7.5, "y":2}, + + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":2}, + {"x":14.75, "y":2}, + {"x":15.75, "y":2}, + {"x":16.75, "y":2, "w":2.25}, + + {"x":1.75, "y":3, "w":2.25}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3}, + {"x":13.25, "y":3}, + {"x":14.25, "y":3}, + {"x":15.25, "y":3}, + {"x":16.25, "y":3, "w":1.75}, + {"x":18, "y":3}, + + {"x":1.75, "y":4, "w":1.5}, + {"x":4.5, "y":4, "w":1.5}, + {"x":6, "y":4, "w":2.25}, + {"x":8.25, "y":4}, + + {"x":10.25, "y":4, "w":2.75}, + {"x":13, "y":4, "w":1.5}, + {"x":17.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/qmk/keyboards/ramonimbao/aelith/keymaps/default/keymap.c b/qmk/keyboards/ramonimbao/aelith/keymaps/default/keymap.c new file mode 100644 index 00000000..ff9319e4 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_alice_split_bs( + KC_ESC, 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_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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_alice_split_bs( + RESET, _______, 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_DEL, KC_DEL, + KC_HOME, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_END, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/ramonimbao/aelith/keymaps/via/keymap.c b/qmk/keyboards/ramonimbao/aelith/keymaps/via/keymap.c new file mode 100644 index 00000000..7c48ffa0 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_alice_split_bs( + KC_ESC, 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_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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_alice_split_bs( + RESET, _______, 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_DEL, KC_DEL, + KC_HOME, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_END, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/ramonimbao/aelith/keymaps/via/rules.mk b/qmk/keyboards/ramonimbao/aelith/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/ramonimbao/aelith/readme.md b/qmk/keyboards/ramonimbao/aelith/readme.md new file mode 100644 index 00000000..243d58e2 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/readme.md @@ -0,0 +1,14 @@ +# ÆLITH + +![ÆLITH](https://i.imgur.com/wG1OWLol.png) + +A through-hole Alice-layout keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: ATmega32A + +Make example for this keyboard (after setting up your build environment): + + make ramonimbao/aelith:default + +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). diff --git a/qmk/keyboards/ramonimbao/aelith/rules.mk b/qmk/keyboards/ramonimbao/aelith/rules.mk new file mode 100644 index 00000000..5e4cc3d6 --- /dev/null +++ b/qmk/keyboards/ramonimbao/aelith/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = alice diff --git a/qmk/keyboards/ramonimbao/mona/config.h b/qmk/keyboards/ramonimbao/mona/config.h new file mode 100644 index 00000000..81ddb806 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2020 Ramon Imbao + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xB16B +#define PRODUCT_ID 0x404A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ramon Imbao +#define PRODUCT Mona + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D1, D5, B7, F0, F1 } +#define MATRIX_COL_PINS { D0, D3, D2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/ramonimbao/mona/info.json b/qmk/keyboards/ramonimbao/mona/info.json new file mode 100644 index 00000000..715c0057 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/info.json @@ -0,0 +1,431 @@ +{ + "keyboard_name": "Mona", + "url": "", + "maintainer": "Ramon Imbao", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":0, "y":1, "w":1.5}, + + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_tsangan_hhkb": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4, "w":1.5} + ] + }, + "LAYOUT_60_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso_tsangan": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4, "w":1.5} + ] + }, + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/qmk/keyboards/ramonimbao/mona/keymaps/default/keymap.c b/qmk/keyboards/ramonimbao/mona/keymaps/default/keymap.c new file mode 100644 index 00000000..5cf76c85 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + _______, 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_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/ramonimbao/mona/keymaps/iso/keymap.c b/qmk/keyboards/ramonimbao/mona/keymaps/iso/keymap.c new file mode 100644 index 00000000..704c8bf4 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/keymaps/iso/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_iso( + KC_GESC, 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_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_ENT, + 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_iso( + _______, 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_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/ramonimbao/mona/keymaps/via/keymap.c b/qmk/keyboards/ramonimbao/mona/keymaps/via/keymap.c new file mode 100644 index 00000000..4a129b87 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, 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_BSPC, + 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_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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + + [1] = LAYOUT_all( + RESET, 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_DEL, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/ramonimbao/mona/keymaps/via/rules.mk b/qmk/keyboards/ramonimbao/mona/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/ramonimbao/mona/mona.c b/qmk/keyboards/ramonimbao/mona/mona.c new file mode 100644 index 00000000..486f75b7 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/mona.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 "mona.h" diff --git a/qmk/keyboards/ramonimbao/mona/mona.h b/qmk/keyboards/ramonimbao/mona/mona.h new file mode 100644 index 00000000..1bb416da --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/mona.h @@ -0,0 +1,102 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define XXX KC_NO + +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ + k40, k41, k42, k46, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, XXX, k4d, k4e }, \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k42, k46, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, XXX, k4d, k4e }, \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ + k40, k41, k42, k46, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, XXX, k4d, k4e }, \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, XXX, k4d, k4e }, \ +} + +#define LAYOUT_60_iso_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ + k40, k41, k42, k46, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, XXX, k4d, k4e }, \ +} + +#define LAYOUT_all LAYOUT_60_iso_split_bs_rshift + diff --git a/qmk/keyboards/ramonimbao/mona/readme.md b/qmk/keyboards/ramonimbao/mona/readme.md new file mode 100644 index 00000000..57b811ef --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/readme.md @@ -0,0 +1,19 @@ +# Mona + +![Mona](https://i.imgur.com/jaRv4vW.png) + +A gummy-worm o-ring mount 60% marble keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: ATmega32u4 +* Hardware Availability: [Erbakeys](https://www.erbakeys.com/) + +Make example for this keyboard (after setting up your build environment): + + make ramonimbao/mona:default + +Flashing example for this keyboard: + + make ramonimbao/mona: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). diff --git a/qmk/keyboards/ramonimbao/mona/rules.mk b/qmk/keyboards/ramonimbao/mona/rules.mk new file mode 100644 index 00000000..5c0d8f30 --- /dev/null +++ b/qmk/keyboards/ramonimbao/mona/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/rart/rartlice/chconf.h b/qmk/keyboards/rart/rartlice/chconf.h new file mode 100644 index 00000000..cf1cd709 --- /dev/null +++ b/qmk/keyboards/rart/rartlice/chconf.h @@ -0,0 +1,711 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/rart/rartlice/config.h b/qmk/keyboards/rart/rartlice/config.h new file mode 100644 index 00000000..26f9324b --- /dev/null +++ b/qmk/keyboards/rart/rartlice/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 Alabahuy + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x414C +#define PRODUCT_ID 0x0065 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alabahuy +#define PRODUCT Rartlice + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B12, B8, B5, B4, B3, B11, B10, B1, B0, A7, A6, A5, A3, A4, A1 } +#define MATRIX_ROW_PINS { B13, A15, B9, A2, A0 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN B15 +#define RGBLED_NUM 11 +#define WS2812_SPI SPID2 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/rart/rartlice/halconf.h b/qmk/keyboards/rart/rartlice/halconf.h new file mode 100644 index 00000000..691c3cda --- /dev/null +++ b/qmk/keyboards/rart/rartlice/halconf.h @@ -0,0 +1,522 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/rart/rartlice/info.json b/qmk/keyboards/rart/rartlice/info.json new file mode 100644 index 00000000..065df8f0 --- /dev/null +++ b/qmk/keyboards/rart/rartlice/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "Rartlice", + "url": "", + "maintainer": "Alabahuy", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label" : " ", "x":0, "y":0}, + {"label" : "Esc", "x":1.25, "y":0}, + {"label" : "1", "x":2.25, "y":0}, + {"label" : "2", "x":3.25, "y":0}, + {"label" : "3", "x":4.25, "y":0}, + {"label" : "4", "x":5.25, "y":0}, + {"label" : "5", "x":6.25, "y":0}, + {"label" : "6", "x":7.25, "y":0}, + {"label" : "7", "x":9.25, "y":0}, + {"label" : "8", "x":10.25, "y":0}, + {"label" : "9", "x":11.25, "y":0}, + {"label" : "0", "x":12.25, "y":0}, + {"label" : "-", "x":13.25, "y":0}, + {"label" : "=", "x":14.25, "y":0}, + {"label" : "|", "x":15.25, "y":0}, + {"label" : "Delete", "x":16.25, "y":0}, + + {"label" : " ", "x":0, "y":1}, + {"label" : "Tab", "x":1.25, "y":1, "w":1.5}, + {"label" : "Q", "x":2.75, "y":1}, + {"label" : "W", "x":3.75, "y":1}, + {"label" : "E", "x":4.75, "y":1}, + {"label" : "R", "x":5.75, "y":1}, + {"label" : "T", "x":6.75, "y":1}, + {"label" : "Y", "x":8.75, "y":1}, + {"label" : "U", "x":9.75, "y":1}, + {"label" : "I", "x":10.75, "y":1}, + {"label" : "O", "x":11.75, "y":1}, + {"label" : "P", "x":12.75, "y":1}, + {"label" : "[", "x":13.75, "y":1}, + {"label" : "]", "x":14.75, "y":1}, + {"label" : "|", "x":15.75, "y":1, "w":1.5}, + + {"label" : " ", "x":0, "y":2}, + {"label" : "Caps lock", "x":1.25, "y":2, "w":1.75}, + {"label" : "A", "x":3, "y":2}, + {"label" : "S", "x":4, "y":2}, + {"label" : "D", "x":5, "y":2}, + {"label" : "F", "x":6, "y":2}, + {"label" : "G", "x":7, "y":2}, + {"label" : "H", "x":9, "y":2}, + {"label" : "J", "x":10, "y":2}, + {"label" : "K", "x":11, "y":2}, + {"label" : "L", "x":12, "y":2}, + {"label" : ";", "x":13, "y":2}, + {"label" : "'", "x":14, "y":2}, + {"label" : "Enter", "x":15, "y":2, "w":2.25}, + + {"label" : "Shift", "x":1.25, "y":3, "w":2.25}, + {"label" : "Z", "x":3.5, "y":3}, + {"label" : "X", "x":4.5, "y":3}, + {"label" : "C", "x":5.5, "y":3}, + {"label" : "V", "x":6.5, "y":3}, + {"label" : "B", "x":7.5, "y":3}, + {"label" : "N", "x":9.5, "y":3}, + {"label" : "M", "x":10.5, "y":3}, + {"label" : ",", "x":11.5, "y":3}, + {"label" : ".", "x":12.5, "y":3}, + {"label" : "/", "x":13.5, "y":3}, + {"label" : "Shift", "x":14.5, "y":3, "w":1.75}, + {"label" : "Up", "x":16.5, "y":3.25}, + + {"label" : "Ctrl", "x":1.25, "y":4, "w":1.25}, + {"label" : "Alt", "x":4.25, "y":4, "w":1.25}, + {"label" : "Space", "x":5.5, "y":4, "w":2}, + {"label" : "Fn", "x":7.5, "y":4}, + {"label" : "Space", "x":9.5, "y":4, "w":2.75}, + {"label" : "Ctrl", "x":12.25, "y":4, "w":1.5}, + {"label" : "Left", "x":15.5, "y":4.25 }, + {"label" : "Down", "x":16.5, "y":4.25 }, + {"label" : "Right", "x":17.5, "y":4.25 } + ] + } + } +} diff --git a/qmk/keyboards/rart/rartlice/keymaps/default/keymap.c b/qmk/keyboards/rart/rartlice/keymaps/default/keymap.c new file mode 100644 index 00000000..0117eeaf --- /dev/null +++ b/qmk/keyboards/rart/rartlice/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2020 Alabahuy + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, 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_GRV, KC_DEL, + 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_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_NLCK, RGB_TOG, 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_SLCK, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("R A R T L I C E\nLayer: "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Default\n"), false); + break; + case 1: + oled_write_P(PSTR("FN\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +} +#endif diff --git a/qmk/keyboards/rart/rartlice/keymaps/via/config.h b/qmk/keyboards/rart/rartlice/keymaps/via/config.h new file mode 100644 index 00000000..3e019f9a --- /dev/null +++ b/qmk/keyboards/rart/rartlice/keymaps/via/config.h @@ -0,0 +1 @@ +#define OLED_TIMEOUT 600000 diff --git a/qmk/keyboards/rart/rartlice/keymaps/via/keymap.c b/qmk/keyboards/rart/rartlice/keymaps/via/keymap.c new file mode 100644 index 00000000..0156c2fa --- /dev/null +++ b/qmk/keyboards/rart/rartlice/keymaps/via/keymap.c @@ -0,0 +1,80 @@ +/* +Copyright 2020 Alabahuy + +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, 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_GRV, KC_DEL, + 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_BSPC, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_NLCK, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, _______, + KC_SLCK, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______, + _______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("* R A R T L I C E *\n Powered by QMK\nLayer: "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Default\n"), false); + break; + case 1: + oled_write_P(PSTR("Fn\n"), false); + break; + case 2: + oled_write_P(PSTR("Layer 3\n"), false); + break; + case 3: + oled_write_P(PSTR("Layer 4\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undifined\n"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +} +#endif diff --git a/qmk/keyboards/rart/rartlice/keymaps/via/rules.mk b/qmk/keyboards/rart/rartlice/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/rart/rartlice/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/rart/rartlice/mcuconf.h b/qmk/keyboards/rart/rartlice/mcuconf.h new file mode 100644 index 00000000..c4ab1a5e --- /dev/null +++ b/qmk/keyboards/rart/rartlice/mcuconf.h @@ -0,0 +1,206 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/qmk/keyboards/rart/rartlice/rartlice.c b/qmk/keyboards/rart/rartlice/rartlice.c new file mode 100644 index 00000000..be805da3 --- /dev/null +++ b/qmk/keyboards/rart/rartlice/rartlice.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Alabahuy + * 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 "rartlice.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(A8); + setPinOutput(B14); + setPinOutput(A9); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(A8, !led_state.num_lock); + writePin(B14, !led_state.caps_lock); + writePin(A9, !led_state.scroll_lock); + } + return true; +} diff --git a/qmk/keyboards/rart/rartlice/rartlice.h b/qmk/keyboards/rart/rartlice/rartlice.h new file mode 100644 index 00000000..ea8b130e --- /dev/null +++ b/qmk/keyboards/rart/rartlice/rartlice.h @@ -0,0 +1,27 @@ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K14, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K24, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K34, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K44, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, \ + K41, K43, K45, K46, K48, K4A, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ + { KC_NO, K41, KC_NO, K43, K44, K45, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, K4E }, \ +} diff --git a/qmk/keyboards/rart/rartlice/readme.md b/qmk/keyboards/rart/rartlice/readme.md new file mode 100644 index 00000000..134c8ca6 --- /dev/null +++ b/qmk/keyboards/rart/rartlice/readme.md @@ -0,0 +1,15 @@ +# Rartlice + +![TOP](https://user-images.githubusercontent.com/30220306/94159843-3a0e4600-feae-11ea-94e0-7babe43f83a4.png) + +A 65% Ergo Layout Mechanical Keyboard with Blue Pill STM32F103C8T6-based inspired by TGR Alice, Arisu and Cannon keys Practice60 based on [IMKG](https://www.facebook.com/groups/indomechanicalkeyboard/) (Indonesia Mechanical Keyboard Group) + +* Keyboard Maintainer: [Alabahuy](https://github.com/alabahuy) +* Hardware Supported: RARTLICE PCB, Mini USB, Blue Pill STM32F103C8T6, RGB underglow +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make rart/rartlice:default + +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). diff --git a/qmk/keyboards/rart/rartlice/rules.mk b/qmk/keyboards/rart/rartlice/rules.mk new file mode 100644 index 00000000..7ec4cef2 --- /dev/null +++ b/qmk/keyboards/rart/rartlice/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi +OLED_DRIVER_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/redox/config.h b/qmk/keyboards/redox/config.h index 96f57f25..79316dd0 100644 --- a/qmk/keyboards/redox/config.h +++ b/qmk/keyboards/redox/config.h @@ -17,4 +17,4 @@ along with this program. If not, see . #pragma once -#include "config_common.h" +#include "config_common.h" \ No newline at end of file diff --git a/qmk/keyboards/redox/keymaps/via/config.h b/qmk/keyboards/redox/keymaps/via/config.h new file mode 100644 index 00000000..a3ef209a --- /dev/null +++ b/qmk/keyboards/redox/keymaps/via/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/qmk/keyboards/redox/keymaps/via/keymap.c b/qmk/keyboards/redox/keymaps/via/keymap.c new file mode 100644 index 00000000..f0f92858 --- /dev/null +++ b/qmk/keyboards/redox/keymaps/via/keymap.c @@ -0,0 +1,88 @@ + /* Copyright HarshitGoel96 2020 + * With permission from mattdibi, the original maintainer of the Redox hardware. + * + * 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 + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum custom_keycodes { + _QWERTY, + _SYMB, + _NAV, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , MO(_ADJUST) ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,XXXXXXX ,KC_PGDN , KC_HOME ,XXXXXXX ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_LGUI ,KC_PPLS ,KC_PMNS ,MO(_SYMB) , MO(_NAV) , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; \ No newline at end of file diff --git a/qmk/keyboards/redox/keymaps/via/readme.md b/qmk/keyboards/redox/keymaps/via/readme.md new file mode 100644 index 00000000..60c8e0af --- /dev/null +++ b/qmk/keyboards/redox/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for Redox diff --git a/qmk/keyboards/redox/keymaps/via/rules.mk b/qmk/keyboards/redox/keymaps/via/rules.mk new file mode 100644 index 00000000..43061db1 --- /dev/null +++ b/qmk/keyboards/redox/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/redox/rev1/config.h b/qmk/keyboards/redox/rev1/config.h index 94e824e0..284145dc 100644 --- a/qmk/keyboards/redox/rev1/config.h +++ b/qmk/keyboards/redox/rev1/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4D44 // "MD" +#define PRODUCT_ID 0x5244 // "RD" #define DEVICE_VER 0x0100 #define MANUFACTURER Falbatech #define PRODUCT The Redox Keyboard diff --git a/qmk/keyboards/redox_w/config.h b/qmk/keyboards/redox_w/config.h index 349185ed..fb416c8e 100644 --- a/qmk/keyboards/redox_w/config.h +++ b/qmk/keyboards/redox_w/config.h @@ -20,8 +20,8 @@ /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4D44 //MD +#define PRODUCT_ID 0x5257 //RW #define DEVICE_VER 0x0001 #define MANUFACTURER Mattia Dal Ben #define PRODUCT Redox_wireless diff --git a/qmk/keyboards/redox_w/keymaps/via/keymap.c b/qmk/keyboards/redox_w/keymaps/via/keymap.c new file mode 100644 index 00000000..406bc1b8 --- /dev/null +++ b/qmk/keyboards/redox_w/keymaps/via/keymap.c @@ -0,0 +1,89 @@ + /* Copyright HarshitGoel96 2020 + * With permission from mattdibi, the original maintainer of the Redox hardware. + * + * 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 + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum custom_keycodes { + _QWERTY, + _SYMB, + _NAV, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , MO(_ADJUST) ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,XXXXXXX ,KC_PGDN , KC_HOME ,XXXXXXX ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_LGUI ,KC_PPLS ,KC_PMNS ,MO(_SYMB) , MO(_NAV) , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PMNS ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; \ No newline at end of file diff --git a/qmk/keyboards/redox_w/keymaps/via/readme.md b/qmk/keyboards/redox_w/keymaps/via/readme.md new file mode 100644 index 00000000..32ab1253 --- /dev/null +++ b/qmk/keyboards/redox_w/keymaps/via/readme.md @@ -0,0 +1 @@ +# Default keymap for Redox Wireless diff --git a/qmk/keyboards/redox_w/keymaps/via/rules.mk b/qmk/keyboards/redox_w/keymaps/via/rules.mk new file mode 100644 index 00000000..43061db1 --- /dev/null +++ b/qmk/keyboards/redox_w/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/reviung34/config.h b/qmk/keyboards/reviung34/config.h index 5ebb6312..5cd46cab 100644 --- a/qmk/keyboards/reviung34/config.h +++ b/qmk/keyboards/reviung34/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define PRODUCT_ID 0x4E03 #define DEVICE_VER 0x0001 #define MANUFACTURER gtips #define PRODUCT reviung34 diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h b/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h index 1634f368..38e5590d 100644 --- a/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h @@ -1,18 +1,23 @@ /* -Copyright 2018 Fredric Silberberg + Copyright (c) 2020 Fred Silberberg -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. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -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. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -You should have received a copy of the GNU General Public License -along with this program. If not, see . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ #pragma once diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c b/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c index 53756344..946ca79e 100644 --- a/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h b/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h new file mode 100644 index 00000000..211e3517 --- /dev/null +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2020 Casey Webster + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL + +#define EE_HANDS + +#ifdef COMBO_ENABLE + #define COMBO_COUNT 2 +#endif + +#define QMK_KEYS_PER_SCAN 4 + +#define EE_HANDS diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c b/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c new file mode 100644 index 00000000..70013956 --- /dev/null +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/keymap.c @@ -0,0 +1,116 @@ +/* Copyright 2020 Casey Webster + * + * 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 +#include "rev1.h" +#include "cwebster2.h" + +#define LAYOUT_zen_base( \ + L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \ + L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \ + L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \ + L33, L34, L35, R35, R34, R33 \ + ) \ + LAYOUT_zen_wrapper ( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, \ + KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \ + KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \ + KC_EQL, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, KC_MINS, \ + KC_LCCL, KC_LGUI, SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR, KC_ALTCL, KC_LSFT \ + ) +#define LAYOUT_zen_base_wrapper(...) LAYOUT_zen_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + */ + [_QWERTY] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______QWERTY_L1______, _______QWERTY_R1______, + _______QWERTY_L2______, _______QWERTY_R2______, + _______QWERTY_L3______, _______QWERTY_R3______, + _______THUMBS_L_______, _______THUMBS_R_______ + /* `---------------------' `---------------------' */ + ), + [_COLEMAK] = LAYOUT_zen_wrapper( + /* ,-----------------------. ,-----------------------. */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS, + KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN, + KC_EQL, _______COLEMAK_L3_____, _______COLEMAK_R3_____, KC_MINS, + KC_LCCL, KC_LGUI, SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR, KC_ALTCL, KC_LSFT + /* `---------------------' `---------------------' */ + ), + // GAME layout -- qwerty without homerow mods + [_GAME] = LAYOUT_zen_wrapper( + /* ,-------------------------------------------. ,-------------------------------------------. */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS, + KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_EQL, _______QWERTY_L3______, _______QWERTY_R3______, KC_MINS, + KC_LCCL, KC_LGUI, SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_COLEMAK), KC_PSCR, KC_ALTCL, KC_LSFT + /* `----------------------------------' `----------------------------------' */ + ), + [_FN] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______FN_______L1____, _______INACTIVE_R1____, + _______FN_______L2____, _______INACTIVE_R2____, + _______FN_______L3____, _______NAV______R2____, + _______FN________T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_SYMBOLS] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______SYM______L1____, _______INACTIVE_R1____, + _______SYM______L2____, _______INACTIVE_R2____, + _______SYM______L3____, _______INACTIVE_R3____, + _______SYM_______T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_NUM] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______NUM______L1____, _______INACTIVE_R1____, + _______NUM______L2____, _______INACTIVE_R2____, + _______NUM______L3____, _______INACTIVE_R3____, + _______NUM_______T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_NAV] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______NAV______R1____, + _______INACTIVE_L2____, _______NAV______R2____, + _______INACTIVE_L3____, _______NAV______R3____, + _______INACTIVE__T____, _______NAV_______T____ + /* `---------------------' `---------------------' */ + ), + [_MOUSE] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______MOUSE____R1____, + _______INACTIVE_L2____, _______MOUSE____R2____, + _______INACTIVE_L3____, _______MOUSE____R3____, + _______INACTIVE__T____, _______MOUSE_____T____ + /* `---------------------' `---------------------' */ + ), + [_MEDIA] = LAYOUT_zen_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______MEDIA____R1____, + _______INACTIVE_L2____, _______MEDIA____R2____, + _______INACTIVE_L3____, _______MEDIA____R3____, + _______INACTIVE__T____, _______MEDIA_____T____ + /* `---------------------' `---------------------' */ + ), +}; + diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk b/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk new file mode 100644 index 00000000..632a5f61 --- /dev/null +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +RAW_ENABLE = yes diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h b/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h new file mode 100644 index 00000000..d7b37d52 --- /dev/null +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 4 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c b/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c new file mode 100644 index 00000000..673ea405 --- /dev/null +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c @@ -0,0 +1,79 @@ + /* Copyright 2020 Martin J. Potier + * + * 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 3 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 + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _NAV +}; + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV, + +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. .-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |DELETE| A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |RGBMOD| + * |------+------+------+------+------+------+------. .--------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBTOG| NAV |Space | ESC | |Enter|Space/NAV| AltGr| NAV | | - | = | + * `------------------------------------------------' '--------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RGB_MOD, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_NAV), KC_SPC, KC_GESC, KC_ENT, LT(_NAV, KC_SPACE), KC_RALT, MO(_NAV), _______, KC_MINS, KC_EQL + ), + + /* NAV + * ,-----------------------------------------. .-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBSAI|RGBVAI|RGBSAD| | [ | | ] | Pgup | Up | Pgdn |Insert| Home | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBHUD|RGBVAD|RGBHUI| | | | | Left | Down | Right|Delete| End | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | Pause| Back | Next | + * |------+------+------+------+------+------+------. .------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBMOD| | | | | RESET| | | | Mute | VOLUP| VOLDN| + * `------------------------------------------------' '------------------------------------------------' + */ + [_NAV] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RGB_SAI, RGB_VAI, RGB_SAD, _______, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_MOD, _______, _______, _______, RESET, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD + ), + +}; diff --git a/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk b/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk new file mode 100644 index 00000000..1e3cebb1 --- /dev/null +++ b/qmk/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/qmk/keyboards/rominronin/katana60/rev1/config.h b/qmk/keyboards/rominronin/katana60/rev1/config.h new file mode 100644 index 00000000..fe10d1a5 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2017 Baris Tosun + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7272 // "rr" - rominronin +#define PRODUCT_ID 0x0C2C +#define DEVICE_VER 0x0001 +#define MANUFACTURER RominRonin CandyKeys +#define PRODUCT Katana60 rev1 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * +*/ +#define MATRIX_ROW_PINS { F5, F6, F4, F1, D0 } +#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +#define TAPPING_TERM 200 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/rominronin/katana60/rev1/info.json b/qmk/keyboards/rominronin/katana60/rev1/info.json new file mode 100644 index 00000000..fa0aa93d --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Katana60 rev1", + "url": "", + "maintainer": "rominronin", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k40", "x":0, "y":0}, + {"label":"k41", "x":1, "y":0}, + {"label":"k42", "x":2, "y":0}, + {"label":"k43", "x":3, "y":0}, + {"label":"k44", "x":4, "y":0}, + {"label":"k45", "x":5, "y":0}, + {"label":"k46", "x":6, "y":0}, + {"label":"k47", "x":7, "y":0}, + {"label":"k48", "x":8, "y":0}, + {"label":"k49", "x":9, "y":0}, + {"label":"k4a", "x":10, "y":0}, + {"label":"k4b", "x":11, "y":0}, + {"label":"k4c", "x":12, "y":0}, + {"label":"k4d", "x":13, "y":0}, + {"label":"k4e", "x":14, "y":0}, + {"label":"k30", "x":0, "y":1, "w":1.5}, + {"label":"k31", "x":1.5, "y":1}, + {"label":"k32", "x":2.5, "y":1}, + {"label":"k33", "x":3.5, "y":1}, + {"label":"k34", "x":4.5, "y":1}, + {"label":"k35", "x":5.5, "y":1}, + {"label":"k36", "x":6.5, "y":1}, + {"label":"k37", "x":7.5, "y":1}, + {"label":"k38", "x":8.5, "y":1}, + {"label":"k39", "x":9.5, "y":1}, + {"label":"k3a", "x":10.5, "y":1}, + {"label":"k3b", "x":11.5, "y":1}, + {"label":"k3c", "x":12.5, "y":1}, + {"label":"k3d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.25}, + {"label":"k21", "x":1.25, "y":2}, + {"label":"k22", "x":2.25, "y":2}, + {"label":"k23", "x":3.25, "y":2}, + {"label":"k24", "x":4.25, "y":2}, + {"label":"k25", "x":5.25, "y":2}, + {"label":"k26", "x":6.25, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":2, "w":1.25}, + {"label":"k10", "x":0, "y":3}, + {"label":"k11", "x":1, "y":3}, + {"label":"k12", "x":2, "y":3}, + {"label":"k13", "x":3, "y":3}, + {"label":"k14", "x":4, "y":3}, + {"label":"k15", "x":5, "y":3}, + {"label":"k16", "x":6, "y":3}, + {"label":"k17", "x":7, "y":3}, + {"label":"k18", "x":8, "y":3}, + {"label":"k19", "x":9, "y":3}, + {"label":"k1a", "x":10, "y":3}, + {"label":"k1b", "x":11, "y":3}, + {"label":"k1c", "x":12, "y":3}, + {"label":"k1d", "x":13, "y":3}, + {"label":"k1e", "x":14, "y":3}, + {"label":"k00", "x":0, "y":4}, + {"label":"k01", "x":1, "y":4, "w":1.25}, + {"label":"k02", "x":2.25, "y":4, "w":1.25}, + {"label":"k03", "x":3.5, "y":4, "w":1.25}, + {"label":"k04", "x":4.75, "y":4, "w":2.25}, + {"label":"k05", "x":7, "y":4}, + {"label":"k06", "x":8, "y":4, "w":2}, + {"label":"k09", "x":10, "y":4}, + {"label":"k0a", "x":11, "y":4}, + {"label":"k0b", "x":12, "y":4}, + {"label":"k0c", "x":13, "y":4}, + {"label":"k0d", "x":14, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h b/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h new file mode 100644 index 00000000..08c51f6c --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c b/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c new file mode 100644 index 00000000..91128bd5 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c @@ -0,0 +1,97 @@ +/* Copyright 2017 Baris Tosun + * + * 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 + +// Windows based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LCTL(KC_LEFT) // Previous word +#define K_NXTWD LCTL(KC_RIGHT) // Next word +#define K_LSTRT KC_HOME // Start of line +#define K_LEND KC_END // End of line +#define UNDO LCTL(KC_Z) // UNDO +#define CUT LCTL(KC_X) // CUT +#define COPY LCTL(KC_C) // COPY +#define PASTE LCTL(KC_V) // PASTE + + +#define BASE 0 // Default +#define NUMB 1 // Numbers +#define SYMB 2 // Symbols +#define CURS 3 // Text Editing + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = LAYOUT( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2) + ), +[NUMB] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______ + ), +[SYMB] = LAYOUT( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ + ), +[CURS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md b/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md new file mode 100644 index 00000000..4446bffc --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md @@ -0,0 +1,5 @@ +# The colemak keymap for katana60 + +Same as the default layout, but with default Colemal layout. + +# TODO: references to extend layer and symbol layers \ No newline at end of file diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/config.h b/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/config.h new file mode 100644 index 00000000..c4bea7eb --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c b/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c new file mode 100644 index 00000000..989c7c16 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2017 Baris Tosun + * + * 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 + +// Windows based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LCTL(KC_LEFT) // Previous word +#define K_NXTWD LCTL(KC_RIGHT) // Next word +#define K_LSTRT KC_HOME // Start of line +#define K_LEND KC_END // End of line +#define UNDO LCTL(KC_Z) // UNDO +#define CUT LCTL(KC_X) // CUT +#define COPY LCTL(KC_C) // COPY +#define PASTE LCTL(KC_V) // PASTE + + +#define BASE 0 // Default +#define NUMB 1 // Numbers +#define SYMB 2 // Symbols +#define CURS 3 // Text Editing + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = LAYOUT( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2) + ), +[NUMB] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______ + ), +[SYMB] = LAYOUT( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ + ), +[CURS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/readme.md b/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/readme.md new file mode 100644 index 00000000..a75a3858 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for katana60 + +This layout takes my own personal layout (in development at the Colemak forum) and remaps the keys and shortcuts for Windows (I'm a MacOS user). +The testing was comducted on my Windows gaming PC, though it was not exhaustive, all the many layers and useful navigation shortcuts worked fine. + +# TODO: references to extend layer and symbol layers +# TODO: more information \ No newline at end of file diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h b/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h new file mode 100644 index 00000000..0054f43e --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h @@ -0,0 +1,20 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#pragma once + +// place overrides here + diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c b/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c new file mode 100644 index 00000000..8556ee42 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c @@ -0,0 +1,163 @@ +/* Copyright 2019 Josef Adamcik + * + * 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 + +enum katana_layers { + /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */ + _M_COLEMAK, + _M_QWERTY, + _W_COLEMAK, + _W_QWERTY, + _NUMB, + _SYMB, + _M_EXT, + _W_EXT +}; + +enum katana_keycodes { + M_COLEMAK = SAFE_RANGE, + M_QWERTY, + W_COLEMAK, + W_QWERTY +}; + +#define K_SPCFN LT(_SYMB, KC_SPACE) /* Tap for space, hold for symbols layer */ +#define K_BSPFN LT(_SYMB, KC_BSPC) /* Tap for backspace, hold for symbols layer */ +/* Linux/win variants */ +#define W_LEFT_MOD MT(MOD_RCTL, KC_LEFT) +#define W_DOWN_MOD MT(MOD_RALT, KC_DOWN) +#define W_UP_MOD MT(MOD_RGUI, KC_UP) +#define W_UNDO LCTL(KC_Z) +#define W_CUT LCTL(KC_X) +#define W_COPY LCTL(KC_C) +#define W_PASTE LCTL(KC_V) +#define W_PRVWD LCTL(KC_LEFT) +#define W_NXTWD LCTL(KC_RIGHT) +#define W_LSTRT KC_HOME +#define W_LEND KC_END +/* Mac variants */ +#define M_LEFT_MOD MT(MOD_RGUI, KC_LEFT) +#define M_DOWN_MOD MT(MOD_RALT, KC_DOWN) +#define M_UP_MOD MT(MOD_RCTL, KC_UP) +#define M_UNDO LGUI(KC_Z) +#define M_CUT LGUI(KC_X) +#define M_COPY LGUI(KC_C) +#define M_PASTE LGUI(KC_V) +#define M_PRVWD LALT(KC_LEFT) +#define M_NXTWD LALT(KC_RIGHT) +#define M_LSTRT LGUI(KC_LEFT) +#define M_LEND LGUI(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_M_COLEMAK] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_M_EXT),KC_A, KC_R, KC_S, KC_T, KC_D, KC_MINS, KC_QUOT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, K_BSPFN, KC_ENT, KC_SPACE, M_LEFT_MOD,M_DOWN_MOD,M_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_M_QWERTY] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_M_EXT),KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, K_BSPFN, KC_ENT, KC_SPACE, M_LEFT_MOD,M_DOWN_MOD,M_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_W_COLEMAK] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_W_EXT),KC_A, KC_R, KC_S, KC_T, KC_D, KC_MINS, KC_QUOT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LGUI, KC_LALT, KC_LCTL, K_BSPFN, KC_ENT, KC_SPACE, W_LEFT_MOD,W_DOWN_MOD,W_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_W_QWERTY] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_W_EXT),KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LGUI, KC_LALT, KC_LCTL, K_BSPFN, KC_ENT, KC_SPACE, W_LEFT_MOD,W_DOWN_MOD,W_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_NUMB] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______,_______, KC_7, KC_8, KC_9, KC_PPLS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______,_______, KC_4, KC_5, KC_6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______,_______, KC_1, KC_2, KC_3, KC_PENT, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, _______, _______, _______, _______ +), +[_SYMB] = LAYOUT( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ +), +[_M_EXT] = LAYOUT( + RESET ,M_COLEMAK,M_QWERTY,W_COLEMAK,W_QWERTY,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, M_PRVWD, KC_UP, M_NXTWD, _______, _______, + _______, KC_LALT, KC_LCTL, KC_LSFT, _______, KC_CAPS, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, _______, _______, _______, M_LSTRT, _______, M_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +[_W_EXT] = LAYOUT( + RESET ,M_COLEMAK,M_QWERTY,W_COLEMAK,W_QWERTY,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, W_PRVWD, KC_UP, W_NXTWD, _______, _______, + _______, KC_LALT, KC_LCTL, KC_LSFT, _______, KC_CAPS, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, W_UNDO, W_CUT, W_COPY, W_PASTE, _______, _______, _______, _______, _______, W_LSTRT, _______, W_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_M_QWERTY); + } + return false; + break; + case M_COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_M_COLEMAK); + } + return false; + break; + case W_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_W_QWERTY); + } + return false; + break; + case W_COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_W_COLEMAK); + } + return false; + break; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md b/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md new file mode 100644 index 00000000..5d72b1de --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md @@ -0,0 +1,23 @@ +![Multi OS Katana60 layout image](https://i.imgur.com/1w2OA1o.png) + +# Multi OS Katana60 layout + +Based on the default Katana60 layout, customized by [Josef Adamcik](https://josef-adamcik.cz) with several basic layers (Colemak vs Qwerty, Mac OS vs Linux/Win) + +- Supports 4 default layers: Colemak Mac, Qwerty Mac, Colemak Win/Linux, Qwerty Win/Linux. Switching between default layers is persisted. For more details about Mac vs Win/Linux see below. +- There are arrows mapped to the right side of the bottom row on Katana6O. I kept this mapping but modified it a bit - when you press and hold any of the first three arrow keys it acts as a modifier (CMD, OPT, CTRL). If you just tap it, it acts as an arrow. + +## Mac versus Win/Linux layers: + +- Modifiers are ordered differently. Mac version has (from the middle to the outside): CMD, ALT, CTRL, Win/Linux version has CTRL, ALT, CMD. It's meant to make switching between platforms easier. +- Extend layer is different, so the keys which represent shortcuts ("previous/next word" and "copy", "paste", "cut", "undo") work properly. + +## More details - reasons for some choices in this layout + +I use Mac for work and Ubuntu at home. So I would like to stay compatible with both systems. The main problem is the modifiers. Firstly, they tend to be ordered differently on Mac keyboards. Secondly, the main modifier on Mac is CMD (equivalent to WIn or SUPER on other keyboards). The same role is played by CTRL on Windows and Linux. Most of IDE’s or editors (Android Studio, VS Code, SublimeText) follow this habit in their OS-specific keymaps. + +I am a user of the Colemak layout. But I would like to have the ability to switch to qwerty. That would allow my other people to use my keyboard occasionally. + +I am a heavy user of keyboard shortcuts. So I need the layout to support my needs. Some keyboard layout has modifiers only on one side of the keyboard or they hide some of them (CMD) under a key combination. I tend to press the modifiers for a key shortcut with the opposite hand to the one which presses the letter. + +Layout in [keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/14d62ee67d36621c37888783fa29b107) diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h b/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h new file mode 100644 index 00000000..b57cc482 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h @@ -0,0 +1,21 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c b/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c new file mode 100644 index 00000000..72b795ba --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +// Mod-Tap keys for cleaner code +#define ESC_CTL LCTL_T(KC_ESC) +#define SPC_LW LT(2, KC_SPC) +#define ENT_FN LT(4, KC_ENT) + +#define _QW 0 +#define _DV 1 +#define _LW 2 +#define _RS 3 +#define _FN 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = LAYOUT( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, SPC_LW, ENT_FN, KC_SPC, MO(3), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), +[_DV] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +[_LW] = LAYOUT( + _______, _______, 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +[_RS] = LAYOUT( + _______, _______, 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_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md b/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md new file mode 100644 index 00000000..e4f0ebdb --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md @@ -0,0 +1,3 @@ +# msiu's keymap for katana: standard QWERTY layout with planck like layers + +This layout take a standard QWERTY default layer, with raise and lower layers similar to planck. It is for me to easily transition between keyboards. I put a few nav keys in the 'tree' middle, but I have come to realise I rarely use them as I am used to the planck layering. Top of the tree is a toggle for Dvorak layer. diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h b/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h new file mode 100644 index 00000000..08c51f6c --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c b/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c new file mode 100644 index 00000000..5666dba9 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2017 Baris Tosun + * + * 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 + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + + +#define BASE 0 // Default +#define NUMB 1 // Numbers +#define SYMB 2 // Symbols +#define CURS 3 // Text Editing + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = LAYOUT( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2) + ), +[NUMB] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______ + ), +[SYMB] = LAYOUT( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ + ), +[CURS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md b/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md new file mode 100644 index 00000000..9647426f --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md @@ -0,0 +1,5 @@ +# RominRonin's keymap for katana60 + +My own personal daily layout. OS keys are oriented for MacOS and the keys are in COLEMAK Mod-DH layout. + +# TODO: references to extend layer and symbol layers \ No newline at end of file diff --git a/qmk/keyboards/rominronin/katana60/rev1/readme.md b/qmk/keyboards/rominronin/katana60/rev1/readme.md new file mode 100644 index 00000000..d41548b1 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/readme.md @@ -0,0 +1,17 @@ +# Katana60 rev1 + +![Katana60 rev1](https://i.imgur.com/xVkODOul.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB rev1 +Hardware Availability: the rev1 is no longer available, the rev2 can be found at [candykeys.com](https://candykeys.com/product/katana60-pcb-V2) + +Make example for this keyboard (after setting up your build environment): + + make rominronin/katana60/rev1:default + +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). + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/qmk/keyboards/rominronin/katana60/rev1/rev1.c b/qmk/keyboards/rominronin/katana60/rev1/rev1.c new file mode 100644 index 00000000..e57ae2bb --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2017 Baris Tosun + * + * 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 "rev1.h" diff --git a/qmk/keyboards/rominronin/katana60/rev1/rev1.h b/qmk/keyboards/rominronin/katana60/rev1/rev1.h new file mode 100644 index 00000000..52926cc3 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/rev1.h @@ -0,0 +1,37 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k00, k01, k02, k03, k04, k05, k06, k09, k0a, k0b, k0c, k0d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, KC_NO, KC_NO, k09, k0a, k0b, k0c, k0d, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \ +} diff --git a/qmk/keyboards/rominronin/katana60/rev1/rules.mk b/qmk/keyboards/rominronin/katana60/rev1/rules.mk new file mode 100644 index 00000000..7b69908b --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/rominronin/katana60/rev2/config.h b/qmk/keyboards/rominronin/katana60/rev2/config.h new file mode 100644 index 00000000..7eff68a7 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2019 rominronin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7272 // "rr" - rominronin +#define PRODUCT_ID 0xF03B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RominRonin CandyKeys +#define PRODUCT Katana60 rev2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { B0, E6, D5, B4, B5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, D6, D4, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +#define TAPPING_TERM 200 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/rominronin/katana60/rev2/info.json b/qmk/keyboards/rominronin/katana60/rev2/info.json new file mode 100644 index 00000000..bc31ae64 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/info.json @@ -0,0 +1,579 @@ +{ + "keyboard_name": "Katana60 rev2", + "url": "https://candykeys.com/product/katana60-pcb-V2", + "maintainer": "rominronin", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_7u_a": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4}, + {"label":"k43","x":2.5,"y":4,"w":1.5}, + {"label":"k47","x":4,"y":4,"w":7}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_7u_b": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4}, + {"label":"k43","x":2.5,"y":4,"w":1.5}, + {"label":"k47","x":4,"y":4,"w":7}, + {"label":"k17","x":11,"y":4,"w":1.5}, + {"label":"k27","x":12.5,"y":4}, + {"label":"k48","x":13.5,"y":4,"w":1.5} + ] + }, + "LAYOUT_1_a": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k4a","x":10,"y":4}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_1_b": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2.75}, + {"label":"k17","x":10.75,"y":4,"w":2}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_1_c": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k45","x":10,"y":4,"w":1.5}, + {"label":"k27","x":11.5,"y":4,"w":1.25}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_2_a": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k4a","x":10,"y":4}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_2_b": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2.75}, + {"label":"k17","x":10.75,"y":4,"w":2}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_2_c": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k45","x":10,"y":4,"w":1.5}, + {"label":"k27","x":11.5,"y":4,"w":1.25}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + } + } +} diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/config.h b/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/config.h new file mode 100644 index 00000000..06896764 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 rominronin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c b/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c new file mode 100644 index 00000000..d9c9b6d4 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2019 rominronin + * + * 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 + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + +enum layer_names { + BASE, + NUMB, + SYMB, + CURS, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_1_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [NUMB] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, DF(0), _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_PDOT, KC_PENT, _______, _______ + ), + [SYMB] = LAYOUT_1_a( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ), + [CURS] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md b/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md new file mode 100644 index 00000000..6d0bbe8b --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for katana60_rev2 diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h b/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h new file mode 100644 index 00000000..06896764 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 rominronin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c b/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c new file mode 100644 index 00000000..54508921 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2019 rominronin + * + * 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 + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + +enum layer_names { + BASE, + NUMB, + SYMB, + CURS, + BASE2, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_7u_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(4), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [NUMB] = LAYOUT_7u_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + DF(0), KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______ + ), + [SYMB] = LAYOUT_7u_a( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, KC_DEL, _______, _______, _______, _______ + ), + [CURS] = LAYOUT_7u_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, DF(1), _______, _______, _______, _______ + ), + [BASE2] = LAYOUT_7u_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(0), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ) +}; diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md b/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md new file mode 100644 index 00000000..6d0bbe8b --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md @@ -0,0 +1 @@ +# The default keymap for katana60_rev2 diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/via/keymap.c b/qmk/keyboards/rominronin/katana60/rev2/keymaps/via/keymap.c new file mode 100644 index 00000000..3661e245 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 rominronin + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_1_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, KC_SPACE, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [1] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, DF(0), _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_PDOT, KC_PENT, _______, _______ + ), + [2] = LAYOUT_1_a( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/rominronin/katana60/rev2/keymaps/via/rules.mk b/qmk/keyboards/rominronin/katana60/rev2/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/rominronin/katana60/rev2/readme.md b/qmk/keyboards/rominronin/katana60/rev2/readme.md new file mode 100644 index 00000000..2f2abad7 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/readme.md @@ -0,0 +1,17 @@ +# Katana60 rev2 + +![Katana60 rev2](https://i.imgur.com/3hBsSvBl.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB rev2 +Hardware Availability: [candykeys.com](https://candykeys.com/product/katana60-pcb-V2) + +Make example for this keyboard (after setting up your build environment): + + make rominronin/katana60/rev2:default + +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). + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/qmk/keyboards/rominronin/katana60/rev2/rev2.c b/qmk/keyboards/rominronin/katana60/rev2/rev2.c new file mode 100644 index 00000000..3336fd0d --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 rominronin + * + * 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 "rev2.h" diff --git a/qmk/keyboards/rominronin/katana60/rev2/rev2.h b/qmk/keyboards/rominronin/katana60/rev2/rev2.h new file mode 100644 index 00000000..35a45b43 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/rev2.h @@ -0,0 +1,238 @@ +/* Copyright 2019 rominronin + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* LAYOUT_7u_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┤ + * │41 │42 │43 │ 47 │4B │4C │4D │4E │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ + */ +#define LAYOUT_7u_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q47, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, XXX, XXX, XXX, Q47, XXX, XXX, XXX, Q4B, Q4C, Q4D, Q4E } \ +} + +/* LAYOUT_7u_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┴─┬─┴─┬─┴───┤ + * │41 │42 │43 │ 47 │17 │27 │48 │ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + */ +#define LAYOUT_7u_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q47, Q17, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, XXX, XXX, XXX, Q47, Q48, XXX, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_1_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┼───┼───┼───┼───┼───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │4A │4B │4C │4D │4E │ + * └───┴────┴────┴────┴────────┴───┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_1_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q4A, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, XXX, XXX, Q47, XXX, Q49, Q4A, Q4B, Q4C, Q4D, Q4E } \ +} + +/* LAYOUT_1_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┴──┬┴───┴──┬┴───┴───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │17 │48 │ + * └───┴────┴────┴────┴────────┴───┴──────────┴───────┴────────┘ + */ +#define LAYOUT_1_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q17, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, XXX, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_1_c + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┼───┴─┬─┴──┬┴───┴───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │45 │27 │48 │ + * └───┴────┴────┴────┴────────┴───┴───────┴─────┴────┴────────┘ + */ +#define LAYOUT_1_c( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q45, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, Q45, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + + +/* LAYOUT_2_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴──┬┴───┴┬──┴───┴───┼───┼───┴───┼───┼───┼───┼───┼───┤ + * │41 │42 │43 │ 44 │47 │ 49 │4A │4B │4C │4D │4E │ + * └─────┴────┴─────┴──────────┴───┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_2_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q4A, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, XXX, XXX, Q47, XXX, Q49, Q4A, Q4B, Q4C, Q4D, Q4E } \ +} + + + +/* LAYOUT_2_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴──┬┴───┴┬──┴───┴───┼───┼───┴───┴──┬┴───┴──┬┴───┴───┤ + * │41 │42 │43 │ 44 │47 │ 49 │17 │48 │ + * └─────┴────┴─────┴──────────┴───┴──────────┴───────┴────────┘ + */ +#define LAYOUT_2_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q17, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, XXX, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_2_c + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┼───┴─┬─┴──┬┴───┴───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │45 │27 │48 │ + * └───┴────┴────┴────┴────────┴───┴───────┴─────┴────┴────────┘ + */ +#define LAYOUT_2_c( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q45, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, Q45, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} diff --git a/qmk/keyboards/rominronin/katana60/rev2/rules.mk b/qmk/keyboards/rominronin/katana60/rev2/rules.mk new file mode 100644 index 00000000..000f5591 --- /dev/null +++ b/qmk/keyboards/rominronin/katana60/rev2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/sofle/keymaps/via/config.h b/qmk/keyboards/sofle/keymaps/via/config.h new file mode 100644 index 00000000..32139d8b --- /dev/null +++ b/qmk/keyboards/sofle/keymaps/via/config.h @@ -0,0 +1,29 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +#pragma once + +/* The way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +//Add RGB underglow +#define RGB_DI_PIN D3 +#define RGBLED_NUM 14 +#define RGBLED_SPLIT {7,7} +#define RGBLIGHT_ANIMATIONS \ No newline at end of file diff --git a/qmk/keyboards/sofle/keymaps/via/encoder.c b/qmk/keyboards/sofle/keymaps/via/encoder.c new file mode 100644 index 00000000..8126d077 --- /dev/null +++ b/qmk/keyboards/sofle/keymaps/via/encoder.c @@ -0,0 +1,38 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via. + +#ifdef ENCODER_ENABLE + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDOWN); + } else { + tap_code(KC_PGUP); + } + } +} + +#endif \ No newline at end of file diff --git a/qmk/keyboards/sofle/keymaps/via/keymap.c b/qmk/keyboards/sofle/keymaps/via/keymap.c new file mode 100644 index 00000000..2f917f42 --- /dev/null +++ b/qmk/keyboards/sofle/keymaps/via/keymap.c @@ -0,0 +1,113 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 +#include "oled.c" +#include "encoder.c" + +//Default keymap. This can be changed in Via. Use oled.c and encoder.c to change beavior that Via cannot change. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI,KC_LALT,KC_LCTRL, MO(2), KC_ENT, KC_SPC, MO(3), KC_RCTRL, KC_RALT, KC_RGUI +), +/* + * COLEMAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[1] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI,KC_LALT,KC_LCTRL,KC_TRNS, KC_ENT, KC_SPC, KC_TRNS, KC_RCTRL, KC_RALT, KC_RGUI +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[2] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[3] = LAYOUT( + _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______,_______, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/qmk/keyboards/sofle/keymaps/via/oled.c b/qmk/keyboards/sofle/keymaps/via/oled.c new file mode 100644 index 00000000..06839da1 --- /dev/null +++ b/qmk/keyboards/sofle/keymaps/via/oled.c @@ -0,0 +1,84 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +//Sets up what the OLED screens display. + +#ifdef OLED_DRIVER_ENABLE + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; + + oled_write_P(qmk_logo, false); +} + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("\n\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("Qwrt"), false); + break; + case 1: + oled_write_ln_P(PSTR("Clmk"), false); + break; + default: + oled_write_P(PSTR("Mod\n"), false); + break; + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("LAYER"), false); + switch (get_highest_layer(layer_state)) { + case 0: + case 1: + oled_write_P(PSTR("Base\n"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } +} + +#endif \ No newline at end of file diff --git a/qmk/keyboards/sofle/keymaps/via/readme.md b/qmk/keyboards/sofle/keymaps/via/readme.md new file mode 100644 index 00000000..8470c69b --- /dev/null +++ b/qmk/keyboards/sofle/keymaps/via/readme.md @@ -0,0 +1,14 @@ +# VIA keymap for Sofle + +Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4) + + +Features: + +- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift) +- Modes for Qwerty and Colemak support +- The OLED on master half shows selected mode and caps lock state and is rotated. +- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. +- Via support +- RGB underglow support + diff --git a/qmk/keyboards/sofle/keymaps/via/rules.mk b/qmk/keyboards/sofle/keymaps/via/rules.mk new file mode 100644 index 00000000..f482499d --- /dev/null +++ b/qmk/keyboards/sofle/keymaps/via/rules.mk @@ -0,0 +1,7 @@ +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +VIA_ENABLE = yes +LTO_ENABLE = yes +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/soy20/config.h b/qmk/keyboards/soy20/config.h new file mode 100644 index 00000000..932b129f --- /dev/null +++ b/qmk/keyboards/soy20/config.h @@ -0,0 +1,55 @@ +/* Soy20 PCB}} +Copyright (C) {{ 2020 }} {{ Drewkeys }} + +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 3 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 .*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4452 // "DR" short for DrewKeys +#define PRODUCT_ID 0x534f // "SO" short for Soy +#define DEVICE_VER 0x0001 +#define MANUFACTURER drewkeys +#define PRODUCT soy20 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, B6, B7, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/qmk/keyboards/soy20/info.json b/qmk/keyboards/soy20/info.json new file mode 100644 index 00000000..ea1ab2e7 --- /dev/null +++ b/qmk/keyboards/soy20/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "Soy20", + "url": "", + "maintainer": "twholt", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C7)", "x":3, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1}, + {"label":"K11 (B1,B6)", "x":1, "y":1}, + {"label":"K12 (B1,B7)", "x":2, "y":1}, + {"label":"K13 (B1,C7)", "x":3, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2}, + {"label":"K21 (B2,B6)", "x":1, "y":2}, + {"label":"K22 (B2,B7)", "x":2, "y":2}, + {"label":"K23 (B2,C7)", "x":3, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3}, + {"label":"K31 (B3,B6)", "x":1, "y":3}, + {"label":"K32 (B3,B7)", "x":2, "y":3}, + {"label":"K33 (B3,C7)", "x":3, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4}, + {"label":"K41 (B4,B6)", "x":1, "y":4}, + {"label":"K42 (B4,B7)", "x":2, "y":4}, + {"label":"K43 (B4,C7)", "x":3, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/soy20/keymaps/default/keymap.c b/qmk/keyboards/soy20/keymaps/default/keymap.c new file mode 100644 index 00000000..0ab505ee --- /dev/null +++ b/qmk/keyboards/soy20/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_5x4( + KC_PMNS, KC_PAST, KC_PSLS, MO(1), + KC_PPLS, KC_P9, KC_P8, KC_P7, + KC_TAB, KC_P5, KC_P6, KC_P4, + KC_PENT, KC_P3, KC_P2, KC_P1, + KC_DEL, KC_SCLN, KC_PDOT, KC_P0), + + [1] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSCR, 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, RESET), + +}; diff --git a/qmk/keyboards/soy20/keymaps/via/keymap.c b/qmk/keyboards/soy20/keymaps/via/keymap.c new file mode 100644 index 00000000..fde63da1 --- /dev/null +++ b/qmk/keyboards/soy20/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_5x4( + KC_PMNS, KC_PAST, KC_PSLS, MO(1), + KC_PPLS, KC_P9, KC_P8, KC_P7, + KC_TAB, KC_P5, KC_P6, KC_P4, + KC_PENT, KC_P3, KC_P2, KC_P1, + KC_DEL, KC_SCLN, KC_PDOT, KC_P0), + + [1] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSCR, 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, RESET), + + [2] = LAYOUT_ortho_5x4( + 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), + + [3] = LAYOUT_ortho_5x4( + 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), + +}; diff --git a/qmk/keyboards/soy20/keymaps/via/rules.mk b/qmk/keyboards/soy20/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/soy20/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/soy20/readme.md b/qmk/keyboards/soy20/readme.md new file mode 100644 index 00000000..1ac310f7 --- /dev/null +++ b/qmk/keyboards/soy20/readme.md @@ -0,0 +1,13 @@ +# Soy20 + +A 4x5 keypad created by drewkeys + +* Keyboard Maintainer: [Friend-Or-F0H](https://github.com/Friend-Or-F0H) +* Hardware Supported: drewkeys Soy20 PCB +* Hardware Availability: Limited GB + +Make example for this keyboard (after setting up your build environment): + + make soy20:default + +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). diff --git a/qmk/keyboards/soy20/rules.mk b/qmk/keyboards/soy20/rules.mk new file mode 100644 index 00000000..06f81dad --- /dev/null +++ b/qmk/keyboards/soy20/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_5x4 diff --git a/qmk/keyboards/soy20/soy20.c b/qmk/keyboards/soy20/soy20.c new file mode 100644 index 00000000..1b259e8d --- /dev/null +++ b/qmk/keyboards/soy20/soy20.c @@ -0,0 +1,18 @@ +/* Soy20 PCB}} +Copyright (C) {{ 2020 }} {{ Drewkeys }} + +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 3 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 "soy20.h" diff --git a/qmk/keyboards/soy20/soy20.h b/qmk/keyboards/soy20/soy20.h new file mode 100644 index 00000000..c29b04f9 --- /dev/null +++ b/qmk/keyboards/soy20/soy20.h @@ -0,0 +1,33 @@ +/* Soy20 PCB}} +Copyright (C) {{ 2020 }} {{ Drewkeys }} + +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 3 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 .*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} diff --git a/qmk/keyboards/spaceman/2_milk/keymaps/via/rules.mk b/qmk/keyboards/spaceman/2_milk/keymaps/via/rules.mk index 43061db1..36b7ba9c 100644 --- a/qmk/keyboards/spaceman/2_milk/keymaps/via/rules.mk +++ b/qmk/keyboards/spaceman/2_milk/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/qmk/keyboards/spaceman/2_milk/rules.mk b/qmk/keyboards/spaceman/2_milk/rules.mk index 4e6c5f70..b93e8d3a 100644 --- a/qmk/keyboards/spaceman/2_milk/rules.mk +++ b/qmk/keyboards/spaceman/2_milk/rules.mk @@ -16,7 +16,7 @@ BOOTLOADER = caterina # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control +EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/qmk/keyboards/spaceman/pancake/config.h b/qmk/keyboards/spaceman/pancake/config.h index 5a01a572..69fcd958 100644 --- a/qmk/keyboards/spaceman/pancake/config.h +++ b/qmk/keyboards/spaceman/pancake/config.h @@ -17,8 +17,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xB195 +#define VENDOR_ID 0x5342 // SB +#define PRODUCT_ID 0x504B // PK #define DEVICE_VER 0x0001 #define MANUFACTURER Spaceman #define PRODUCT Pancake @@ -28,4 +28,4 @@ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 -#define DIODE_DIRECTION COL2ROW \ No newline at end of file +#define DIODE_DIRECTION COL2ROW diff --git a/qmk/keyboards/spaceman/pancake/feather/rules.mk b/qmk/keyboards/spaceman/pancake/feather/rules.mk index c54fbf06..a7331959 100644 --- a/qmk/keyboards/spaceman/pancake/feather/rules.mk +++ b/qmk/keyboards/spaceman/pancake/feather/rules.mk @@ -20,7 +20,7 @@ BOOTLOADER = caterina BLUETOOTH = AdafruitBLE BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control +EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/qmk/keyboards/spaceman/pancake/keymaps/via/keymap.c b/qmk/keyboards/spaceman/pancake/keymaps/via/keymap.c new file mode 100644 index 00000000..a0cda2ee --- /dev/null +++ b/qmk/keyboards/spaceman/pancake/keymaps/via/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2020 Spaceman + * + * 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 +enum layers { + _DEFAULT, + _LOWER, + _RAISE, + _FN +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FN MO(_FN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Default + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | " | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | FN | Lower| Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DEFAULT] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_SCLN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, KC_LALT, KC_LGUI, FN, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | _ | + | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | { | } | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | ? | | Vol- | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______, KC_VOLD, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | - | = | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | [ | ] | Vol- | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Vol+ | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______ +), + + /* FN + * ,-----------------------------------------------------------------------------------. + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | F11 | F12 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | TRNS | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ortho_4x12( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + + +}; + diff --git a/qmk/keyboards/spaceman/pancake/keymaps/via/rules.mk b/qmk/keyboards/spaceman/pancake/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/spaceman/pancake/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/spaceman/pancake/promicro/rules.mk b/qmk/keyboards/spaceman/pancake/promicro/rules.mk index 6ed9e88e..09daaf4d 100644 --- a/qmk/keyboards/spaceman/pancake/promicro/rules.mk +++ b/qmk/keyboards/spaceman/pancake/promicro/rules.mk @@ -16,7 +16,7 @@ BOOTLOADER = caterina # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control +EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/qmk/keyboards/spiderisland/split78/config.h b/qmk/keyboards/spiderisland/split78/config.h new file mode 100644 index 00000000..a7ec160f --- /dev/null +++ b/qmk/keyboards/spiderisland/split78/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2020 unrelenting.technology + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xF4E4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SpiderIsland +#define PRODUCT Split 78-key + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING diff --git a/qmk/keyboards/spiderisland/split78/info.json b/qmk/keyboards/spiderisland/split78/info.json new file mode 100644 index 00000000..7a96efe7 --- /dev/null +++ b/qmk/keyboards/spiderisland/split78/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "Spider Island 78-key split", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + {"x": 10.5, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25}, + {"x": 14, "y": 1.25, "w": 2}, + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25}, + {"x": 14.5, "y": 2.25, "w": 1.5}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 3.25, "w": 2.25}, + + {"x": 0, "y": 4.25, "w": 2.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 1.75}, + {"x": 14, "y": 4.25}, + {"x": 15, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 1.25}, + {"x": 5, "y": 5.25, "w": 2.25}, + {"x": 8.25, "y": 5.25, "w": 2.25}, + {"x": 10.5, "y": 5.25, "w": 1.25}, + {"x": 11.75, "y": 5.25, "w": 1.25}, + {"x": 13, "y": 5.25}, + {"x": 14, "y": 5.25}, + {"x": 15, "y": 5.25} + ] + } + } +} diff --git a/qmk/keyboards/spiderisland/split78/keymaps/default/keymap.c b/qmk/keyboards/spiderisland/split78/keymaps/default/keymap.c new file mode 100644 index 00000000..761648d9 --- /dev/null +++ b/qmk/keyboards/spiderisland/split78/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 unrelenting.technology + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_GESC, 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_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, TT(_FN), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, KC_DEL, + KC_NLCK, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + BL_TOGG, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, KC_SLSH, KC_PGUP, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, KC_PDOT, KC_PENT, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/qmk/keyboards/spiderisland/split78/matrix.c b/qmk/keyboards/spiderisland/split78/matrix.c new file mode 100644 index 00000000..b5c7028f --- /dev/null +++ b/qmk/keyboards/spiderisland/split78/matrix.c @@ -0,0 +1,155 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 +#include +#include "quantum.h" +#include "i2c_master.h" +#include "split78.h" + +#define RIGHT_HALF + + +void matrix_set_row_status(uint8_t row); + + +#if defined(RIGHT_HALF) +#define I2C_TIMEOUT 10 +#define MCP23018_TWI_ADDRESS 0b0100000 +#define TW_READ 1 +#define TW_WRITE 0 +#define TWI_ADDR_WRITE ( (MCP23018_TWI_ADDRESS<<1) | TW_WRITE ) +#define TWI_ADDR_READ ( (MCP23018_TWI_ADDRESS<<1) | TW_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 +#define MCP_ROWS_START 8 + +static uint8_t mcp23018_init(void) { + uint8_t ret; + uint8_t data[3]; + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + data[0] = IODIRA; + data[1] = 0b00000000; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + if (ret) goto out; // make sure we got an ACK + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + data[0] = GPPUA; + data[1] = 0b00000000; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + if (ret) goto out; // make sure we got an ACK + + // set logical value (doesn't matter on inputs) + // - unused : hi-Z : 1 + // - input : hi-Z : 1 + // - driving : hi-Z : 1 + data[0] = OLATA; + data[1] = 0b11111111; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + +out: + return ret; +} +#endif + +void matrix_init_custom(void) { + // Set rows as output starting high + DDRB = 0xFF; + PORTB = 0xFF; + + // Set columns as inputs with pull-up enabled + DDRA = 0x00; + PORTA = 0xFF; + + // Initialize i2c communication + i2c_init(); + +#if defined(RIGHT_HALF) + // Initialize the chip on the other half + mcp23018_init(); +#endif + +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row]; + + matrix_row_t cols = 0; + // Select the row to scan + matrix_set_row_status(row); + + matrix_io_delay(); + //Set the local row + +#if defined(RIGHT_HALF) + // Initialize to 0x7F in case I2C read fails, + // as 0x75 would be no keys pressed + uint8_t data = 0x7F; + // Receive the columns from right half + i2c_receive(TWI_ADDR_WRITE, &data, 1, I2C_TIMEOUT); +#endif + + cols |= ((~(PINA | 0x80)) & 0x7F); +#if defined(RIGHT_HALF) + cols |= (((~(data | 0x80)) & 0x7F) << 7); +#endif + + current_matrix[row] = cols; + matrix_has_changed |= (last_row_value != current_matrix[row]); + } + + return matrix_has_changed; +} + +void matrix_set_row_status(uint8_t row) { +#if defined(RIGHT_HALF) + uint8_t txdata[3]; + + //Set the remote row on port A + txdata[0] = (GPIOA); + txdata[1] = ( 0xFF & ~(1<. + */ + +#include "split78.h" diff --git a/qmk/keyboards/spiderisland/split78/split78.h b/qmk/keyboards/spiderisland/split78/split78.h new file mode 100644 index 00000000..2f6252f0 --- /dev/null +++ b/qmk/keyboards/spiderisland/split78/split78.h @@ -0,0 +1,36 @@ +/* Copyright 2020 unrelenting.technology + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + l00, l01, l02, l03, l04, l05, r00, r01, r02, r03, r04, r05, r06, \ + l06, l07, l08, l09, l10, l11, l12, r07, r08, r09, r10, r11, r12, r13, \ + l13, l14, l15, l16, l17, l18, r14, r15, r16, r17, r18, r19, r20, r21, \ + l19, l20, l21, l22, l23, l24, r22, r23, r24, r25, r26, r27, r28, \ + l25, l26, l27, l28, l29, l30, r29, r30, r31, r32, r33, r34, r35, \ + l31, l32, l33, l34, l35, r36, r37, r38, r39, r40, r41 \ +) { \ + { l00, l06, l13, l19, l25, l31, KC_NO, r00, r07, r14, r22, r29, r21 }, \ + { l01, l07, l14, l20, l26, l32, KC_NO, r01, r08, r15, r23, r30, r36 }, \ + { l02, l08, l15, l21, l27, l33, KC_NO, r02, r09, r16, r24, r31, r37 }, \ + { l03, l09, l16, l22, l28, l34, KC_NO, r03, r10, r17, r25, r32, r38 }, \ + { l04, l10, l17, l23, l29, l35, KC_NO, r04, r11, r18, r27, r33, r39 }, \ + { l05, l11, l18, l24, l30, l12, KC_NO, r05, r12, r19, r26, r34, r40 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, r06, r13, r20, r28, r35, r41 }, \ +} diff --git a/qmk/keyboards/stella/config.h b/qmk/keyboards/stella/config.h index 18a8c5a2..04ba0823 100644 --- a/qmk/keyboards/stella/config.h +++ b/qmk/keyboards/stella/config.h @@ -20,15 +20,14 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER HnahKB -#define PRODUCT Stella -#define DESCRIPTION Custom PCB TKL keyboard for vgs community +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0AB7 +#define DEVICE_VER 0x0001 +#define MANUFACTURER HnahKB +#define PRODUCT Stella /* key matrix size */ -#define MATRIX_ROWS 10 +#define MATRIX_ROWS 10 #define MATRIX_COLS 10 /* @@ -45,21 +44,98 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ - #define BACKLIGHT_PIN B6 -#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 14 +//# define RGBLIGHT_HUE_STEP 8 +//# define RGBLIGHT_SAT_STEP 8 +//# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST -#define RGB_DI_PIN E2 -#define RGBLED_NUM 14 \ No newline at end of file +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/stella/info.json b/qmk/keyboards/stella/info.json index d6555636..d5a585bb 100644 --- a/qmk/keyboards/stella/info.json +++ b/qmk/keyboards/stella/info.json @@ -1,18 +1,326 @@ { - "keyboard_name": "Stella", - "url": "", - "maintainer": "VGS", - "width": 18.25, - "height": 6.5, + "keyboard_name": "Stella", + "url": "", + "maintainer": "VGS", + "width": 18.25, + "height": 6.5, "layouts": { "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5}, {"label":"Backspace2", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"JP Ro", "x":12.25, "y":4.5}, {"label":"Shift", "x":13.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 15.25, "y": 0}, + {"x": 16.25, "y": 0}, + {"x": 17.25, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25}, + {"x": 14, "y": 1.25}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25, "w": 1.5}, + + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 3.25, "w": 1.25}, + + {"x": 0, "y": 4.25, "w": 1.25}, + {"x": 1.25, "y": 4.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25}, + {"x": 13.25, "y": 4.25, "w": 1.75}, + + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} + ] }, "LAYOUT_tkl_ansi": { - "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 15.25, "y": 0}, + {"x": 16.25, "y": 0}, + {"x": 17.25, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25, "w": 2}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25, "w": 1.5}, + + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25, "w": 2.25}, + + {"x": 0, "y": 4.25, "w": 2.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 2.75}, + + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} + ] }, "LAYOUT_tkl_iso": { - "layout": [{"label":"Esc", "x":0, "y":0.25}, {"label":"F1", "x":2, "y":0.25}, {"label":"F2", "x":3, "y":0.25}, {"label":"F3", "x":4, "y":0.25}, {"label":"F4", "x":5, "y":0.25}, {"label":"F5", "x":6.5, "y":0.25}, {"label":"F6", "x":7.5, "y":0.25}, {"label":"F7", "x":8.5, "y":0.25}, {"label":"F8", "x":9.5, "y":0.25}, {"label":"F9", "x":11, "y":0.25}, {"label":"F10", "x":12, "y":0.25}, {"label":"F11", "x":13, "y":0.25}, {"label":"F12", "x":14, "y":0.25}, {"label":"PrtSc", "x":15.25, "y":0.25}, {"label":"Scroll Lock", "x":16.25, "y":0.25}, {"label":"Pause", "x":17.25, "y":0.25}, {"label":"\u00ac", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"\"", "x":2, "y":1.5}, {"label":"\u00a3", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"@", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 15.25, "y": 0}, + {"x": 16.25, "y": 0}, + {"x": 17.25, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25, "w": 2}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, + + {"x": 0, "y": 4.25, "w": 1.25}, + {"x": 1.25, "y": 4.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 2.75}, + + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} + ] } } } diff --git a/qmk/keyboards/stella/keymaps/default/keymap.c b/qmk/keyboards/stella/keymaps/default/keymap.c index 6c869a7f..d8a8f47b 100644 --- a/qmk/keyboards/stella/keymaps/default/keymap.c +++ b/qmk/keyboards/stella/keymaps/default/keymap.c @@ -13,32 +13,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -enum hnah_layers{ - _QWERTY, - _LOWER +enum layer_names { + _QWERTY, + _LOWER }; #define LOWER MO(_LOWER) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_tkl_iso( - 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_PSCR, KC_SLCK, KC_PAUS , - 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_INS, KC_HOME, 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_DEL, KC_END, 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_NUHS, KC_ENT, - 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, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [_LOWER] = LAYOUT_tkl_iso( - RESET, 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, 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 - ) -}; + [_QWERTY] = LAYOUT_tkl_iso( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, 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_DEL, KC_END, 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_NUHS, KC_ENT, + 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_LOWER] = LAYOUT_tkl_iso( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/stella/keymaps/default/readme.md b/qmk/keyboards/stella/keymaps/default/readme.md index 3ab96ef6..fa9cd4a5 100644 --- a/qmk/keyboards/stella/keymaps/default/readme.md +++ b/qmk/keyboards/stella/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for stella \ No newline at end of file +# The default keymap for stella diff --git a/qmk/keyboards/stella/readme.md b/qmk/keyboards/stella/readme.md index c716225a..f5820dcf 100644 --- a/qmk/keyboards/stella/readme.md +++ b/qmk/keyboards/stella/readme.md @@ -1,15 +1,19 @@ # stella -![stella](https://i.imgur.com/jaiG578.jpg) +![stella](https://i.imgur.com/jaiG578l.jpg) -A cusom keyboard design for VGS community +A custom keyboard design for VGS community -Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) -Hardware Supported: Stella Keyboard -Hardware Availability: [VGS](https://www.facebook.com/groups/vietnamgamingsetup/permalink/2403066473102277) +* Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) +* Hardware Supported: Stella Keyboard +* Hardware Availability: [VGS](https://www.facebook.com/groups/vietnamgamingsetup/permalink/2403066473102277) Make example for this keyboard (after setting up your build environment): make stella:default +Flashing example for this keyboard: + + make stella: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). diff --git a/qmk/keyboards/stella/rules.mk b/qmk/keyboards/stella/rules.mk index 1f4d1922..6ffd641e 100644 --- a/qmk/keyboards/stella/rules.mk +++ b/qmk/keyboards/stella/rules.mk @@ -2,20 +2,13 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration @@ -23,14 +16,9 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output -# Supported layouts LAYOUTS = tkl_ansi tkl_iso diff --git a/qmk/keyboards/stella/stella.c b/qmk/keyboards/stella/stella.c index 4b545042..363c327d 100644 --- a/qmk/keyboards/stella/stella.c +++ b/qmk/keyboards/stella/stella.c @@ -13,33 +13,24 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "stella.h" - void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); + matrix_init_user(); + led_init_ports(); }; void led_init_ports(void) { - setPinOutput(B3); - setPinOutput(B7); + setPinOutput(B3); + setPinOutput(B7); } -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn Caps Lock LED on - writePinLow(B3); - } else { - // Turn Caps Lock LED off - writePinHigh(B3); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - // Turn Scroll Lock LED on - writePinLow(B7); - } else { - // Turn Scroll Lock LED off - writePinHigh(B7); - } - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B3, !led_state.caps_lock); + writePin(B7, !led_state.scroll_lock); + } + + return true; } diff --git a/qmk/keyboards/stella/stella.h b/qmk/keyboards/stella/stella.h index f18e7443..ce41dfd2 100644 --- a/qmk/keyboards/stella/stella.h +++ b/qmk/keyboards/stella/stella.h @@ -13,60 +13,69 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once #include "quantum.h" +#define XXX KC_NO #define LAYOUT_all( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ + k00, k01, k02, k03, k04, k06, k07, k08, k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ ) { \ - { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09 }, \ + { k00, k01, k02, k03, k04, XXX, k06, k07, k08, k09 }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49}, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \ { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ - { k80, k81, k82, k83, k84, k85, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { k90, k91, k92, k93, k94, k95, KC_NO, KC_NO, KC_NO, KC_NO } \ + { k80, k81, k82, k83, k84, k85, XXX, XXX, XXX, XXX }, \ + { k90, k91, k92, k93, k94, k95, XXX, XXX, XXX, XXX } \ } #define LAYOUT_tkl_ansi( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ - k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) LAYOUT_all( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, KC_NO, k84, \ - k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) + k00, k01, k02, k03, k04, k06, k07, k08, k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, XXX, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, k83, k84, XXX, XXX, XXX, XXX, XXX }, \ + { k90, k91, XXX, k93, k94, k95, XXX, XXX, XXX, XXX } \ +} #define LAYOUT_tkl_iso( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) LAYOUT_all( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, KC_NO, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) - + k00, k01, k02, k03, k04, k06, k07, k08, k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, XXX, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, XXX, k84, XXX, XXX, XXX, XXX, XXX }, \ + { k90, k91, k92, k93, k94, k95, XXX, XXX, XXX, XXX } \ +} diff --git a/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c b/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c new file mode 100644 index 00000000..f8f8a1ce --- /dev/null +++ b/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2020 Ryota Goto + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all ( + BL_STEP, BL_TOGG, MO(1) , 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_PSCR, KC_SLCK, KC_PAUS, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_DEL, KC_END, KC_PGDN, + KC_P4, KC_P5, KC_P6, KC_PPLS, 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_ENT, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN1] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md b/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md new file mode 100644 index 00000000..1335b773 --- /dev/null +++ b/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for southpaw fullsize + +For use with VIA configurator \ No newline at end of file diff --git a/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk b/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/config.h b/qmk/keyboards/terrazzo/config.h new file mode 100644 index 00000000..4b1dac70 --- /dev/null +++ b/qmk/keyboards/terrazzo/config.h @@ -0,0 +1,104 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ +#pragma once + +#include "config_common.h" + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4d4d // MM +#define PRODUCT_ID 0x545a // TZ +#define DEVICE_VER 0x0002 +#define MANUFACTURER MsMustard +#define PRODUCT Terrazzo + +/* key matrix size */ + +// SWAP FOR PRO MICRO +// #define MATRIX_ROWS 8 +#define MATRIX_ROWS 9 +#define MATRIX_COLS 6 + +/* key matrix pins */ + +// SWAP FOR PRO MICRO +// #define MATRIX_ROW_PINS { D2, D7, E6, B4, B5, B6, B2, B3 } +#define MATRIX_ROW_PINS { D2, D7, E6, B4, B5, B6, B2, B3, F0 } +#define MATRIX_COL_PINS { D3, F4, F5, F6, F7, B1 } + +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* ROTARY ENCODERS */ + +/* 4 encoder positions are supported. With multiple +encoder support when using the extra pins of +Elite-C controller. + +Use the following configuration guides for your +encoder layout. */ + +/* PRO MICRO CONFIGURATIONS */ + +/* If using a Pro Micro, only 1 encoder may be used, +and only in the top or bottom position. +Top and bottom encoders share the same net, +so there is only one configuration. */ + +/* TOP or BOTTOM */ +// #define ENCODERS_PAD_A { C6 } +// #define ENCODERS_PAD_B { D4 } + +/* ELITE-C ONLY CONFIGURATIONS */ + +/* TOP 3 + Default configuration */ +#define ENCODERS_PAD_A { C6 , B7, C7 } +#define ENCODERS_PAD_B { D4 , D5, F1 } + +/* BOTTOM 3 */ +// #define ENCODERS_PAD_A { B7, C7, C6 } +// #define ENCODERS_PAD_B { D5, F1, D4 } + +/* BOTTOM 2 */ +// #define ENCODERS_PAD_A { C7, C6 } +// #define ENCODERS_PAD_B { F1, D4 } + + +#define ENCODER_RESOLUTION 2 +#define BACKLIGHT_LEVELS 5 + +#ifdef LED_MATRIX_ENABLE + +#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_COUNT 1 +#define LED_DRIVER_LED_COUNT 105 +#define LED_MATRIX_ROWS 15 +#define LED_MATRIX_COLS 7 +#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 +#define LED_DISABLE_WHEN_USB_SUSPENDED true + +#endif + +/* Terrazzo animations */ + +// #define DISABLE_TERRAZZO_EFFECT_STRIPES +// #define DISABLE_TERRAZZO_EFFECT_DINO +// #define DISABLE_TERRAZZO_EFFECT_OUTRUN +#define DISABLE_TERRAZZO_EFFECT_PAC_DUDE +#define DISABLE_TERRAZZO_EFFECT_HEART +// #define DISABLE_TERRAZZO_EFFECT_WPM_CHART +#define DISABLE_TERRAZZO_EFFECT_DOT diff --git a/qmk/keyboards/terrazzo/info.json b/qmk/keyboards/terrazzo/info.json new file mode 100644 index 00000000..d41a81c5 --- /dev/null +++ b/qmk/keyboards/terrazzo/info.json @@ -0,0 +1,41 @@ +{ + "keyboard_name": "Terrazzo", + "url": "", + "maintainer": "MsMustard", + "width": 14.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"Q", "x":3.5, "y":0}, {"label":"W", "x":4.5, "y":0}, {"label":"E", "x":5.5, "y":0}, {"label":"R", "x":6.5, "y":0}, {"label":"T", "x":7.5, "y":0}, {"label":"Y", "x":8.5, "y":0}, {"label":"U", "x":9.5, "y":0}, {"label":"I", "x":10.5, "y":0}, {"label":"O", "x":11.5, "y":0}, {"label":"P", "x":12.5, "y":0}, {"label":"Back", "x":13.5, "y":0}, + {"label":"TZ Nxt", "x":0, "y":1}, {"label":"Control", "x":2.5, "y":1, "w":1.25}, {"label":"A", "x":3.75, "y":1}, {"label":"S", "x":4.75, "y":1}, {"label":"D", "x":5.75, "y":1}, {"label":"F", "x":6.75, "y":1}, {"label":"G", "x":7.75, "y":1}, {"label":"H", "x":8.75, "y":1}, {"label":"J", "x":9.75, "y":1}, {"label":"K", "x":10.75, "y":1}, {"label":"L", "x":11.75, "y":1}, {"label":"Enter", "x":12.75, "y":1, "w":1.75}, + {"label":"TZ Prv", "x":0, "y":2}, {"label":"Shift", "x":2.5, "y":2, "w":1.75}, {"label":"Z", "x":4.25, "y":2}, {"label":"X", "x":5.25, "y":2}, {"label":"C", "x":6.25, "y":2}, {"label":"V", "x":7.25, "y":2}, {"label":"B", "x":8.25, "y":2}, {"label":"N", "x":9.25, "y":2}, {"label":"M", "x":10.25, "y":2}, {"label":"<", "x":11.25, "y":2}, {"label":">", "x":12.25, "y":2}, {"label":"Shift", "x":13.25, "y":2, "w":1.25}, + {"label":"TZ Off", "x":0, "y":3}, {"label":"Win", "x":3.5, "y":3}, {"label":"Alt", "x":4.5, "y":3, "w":1.5}, {"label":"Space", "x":6, "y":3, "w":2.25}, {"label":"Space", "x":8.25, "y":3, "w":2.75}, {"label":"Fn", "x":11, "y":3, "w":1.5}, {"label":"Fn1", "x":12.5, "y":3} + ] + }, + "LAYOUT_ortho": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"Q", "x":3.5, "y":0}, {"label":"W", "x":4.5, "y":0}, {"label":"E", "x":5.5, "y":0}, {"label":"R", "x":6.5, "y":0}, {"label":"T", "x":7.5, "y":0}, {"label":"Y", "x":8.5, "y":0}, {"label":"U", "x":9.5, "y":0}, {"label":"I", "x":10.5, "y":0}, {"label":"O", "x":11.5, "y":0}, {"label":"P", "x":12.5, "y":0}, {"label":"Back", "x":13.5, "y":0}, + {"label":"TZ Nxt", "x":0, "y":1}, {"label":"Ctrl", "x":2.5, "y":1}, {"label":"A", "x":3.5, "y":1}, {"label":"S", "x":4.5, "y":1}, {"label":"D", "x":5.5, "y":1}, {"label":"F", "x":6.5, "y":1}, {"label":"G", "x":7.5, "y":1}, {"label":"H", "x":8.5, "y":1}, {"label":"J", "x":9.5, "y":1}, {"label":"K", "x":10.5, "y":1}, {"label":"L", "x":11.5, "y":1}, {"label":";", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1}, + {"label":"TZ Prv", "x":0, "y":2}, {"label":"Shift", "x":2.5, "y":2}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"/", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2}, + {"label":"TZ Off", "x":0, "y":3}, {"label":"Win", "x":3.5, "y":3}, {"label":"Alt", "x":4.5, "y":3}, {"label":"Lower", "x":5.5, "y":3}, {"label":"Space", "x":6.5, "y":3, "w":2}, {"label":"Space", "x":8.5, "y":3, "w":2}, {"label":"Raise", "x":10.5, "y":3}, {"label":"Nav", "x":11.5, "y":3}, {"label":"Fn", "x":12.5, "y":3} + ] + }, + "LAYOUT_ortho_mit": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"Q", "x":3.5, "y":0}, {"label":"W", "x":4.5, "y":0}, {"label":"E", "x":5.5, "y":0}, {"label":"R", "x":6.5, "y":0}, {"label":"T", "x":7.5, "y":0}, {"label":"Y", "x":8.5, "y":0}, {"label":"U", "x":9.5, "y":0}, {"label":"I", "x":10.5, "y":0}, {"label":"O", "x":11.5, "y":0}, {"label":"P", "x":12.5, "y":0}, {"label":"Back", "x":13.5, "y":0}, + {"label":"TZ Nxt", "x":0, "y":1}, {"label":"Ctrl", "x":2.5, "y":1}, {"label":"A", "x":3.5, "y":1}, {"label":"S", "x":4.5, "y":1}, {"label":"D", "x":5.5, "y":1}, {"label":"F", "x":6.5, "y":1}, {"label":"G", "x":7.5, "y":1}, {"label":"H", "x":8.5, "y":1}, {"label":"J", "x":9.5, "y":1}, {"label":"K", "x":10.5, "y":1}, {"label":"L", "x":11.5, "y":1}, {"label":";", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1}, + {"label":"TZ Prv", "x":0, "y":2}, {"label":"Shift", "x":2.5, "y":2}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"/", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2}, + {"label":"TZ Off", "x":0, "y":3}, {"label":"Tab", "x":3.5, "y":3}, {"label":"Win", "x":4.5, "y":3}, {"label":"Alt", "x":5.5, "y":3}, {"label":"Lower", "x":6.5, "y":3}, {"label":"Space", "x":7.5, "y":3, "w":2}, {"label":"Raise", "x":9.5, "y":3}, {"label":"Nav", "x":10.5, "y":3}, {"label":"Fn", "x":11.5, "y":3}, {"label":"Del", "x":12.5, "y":3} + ] + }, + "LAYOUT_ortho_all": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"Q", "x":3.5, "y":0}, {"label":"W", "x":4.5, "y":0}, {"label":"E", "x":5.5, "y":0}, {"label":"R", "x":6.5, "y":0}, {"label":"T", "x":7.5, "y":0}, {"label":"Y", "x":8.5, "y":0}, {"label":"U", "x":9.5, "y":0}, {"label":"I", "x":10.5, "y":0}, {"label":"O", "x":11.5, "y":0}, {"label":"P", "x":12.5, "y":0}, {"label":"Back", "x":13.5, "y":0}, + {"label":"TZ Nxt", "x":0, "y":1}, {"label":"Ctrl", "x":2.5, "y":1}, {"label":"A", "x":3.5, "y":1}, {"label":"S", "x":4.5, "y":1}, {"label":"D", "x":5.5, "y":1}, {"label":"F", "x":6.5, "y":1}, {"label":"G", "x":7.5, "y":1}, {"label":"H", "x":8.5, "y":1}, {"label":"J", "x":9.5, "y":1}, {"label":"K", "x":10.5, "y":1}, {"label":"L", "x":11.5, "y":1}, {"label":";", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1}, + {"label":"TZ Prv", "x":0, "y":2}, {"label":"Shift", "x":2.5, "y":2}, {"label":"Z", "x":3.5, "y":2}, {"label":"X", "x":4.5, "y":2}, {"label":"C", "x":5.5, "y":2}, {"label":"V", "x":6.5, "y":2}, {"label":"B", "x":7.5, "y":2}, {"label":"N", "x":8.5, "y":2}, {"label":"M", "x":9.5, "y":2}, {"label":"<", "x":10.5, "y":2}, {"label":">", "x":11.5, "y":2}, {"label":"/", "x":12.5, "y":2}, {"label":"Shift", "x":13.5, "y":2}, + {"label":"TZ Off", "x":0, "y":3}, {"label":"Tab", "x":3.5, "y":3}, {"label":"Win", "x":4.5, "y":3}, {"label":"Alt", "x":5.5, "y":3}, {"label":"Lower", "x":6.5, "y":3}, {"label":"Space", "x":7.5, "y":3}, {"label":"Space", "x":8.5, "y":3}, {"label":"Raise", "x":9.5, "y":3}, {"label":"Nav", "x":10.5, "y":3}, {"label":"Fn", "x":11.5, "y":3}, {"label":"Del", "x":12.5, "y":3} + ] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/keymaps/default/keymap.c b/qmk/keyboards/terrazzo/keymaps/default/keymap.c new file mode 100644 index 00000000..9392a605 --- /dev/null +++ b/qmk/keyboards/terrazzo/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +/* Staggered layout with split spacebars + * make terrazzo:default + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _RAISE, + _LOWER, + _NAV, + _FN +}; + +#define LOWERSP LT(_LOWER, KC_SPC) +#define RAISESP LT(_RAISE, KC_SPC) +#define SFTSLSH MT(MOD_RSFT, KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH, + TZ_OFF, KC_LGUI, KC_RALT, LOWERSP, RAISESP, MO(_NAV), MO(_FN) + ), + + [_RAISE] = LAYOUT( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT( + _______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAV] = LAYOUT( + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, + _______, RESET, _______, _______, _______, _______, _______ + ) +}; + + +void encoder_update_user(uint8_t index, bool clockwise) { + terrazzo_scroll_pixel(clockwise); + switch(get_highest_layer(layer_state)) { + case _NAV: + // Change volume when on nav layer + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + default: + // Default encoder behavior of Page Up and Down + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + } +} \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/keymaps/ortho/keymap.c b/qmk/keyboards/terrazzo/keymaps/ortho/keymap.c new file mode 100644 index 00000000..c2085c41 --- /dev/null +++ b/qmk/keyboards/terrazzo/keymaps/ortho/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +/* Ortho layout with 2x 2u spacebars + * Default ortho layout. + * make terrazzo:othro + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _RAISE, + _LOWER, + _NAV, + _FN +}; + +#define LOWERSP LT(_LOWER, KC_SPC) +#define RAISESP LT(_RAISE, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ortho( + KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, LOWERSP, RAISESP, MO(_NAV), MO(_FN), KC_DEL + ), + + [_RAISE] = LAYOUT_ortho( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_ortho( + _______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAV] = LAYOUT_ortho( + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT_ortho( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG, + _______, RESET, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + terrazzo_scroll_pixel(clockwise); + switch(get_highest_layer(layer_state)) { + case _NAV: + // Change volume when on nav layer + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + default: + // Default encoder behavior of Page Up and Down + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + } +} \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/keymaps/ortho_all/keymap.c b/qmk/keyboards/terrazzo/keymaps/ortho_all/keymap.c new file mode 100644 index 00000000..ba33c15f --- /dev/null +++ b/qmk/keyboards/terrazzo/keymaps/ortho_all/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +/* Ortho layout with all 1u + * make terrazzo:othro_all + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _RAISE, + _LOWER, + _NAV, + _FN +}; + +#define LOWERSP LT(_LOWER, KC_SPC) +#define RAISESP LT(_RAISE, KC_SPC) +#define SFTSLSH MT(MOD_RSFT, KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ortho_all( + KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), MO(_NAV), MO(_FN), KC_DEL + ), + + [_RAISE] = LAYOUT_ortho_all( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_ortho_all( + _______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAV] = LAYOUT_ortho_all( + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,_______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT_ortho_all( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + terrazzo_scroll_pixel(clockwise); + switch(get_highest_layer(layer_state)) { + case _NAV: + /* Change volume when on nav layer */ + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + default: + /* Default encoder behavior of Page Up and Down */ + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + } +} \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/keymaps/ortho_mit/keymap.c b/qmk/keyboards/terrazzo/keymaps/ortho_mit/keymap.c new file mode 100644 index 00000000..ab63f539 --- /dev/null +++ b/qmk/keyboards/terrazzo/keymaps/ortho_mit/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +/* Ortho layout with 1 2u spacebar + * make terrazzo:othro_mit + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _RAISE, + _LOWER, + _NAV, + _FN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ortho_mit( + KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, MO(_LOWER), KC_SPC, MO(_RAISE), MO(_NAV), MO(_FN), KC_DEL + ), + + [_RAISE] = LAYOUT_ortho_mit( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_ortho_mit( + _______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAV] = LAYOUT_ortho_mit( + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,_______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT_ortho_mit( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +void encoder_update_user(uint8_t index, bool clockwise) { + terrazzo_scroll_pixel(clockwise); + switch(get_highest_layer(layer_state)) { + case _NAV: + /* Change volume when on nav layer */ + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + default: + /* Default encoder behavior of Page Up and Down */ + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + } +} \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/readme.md b/qmk/keyboards/terrazzo/readme.md new file mode 100644 index 00000000..08cecd6a --- /dev/null +++ b/qmk/keyboards/terrazzo/readme.md @@ -0,0 +1,125 @@ +# Terrazzo + +![Terrazzo](https://i.imgur.com/W91ixck.jpg) + +Terrazzo is a 40% pro micro keyboard kit with a fun, hot-swapable LED module. It is offered in both staggered and ortholinear variations, each with multiple layout options. A left hand macro column has 4 positions for switches or rotary encoders. + +Extended layout options and multiple encoder support will require use of an Elite-C controller. Key switch support is MX soldered only. + +* Keyboard Maintainer: MsMustard, [Anne Demey](https://github.com/ademey) +* Hardware Supported: Terrazzo v1 & v2 PCB in staggered and ortholinear + +Make example for this keyboard (after setting up your build environment): + +- `make terrazzo:default` Split spacebar staggered layout +- `make terrazzo:ortho` 2 x 2u spacebar ortho layout +- `make terrazzo:ortho_mit` 2u spacebar ortho layout +- `make terrazzo:ortho_all` All 1u ortho layout + +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). + +## Parts List +- 1 PCB (staggered or ortho) +- 1 LED module ([red](https://www.digikey.com/product-detail/en/adafruit-industries-llc/3134/1528-1699-ND/6058480), [green](https://www.digikey.com/product-detail/en/adafruit-industries-llc/3136/1528-1701-ND/6058482), [yellow](https://www.digikey.com/short/zbttp5), [blue](https://www.digikey.com/product-detail/en/adafruit-industries-llc/3137/1528-1702-ND/6058483), or [white](https://www.digikey.com/product-detail/en/adafruit-industries-llc/3138/1528-1703-ND/6058484)) +- [1 Rotary encoder](https://www.digikey.com/short/zbttzn) +- 1 Knurled knob ([black](https://www.digikey.com/short/zbttz4) or [silver](https://www.digikey.com/short/zbttz4)) +- [SMD diodes](https://www.digikey.com/short/zbttzr) +- [Reset switch](https://www.digikey.com/short/zbttz1) +- Mill-max female headers ([12](https://www.digikey.com/short/zbtt42) & [5](https://www.digikey.com/short/zbttmt) pins) and [through-hole diodes](https://www.digikey.com/short/zbttmj) to aid in socketing a pro micro +- Mill-max [male](https://www.digikey.com/short/zbttm5) & [female](https://www.digikey.com/short/zbttm4) headers for LED module + +## Custom Keycodes + +Terrazzo has several custom keycodes for LED control. + +| Key | Description | +|-----|-------------| +| `TZ_NXT` | Next Animation | +| `TZ_PRV` | Previous Animation | +| `TZ_OFF` | LED Off | + +## LED Animations + +LED animations for Terrazzo are reactive to keyboard input. Each key press or encoder turn increments an internal counter, looping through the number of individual LEDs. + +This counter (`terrazzo_led_index`) is used as a seed for the animation functions, along with a boolean indicating the direction. Turning the encoder counter-clockwise, or pressing backspace will decrement the counter, allowing for animations to reverse or display alternative frames. + +The current animations are: + +- DINO: It's like your internet went out +- DOT: Just a single led at a time, for debugging +- HEART: Love you too +- OUTRUN: Driving into the sunset +- PAC_DUDE: Vintage arcade fun +- STRIPES: Just a nice gradient +- WPM_CHART: 2 digit readout with lights indicating speed, each pixel = 2 wpm + +Not all animations are enabled by default. You can enable or disable animations in the `config.h` file to limit firmware size. + +``` +// #define DISABLE_TERRAZZO_EFFECT_STRIPES +// #define DISABLE_TERRAZZO_EFFECT_DINO +// #define DISABLE_TERRAZZO_EFFECT_OUTRUN +#define DISABLE_TERRAZZO_EFFECT_PAC_DUDE +#define DISABLE_TERRAZZO_EFFECT_HEART +// #define DISABLE_TERRAZZO_EFFECT_WPM_CHART +#define DISABLE_TERRAZZO_EFFECT_DOT +``` + +## Microcontroller Support + +Terrazzo is designed for use with a Pro Micro (or compatible, like Bit-C), or an Elite-C. The extra pinouts of an Elite-C are required for the ortho MIT and ALL layouts and multiple encoders. By default the firmware is set up for an Elite-C. For a Pro Micro some changes to `config.h` are needed. + +Change number of rows from 9 to 8. +``` +#define MATRIX_ROWS 8 +``` + +Change pinouts, Pro Micro does not have the "F0" pin. +``` +#define MATRIX_ROW_PINS { D2, D7, E6, B4, B5, B6, B2, B3 } +``` + +Set encoder to just top or bottom position. +``` +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { D4 } +``` + +## Encoder Setup + +Terrazzo has 4 positions for encoders in the left-hand column. Up to 3 may be used at a time, but this requires the extra pins of an Elite-C. Please refer to `config.h` for examples of pin configurations. + +The default keymaps are setup for one encoder. Encoders can change behavior based on the current layer. Here, on the "NAV" layer, the encoder changes volume instead of scrolling. + +```c +void encoder_update_user(uint8_t index, bool clockwise) { + terrazzo_scroll_pixel(clockwise); + switch(get_highest_layer(layer_state)) { + case _NAV: + // Change volume when on nav layer + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + default: + // Default encoder behavior of Page Up and Down + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + } +} +``` + +If using multiple encoders, the `index` param can be used to distingish which is providing input. + +```c +void encoder_update_user(uint8_t index, bool clockwise) { + terrazzo_scroll_pixel(clockwise); + switch(index) { + case 0: + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + case 1: + clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN); + break; + } +} +``` \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/rules.mk b/qmk/keyboards/terrazzo/rules.mk new file mode 100644 index 00000000..f6ea149e --- /dev/null +++ b/qmk/keyboards/terrazzo/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +LED_MATRIX_ENABLE = IS31FL3731 +ENCODER_ENABLE = yes +WPM_ENABLE = yes + +LAYOUTS = ortho ortho_mit ortho_all \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo.c b/qmk/keyboards/terrazzo/terrazzo.c new file mode 100644 index 00000000..2fe94f86 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo.c @@ -0,0 +1,165 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 "terrazzo.h" + +#ifdef LED_MATRIX_ENABLE + #include "is31fl3731-simple.h" + #include + #include + #include "quantum.h" + +const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = { +/* Refer to IS31 manual for these locations + * https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf + */ + {0, C1_2}, {0, C1_3}, {0, C1_4}, {0, C1_5}, {0, C1_6}, {0, C1_7}, {0, C1_8}, + {0, C2_2}, {0, C2_3}, {0, C2_4}, {0, C2_5}, {0, C2_6}, {0, C2_7}, {0, C2_8}, + {0, C3_2}, {0, C3_3}, {0, C3_4}, {0, C3_5}, {0, C3_6}, {0, C3_7}, {0, C3_8}, + {0, C4_2}, {0, C4_3}, {0, C4_4}, {0, C4_5}, {0, C4_6}, {0, C4_7}, {0, C4_8}, + {0, C5_2}, {0, C5_3}, {0, C5_4}, {0, C5_5}, {0, C5_6}, {0, C5_7}, {0, C5_8}, + {0, C6_2}, {0, C6_3}, {0, C6_4}, {0, C6_5}, {0, C6_6}, {0, C6_7}, {0, C6_8}, + {0, C7_2}, {0, C7_3}, {0, C7_4}, {0, C7_5}, {0, C7_6}, {0, C7_7}, {0, C7_8}, + {0, C8_2}, {0, C8_3}, {0, C8_4}, {0, C8_5}, {0, C8_6}, {0, C8_7}, {0, C8_8}, + // + {0, C8_15},{0, C8_14},{0, C8_13},{0, C8_12},{0, C8_11},{0, C8_10},{0, C8_9}, + {0, C7_15},{0, C7_14},{0, C7_13},{0, C7_12},{0, C7_11},{0, C7_10},{0, C7_9}, + {0, C6_15},{0, C6_14},{0, C6_13},{0, C6_12},{0, C6_11},{0, C6_10},{0, C6_9}, + {0, C5_15},{0, C5_14},{0, C5_13},{0, C5_12},{0, C5_11},{0, C5_10},{0, C5_9}, + {0, C4_15},{0, C4_14},{0, C4_13},{0, C4_12},{0, C4_11},{0, C4_10},{0, C4_9}, + {0, C3_15},{0, C3_14},{0, C3_13},{0, C3_12},{0, C3_11},{0, C3_10},{0, C3_9}, + {0, C2_15},{0, C2_14},{0, C2_13},{0, C2_12},{0, C2_11},{0, C2_10},{0, C2_9} +}; + +#define TERRAZZO_EFFECT(name) +#define TERRAZZO_EFFECT_IMPLS + +#include "terrazzo_effects/terrazzo_effects.inc" + +#undef TERRAZZO_EFFECT_IMPLS +#undef TERRAZZO_EFFECT + +uint8_t terrazzo_led_index = 0; +uint8_t terrazzo_dir = 1; +uint8_t terrazzo_effect = 1; + +void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) { + uint8_t target = y * LED_MATRIX_COLS + x; + if (target < LED_DRIVER_LED_COUNT && target >= 0) { + led_matrix_set_index_value(y * LED_MATRIX_COLS + x, value); + } +} + +void terrazzo_draw_at(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t image[]) { + uint8_t index = 0; + for (int v = 0; v < height; v++) { + for (int h = 0; h < width; h++) { + uint8_t pixel_value = image[index]; + if (pixel_value != 0) { + terrazzo_set_pixel(x + h, y + v, image[index]); + } + index++; + } + } +} + +void terrazzo_scroll_pixel(bool clockwise) { + terrazzo_dir = clockwise; + + if (clockwise) { + terrazzo_led_index = terrazzo_led_index + 1; + } else { + terrazzo_led_index = terrazzo_led_index - 1; + } + + if (terrazzo_led_index >= LED_DRIVER_LED_COUNT) { + terrazzo_led_index = 0; + } else if (terrazzo_led_index <= 0 ) { + terrazzo_led_index = LED_DRIVER_LED_COUNT - 1; + } +} + +void terrazzo_step_mode(void) { + terrazzo_effect++; + if (terrazzo_effect >= TERRAZZO_EFFECT_MAX) { + terrazzo_effect = 1; + } +} + +void terrazzo_step_mode_reverse(void) { + terrazzo_effect--; + if (terrazzo_effect < 1) { + terrazzo_effect = TERRAZZO_EFFECT_MAX - 1; + } +} + +void terrazzo_mode_off(void) { + terrazzo_effect = TERRAZZO_NONE; +} + +void terrazzo_render(void) { + switch(terrazzo_effect) { + case TERRAZZO_NONE: + led_matrix_set_index_value_all(0); + break; + #define TERRAZZO_EFFECT(name, ...) \ + case TERRAZZO_EFFECT_##name: \ + name(terrazzo_led_index, terrazzo_dir); \ + break; + #include "terrazzo_effects/terrazzo_effects.inc" + #undef TERRAZZO_EFFECT + } +} + +void led_matrix_indicators_kb(void) { + terrazzo_render(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case TZ_NXT: + terrazzo_step_mode(); + return true; + case TZ_PRV: + terrazzo_step_mode_reverse(); + return true; + case TZ_OFF: + terrazzo_mode_off(); + return true; + // Reverse animation on backspace + case KC_BSPC: + terrazzo_scroll_pixel(0); + return true; + // Any keycode increments counter + default: + terrazzo_scroll_pixel(1); + break; + } + } + return process_record_user(keycode, record); +} + +void suspend_power_down_kb(void) { + led_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) { + led_matrix_set_suspend_state(false); +} + + +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo.h b/qmk/keyboards/terrazzo/terrazzo.h new file mode 100644 index 00000000..526b3f92 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo.h @@ -0,0 +1,122 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* Default staggered layout + Bottom row: 1u 1.5u 2.25u 2.75u 1.5u 1u */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \ + K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K55, \ + K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K54, K45, \ + K30, K31, K32, K33, K40, K42, K43 \ +){ \ + { K00, K01, K02, K03, K04, K05,}, \ + { K10, K11, K12, K13, K14, K15,}, \ + { K20, K21, K22, K23, K24, K25,}, \ + { K30, K31, K32, K33, KC_NO, KC_NO,},\ + { K40, KC_NO, K42, K43, KC_NO, K45,},\ + { K50, K51, K52, K53, K54, K55,}, \ + { K60, K61, K62, K63, K64, K65,}, \ + { K70, K71, K72, K73, K74, K75, } \ +} + +/* Default ortho layout + Bottom row: 1u 1u 1u 2u 2u 1u 1u 1u */ +#define LAYOUT_ortho( \ + K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \ + K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K54, K55, \ + K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K43, K44, K45, \ + K30, K31, K32, K33, K34, K35, K40, K41, K42 \ +){ \ + { K00, K01, K02, K03, K04, K05,}, \ + { K10, K11, K12, K13, K14, K15,}, \ + { K20, K21, K22, K23, K24, K25,}, \ + { K30, K31, K32, K33, K34, K35,}, \ + { K40, K41, K42, K43, K44, K45,}, \ + { K50, K51, K52, K53, K54, K55,}, \ + { K60, K61, K62, K63, K64, K65,}, \ + { K70, K71, K72, K73, K74, K75, }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, } \ +} + +/* MIT ortho layout + Bottom row: 1u 1u 1u 1u 2u 1u 1u 1u 1u */ +#define LAYOUT_ortho_mit( \ + K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \ + K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K54, K55, \ + K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K43, K44, K45, \ + K30, K31, K32, K33, K84, K35, K85, K40, K41, K42 \ +){ \ + { K00, K01, K02, K03, K04, K05,}, \ + { K10, K11, K12, K13, K14, K15,}, \ + { K20, K21, K22, K23, K24, K25,}, \ + { K30, K31, K32, K33, KC_NO, K35,}, \ + { K40, K41, K42, K43, K44, K45,}, \ + { K50, K51, K52, K53, K54, K55,}, \ + { K60, K61, K62, K63, K64, K65,}, \ + { K70, K71, K72, K73, K74, K75, }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, } \ +} + +/* All 1u ortho layout + Bottom row: 1u 1u 1u 1u 1u 1u 1u 1u 1u 1u */ +#define LAYOUT_ortho_all( \ + K00, K01, K02, K03, K04, K05, K70, K71, K72, K73, K74, K75, K65, \ + K10, K11, K12, K13, K14, K15, K60, K61, K62, K63, K64, K54, K55, \ + K20, K21, K22, K23, K24, K25, K50, K51, K52, K53, K43, K44, K45, \ + K30, K31, K32, K33, K84, K34, K35, K85, K40, K41, K42 \ +){ \ + { K00, K01, K02, K03, K04, K05,}, \ + { K10, K11, K12, K13, K14, K15,}, \ + { K20, K21, K22, K23, K24, K25,}, \ + { K30, K31, K32, K33, K34, K35,}, \ + { K40, K41, K42, K43, K44, K45,}, \ + { K50, K51, K52, K53, K54, K55,}, \ + { K60, K61, K62, K63, K64, K65,}, \ + { K70, K71, K72, K73, K74, K75, }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, } \ +} + + +enum terrazzo_matrix_effects { + TERRAZZO_NONE = 0, +// -------------------------------------- +// -----Begin led effect enum macros----- +#define TERRAZZO_EFFECT(name, ...) TERRAZZO_EFFECT_##name, +#include "terrazzo_effects/terrazzo_effects.inc" +#undef TERRAZZO_EFFECT + // -------------------------------------- + // -----End led effect enum macros------- + // All new effects go above this line + TERRAZZO_EFFECT_MAX +}; + +enum terrazzo_keycodes { + TZ_NXT = SAFE_RANGE, + TZ_PRV, + TZ_OFF +}; + +void terrazzo_render(void); +void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value); +void terrazzo_draw_at(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t image[]); +void terrazzo_scroll_pixel(bool clockwise); +void terrazzo_step_mode(void); +void terrazzo_step_mode_reverse(void); +void terrazzo_mode_off(void); diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/dino.h b/qmk/keyboards/terrazzo/terrazzo_effects/dino.h new file mode 100644 index 00000000..747ef617 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/dino.h @@ -0,0 +1,162 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_DINO +TERRAZZO_EFFECT(DINO) +# ifdef TERRAZZO_EFFECT_IMPLS + +static uint8_t dino_frames[2][56] = { +{ + 0, 0, 0, 9, 9, 9, 9, + 0, 0, 0, 9, 0, 9, 9, + 9, 0, 0, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 0, 0, + 9, 9, 9, 9, 9, 0, 0, + 0, 9, 9, 9, 0, 0, 0, + 0, 9, 0, 9, 9, 0, 0, + 0, 9, 9, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 9, 9, 9, 9, + 0, 0, 0, 9, 0, 9, 9, + 9, 0, 0, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 0, 0, + 9, 9, 9, 9, 9, 0, 0, + 0, 9, 9, 9, 0, 0, 0, + 0, 9, 0, 9, 0, 0, 0, + 0, 0, 0, 9, 9, 0, 0 +} +}; + +static uint8_t dino_reverse[2][56] = { +{ + 9, 9, 9, 9, 0, 0, 0, + 9, 9, 0, 9, 0, 0, 0, + 9, 9, 9, 9, 0, 0, 9, + 0, 0, 9, 9, 9, 9, 9, + 0, 0, 9, 9, 9, 9, 9, + 0, 0, 0, 9, 9, 9, 0, + 0, 0, 9, 9, 0, 9, 0, + 0, 0, 0, 0, 9, 9, 0 +}, +{ + 9, 9, 9, 9, 0, 0, 0, + 9, 9, 0, 9, 0, 0, 0, + 9, 9, 9, 9, 0, 0, 9, + 0, 0, 9, 9, 9, 9, 9, + 0, 0, 9, 9, 9, 9, 9, + 0, 0, 0, 9, 9, 9, 0, + 0, 0, 0, 9, 0, 9, 0, + 0, 0, 9, 9, 0, 0, 0 +} +}; + +static uint8_t dino_bg[10][42] = { +{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 4, 0, + 0, 1, 1, 0, 0, 0, 4, + 1, 0, 0, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 4, 0, 4, + 0, 0, 0, 0, 4, 0, 4, + 1, 1, 0, 0, 0, 4, 4, + 0, 0, 1, 1, 1, 1, 4, + 0, 0, 0, 0, 0, 0, 4 +}, +{ + 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 4, 0, 4, 0, + 0, 0, 0, 4, 0, 4, 4, + 1, 0, 0, 0, 4, 4, 0, + 0, 1, 1, 1, 1, 4, 0, + 0, 0, 0, 0, 0, 4, 0 +}, +{ + 0, 0, 0, 0, 4, 0, 0, + 0, 0, 4, 0, 4, 0, 4, + 0, 0, 4, 0, 4, 4, 4, + 0, 0, 0, 4, 4, 0, 0, + 1, 1, 1, 1, 4, 1, 1, + 0, 0, 0, 0, 4, 0, 0 +}, +{ + 0, 0, 0, 4, 0, 0, 0, + 0, 4, 0, 4, 0, 4, 0, + 0, 4, 0, 4, 4, 4, 0, + 0, 0, 4, 4, 0, 0, 0, + 1, 1, 1, 4, 1, 1, 1, + 0, 0, 0, 4, 0, 0, 0 +}, +{ + 0, 0, 4, 0, 0, 0, 0, + 4, 0, 4, 0, 4, 0, 0, + 4, 0, 4, 4, 4, 0, 0, + 0, 4, 4, 0, 0, 0, 1, + 1, 1, 4, 1, 1, 1, 0, + 0, 0, 4, 0, 0, 0, 0 +}, +{ + 0, 4, 0, 0, 0, 0, 0, + 0, 4, 0, 4, 0, 0, 0, + 0, 4, 4, 4, 0, 0, 0, + 4, 4, 0, 0, 0, 1, 1, + 1, 4, 1, 1, 1, 0, 0, + 0, 4, 0, 0, 0, 0, 0 +}, +{ + 4, 0, 0, 0, 0, 0, 0, + 4, 0, 4, 0, 0, 0, 0, + 4, 4, 4, 0, 0, 0, 0, + 4, 0, 0, 0, 1, 1, 0, + 4, 1, 1, 1, 0, 0, 1, + 4, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 0, 4, 0, 0, 0, 0, 0, + 4, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 4, + 4, 0, 0, 0, 0, 0, 4, + 0, 0, 1, 1, 0, 0, 0, + 1, 1, 0, 0, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0 +} +}; + +void DINO(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + if (dir) { + terrazzo_draw_at(0, 7, 7, 8, dino_frames[i % 2]); + } else { + terrazzo_draw_at(0, 7, 7, 8, dino_reverse[i % 2]); + + } + terrazzo_draw_at(0, 0, 7, 6, dino_bg[i % 10]); +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/dot.h b/qmk/keyboards/terrazzo/terrazzo_effects/dot.h new file mode 100644 index 00000000..e8eb8e0f --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/dot.h @@ -0,0 +1,27 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_DOT +TERRAZZO_EFFECT(DOT) +# ifdef TERRAZZO_EFFECT_IMPLS +// Animation for debugging. Lights one pixel according to animation index +void DOT(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + led_matrix_set_index_value(i, 10); +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/heart.h b/qmk/keyboards/terrazzo/terrazzo_effects/heart.h new file mode 100644 index 00000000..bdcd2d7b --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/heart.h @@ -0,0 +1,99 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_HEART +TERRAZZO_EFFECT(HEART) +# ifdef TERRAZZO_EFFECT_IMPLS + +static uint8_t heart_frames[4][105] = { +{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 5, 5, 0, 5, 5, 0, + 5, 0, 0, 5, 0, 0, 5, + 5, 0, 0, 0, 0, 0, 5, + 0, 5, 0, 0, 0, 5, 0, + 0, 0, 5, 0, 5, 0, 0, + 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 5, 5, 0, 5, 5, 0, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 0, 5, 5, 5, 5, 5, 0, + 0, 0, 5, 5, 5, 0, 0, + 0, 0, 0, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 5, 0, 0, 1, + 0, 5, 5, 0, 5, 5, 0, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 0, 5, 5, 5, 5, 5, 0, + 0, 0, 5, 5, 5, 0, 0, + 1, 0, 0, 5, 0, 0, 1, + 0, 1, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 0, 1, + 0, 5, 5, 0, 5, 5, 0, + 5, 0, 0, 5, 0, 0, 5, + 0, 5, 5, 0, 5, 5, 0, + 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, + 0, 5, 5, 5, 5, 5, 0, + 0, 0, 5, 5, 5, 0, 0, + 5, 0, 0, 5, 0, 0, 5, + 0, 5, 0, 0, 0, 5, 0, + 1, 0, 5, 0, 5, 0, 1, + 0, 1, 0, 5, 0, 1, 0, + 0, 0, 1, 0, 1, 0, 0, + 0, 0, 0, 1, 0, 0, 0 +} +}; + + +void HEART(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + terrazzo_draw_at(0, 0, 7, 15, heart_frames[i % 4]); +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/outrun.h b/qmk/keyboards/terrazzo/terrazzo_effects/outrun.h new file mode 100644 index 00000000..b4455ef4 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/outrun.h @@ -0,0 +1,127 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_OUTRUN +TERRAZZO_EFFECT(OUTRUN) +# ifdef TERRAZZO_EFFECT_IMPLS + +static uint8_t outrun_sun[25] = { + 0, 9, 9, 9, 0, + 7, 7, 7, 7, 7, + 4, 4, 4, 4, 4, + 2, 2, 2, 2, 2, + 0, 1, 1, 1, 0 +}; + +static uint8_t outrun_ground[63] = { + 0, 0, 1, 1, 1, 0, 0, + 0, 2, 0, 2, 0, 2, 0, + 0, 2, 0, 2, 0, 2, 0, + 0, 2, 0, 4, 0, 2, 0, + 2, 0, 0, 5, 0, 0, 2, + 2, 0, 0, 5, 0, 0, 2, + 2, 0, 0, 6, 0, 0, 2, + 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 8, 0, 0, 0 +}; + +static uint8_t outrun_rows[4][63] = { +{ + 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 9, 9, 9, 9, 9, 9, 9, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 9, 9, 9, 9, 9, 9, 9 +} +}; + +bool last_dir; +uint8_t change_index = 0; + +void OUTRUN(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + + if(dir != last_dir) { + change_index = i; + } + + uint8_t change_diff = abs(i - change_index); + uint8_t horz_bright = 9; + + if(change_diff < 4) { + if (dir) { + terrazzo_draw_at(1, 4 - change_diff, 5, 1 + change_diff, outrun_sun); + horz_bright = 3 + change_diff; + } else { + terrazzo_draw_at(1, 0 + change_diff, 5, 5 - change_diff, outrun_sun); + horz_bright = 5 - change_diff; + } + } else { + if (dir) { + terrazzo_draw_at(1, 0, 5, 5, outrun_sun); + } else { + horz_bright = 1; + } + } + + for(int x = 0; x < 7; x++){ + terrazzo_set_pixel(x, 5, horz_bright); + } + // Sun is larger but render the top 3 rows only + terrazzo_draw_at(0, 6, 7, 10, outrun_ground); + terrazzo_draw_at(0, 6, 7, 10, outrun_rows[i % 4]); + last_dir = dir; +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/pac_dude.h b/qmk/keyboards/terrazzo/terrazzo_effects/pac_dude.h new file mode 100644 index 00000000..aa4fc992 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/pac_dude.h @@ -0,0 +1,67 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_PAC_DUDE +TERRAZZO_EFFECT(PAC_DUDE) +# ifdef TERRAZZO_EFFECT_IMPLS + +static uint8_t pac_frames[3][25] = { +{ // up + 0, 0, 0, 0, 0, + 9, 0, 0, 0, 9, + 9, 9, 0, 9, 9, + 9, 9, 9, 9, 9, + 0, 9, 9, 9, 0 +}, +{ // closed + 0, 9, 9, 9, 0, + 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, + 0, 9, 9, 9, 0 +}, +{ // down + 0, 9, 9, 9, 0, + 9, 9, 9, 9, 9, + 9, 9, 0, 9, 9, + 9, 0, 0, 0, 9, + 0, 0, 0, 0, 0 +} +}; + +static uint8_t pac_ghost[20] = { + 0, 4, 4, 4, 0, + 4, 0, 4, 0, 4, + 4, 4, 4, 4, 4, + 4, 0, 4, 0, 4 +}; + + +void PAC_DUDE(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + if (dir) { + terrazzo_draw_at(1, 4, 5, 5, pac_frames[i % 2]); + terrazzo_set_pixel(3, 0 + i % 3, 5); + terrazzo_set_pixel(3, 3 + i % 3, 5); + } else { + terrazzo_draw_at(1, 4, 5, 5, pac_frames[1 + i % 2]); + terrazzo_draw_at(1, 8 + i % 8, 5, 4, pac_ghost); + } + +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/stripes.h b/qmk/keyboards/terrazzo/terrazzo_effects/stripes.h new file mode 100644 index 00000000..4e1238cd --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/stripes.h @@ -0,0 +1,35 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_STRIPES +TERRAZZO_EFFECT(STRIPES) +# ifdef TERRAZZO_EFFECT_IMPLS + +void STRIPES(uint8_t i, bool dir) { + uint8_t sweep[] = {1, 2, 3, 4, 6, 8, 10, 15, 20, 30, 40, 60}; + uint8_t levels = 12; + float soften = 5; + + for (int y = 0; y < LED_MATRIX_ROWS; y++) { + for (int x = 0; x < LED_MATRIX_COLS; x++) { + uint8_t target = (x+y+i)%levels; + terrazzo_set_pixel(x, y, floor(sweep[target] / soften)); + } + } +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/terrazzo_effects.inc b/qmk/keyboards/terrazzo/terrazzo_effects/terrazzo_effects.inc new file mode 100644 index 00000000..c5271db1 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/terrazzo_effects.inc @@ -0,0 +1,7 @@ +#include "terrazzo_effects/stripes.h" +#include "terrazzo_effects/dino.h" +#include "terrazzo_effects/outrun.h" +#include "terrazzo_effects/pac_dude.h" +#include "terrazzo_effects/heart.h" +#include "terrazzo_effects/wpm_chart.h" +#include "terrazzo_effects/dot.h" diff --git a/qmk/keyboards/terrazzo/terrazzo_effects/wpm_chart.h b/qmk/keyboards/terrazzo/terrazzo_effects/wpm_chart.h new file mode 100644 index 00000000..5c66bc39 --- /dev/null +++ b/qmk/keyboards/terrazzo/terrazzo_effects/wpm_chart.h @@ -0,0 +1,111 @@ +/* Copyright 2020 ademey "MsMustard" + * + * 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 . + */ + +#ifndef DISABLE_TERRAZZO_EFFECT_WPM_CHART +TERRAZZO_EFFECT(WPM_CHART) +# ifdef TERRAZZO_EFFECT_IMPLS + +static uint8_t number_3_4[10][12] = { +{ // 0 + 9, 9, 9, + 9, 0, 9, + 9, 0, 9, + 9, 9, 9 +}, +{ // 1 + 0, 9, 0, + 9, 9, 0, + 0, 9, 0, + 9, 9, 9 +}, +{ // 2 + 9, 9, 0, + 0, 0, 9, + 0, 9, 0, + 9, 9, 9 +}, +{ // 3 + 9, 9, 9, + 0, 9, 0, + 0, 0, 9, + 9, 9, 0 +}, +{ // 4 + 9, 0, 9, + 9, 0, 9, + 9, 9, 9, + 0, 0, 9 +}, +{ // 5 + 9, 9, 9, + 9, 9, 0, + 0, 0, 9, + 9, 9, 9 +}, +{ // 6 + 0, 0, 9, + 0, 9, 0, + 9, 0, 9, + 0, 9, 0 +}, +{ // 7 + 9, 9, 9, + 0, 0, 9, + 0, 9, 0, + 9, 0, 0 +}, +{ // 8 + 9, 9, 9, + 9, 0, 9, + 9, 4, 9, + 9, 9, 9 +}, +{ // 9 + 9, 9, 9, + 9, 0, 9, + 9, 9, 9, + 0, 0, 9 +} +}; + +/* Reference to create a gradient effect */ +uint8_t wpm_levels[10] = {20, 9, 8, 7, 6, 5, 4, 3, 2, 1}; + +void WPM_CHART(uint8_t i, bool dir) { + led_matrix_set_index_value_all(0); + uint8_t c_wpm = get_current_wpm(); + uint8_t half_wpm = floor(c_wpm / 2); + uint8_t max_rows = 10; + /* Turn on LED for current WPM. Each pixel is 2 wpm. */ + for (int k = 0; k < half_wpm && k < 70; k++) { + uint8_t current_row = (int)floor(k / 7); + led_matrix_set_index_value(k, wpm_levels[max_rows - current_row]); + }; + uint8_t d1 = (int)floor(c_wpm / 10); + /* There is only room to print 2 digits. If the WPM is greater than + 99 then the last 2 digits will show, ie 120 = 20. */ + if (c_wpm > 99) { + uint8_t tens_place = d1 % 10; + terrazzo_draw_at(0, 11, 3, 4, number_3_4[tens_place]); + } else { + terrazzo_draw_at(0, 11, 3, 4, number_3_4[d1]); + } + + terrazzo_draw_at(4, 11, 3, 4, number_3_4[c_wpm % 10]); +} + +# endif +#endif \ No newline at end of file diff --git a/qmk/keyboards/tg4x/config.h b/qmk/keyboards/tg4x/config.h index ae66b8c9..c00cf282 100644 --- a/qmk/keyboards/tg4x/config.h +++ b/qmk/keyboards/tg4x/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0001 +#define VENDOR_ID 0x4D4D // "MM" +#define PRODUCT_ID 0x0458 // 4 "X" #define DEVICE_VER 0x0021 #define MANUFACTURER MythosMann #define PRODUCT TG4x diff --git a/qmk/keyboards/tg4x/keymaps/default/keymap.c b/qmk/keyboards/tg4x/keymaps/default/keymap.c index b1b35a24..a19e5402 100644 --- a/qmk/keyboards/tg4x/keymaps/default/keymap.c +++ b/qmk/keyboards/tg4x/keymaps/default/keymap.c @@ -20,9 +20,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_DEL, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_RCTL + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, MO(1) ), + + [1] = LAYOUT( + 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, RESET, + 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 + ) }; - diff --git a/qmk/keyboards/tg4x/keymaps/via/keymap.c b/qmk/keyboards/tg4x/keymaps/via/keymap.c new file mode 100644 index 00000000..c8421c8e --- /dev/null +++ b/qmk/keyboards/tg4x/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 MechMerlin + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, MO(1) + ), + + [1] = LAYOUT( + 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, RESET, + 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 + ), + + [2] = LAYOUT( + 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 + ), + + [3] = LAYOUT( + 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 + ), +}; + + + diff --git a/qmk/keyboards/tg4x/keymaps/via/readme.md b/qmk/keyboards/tg4x/keymaps/via/readme.md new file mode 100644 index 00000000..7b085ec2 --- /dev/null +++ b/qmk/keyboards/tg4x/keymaps/via/readme.md @@ -0,0 +1 @@ +# Keymap for TG4x with Via enabled diff --git a/qmk/keyboards/tg4x/keymaps/via/rules.mk b/qmk/keyboards/tg4x/keymaps/via/rules.mk new file mode 100644 index 00000000..df4320df --- /dev/null +++ b/qmk/keyboards/tg4x/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes # LED strips +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/tgr/910ce/910ce.h b/qmk/keyboards/tgr/910ce/910ce.h index f1592b02..2d8f113e 100644 --- a/qmk/keyboards/tgr/910ce/910ce.h +++ b/qmk/keyboards/tgr/910ce/910ce.h @@ -32,7 +32,7 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k44, k45, k47, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k44, k45, k47, k48, k49, k4c, k4d, k4e \ ){ \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ @@ -47,7 +47,7 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k45, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k45, k48, k49, k4c, k4d, k4e \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, ___ }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ @@ -62,7 +62,7 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k45, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k45, k48, k49, k4c, k4d, k4e \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, ___ }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e }, \ diff --git a/qmk/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c b/qmk/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c index bcfbad2e..032aaf5c 100644 --- a/qmk/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c +++ b/qmk/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c @@ -1,3 +1,19 @@ + /* Copyright 2020 King Wang Wong + * + * 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 @@ -17,17 +33,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BKSPC │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ - * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │' │ + * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ENTER │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ - * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ENTER│ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │' │ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ - * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO SL│ │MO(RL │ + * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO_SL│ │MO(RL │ * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ */ [_ML] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, KC_LCTL, KC_LGUI, KC_LALT, SPC_FUN, MO(_NL), MO(_SL), XXXXXXX, MO(_RL) ), @@ -36,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ │ │HOME │ UP │END │PGUP │ │ F1 │ F2 │ F3 │ F4 │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ - * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ │ + * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ QUOT │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ * │ │ │ │ DEL │ INS │ │ │ F9 │ F10 │ F11 │ F12 │ │ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ @@ -45,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FL] = LAYOUT( _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______, - KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_QUOT, _______, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/qmk/keyboards/tkw/stoutgat/v2/f411/rules.mk b/qmk/keyboards/tkw/stoutgat/v2/f411/rules.mk index 61add3ae..4f7f52e6 100644 --- a/qmk/keyboards/tkw/stoutgat/v2/f411/rules.mk +++ b/qmk/keyboards/tkw/stoutgat/v2/f411/rules.mk @@ -1,27 +1,5 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/qmk/keyboards/torn/config.h b/qmk/keyboards/torn/config.h new file mode 100644 index 00000000..6cd6c280 --- /dev/null +++ b/qmk/keyboards/torn/config.h @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x7274 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0000 +#define MANUFACTURER richard.titmuss +#define PRODUCT Torn + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS \ + { D4, D1, D0, D5 } +#define MATRIX_COL_PINS \ + { B3, B4, B5, B0, D7, D6 } +#define UNUSED_PINS + +#define SECONDARY_ROW_PINS \ + { (1 << 5), (1 << 6), (1 << 7), (1 << 4) } +#define SECONDARY_COL_PINS \ + { (1 << 3), (1 << 2), (1 << 1), (1 << 0), (1 << 15), (1 << 14) } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A \ + { B2 } +#define ENCODERS_PAD_B \ + { B1 } + +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define OLED_TIMEOUT 60000 diff --git a/qmk/keyboards/torn/info.json b/qmk/keyboards/torn/info.json new file mode 100644 index 00000000..340eb735 --- /dev/null +++ b/qmk/keyboards/torn/info.json @@ -0,0 +1,57 @@ +{ + "keyboard_name": "Torn / Split Through Hole", + "url": "https://github.com/rtitmuss/torn", + "maintainer": "rtitmuss", + "width": 15, + "height": 4.55, + "layouts": { + "LAYOUT_split_3x6_4": { + "layout": [ + {"label":"SW1", "x":0, "y":0.375}, + {"label":"SW2", "x":1, "y":0.375}, + {"label":"SW3", "x":2, "y":0.125}, + {"label":"SW4", "x":3, "y":0}, + {"label":"SW5", "x":4, "y":0.125}, + {"label":"SW6", "x":5, "y":0.25}, + {"label":"SW23", "x":9, "y":0.25}, + {"label":"SW24", "x":10, "y":0.125}, + {"label":"SW25", "x":11, "y":0}, + {"label":"SW26", "x":12, "y":0.125}, + {"label":"SW27", "x":13, "y":0.375}, + {"label":"SW28", "x":14, "y":0.375}, + {"label":"SW7", "x":0, "y":1.375}, + {"label":"SW8", "x":1, "y":1.375}, + {"label":"SW9", "x":2, "y":1.125}, + {"label":"SW10", "x":3, "y":1}, + {"label":"SW11", "x":4, "y":1.125}, + {"label":"SW12", "x":5, "y":1.25}, + {"label":"SW29", "x":9, "y":1.25}, + {"label":"SW30", "x":10, "y":1.125}, + {"label":"SW31", "x":11, "y":1}, + {"label":"SW32", "x":12, "y":1.125}, + {"label":"SW33", "x":13, "y":1.375}, + {"label":"SW34", "x":14, "y":1.375}, + {"label":"SW13", "x":0, "y":2.375}, + {"label":"SW14", "x":1, "y":2.375}, + {"label":"SW15", "x":2, "y":2.125}, + {"label":"SW16", "x":3, "y":2}, + {"label":"SW17", "x":4, "y":2.125}, + {"label":"SW18", "x":5, "y":2.25}, + {"label":"SW35", "x":9, "y":2.25}, + {"label":"SW36", "x":10, "y":2.125}, + {"label":"SW37", "x":11, "y":2}, + {"label":"SW38", "x":12, "y":2.125}, + {"label":"SW39", "x":13, "y":2.375}, + {"label":"SW40", "x":14, "y":2.375}, + {"label":"SW19", "x":3, "y":3.1}, + {"label":"SW20", "x":4, "y":3.25}, + {"label":"SW21", "x":5, "y":3.40}, + {"label":"SW22", "x":6, "y":3.55}, + {"label":"SW41", "x":8, "y":3.55}, + {"label":"SW42", "x":9, "y":3.40}, + {"label":"SW43", "x":10, "y":3.25}, + {"label":"SW44", "x":11, "y":3.1} + ] + } + } +} diff --git a/qmk/keyboards/torn/keymaps/default/keymap.c b/qmk/keyboards/torn/keymaps/default/keymap.c new file mode 100644 index 00000000..7c91325b --- /dev/null +++ b/qmk/keyboards/torn/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Richard Titmuss (richard.titmuss@gmail.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 . + */ + +#include QMK_KEYBOARD_H + +enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +#define S_BSPC LSFT_T(KC_BSPC) +#define R_DEL LT(_RAISE, KC_DEL) +#define G_ENT LGUI_T(KC_ENT) +#define L_SPC LT(_LOWER, KC_SPC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | A | S | D | F | G | | H | J | K | L | ; | [ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | \ | Z | X | C | V | B | | N | M | , | . | / | ] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT_split_3x6_4( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_LBRC, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC , + _______, KC_LCTL, S_BSPC, R_DEL, G_ENT, L_SPC, KC_RALT, _______ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | _ | | | | | | | | | , | . | / | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT_split_3x6_4( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PMNS, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT_split_3x6_4( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP, + _______, KC_F11, KC_F12, _______, _______, _______, A(KC_BSPC), A(KC_LEFT), S(KC_DOWN), A(KC_RGHT), _______, KC_PGDN , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT_split_3x6_4( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +const uint16_t PROGMEM encoder_keymaps[][2][2] = { + [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } }, + [_RAISE] = { { KC_TRNS, KC_TRNS }, { G(KC_TAB), G(S(KC_TAB)) } }, + [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } }, +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE)); + torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER)); + return state; +} diff --git a/qmk/keyboards/torn/keymaps/via/keymap.c b/qmk/keyboards/torn/keymaps/via/keymap.c new file mode 100644 index 00000000..7c91325b --- /dev/null +++ b/qmk/keyboards/torn/keymaps/via/keymap.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Richard Titmuss (richard.titmuss@gmail.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 . + */ + +#include QMK_KEYBOARD_H + +enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +#define S_BSPC LSFT_T(KC_BSPC) +#define R_DEL LT(_RAISE, KC_DEL) +#define G_ENT LGUI_T(KC_ENT) +#define L_SPC LT(_LOWER, KC_SPC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | A | S | D | F | G | | H | J | K | L | ; | [ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | \ | Z | X | C | V | B | | N | M | , | . | / | ] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT_split_3x6_4( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_LBRC, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC , + _______, KC_LCTL, S_BSPC, R_DEL, G_ENT, L_SPC, KC_RALT, _______ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | _ | | | | | | | | | , | . | / | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT_split_3x6_4( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PMNS, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT_split_3x6_4( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP, + _______, KC_F11, KC_F12, _______, _______, _______, A(KC_BSPC), A(KC_LEFT), S(KC_DOWN), A(KC_RGHT), _______, KC_PGDN , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT_split_3x6_4( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +const uint16_t PROGMEM encoder_keymaps[][2][2] = { + [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } }, + [_RAISE] = { { KC_TRNS, KC_TRNS }, { G(KC_TAB), G(S(KC_TAB)) } }, + [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } }, +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE)); + torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER)); + return state; +} diff --git a/qmk/keyboards/torn/keymaps/via/rules.mk b/qmk/keyboards/torn/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/torn/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/torn/matrix.c b/qmk/keyboards/torn/matrix.c new file mode 100644 index 00000000..dd7fa1e2 --- /dev/null +++ b/qmk/keyboards/torn/matrix.c @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + * + * 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 +#include "mcp23018.h" + +#define SPLIT_MATRIX_COLS (MATRIX_COLS / 2) +#define SECONDARY_ROW_OFFSET (MATRIX_ROWS / 2) + +typedef uint16_t mcp23018_pin_t; + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[SPLIT_MATRIX_COLS] = MATRIX_COL_PINS; +static const mcp23018_pin_t secondary_row_pins[MATRIX_ROWS] = SECONDARY_ROW_PINS; +static const mcp23018_pin_t secondary_col_pins[SPLIT_MATRIX_COLS] = SECONDARY_COL_PINS; + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_secondary_row(uint8_t row) { + uint8_t gpioa = 0xFF & ~secondary_row_pins[row]; + mcp23018_writeReg(GPIOA, &gpioa, 1); +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < SPLIT_MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static matrix_row_t read_cols(void) { + matrix_row_t state = 0; + + // For each col... + for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + return state; +} + +static matrix_row_t read_secondary_cols(void) { + matrix_row_t state = 0; + + uint8_t mcp23018_pin_state[2]; + if (mcp23018_readReg(GPIOA, mcp23018_pin_state, 2)) { + return 0; + } + + uint16_t pins = mcp23018_pin_state[0] | (mcp23018_pin_state[1] << 8); + + for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) { + uint16_t pin_state = pins & (secondary_col_pins[col_index]); + state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + return state; +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + + select_row(current_row); + select_secondary_row(current_row); + + current_matrix[current_row] = read_cols() | (read_secondary_cols() << 6); + + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +void matrix_init_custom(void) { init_pins(); } + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + return changed; +} diff --git a/qmk/keyboards/torn/mcp23018.c b/qmk/keyboards/torn/mcp23018.c new file mode 100644 index 00000000..c180f1da --- /dev/null +++ b/qmk/keyboards/torn/mcp23018.c @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + * + * 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 +#include "i2c_master.h" +#include "mcp23018.h" + +#define MCP23018_ADDR 0b0100000 + +#define MCP23018_TIMEOUT 100 + +static i2c_status_t mcp23018_status = I2C_STATUS_ERROR; + +void msp23018_init(void) { + mcp23018_status = I2C_STATUS_SUCCESS; + + // Set pin direction + uint8_t iodir[] = {0b00001111, 0b11111111}; + mcp23018_writeReg(IODIRA, iodir, 2); + + // Set pull-up + uint8_t gppu[] = {0b00001111, 0b11111000}; + mcp23018_writeReg(GPPUA, gppu, 2); + + // LEDs output high + uint8_t gpio[] = {0b00000000, 0b00000111}; + mcp23018_writeReg(GPIOA, gpio, 2); +} + +bool mcp23018_reset_required(void) { return mcp23018_status != I2C_STATUS_SUCCESS; } + +i2c_status_t mcp23018_writeReg(uint8_t regaddr, const uint8_t* data, uint16_t length) { + if (mcp23018_status) { + return mcp23018_status; + } + + mcp23018_status = i2c_writeReg((MCP23018_ADDR << 1), regaddr, data, length, MCP23018_TIMEOUT); + return mcp23018_status; +} + +i2c_status_t mcp23018_readReg(uint8_t regaddr, uint8_t* data, uint16_t length) { + if (mcp23018_status) { + return mcp23018_status; + } + + mcp23018_status = i2c_readReg((MCP23018_ADDR << 1), regaddr, data, length, MCP23018_TIMEOUT); + return mcp23018_status; +} diff --git a/qmk/keyboards/torn/mcp23018.h b/qmk/keyboards/torn/mcp23018.h new file mode 100644 index 00000000..17ecaa5a --- /dev/null +++ b/qmk/keyboards/torn/mcp23018.h @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.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 . + */ + +#pragma once + +#define IODIRA 0x00 +#define IODIRB 0x01 +#define GPPUA 0x0C +#define GPPUB 0x0D +#define GPIOA 0x12 +#define GPIOB 0x13 + +typedef int16_t mcp23018_status_t; + +void msp23018_init(void); +bool mcp23018_reset_required(void); +mcp23018_status_t mcp23018_writeReg(uint8_t regaddr, const uint8_t* data, uint16_t length); +mcp23018_status_t mcp23018_readReg(uint8_t regaddr, uint8_t* data, uint16_t length); diff --git a/qmk/keyboards/torn/readme.md b/qmk/keyboards/torn/readme.md new file mode 100644 index 00000000..ffe9a2d9 --- /dev/null +++ b/qmk/keyboards/torn/readme.md @@ -0,0 +1,21 @@ +# TORN// Split Through Hole + +![torn](https://raw.githubusercontent.com/rtitmuss/torn/master/doc/img/torn.jpg) + +The split keyboard kit made by through hole components only. + +The design has been inspired by the Corne, Plaid and Discipline keyboards. + +* Keyboard Maintainer: [rtitmuss](https://github.com/rtitmuss) +* Hardware Supported: TORN, atmega328p +* Hardware Availability: [GitHub](https://github.com/rtitmuss/torn) + +Make example for this keyboard (after setting up your build environment): + + make torn:default + +Flashing example for this keyboard: + + make torn: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). diff --git a/qmk/keyboards/torn/rules.mk b/qmk/keyboards/torn/rules.mk new file mode 100644 index 00000000..caf544d1 --- /dev/null +++ b/qmk/keyboards/torn/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = yes +CUSTOM_MATRIX = lite + +SRC += matrix.c \ + mcp23018.c \ + torn_encoder.c \ + torn_oled.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/qmk/keyboards/torn/torn.c b/qmk/keyboards/torn/torn.c new file mode 100644 index 00000000..ef5060e6 --- /dev/null +++ b/qmk/keyboards/torn/torn.c @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 "torn.h" +#include "i2c_master.h" +#include "mcp23018.h" + +static uint8_t led_state[3] = {1, 1, 1}; + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + i2c_init(); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + if (mcp23018_reset_required()) { + msp23018_init(); + secondary_encoder_init(); + // torn_set_led(2, 1); + } + + matrix_scan_user(); + secondary_encoder_read(); +} + +void torn_set_led(uint8_t led, bool state) { + led_state[led] = !state; + + // toggle leds by setting the pin direction + uint8_t iodir = 0b11111000 | led_state[0] << 2 | led_state[1] << 1 | led_state[2]; + mcp23018_writeReg(IODIRB, &iodir, 1); +} diff --git a/qmk/keyboards/torn/torn.h b/qmk/keyboards/torn/torn.h new file mode 100644 index 00000000..c25b5c2a --- /dev/null +++ b/qmk/keyboards/torn/torn.h @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// clang-format off +#define LAYOUT_split_3x6_4( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k32, k33, k34, k35, k36, k37, k38, k39 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { ___, ___, k32, k33, k34, k35, k36, k37, k38, k39, ___, ___ } \ +} +// clang-format on + +void torn_set_led(uint8_t led, bool on); + +void secondary_encoder_read(void); +void secondary_encoder_init(void); diff --git a/qmk/keyboards/torn/torn_encoder.c b/qmk/keyboards/torn/torn_encoder.c new file mode 100644 index 00000000..ef9b0873 --- /dev/null +++ b/qmk/keyboards/torn/torn_encoder.c @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Richard Titmuss + * Copyright 2018 Jack Humbert + * + * 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 "torn.h" +#include "mcp23018.h" + +#ifndef ENCODER_RESOLUTION +# define ENCODER_RESOLUTION 4 +#endif + +#define ENCODER_CLOCKWISE true +#define ENCODER_COUNTER_CLOCKWISE false + +static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; + +static uint8_t encoder_state = 0; +static int8_t encoder_pulses = 0; + +extern const uint16_t PROGMEM encoder_keymaps[][2][2]; + +/** + * Tap on encoder updates using the encoder keymap + */ +void encoder_update_kb(uint8_t index, bool clockwise) { + int layer = get_highest_layer(layer_state); + + uint16_t code; + do { + code = pgm_read_word(&encoder_keymaps[layer--][index][clockwise]); + } while (code == KC_TRNS); + + tap_code16(code); +} + +static bool encoder_read_state(uint8_t *state) { + uint8_t mcp23018_pin_state; + mcp23018_status_t status = mcp23018_readReg(GPIOB, &mcp23018_pin_state, 1); + if (status == 0) { + *state = (mcp23018_pin_state & 0b110000) >> 4; + return true; + } + return false; +} + +static void encoder_update(int8_t index, uint8_t state) { + encoder_pulses += encoder_LUT[state & 0xF]; + if (encoder_pulses >= ENCODER_RESOLUTION) { + encoder_update_kb(index, ENCODER_CLOCKWISE); + } + if (encoder_pulses <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); + } + encoder_pulses %= ENCODER_RESOLUTION; +} + +/** + * Read the secondary encoder over i2c + */ +void secondary_encoder_read(void) { + uint8_t state; + if (encoder_read_state(&state)) { + encoder_state <<= 2; + encoder_state |= state; + encoder_update(1, encoder_state); + } +} + +/** + * Initialize the secondary encoder over i2c + */ +void secondary_encoder_init(void) { encoder_read_state(&encoder_state); } diff --git a/qmk/keyboards/torn/torn_oled.c b/qmk/keyboards/torn/torn_oled.c new file mode 100644 index 00000000..834abf96 --- /dev/null +++ b/qmk/keyboards/torn/torn_oled.c @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 + +#ifdef OLED_DRIVER_ENABLE + +// clang-format off +__attribute__((weak)) +void oled_task_user(void) { + static const char PROGMEM torn_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x98, 0x98, 0x98, 0x98, 0x98, 0x18, 0x18, 0x98, + 0x98, 0x98, 0x98, 0x98, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x30, 0x18, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, + 0x18, 0x30, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x18, 0x38, + 0x70, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xf8, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xf8, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0x00, 0x00, 0xff, + 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xfe, 0x07, 0x01, 0xf0, 0xfc, 0x0e, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x03, 0x03, 0x0e, 0xfc, 0xf0, 0x01, 0x07, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xc1, 0xc1, 0x63, 0x3f, 0x1c, + 0xc0, 0xe1, 0x7f, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf1, 0xe3, 0xc7, 0x8e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x3f, 0x70, 0xc0, 0x87, 0x1f, 0x38, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x60, 0x60, 0x38, 0x1f, 0x87, 0xc0, 0xf0, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xfe, 0x0e, 0x3c, 0x78, 0xe2, 0xc7, 0x1f, + 0x39, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x71, 0xe3, 0xc7, + 0x8f, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x06, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, + 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x03, 0x07, 0x0e, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(torn_logo, sizeof(torn_logo)); +} +// clang-format on + +#endif diff --git a/qmk/keyboards/treadstone48/rev2/info.json b/qmk/keyboards/treadstone48/rev2/info.json index 1771a6a9..991a8301 100644 --- a/qmk/keyboards/treadstone48/rev2/info.json +++ b/qmk/keyboards/treadstone48/rev2/info.json @@ -191,11 +191,6 @@ "x": 12.75, "y": 2 }, - { - "label": "Shift", - "x": 13.75, - "y": 2 - }, { "label": "Ctrl", "x": 0.75, @@ -256,6 +251,11 @@ "label": "\u2192", "x": 13.75, "y": 3 + }, + { + "label": "Shift", + "x": 13.75, + "y": 2 } ] } diff --git a/qmk/keyboards/tunks/ergo33/config.h b/qmk/keyboards/tunks/ergo33/config.h new file mode 100644 index 00000000..96cc5b93 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/config.h @@ -0,0 +1,68 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xA0A1 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kulmajaba +#define PRODUCT Ergo33 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom +*/ +#define MATRIX_ROW_PINS { F0, F1, B5, B4, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6 } + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Underglow + top RGB configuration */ +#define RGB_DI_PIN D4 + +/* 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 ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D3 } + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/tunks/ergo33/ergo33.c b/qmk/keyboards/tunks/ergo33/ergo33.c new file mode 100644 index 00000000..94265581 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/ergo33.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 "ergo33.h" diff --git a/qmk/keyboards/tunks/ergo33/ergo33.h b/qmk/keyboards/tunks/ergo33/ergo33.h new file mode 100644 index 00000000..d3deb974 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/ergo33.h @@ -0,0 +1,57 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +/* Matrix layout + * ,---------. + * | 00 | 01 |------------------------. + * |----|----| 02 | 03 | 04 | 05 | 06 | + * | 10 | 11 |----|----|----|----|----| + * |----|----| 12 | 13 | 14 | 14 | 16 | + * | 20 | 21 |----|----|----|----|----| + * |----|----| 22 | 23 | 24 | 25 | 26 | + * | 30 | 31 |----|----|----|----|----| ,----. + * |----|----| 32 | 33 | 34 | 35 | 36 | | 46 | + * | 40 | 41 |---------------------------|----' + * `---------' | 43 | 44 | 45 | + * `--------------' + */ + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, k26, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k46, \ + k43, k44, k45 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, KC_NO, k43, k44, k45, k46 } \ +} diff --git a/qmk/keyboards/tunks/ergo33/info.json b/qmk/keyboards/tunks/ergo33/info.json new file mode 100644 index 00000000..0d4f00b9 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Ergo33", + "url": "https://github.com/kulmajaba/tunks-keyboard", + "width": 9, + "height": 6, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, {"x": 1, "y": 0}, {"x": 2, "y": 0.4}, {"x": 3, "y": 0.3}, {"x": 4, "y": 0.4}, {"x": 5, "y": 0.5}, {"x": 6, "y": 0.5}, + {"x": 0, "y": 1}, {"x": 1, "y": 1}, {"x": 2, "y": 1.4}, {"x": 3, "y": 1.3}, {"x": 4, "y": 1.4}, {"x": 5, "y": 1.5}, {"x": 6, "y": 1.5}, + {"x": 0, "y": 2}, {"x": 1, "y": 2}, {"x": 2, "y": 2.4}, {"x": 3, "y": 2.3}, {"x": 4, "y": 2.4}, {"x": 5, "y": 2.5}, {"x": 6, "y": 2.5}, + {"x": 0, "y": 3}, {"x": 1, "y": 3}, {"x": 2, "y": 3.4}, {"x": 3, "y": 3.3}, {"x": 4, "y": 3.4}, {"x": 5, "y": 3.5}, {"x": 6, "y": 3.5}, {"x": 8, "y": 3.5}, + {"x": 0, "y": 4}, {"x": 1, "y": 4}, + {"x": 4.7, "y": 4.7}, {"x": 5.8, "y": 4.7}, {"x": 6.8, "y": 4.8} + ] + } + } +} \ No newline at end of file diff --git a/qmk/keyboards/tunks/ergo33/keymaps/default/config.h b/qmk/keyboards/tunks/ergo33/keymaps/default/config.h new file mode 100644 index 00000000..0fd2ef93 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/default/config.h @@ -0,0 +1,26 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 . + */ + +#pragma once + +/* RGB LED count + * No external LED PCB: 10 + * External LED PCB: 14 + */ +#define RGBLED_NUM 14 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LAYERS +#define RGBLIGHT_SLEEP \ No newline at end of file diff --git a/qmk/keyboards/tunks/ergo33/keymaps/default/keymap.c b/qmk/keyboards/tunks/ergo33/keymaps/default/keymap.c new file mode 100644 index 00000000..e26e556c --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/default/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +/* Each layer gets a name for readability, which is then used in the keymap matrix below. + * The underscores don't mean anything - you can have a layer called STUFF or any other name. + */ +enum layers { + _BASE = 0, + _RGB, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_Y, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_H, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_N, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, TG(_RGB), + KC_LGUI, KC_LCTL, KC_ENT, + KC_LALT, KC_SPC, KC_ENT + ), + + [_RGB] = LAYOUT( + RGB_RMOD, RGB_MOD, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(_RGB), + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } + } +} +#endif + + +#ifdef RGBLIGHT_LAYERS +#define HUE_PRIMARY 10 +#define HSV_OFF 0, 0, 0 +#define HSV_CAPS HUE_PRIMARY, 255, 64 +#define HSV_LAYER_BASE HUE_PRIMARY, 255, 64 +#define HSV_LAYER_RGB 213, 255, 64 + +const rgblight_segment_t PROGMEM ug_default_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {10, 4, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ug_caps_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {11, 1, HSV_CAPS} +); + +const rgblight_segment_t PROGMEM ug_base_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_BASE} +); + +const rgblight_segment_t PROGMEM ug_rgb_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_RGB} +); + +/* Define layer order, later layers take precedence */ +const rgblight_segment_t* const PROGMEM ug_layers[] = RGBLIGHT_LAYERS_LIST( + ug_default_layer, + ug_caps_layer, + ug_base_layer, + ug_rgb_layer +); + +void keyboard_post_init_user(void) { + /* Enable the LED layers and set the initial state */ + rgblight_layers = ug_layers; + rgblight_set_layer_state(0, true); + rgblight_set_layer_state(2, true); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + /* Both layers will light up if both kb layers are active, latter overrides */ + rgblight_set_layer_state(2, layer_state_cmp(state, 0)); + rgblight_set_layer_state(3, layer_state_cmp(state, 1)); + return state; +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + return true; +} +#endif diff --git a/qmk/keyboards/tunks/ergo33/keymaps/default/readme.md b/qmk/keyboards/tunks/ergo33/keymaps/default/readme.md new file mode 100644 index 00000000..40c5e0f4 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Default Ergo33 Layout + +This is the default layout for the Ergo33. It mostly follows the left side of a normal keyboard, except since there is an extra column on the left, `0` is above `TAB` and the left column is: +``` +ESC +Y +H +N +GUI (Win) +``` +The encoder acts as a mouse scrollwheel and encoder press is `Enter`. On the top LEDs the 1st is a layer indicator and the 3rd is a caps lock indicator. diff --git a/qmk/keyboards/tunks/ergo33/keymaps/prpro/config.h b/qmk/keyboards/tunks/ergo33/keymaps/prpro/config.h new file mode 100644 index 00000000..4fc3b213 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/prpro/config.h @@ -0,0 +1,28 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 . + */ + +#pragma once + +/* RGB LED count + * No external LED PCB: 10 + * External LED PCB: 14 + */ +#define RGBLED_NUM 14 +#define RGBLIGHT_LAYERS +#define RGBLIGHT_SLEEP + +/* Tap dance delay in ms */ +#define TAPPING_TERM 175 \ No newline at end of file diff --git a/qmk/keyboards/tunks/ergo33/keymaps/prpro/keymap.c b/qmk/keyboards/tunks/ergo33/keymaps/prpro/keymap.c new file mode 100644 index 00000000..500e5dba --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/prpro/keymap.c @@ -0,0 +1,164 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +#include "keymap_finnish.h" + +enum layers { + _BASE = 0, + _PRPRO, + _PRPRO2, +}; + +/* Tap Dance declarations */ +enum { + TD_1, + TD_2, + TD_3, + TD_4, + TD_5, + TD_6, + TD_COMMA, + TD_HOME, + TD_K, + TD_DEL, + TD_X, + TD_C, + TD_V, + TD_Z +}; + +/* Tap Dance definitions */ +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_1] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_1), LCTL(LSFT(KC_1))), + [TD_2] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_2), LCTL(LSFT(KC_2))), + [TD_3] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_3), LCTL(LSFT(KC_3))), + [TD_4] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_4), LCTL(LSFT(KC_4))), + [TD_5] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_5), LCTL(LSFT(KC_5))), + [TD_6] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_6), LCTL(LSFT(KC_6))), + [TD_COMMA] = ACTION_TAP_DANCE_DOUBLE(KC_COMMA, KC_DOT), + [TD_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), + [TD_K] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_K), LCTL(LSFT(KC_K))), + [TD_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_DEL, LSFT(KC_DEL)), + [TD_X] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_X), KC_S), + [TD_C] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_C), KC_M), + [TD_V] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_V), LCTL(KC_L)), + [TD_Z] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_Z), LCTL(LSFT(KC_Z))) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_ESC, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_Y, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_H, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_N, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, TG(_PRPRO), + KC_LGUI, KC_LCTL, KC_ENT, + KC_LALT, KC_SPC, KC_ENT + ), + + [_PRPRO] = LAYOUT( + KC_ESC, KC_M, KC_V, KC_UP, KC_A, KC_Y, KC_C, + KC_1, KC_2, KC_LEFT, KC_DOWN, KC_RIGHT, TD(TD_Z), TD(TD_DEL), + FI_SECT, TD(TD_HOME), KC_J, KC_K, KC_L, TD(TD_K), TG(_PRPRO2), + KC_S, KC_LSFT, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_S), TG(_PRPRO), + LCTL(KC_L), KC_LCTL, KC_ENT, + KC_LALT, KC_SPC, KC_ENT + ), + + [_PRPRO2] = LAYOUT( + KC_TRNS, KC_TRNS, TD(TD_1), TD(TD_2), TD(TD_3), TD(TD_4), TD(TD_5), + 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_I, KC_O, TD(TD_COMMA), KC_TRNS, TG(_PRPRO2), + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } + } +} +#endif + +#ifdef RGBLIGHT_LAYERS +#define HUE_PRIMARY 10 +#define HSV_PRIMARY HUE_PRIMARY, 255, 255 +#define HSV_OFF 0, 0, 0 +#define HSV_CAPS HUE_PRIMARY, 255, 64 +#define HSV_LAYER_BASE HUE_PRIMARY, 255, 64 +#define HSV_LAYER_PRPRO 213, 255, 64 +#define HSV_LAYER_PRPRO2 184, 255, 64 + +const rgblight_segment_t PROGMEM ug_default_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 14, HSV_PRIMARY}, + {10, 4, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ug_caps_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {11, 1, HSV_CAPS} +); + +const rgblight_segment_t PROGMEM ug_base_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_BASE} +); + +const rgblight_segment_t PROGMEM ug_prpro_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_PRPRO} +); + +const rgblight_segment_t PROGMEM ug_prpro2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {13, 1, HSV_LAYER_PRPRO2} +); + +/* Define layer order, later layers take precedence */ +const rgblight_segment_t* const PROGMEM ug_layers[] = RGBLIGHT_LAYERS_LIST( + ug_default_layer, + ug_caps_layer, + ug_base_layer, + ug_prpro_layer, + ug_prpro2_layer +); + +void keyboard_post_init_user(void) { + /* Enable the LED layers */ + rgblight_layers = ug_layers; + rgblight_set_layer_state(0, true); + rgblight_set_layer_state(2, true); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, true); + /* Both layers will light up if both kb layers are active */ + rgblight_set_layer_state(2, layer_state_cmp(state, 0)); + rgblight_set_layer_state(3, layer_state_cmp(state, 1)); + rgblight_set_layer_state(4, layer_state_cmp(state, 2)); + return state; +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(1, led_state.caps_lock); + return true; +} +#endif diff --git a/qmk/keyboards/tunks/ergo33/keymaps/prpro/readme.md b/qmk/keyboards/tunks/ergo33/keymaps/prpro/readme.md new file mode 100644 index 00000000..d9507df7 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/prpro/readme.md @@ -0,0 +1,5 @@ +# Ergo33 Premiere Pro Layout + +Default layout + Premiere pro editing layout for Ergo33. + +On this layout, the second and third layers are Adobe Premiere Pro hotkeys. You'll need to use [My custom shortcuts](https://github.com/kulmajaba/tunks-keyboard/blob/master/Ergo33%20prpro.kys) for it to work. diff --git a/qmk/keyboards/tunks/ergo33/keymaps/prpro/rules.mk b/qmk/keyboards/tunks/ergo33/keymaps/prpro/rules.mk new file mode 100644 index 00000000..2176e6dc --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/prpro/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes # Tap dance \ No newline at end of file diff --git a/qmk/keyboards/tunks/ergo33/keymaps/rgb/config.h b/qmk/keyboards/tunks/ergo33/keymaps/rgb/config.h new file mode 100644 index 00000000..dceb8294 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/rgb/config.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 . + */ + +#pragma once + +/* RGB LED count + * No external LED PCB: 10 + * External LED PCB: 14 + */ +#define RGBLED_NUM 10 +#define RGBLIGHT_ANIMATIONS \ No newline at end of file diff --git a/qmk/keyboards/tunks/ergo33/keymaps/rgb/keymap.c b/qmk/keyboards/tunks/ergo33/keymaps/rgb/keymap.c new file mode 100644 index 00000000..9ea18d27 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/rgb/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Mika Kuitunen + * + * 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 + +enum layers { + _BASE = 0, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + RGB_RMOD, RGB_MOD, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/qmk/keyboards/tunks/ergo33/keymaps/rgb/readme.md b/qmk/keyboards/tunks/ergo33/keymaps/rgb/readme.md new file mode 100644 index 00000000..bafc87e5 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/keymaps/rgb/readme.md @@ -0,0 +1,3 @@ +# Ergo33 RGB Layout + +Pure RGB lighting layout for product photography. diff --git a/qmk/keyboards/tunks/ergo33/readme.md b/qmk/keyboards/tunks/ergo33/readme.md new file mode 100644 index 00000000..d825ef3a --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/readme.md @@ -0,0 +1,20 @@ +# Ergo33 + +A one-handed 33-key keypad for gaming, macros etc. + +* Keyboard Maintainer: [Mika Kuitunen / kulmajaba](https://github.com/kulmajaba) +* Hardware Supported: Ergo33 PCB, ATmega32U4 MCU, Kailh hot-swap sockets, EC11 rotary encoder +* Hardware Availability: Open source, schema and layout: [Github](https://github.com/kulmajaba/tunks-keyboard) + +![](https://i.imgur.com/G5nAspYl.jpg) +![](https://i.imgur.com/snLIZrEl.jpg) + +Make example for this keyboard (after setting up your build environment): + + make ergo33:default + +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 mode + +To get the keyboard into bootloader mode, press the switch `SW1` on the backside of the PCB once while the keyboard is connected to USB. diff --git a/qmk/keyboards/tunks/ergo33/rules.mk b/qmk/keyboards/tunks/ergo33/rules.mk new file mode 100644 index 00000000..fcd2cf52 --- /dev/null +++ b/qmk/keyboards/tunks/ergo33/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +MOUSEKEY_ENABLE = yes # Mouse keys +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes # Rotary encoders diff --git a/qmk/keyboards/v60_type_r/v60_type_r.h b/qmk/keyboards/v60_type_r/v60_type_r.h index 78b6561b..8494897e 100644 --- a/qmk/keyboards/v60_type_r/v60_type_r.h +++ b/qmk/keyboards/v60_type_r/v60_type_r.h @@ -88,7 +88,7 @@ enum my_keycodes { // KBP V60 Type R with ANSI layout - #define LAYOUT_60_ansi( \ +#define LAYOUT_60_ansi( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ diff --git a/qmk/keyboards/viktus/readme.md b/qmk/keyboards/viktus/readme.md new file mode 100644 index 00000000..e65a030a --- /dev/null +++ b/qmk/keyboards/viktus/readme.md @@ -0,0 +1 @@ +# Viktus Design diff --git a/qmk/keyboards/viktus/sp111/config.h b/qmk/keyboards/viktus/sp111/config.h new file mode 100644 index 00000000..7dda6457 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/config.h @@ -0,0 +1,83 @@ +/* Copyright 2020 blindassassin111 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5644 //VD +#define PRODUCT_ID 0x5111 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Viktus Design +#define PRODUCT SP111 + +/* key matrix size */ +#define MATRIX_ROWS 6*2 +#define MATRIX_COLS 11 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/viktus/sp111/info.json b/qmk/keyboards/viktus/sp111/info.json new file mode 100644 index 00000000..0061062f --- /dev/null +++ b/qmk/keyboards/viktus/sp111/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "SP-111", + "url": "https://thekey.company/products/sp-111", + "maintainer": "blindassassin111", + "width": 22.5, + "height": 6.75, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"F13", "x":0, "y":0}, {"label":"F14", "x":1, "y":0}, {"label":"F15", "x":2, "y":0}, {"label":"F16", "x":3, "y":0}, {"label":"Esc", "x":4.5, "y":0}, {"label":"F1", "x":5.75, "y":0}, {"label":"F2", "x":6.75, "y":0}, {"label":"F3", "x":7.75, "y":0}, {"label":"F4", "x":8.75, "y":0}, {"label":"F5", "x":10, "y":0}, {"label":"F6", "x":11, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15, "y":0}, {"label":"F10", "x":16, "y":0}, {"label":"F11", "x":17, "y":0}, {"label":"F12", "x":18, "y":0}, {"label":"Prt Scn", "x":19.25, "y":0}, {"label":"Scl Lck", "x":20.5, "y":0}, {"label":"Pause", "x":21.5, "y":0}, + {"label":"Num Lock", "x":0, "y":1.5}, {"label":"/", "x":1, "y":1.5}, {"label":"*", "x":2, "y":1.5}, {"label":"-", "x":3, "y":1.5}, {"label":"~", "x":4.5, "y":1.5}, {"label":"!", "x":5.5, "y":1.5}, {"label":"@", "x":6.5, "y":1.5}, {"label":"#", "x":7.5, "y":1.5}, {"label":"$", "x":8.5, "y":1.5}, {"label":"%", "x":9.5, "y":1.5}, {"label":"^", "x":10.5, "y":1.5}, {"label":"&", "x":12.25, "y":1.5}, {"label":"*", "x":13.25, "y":1.5}, {"label":"(", "x":14.25, "y":1.5}, {"label":")", "x":15.25, "y":1.5}, {"label":"_", "x":16.25, "y":1.5}, {"label":"+", "x":17.25, "y":1.5}, {"label":"Backspace", "x":18.25, "y":1.5}, {"label":"Backspace2", "x":19.25, "y":1.5}, {"label":"Home", "x":20.5, "y":1.5}, {"label":"Insert", "x":21.5, "y":1.5}, + {"label":"7", "x":0, "y":2.5}, {"label":"8", "x":1, "y":2.5}, {"label":"9", "x":2, "y":2.5}, {"label":"+", "x":3, "y":2.5}, {"label":"Tab", "x":4.5, "y":2.5, "w":1.5}, {"label":"Q", "x":6, "y":2.5}, {"label":"W", "x":7, "y":2.5}, {"label":"E", "x":8, "y":2.5}, {"label":"R", "x":9, "y":2.5}, {"label":"T", "x":10, "y":2.5}, {"label":"Y", "x":11.75, "y":2.5}, {"label":"U", "x":12.75, "y":2.5}, {"label":"I", "x":13.75, "y":2.5}, {"label":"O", "x":14.75, "y":2.5}, {"label":"P", "x":15.75, "y":2.5}, {"label":"{", "x":16.75, "y":2.5}, {"label":"}", "x":17.75, "y":2.5}, {"label":"|", "x":18.75, "y":2.5, "w":1.5}, {"label":"End", "x":20.5, "y":2.5}, {"label":"Delete", "x":21.5, "y":2.5}, + {"label":"4", "x":0, "y":3.5}, {"label":"5", "x":1, "y":3.5}, {"label":"6", "x":2, "y":3.5}, {"label":"=", "x":3, "y":3.5}, {"label":"Caps Lock", "x":4.5, "y":3.5, "w":1.75}, {"label":"A", "x":6.25, "y":3.5}, {"label":"S", "x":7.25, "y":3.5}, {"label":"D", "x":8.25, "y":3.5}, {"label":"F", "x":9.25, "y":3.5}, {"label":"G", "x":10.25, "y":3.5}, {"label":"H", "x":12, "y":3.5}, {"label":"J", "x":13, "y":3.5}, {"label":"K", "x":14, "y":3.5}, {"label":"L", "x":15, "y":3.5}, {"label":":", "x":16, "y":3.5}, {"label":"\"", "x":17, "y":3.5}, {"label":"#", "x":18, "y":3.5, "w":1}, {"label":"Enter", "x":19, "y":3.5, "w":1.25}, {"label":"PgUp", "x":20.5, "y":3.5}, {"label":"PgDn", "x":21.5, "y":3.5}, + {"label":"1", "x":0, "y":4.5}, {"label":"2", "x":1, "y":4.5}, {"label":"3", "x":2, "y":4.5}, {"label":"Enter", "x":3, "y":4.5}, {"label":"Shift", "x":4.5, "y":4.5, "w":1.25}, {"label":"numbs", "x":5.75, "y":4.5, "w":1}, {"label":"Z", "x":6.75, "y":4.5}, {"label":"X", "x":7.75, "y":4.5}, {"label":"C", "x":8.75, "y":4.5}, {"label":"V", "x":9.75, "y":4.5}, {"label":"B", "x":10.75, "y":4.5}, {"label":"N", "x":12.5, "y":4.5}, {"label":"M", "x":13.5, "y":4.5}, {"label":"<", "x":14.5, "y":4.5}, {"label":">", "x":15.5, "y":4.5}, {"label":"?", "x":16.5, "y":4.5}, {"label":"Shift", "x":17.5, "y":4.5, "w":1.75}, {"label":"Fn", "x":19.25, "y":4.5}, {"label":"\u2191", "x":20.5, "y":4.75}, + {"label":"0", "x":0, "y":5.5}, {"label":"00", "x":1, "y":5.5}, {"label":".", "x":2, "y":5.5}, {"label":"..", "x":3, "y":5.5}, {"label":"Ctrl", "x":4.5, "y":5.5, "w":1.25}, {"label":"Code", "x":5.75, "y":5.5, "w":1.25}, {"label":"Alt", "x":7, "y":5.5, "w":1.25}, {"label":"Fn", "x":8.25, "y":5.5, "w":1}, {"label":"", "x":9.25, "y":5.5, "w":2.25}, {"label":"", "x":12.25, "y":5.5, "w":2.25}, {"label":"", "x":14.5, "y":5.5, "w":1}, {"label":"Alt", "x":15.5, "y":5.5, "w":1.25}, {"label":"Code", "x":16.75, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":18, "y":5.5, "w":1.25}, {"label":"\u2190", "x":19.5, "y":5.75}, {"label":"\u2193", "x":20.5, "y":5.75}, {"label":"\u2192", "x":21.5, "y":5.75} + ] + } + } +} diff --git a/qmk/keyboards/viktus/sp111/keymaps/default/keymap.c b/qmk/keyboards/viktus/sp111/keymaps/default/keymap.c new file mode 100644 index 00000000..11571e37 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2020 blindassassin111 + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, 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_PSCR, KC_SLCK, KC_PAUS, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, KC_HOME, KC_INS, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_END, KC_DEL, + KC_P4, KC_P5, KC_P6, KC_PEQL, 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_PGUP, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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, MO(_FN), KC_UP, + KC_P0, KC_P0, KC_P00, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_MUTE, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FN] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case KC_P00: + tap_code(KC_P0); + tap_code(KC_P0); + return false; + } + } + return true; +} diff --git a/qmk/keyboards/viktus/sp111/keymaps/via/config.h b/qmk/keyboards/viktus/sp111/keymaps/via/config.h new file mode 100644 index 00000000..e16379c5 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/keymaps/via/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 blindassassin111 + * + * 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 . + */ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/qmk/keyboards/viktus/sp111/keymaps/via/keymap.c b/qmk/keyboards/viktus/sp111/keymaps/via/keymap.c new file mode 100644 index 00000000..37dacc38 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 blindassassin111 + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, 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_PSCR, KC_SLCK, KC_PAUS, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, KC_HOME, KC_INS, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_END, KC_DEL, + KC_P4, KC_P5, KC_P6, KC_PEQL, 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_PGUP, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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, MO(1), KC_UP, + KC_P0, KC_P0, KC_PDOT, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_MUTE, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/qmk/keyboards/viktus/sp111/keymaps/via/rules.mk b/qmk/keyboards/viktus/sp111/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/viktus/sp111/matrix.c b/qmk/keyboards/viktus/sp111/matrix.c new file mode 100644 index 00000000..33b232dc --- /dev/null +++ b/qmk/keyboards/viktus/sp111/matrix.c @@ -0,0 +1,178 @@ +/* Copyright 2020 zvecr + * + * 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 "mcp23018.h" +#include "quantum.h" + +// Optimize scanning code for speed as a slight mitigation for the port expander +#pragma GCC push_options +#pragma GCC optimize("-O3") + +#define I2C_ADDR 0x20 + +static uint16_t mcp23018_reset_loop = 0; +static uint8_t mcp23018_errors = 0; + +static const pin_t row_pins[MATRIX_ROWS / 2] = {B1, D5, D4, D6, D7, B4}; +static const pin_t col_pins[MATRIX_COLS] = {F5, F6, F7, C7, C6, B6, B5, D3, D2, B3, B2}; + +//_____REGULAR funcs____________________________________________________________ + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS / 2; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + matrix_row_t current_row_value = 0; + + // Select row and wait for row selection to stabilize + select_row(current_row); + wait_us(5); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + if (last_row_value == current_row_value) { + return false; + } + + current_matrix[current_row] = current_row_value; + return true; +} + +//_____MCP23018 funcs___________________________________________________________ + +static void init_pins_MCP23018(void) { + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, 0b11111111); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, 0b01100000); +} + +static void select_row_MCP23018(uint8_t row) { + uint8_t mask = 0; + + switch (row) { + case 6: + mask = 0b10000000; + break; + case 7: + mask = 0b00000001; + break; + case 8: + mask = 0b00000010; + break; + case 9: + mask = 0b00000100; + break; + case 10: + mask = 0b00001000; + break; + case 11: + mask = 0b00010000; + break; + } + + mcp23018_errors += !mcp23018_set_output(I2C_ADDR, mcp23018_PORTB, ~mask); +} + +static uint16_t read_cols_MCP23018(void) { + uint16_t tmp = 0xFFFF; + mcp23018_errors += !mcp23018_readPins_all(I2C_ADDR, &tmp); + + uint16_t state = ((tmp & 0b11111111) << 2) | ((tmp & 0b0110000000000000) >> 13); + return (~state) & 0b1111111111; +} + +static bool read_cols_on_row_MCP23018(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // No need to Clear data in matrix row as we just replace in one go + + // Select row and wait for row selection to stabilize + select_row_MCP23018(current_row); + + matrix_row_t current_row_value = read_cols_MCP23018(); + + // No need to Unselect row as the next `select_row` will blank everything + + if (last_row_value == current_row_value) { + return false; + } + + current_matrix[current_row] = current_row_value; + return true; +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void matrix_init_custom(void) { + mcp23018_init(I2C_ADDR); + + init_pins(); + init_pins_MCP23018(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + if (mcp23018_errors) { + if (++mcp23018_reset_loop > 0x7FFF) { + // tuned to about 5s given the current scan rate + print("trying to reset mcp23018\n"); + mcp23018_reset_loop = 0; + mcp23018_errors = 0; + init_pins_MCP23018(); + } + return changed; + } + + for (uint8_t current_row = MATRIX_ROWS / 2; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row_MCP23018(current_matrix, current_row); + } + return changed; +} +#pragma GCC pop_options diff --git a/qmk/keyboards/viktus/sp111/mcp23018.c b/qmk/keyboards/viktus/sp111/mcp23018.c new file mode 100644 index 00000000..f1d8e568 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/mcp23018.c @@ -0,0 +1,120 @@ +/* Copyright 2020 zvecr + * + * 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 "mcp23018.h" +#include "i2c_master.h" +#include "wait.h" +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n << 1) +#define TIMEOUT 100 + +enum { + CMD_IODIRA = 0x00, // i/o direction register + CMD_IODIRB = 0x01, + CMD_GPPUA = 0x0C, // GPIO pull-up resistor register + CMD_GPPUB = 0x0D, + CMD_GPIOA = 0x12, // general purpose i/o port register (write modifies OLAT) + CMD_GPIOB = 0x13, +}; + +void mcp23018_init(uint8_t addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + wait_ms(1000); + + s_init = 1; + } +} + +bool mcp23018_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmdDirection = port ? CMD_IODIRB : CMD_IODIRA; + uint8_t cmdPullup = port ? CMD_GPPUB : CMD_GPPUA; + + i2c_status_t ret = i2c_writeReg(addr, cmdDirection, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_config::directionFAILED::%u\n", ret); + return false; + } + + ret = i2c_writeReg(addr, cmdPullup, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_config::pullupFAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_output::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t conf[2] = {confA, confB}; + + i2c_status_t ret = i2c_writeReg(addr, CMD_GPIOA, &conf[0], sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_output::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_readPins(uint8_t slave_addr, uint8_t port, uint8_t* out) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA; + + i2c_status_t ret = i2c_readReg(addr, cmd, out, sizeof(uint8_t), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_readPins::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* out) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + + typedef union { + uint8_t u8[2]; + uint16_t u16; + } data16; + + data16 data = {.u16 = 0}; + + i2c_status_t ret = i2c_readReg(addr, CMD_GPIOA, &data.u8[0], sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_readPins::FAILED::%u\n", ret); + return false; + } + + *out = data.u16; + return true; +} diff --git a/qmk/keyboards/viktus/sp111/mcp23018.h b/qmk/keyboards/viktus/sp111/mcp23018.h new file mode 100644 index 00000000..dc2251b7 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/mcp23018.h @@ -0,0 +1,34 @@ +/* Copyright 2020 zvecr + * + * 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 . + */ +#pragma once + +#include +#include + +#define mcp23018_PORTA 0 +#define mcp23018_PORTB 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void mcp23018_init(uint8_t addr); +bool mcp23018_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); +bool mcp23018_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); +bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB); +bool mcp23018_readPins(uint8_t slave_addraddr, uint8_t port, uint8_t* ret); +bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* ret); diff --git a/qmk/keyboards/viktus/sp111/readme.md b/qmk/keyboards/viktus/sp111/readme.md new file mode 100644 index 00000000..608fd402 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/readme.md @@ -0,0 +1,21 @@ +# SP-111 + +![SP-111](https://i.imgur.com/RPFv9KKl.jpg) + +Southpaw (left sided numpad) allows you to use the numpad and mouse at the same time. +Split allows placement in a comfortable manner for long sessions. +Right side layout to maintain the functionality of a full size board in a much more compact manner. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr), blindassassin111 +* Hardware Supported: SP-111 +* Hardware Availability: + +Make example for this keyboard (after setting up your build environment): + + make viktus/sp111:default + +Flashing example for this keyboard: + + make viktus/sp111: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). diff --git a/qmk/keyboards/viktus/sp111/rules.mk b/qmk/keyboards/viktus/sp111/rules.mk new file mode 100644 index 00000000..6aab6807 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes # Smaller (and slightly faster) firmware + + +# custom matrix setup +CUSTOM_MATRIX = lite + +SRC += mcp23018.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/qmk/keyboards/viktus/sp111/sp111.c b/qmk/keyboards/viktus/sp111/sp111.c new file mode 100644 index 00000000..73733499 --- /dev/null +++ b/qmk/keyboards/viktus/sp111/sp111.c @@ -0,0 +1,42 @@ +/* Copyright 2020 blindassassin111 + * + * 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 "sp111.h" + +void keyboard_pre_init_kb(void) { + // enable built in pullups to avoid timeouts when right hand not connected + setPinInputHigh(D0); + setPinInputHigh(D1); + + keyboard_pre_init_user(); +} + +void matrix_init_kb(void) { + setPinOutput(F0); + setPinOutput(F1); + setPinOutput(F4); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(F0, led_state.num_lock); + writePin(F1, led_state.caps_lock); + writePin(F4, led_state.scroll_lock); + } + return res; +} diff --git a/qmk/keyboards/viktus/sp111/sp111.h b/qmk/keyboards/viktus/sp111/sp111.h new file mode 100644 index 00000000..b5f3a97d --- /dev/null +++ b/qmk/keyboards/viktus/sp111/sp111.h @@ -0,0 +1,41 @@ +/* Copyright 2020 blindassassin111 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, R01, R02, R03, R04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L0B, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A, R41, R42, R43, R44, R45, R46, R47, R48, \ + L50, L51, L52, L53, L54, L55, L56, L57, L58, R52, R53, R54, R55, R56, R57, R49, R59 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L0B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, ___ }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, ___ }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L4A }, \ + { L50, L51, L52, L53, L54, L55, L56, L57, L58, ___, ___ }, \ + { ___, R01, R02, R03, R04, R05, R06, R07, R08, R09, ___ }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, ___ }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, ___ }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, ___ }, \ + { ___, R41, R42, R43, R44, R45, R46, R47, R48, ___, ___ }, \ + { ___, ___, R52, R53, R54, R55, R56, R57, R49, R59, ___ } \ +} diff --git a/qmk/keyboards/vn66/config.h b/qmk/keyboards/vn66/config.h index d7281747..e30c1b19 100644 --- a/qmk/keyboards/vn66/config.h +++ b/qmk/keyboards/vn66/config.h @@ -20,12 +20,11 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xCA2C +#define DEVICE_VER 0x0001 #define MANUFACTURER HnahKB -#define PRODUCT VN66 -#define DESCRIPTION A compact keyboard for VNMK +#define PRODUCT VN66 /* key matrix size */ #define MATRIX_ROWS 5 @@ -41,33 +40,51 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS \ - { B1, B2, B3, D2, F7 } -#define MATRIX_COL_PINS \ - { F6, F5, F4, F1, F0, C6, C7, B5, B4, D7, D6, D4, D5, D3 } +#define MATRIX_ROW_PINS { B1, B2, B3, D2, F7 } +#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, C6, C7, B5, B4, D7, D6, D4, D5, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_PIN B6 -#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 4 +#define BACKLIGHT_BREATHING + +#define ENCODERS_PAD_A { B0 } +#define ENCODERS_PAD_B { B7 } +#define ENCODER_RESOLUTION 2 #define RGB_DI_PIN E2 - #ifdef RGB_DI_PIN - #define RGBLED_NUM 20 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ - #define RGBLIGHT_ANIMATIONS - #endif +#ifdef RGB_DI_PIN +# define RGBLED_NUM 20 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 3 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -78,10 +95,51 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). */ #define GRAVE_ESC_CTRL_OVERRIDE -#define ENCODERS_PAD_A {B0} -#define ENCODERS_PAD_B {B7} -#define ENCODER_RESOLUTION 2 \ No newline at end of file +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/vn66/info.json b/qmk/keyboards/vn66/info.json index 9756905f..c2fe2a39 100644 --- a/qmk/keyboards/vn66/info.json +++ b/qmk/keyboards/vn66/info.json @@ -1,18 +1,248 @@ { - "keyboard_name": "vn66", - "url": "fb.com/groups/VietNamMechKey/", - "maintainer": "qmk", - "width": 19.25, - "height": 5.25, + "keyboard_name": "vn66", + "url": "fb.com/groups/VietNamMechKey/", + "maintainer": "qmk", + "width": 19.25, + "height": 5.25, "layouts": { "LAYOUT_all": { - "layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}] + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 15.25, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + + {"x": 15.25, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x": 13.75, "y": 2, "w": 1.25}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + + {"x": 14.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 6}, + {"x": 9.5, "y": 4, "w": 1.25}, + {"x": 10.75, "y": 4}, + {"x": 11.75, "y": 4, "w": 1.25}, + + {"x": 13.25, "y": 4.25}, + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25} + ] }, - "LAYOUT_ansi": { - "layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}] + "LAYOUT_66_ansi": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + + {"x": 15.25, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + + {"x": 15.25, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + + {"x": 14.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 6}, + {"x": 9.5, "y": 4, "w": 1.25}, + {"x": 10.75, "y": 4}, + {"x": 11.75, "y": 4, "w": 1.25}, + + {"x": 13.25, "y": 4.25}, + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25} + ] }, - "LAYOUT_iso": { - "layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}] + "LAYOUT_66_iso": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + + {"x": 15.25, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + + {"x": 15.25, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + + {"x": 14.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 6}, + {"x": 9.5, "y": 4, "w": 1.25}, + {"x": 10.75, "y": 4}, + {"x": 11.75, "y": 4, "w": 1.25}, + + {"x": 13.25, "y": 4.25}, + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25} + ] } } -} \ No newline at end of file +} diff --git a/qmk/keyboards/vn66/keymaps/default/keymap.c b/qmk/keyboards/vn66/keymaps/default/keymap.c index df2d8951..cf7ed98e 100644 --- a/qmk/keyboards/vn66/keymaps/default/keymap.c +++ b/qmk/keyboards/vn66/keymaps/default/keymap.c @@ -13,45 +13,45 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -enum hnah_layers{ - _QWERTY, - _LOWER +enum layer_names { + _QWERTY, + _LOWER }; #define LOWER MO(_LOWER) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_all( /* Base */ - GRAVE_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_BSPC, KC_DEL, 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_DEL, - 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_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, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), + [_QWERTY] = LAYOUT_all( /* Base */ + KC_GESC, 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_DEL, 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_DEL, + 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_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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), [_LOWER] = LAYOUT_all( /* Base */ - 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, BL_STEP, 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, RGB_TOG, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, 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 - ), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; void encoder_update_user(uint8_t index, bool clockwise) { if (clockwise == 0) { - #ifdef MOUSEKEY_ENABLE +#ifdef MOUSEKEY_ENABLE tap_code(KC_MS_WH_DOWN); - #else +#else tap_code(KC_VOLD); - #endif +#endif } else { - #ifdef MOUSEKEY_ENABLE +#ifdef MOUSEKEY_ENABLE tap_code(KC_MS_WH_UP); - #else +#else tap_code(KC_VOLU); - #endif +#endif } - } \ No newline at end of file +} diff --git a/qmk/keyboards/vn66/keymaps/default/readme.md b/qmk/keyboards/vn66/keymaps/default/readme.md index 5c8f558c..f6119fbc 100644 --- a/qmk/keyboards/vn66/keymaps/default/readme.md +++ b/qmk/keyboards/vn66/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for vn66 \ No newline at end of file +# The default keymap for vn66 diff --git a/qmk/keyboards/vn66/readme.md b/qmk/keyboards/vn66/readme.md index 0ab5b750..9b043cb0 100644 --- a/qmk/keyboards/vn66/readme.md +++ b/qmk/keyboards/vn66/readme.md @@ -1,15 +1,19 @@ -# vn66 +# VN66 -![vn66](https://i.imgur.com/Eo28suI.jpg) +![vn66](https://i.imgur.com/Eo28suIl.jpg) A compact 60% keyboard for VNMK -Keyboard Maintainer: VNMK Community -Hardware Supported: VN66 PCB rev.2 -Hardware Availability: [https://geekhack.org/index.php?topic=101754.0] +* Keyboard Maintainer: VNMK Community +* Hardware Supported: VN66 PCB rev.2 +* Hardware Availability: https://geekhack.org/index.php?topic=101754.0 Make example for this keyboard (after setting up your build environment): make vn66:default +Flashing example for this keyboard: + + make vn66: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). diff --git a/qmk/keyboards/vn66/rules.mk b/qmk/keyboards/vn66/rules.mk index 6575b3fd..c765aa74 100644 --- a/qmk/keyboards/vn66/rules.mk +++ b/qmk/keyboards/vn66/rules.mk @@ -2,20 +2,13 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration @@ -23,12 +16,10 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes + +LAYOUTS = 66_ansi 66_iso diff --git a/qmk/keyboards/vn66/vn66.c b/qmk/keyboards/vn66/vn66.c index 12204746..77fe23ae 100644 --- a/qmk/keyboards/vn66/vn66.c +++ b/qmk/keyboards/vn66/vn66.c @@ -13,24 +13,22 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "vn66.h" void matrix_init_kb(void) { - led_init_ports(); - matrix_init_user(); -}; + led_init_ports(); + matrix_init_user(); +} void led_init_ports(void) { - setPinOutput(E6); + setPinOutput(E6); } -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn Caps Lock LED on - writePinLow(E6); - } else { - // Turn Caps Lock LED off - writePinHigh(E6); - } - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + + return true; } diff --git a/qmk/keyboards/vn66/vn66.h b/qmk/keyboards/vn66/vn66.h index 8e4c1764..c8a356fd 100644 --- a/qmk/keyboards/vn66/vn66.h +++ b/qmk/keyboards/vn66/vn66.h @@ -13,10 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -26,45 +29,46 @@ * represents the switch matrix. */ #define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ - { k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k4D, k4C, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k4B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, XXX, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D } \ } -#define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4c,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ -) LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, k4c,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, \ - k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ -) +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k4C, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k4B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, XXX, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX } \ +} -#define LAYOUT_iso( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4c,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b,\ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ -) LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, k4c,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k4b,\ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ -) +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k4C, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k4B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k44, k45, k46, k47, k48, k49, k4A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, XXX, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX } \ +} +#define LAYOUT_ansi LAYOUT_66_ansi +#define LAYOUT_iso LAYOUT_66_iso diff --git a/qmk/keyboards/whitefox/config.h b/qmk/keyboards/whitefox/config.h index 87af4edc..4d7a460d 100644 --- a/qmk/keyboards/whitefox/config.h +++ b/qmk/keyboards/whitefox/config.h @@ -15,42 +15,78 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1c11 -#define PRODUCT_ID 0xb04d -#define DEVICE_VER 0x0001 -#define MANUFACTURER Input Club -#define PRODUCT WhiteFox/QMK +#define VENDOR_ID 0x1C11 +#define PRODUCT_ID 0xB04D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Input:Club +#define PRODUCT WhiteFox (QMK) /* key matrix size */ -#define MATRIX_ROWS 9 -#define MATRIX_COLS 8 +#define MATRIX_ROWS 8 +#define MATRIX_COLS 9 -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +/* + * Keyboard Matrix Assignments + * + * 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) + * + */ +#define MATRIX_ROW_PINS { D0, D1, D4, D5, D6, D7, C1, C2 } +#define MATRIX_COL_PINS { B2, B3, B18, B19, C0, C8, C9, C10, C11 } +#define UNUSED_PINS -#define LED_BRIGHTNESS_LO 100 -#define LED_BRIGHTNESS_HI 255 +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 6 - /* 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 -/* Keymap for Infinity prototype */ -//#define INFINITY_PROTOTYPE +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 -/* Keymap for Infinity 1.1a (first revision with LED support) */ -//#define INFINITY_LED +#define LED_BRIGHTNESS_LO 100 +#define LED_BRIGHTNESS_HI 255 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO /* * Feature disable options @@ -67,7 +103,11 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -#endif +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/qmk/keyboards/whitefox/info.json b/qmk/keyboards/whitefox/info.json index fc2ffea1..715f7281 100644 --- a/qmk/keyboards/whitefox/info.json +++ b/qmk/keyboards/whitefox/info.json @@ -1,91 +1,544 @@ { - "keyboard_name": "Whitefox", - "maintainer": "qmk", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - }, + "keyboard_name": "Whitefox", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, - "LAYOUT_truefox": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - }, + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + {"x": 15, "y": 1}, - "LAYOUT_aria": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - }, - "LAYOUT_vanilla": { - "layout": [ - {"label": "~","x": 0,"y": 0}, - {"label": "!","x": 1,"y": 0}, - {"label": "@","x": 2,"y": 0}, - {"label": "#","x": 3,"y": 0}, - {"label": "$","x": 4,"y": 0}, - {"label": "%","x": 5,"y": 0}, - {"label": "^","x": 6,"y": 0}, - {"label": "&","x": 7,"y": 0}, - {"label": "*","x": 8,"y": 0}, - {"label": "(","x": 9,"y": 0}, - {"label": ")","x": 10,"y": 0}, - {"label": "_","x": 11,"y": 0}, - {"label": "+","x": 12,"y": 0}, - {"label": "Backspace","x": 13,"y": 0,"w": 2}, - {"x": 15,"y": 0}, - {"label": "Tab","x": 0,"y": 1,"w": 1.5}, - {"label": "Q","x": 1.5,"y": 1}, - {"label": "W","x": 2.5,"y": 1}, - {"label": "E","x": 3.5,"y": 1}, - {"label": "R","x": 4.5,"y": 1}, - {"label": "T","x": 5.5,"y": 1}, - {"label": "Y","x": 6.5,"y": 1}, - {"label": "U","x": 7.5,"y": 1}, - {"label": "I","x": 8.5,"y": 1}, - {"label": "O","x": 9.5,"y": 1}, - {"label": "P","x": 10.5,"y": 1}, - {"label": "{","x": 11.5,"y": 1}, - {"label": "}","x": 12.5,"y": 1}, - {"label": "|","x": 13.5,"y": 1,"w": 1.5}, - {"x": 15,"y": 1}, - {"label": "Caps Lock","x": 0,"y": 2,"w": 1.75}, - {"label": "A","x": 1.75,"y": 2}, - {"label": "S","x": 2.75,"y": 2}, - {"label": "D","x": 3.75,"y": 2}, - {"label": "F","x": 4.75,"y": 2}, - {"label": "G","x": 5.75,"y": 2}, - {"label": "H","x": 6.75,"y": 2}, - {"label": "J","x": 7.75,"y": 2}, - {"label": "K","x": 8.75,"y": 2}, - {"label": "L","x": 9.75,"y": 2}, - {"label": ":","x": 10.75,"y": 2}, - {"label": "\"","x": 11.75,"y": 2}, - {"label": "Enter","x": 12.75,"y": 2,"w": 2.25}, - {"x": 15,"y": 2}, - {"label": "Shift","x": 0,"y": 3,"w": 2.25}, - {"label": "Z","x": 2.25,"y": 3}, - {"label": "X","x": 3.25,"y": 3}, - {"label": "C","x": 4.25,"y": 3}, - {"label": "V","x": 5.25,"y": 3}, - {"label": "B","x": 6.25,"y": 3}, - {"label": "N","x": 7.25,"y": 3}, - {"label": "M","x": 8.25,"y": 3}, - {"label": "<","x": 9.25,"y": 3}, - {"label": ">","x": 10.25,"y": 3}, - {"label": "?","x": 11.25,"y": 3}, - {"label": "Shift","x": 12.25,"y": 3,"w": 1.75}, - {"x": 14,"y": 3}, - {"x": 15,"y": 3}, - {"label": "Ctrl","x": 0,"y": 4,"w": 1.25}, - {"label": "Win","x": 1.25,"y": 4,"w": 1.25}, - {"label": "Alt","x": 2.5,"y": 4,"w": 1.25}, - {"x": 3.75,"y": 4,"w": 6.25}, - {"label": "Alt","x": 10,"y": 4,"w": 1}, - {"label": "Win","x": 11,"y": 4,"w": 1}, - {"label": "Ctrl","x": 12,"y": 4,"w": 1}, - {"x": 13,"y": 4}, - {"x": 14,"y": 4}, - {"x": 15,"y": 4} - ] + {"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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x": 13.75, "y": 2, "w": 1.25}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y" :3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 15, "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": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y" :3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + } } - } } diff --git a/qmk/keyboards/whitefox/keymaps/default/keymap.c b/qmk/keyboards/whitefox/keymaps/default/keymap.c index d0f329eb..30b21c39 100644 --- a/qmk/keyboards/whitefox/keymaps/default/keymap.c +++ b/qmk/keyboards/whitefox/keymaps/default/keymap.c @@ -17,31 +17,44 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,---------------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| - * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| - * |---------------------------------------------------------------| - * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| - * |---------------------------------------------------------------| - * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| - * |---------------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| - * `---------------------------------------------------------------' + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ Bspc│Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ Ent│PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│GUI │Alt │                        │Alt│ Fn│Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [0] = LAYOUT( \ - 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_GRV, 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_BSPC, KC_DEL, \ - 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_PGUP,\ - 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, KC_PGDN,\ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ - ), - [1] = LAYOUT( \ - 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_TRNS,KC_MUTE,\ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,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_VOLU,\ - 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_PGUP,KC_VOLD,\ - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ + [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_GRV, 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_BSPC, KC_DEL, + 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_PGUP, + 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, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + /* + * ┌───┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐───┬───┌───┐ + * │   │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│   │   │Mut│ + * ├───└───┴───┴───┴───┴───┴───┴───┴───┴───┴─┬─┴─┬─┴─┬─┴─┐─┴───└───┘ + * │     │   │   │   │   │   │   │   │   │   │Psc│Slk│Pse│     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──└───┴───┴───┘┬────┌───┐ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │Vl+│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┌───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │PgU│Vl-│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┌───┼───┼───┤ + * │    │    │    │                        │   │   │   │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───└───┴───┴───┘ + */ + [1] = LAYOUT_all( + _______, 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_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) }; diff --git a/qmk/keyboards/whitefox/readme.md b/qmk/keyboards/whitefox/readme.md index 9b848a69..a170723e 100644 --- a/qmk/keyboards/whitefox/readme.md +++ b/qmk/keyboards/whitefox/readme.md @@ -2,12 +2,16 @@ A compact 65% keyboard. -Keyboard Maintainer: QMK Community -Hardware Supported: Whitefox PCB -Hardware Availability: https://input.club/whitefox/ +* Keyboard Maintainer: QMK Community +* Hardware Supported: Whitefox PCB +* Hardware Availability: https://input.club/whitefox/ Make example for this keyboard (after setting up your build environment): make whitefox:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +Flashing example for this keyboard: + + make whitefox: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). diff --git a/qmk/keyboards/whitefox/rules.mk b/qmk/keyboards/whitefox/rules.mk index c3621ebd..429795c2 100644 --- a/qmk/keyboards/whitefox/rules.mk +++ b/qmk/keyboards/whitefox/rules.mk @@ -14,29 +14,29 @@ BOOTLOADER = kiibohd BOARD = IC_TEENSY_3_1 # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -#CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = yes # Custom matrix file -BACKLIGHT_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output BACKLIGHT_DRIVER = custom VISUALIZER_ENABLE = yes -# project specific files -SRC = matrix.c \ - led.c - LED_DRIVER = is31fl3731c LED_WIDTH = 16 LED_HEIGHT = 5 +LAYOUTS = 65_ansi 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso 65_iso_blocker 65_iso_blocker_split_bs # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/whitefox/visualizer.c b/qmk/keyboards/whitefox/visualizer.c index e5bafcbe..3846e927 100644 --- a/qmk/keyboards/whitefox/visualizer.c +++ b/qmk/keyboards/whitefox/visualizer.c @@ -14,28 +14,22 @@ * along with this program. If not, see . */ -#ifndef KEYBOARDS_WHITEFOX_SIMPLE_VISUALIZER_H_ -#define KEYBOARDS_WHITEFOX_SIMPLE_VISUALIZER_H_ - #include "visualizer.h" #include "visualizer_keyframes.h" -#include "led.h" #include "default_animations.h" - static bool initial_update = true; // Feel free to modify the animations below, or even add new ones if needed -void initialize_user_visualizer(visualizer_state_t* state) { +void initialize_user_visualizer(visualizer_state_t *state) { // The brightness will be dynamically adjustable in the future // But for now, change it here. initial_update = true; start_keyframe_animation(&default_startup_animation); } - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { +void update_user_visualizer_state(visualizer_state_t *state, visualizer_keyboard_status_t *prev_status) { // Add more tests, change the colors and layer texts here // Usually you want to check the high bits (higher layers first) // because that's the order layers are processed for keypresses @@ -44,17 +38,17 @@ void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard // state->status.default_layer // state->status.leds (see led.h for available statuses) - if (initial_update) { initial_update=false; start_keyframe_animation(&led_test_animation); } + if (initial_update) { + initial_update = false; + start_keyframe_animation(&led_test_animation); + } } - -void user_visualizer_suspend(visualizer_state_t* state) { +void user_visualizer_suspend(visualizer_state_t *state) { start_keyframe_animation(&default_suspend_animation); } -void user_visualizer_resume(visualizer_state_t* state) { +void user_visualizer_resume(visualizer_state_t *state) { initial_update = true; start_keyframe_animation(&default_startup_animation); } - -#endif /* KEYBOARDS_WHITEFOX_SIMPLE_VISUALIZER_H_ */ diff --git a/qmk/keyboards/whitefox/whitefox.c b/qmk/keyboards/whitefox/whitefox.c index 2555dc20..ea083c6e 100644 --- a/qmk/keyboards/whitefox/whitefox.c +++ b/qmk/keyboards/whitefox/whitefox.c @@ -14,21 +14,5 @@ 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 "whitefox.h" - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -void matrix_init_kb(void) { - matrix_init_user(); -}; - -void matrix_scan_kb(void) { - matrix_scan_user(); -}; - diff --git a/qmk/keyboards/whitefox/whitefox.h b/qmk/keyboards/whitefox/whitefox.h index 0c19e2da..19d59ad6 100644 --- a/qmk/keyboards/whitefox/whitefox.h +++ b/qmk/keyboards/whitefox/whitefox.h @@ -14,156 +14,225 @@ 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 . */ -#ifndef WHITEFOX_H -#define WHITEFOX_H + +#pragma once #include "quantum.h" -/* WhiteFox - * ,---------------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| - * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| - * |---------------------------------------------------------------| - * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| - * |---------------------------------------------------------------| - * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| - * |---------------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |App |Alt |Gui | |Lef|Dow|Rig| - * `---------------------------------------------------------------' +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┼───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │    │    │    │                        │   │   │   │   │   │   │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - -#define LAYOUT( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \ - K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ - K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \ - K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ - K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k14, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k32, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k47, k48, k50, \ + k51, k52, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k74, k75, k76, k77 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 }, \ - { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX } \ } -/* Keymap for truefox layout */ -#define LAYOUT_truefox( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \ - K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ - K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ - K15, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ - K76, K86, K07, K17, K27, K37, K57, K67, K77 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, KC_NO, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, KC_NO, K75, K76, K77 }, \ - { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ -} - -/* ISO WhiteFox - * ,---------------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Ins| - * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|Del| - * |------------------------------------------------------` |---| - * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| \| |PgU| - * |---------------------------------------------------------------| - * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| - * |---------------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| - * `---------------------------------------------------------------' +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │        │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │    │    │    │                        │   │   │   │   │   │   │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - -#define LAYOUT_iso( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ - K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K33, \ - K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \ - K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ - K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +#define LAYOUT_65_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k32, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k48, k50, \ + k51, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k74, k75, k76, k77 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, KC_NO, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 }, \ - { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, XXX, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, XXX, k48 }, \ + { k50, k51, XXX, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX } \ } -/* ARIA WhiteFox - * ,---------------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Ins| - * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| - * |---------------------------------------------------------------| - * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| - * |---------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| - * |---------------------------------------------------------------| - * |Ctrl|GUI |Alt | Space |Alt |Ctrl| |Lef|Dow|Rig| - * `---------------------------------------------------------------' +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │        │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │   │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ - -#define LAYOUT_aria( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ - K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ - K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ - K15, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ - K76, K86, K07, K17, K27, K37, K57, K67, K77 \ +#define LAYOUT_65_ansi_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k32, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k48, k50, \ + k51, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k75, k76, k77 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, KC_NO, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, KC_NO }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, KC_NO, K75, K76, K77 }, \ - { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, XXX, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, XXX, k48 }, \ + { k50, k51, XXX, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, XXX } \ } -/* Vanilla WhiteFox - * ,---------------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp| `| - * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| - * |---------------------------------------------------------------| - * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| - * |---------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| - * |---------------------------------------------------------------| - * |Ctrl|GUI |Alt | Space |Alt|GUI|Ctl|Lef|Dow|Rig| - * `---------------------------------------------------------------' +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │        │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │   │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ - -#define LAYOUT_vanilla( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ - K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ - K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ - K15, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ - K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +#define LAYOUT_65_ansi_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k14, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k32, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k48, k50, \ + k51, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k75, k76, k77 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, KC_NO, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, KC_NO, K75, K76, K77 }, \ - { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, XXX, k48 }, \ + { k50, k51, XXX, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, XXX } \ } -#endif +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │    │    │    │                        │   │   │   │   │   │   │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_65_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k47, k48, k50, \ + k51, k52, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k74, k75, k76, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, XXX, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX } \ +} + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │   │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ +#define LAYOUT_65_iso_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k47, k48, k50, \ + k51, k52, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k75, k76, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, XXX, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, XXX } \ +} + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │   │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ +#define LAYOUT_65_iso_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k14, k15, k16, \ + k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, k33, \ + k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, k46, k47, k48, k50, \ + k51, k52, k53, k54, k55, k56, k57, k58, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k70, k71, k72, k73, k75, k76, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, XXX } \ +} + +#define LAYOUT LAYOUT_all +#define LAYOUT_aria LAYOUT_65_ansi_blocker +#define LAYOUT_iso LAYOUT_65_iso +#define LAYOUT_truefox LAYOUT_65_ansi_blocker_split_bs +#define LAYOUT_vanilla LAYOUT_65_ansi diff --git a/qmk/keyboards/wilba_tech/wt_rgb_backlight.c b/qmk/keyboards/wilba_tech/wt_rgb_backlight.c index 30c9c4c5..cd3fdd20 100644 --- a/qmk/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/qmk/keyboards/wilba_tech/wt_rgb_backlight.c @@ -26,7 +26,7 @@ defined(RGB_BACKLIGHT_NK65) || \ defined(RGB_BACKLIGHT_NK87) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ - defined(RGB_BACKLIGHT_NEBULA65) || \ + defined(RGB_BACKLIGHT_NEBULA68) || \ defined(RGB_BACKLIGHT_U80_A) || \ defined(RGB_BACKLIGHT_DAWN60) || \ defined(RGB_BACKLIGHT_WT60_B) || \ @@ -50,7 +50,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) #include #include "drivers/avr/i2c_master.h" #else @@ -81,7 +81,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #elif defined(RGB_BACKLIGHT_NK87) @@ -227,7 +227,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -1061,7 +1061,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {255,255}, {255,255}, {255,255}, {255,255}, {200,196}, {192,192}, {184,196}, {213,74} }; -#elif defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NEBULA68) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA60 {0,0}, {4,16}, {6,31}, {10,47}, {16,0}, {24,16}, {27,31}, {35,47}, {31,0}, {39,16}, {43,31}, {51,47}, @@ -1158,7 +1158,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { #elif defined(RGB_BACKLIGHT_M50_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA0..LA17 - {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, + {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, {104,0}, {88,0}, {72,0}, {56,0}, {40,0}, {24,0}, {0,0}, {0,16}, {255,255}, // LB0..LB17 {255,255}, {120,0}, {136,0}, {152,0}, {168,0}, {184,0}, {200,0}, {255,255}, {255,255}, @@ -1197,7 +1197,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) return; #endif @@ -1400,7 +1400,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, @@ -1504,7 +1504,7 @@ void backlight_update_pwm_buffers(void) #elif defined(RGB_BACKLIGHT_HS60) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); @@ -1542,7 +1542,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color( index, red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) IS31FL3733_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_NK87) // This is done to avoid indicator LEDs being set @@ -1567,7 +1567,7 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color_all( red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) // This is done to avoid indicator LEDs being set for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { IS31FL3733_set_color(i, red, green, blue); @@ -1601,7 +1601,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1681,7 +1681,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) void backlight_set_suspend_state(bool state) { @@ -1927,7 +1927,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i&2 +PROGRAM_CMD = echo 'CLI flashing not supported' >&2 # Build Options # change yes to no to disable diff --git a/qmk/keyboards/wsk/g4m3ralpha/config.h b/qmk/keyboards/wsk/g4m3ralpha/config.h new file mode 100644 index 00000000..071b6ac0 --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/config.h @@ -0,0 +1,56 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5753 // "WS" - Worldspawn00 +#define PRODUCT_ID 0x56D9 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT G4M3Ralpha + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, B4, B5, D1 } +#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 RGB_DI_PIN F4 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/qmk/keyboards/wsk/g4m3ralpha/g4m3ralpha.c b/qmk/keyboards/wsk/g4m3ralpha/g4m3ralpha.c new file mode 100644 index 00000000..66652e3d --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/g4m3ralpha.c @@ -0,0 +1,39 @@ +/* Copyright 2020 Worldspawn + * + * 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 "g4m3ralpha.h" + + +void matrix_init_kb(void) { + setPinOutput(D3); + writePinLow(D3); + setPinOutput(D2); + writePinLow(D2); + setPinOutput(D0); + writePinLow(D0); + + matrix_init_user(); +}; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D3, led_state.num_lock); + writePin(D0, led_state.caps_lock); + writePin(D2, led_state.scroll_lock); + } + return res; +} diff --git a/qmk/keyboards/wsk/g4m3ralpha/g4m3ralpha.h b/qmk/keyboards/wsk/g4m3ralpha/g4m3ralpha.h new file mode 100644 index 00000000..53da90f9 --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/g4m3ralpha.h @@ -0,0 +1,32 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K30, K31, K32, K33, K35, K37, K38, K39 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39 } \ +} + diff --git a/qmk/keyboards/wsk/g4m3ralpha/info.json b/qmk/keyboards/wsk/g4m3ralpha/info.json new file mode 100644 index 00000000..c55bc022 --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "G4M3R Alpha", + "url": "", + "maintainer": "Worldspawn00", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"!", "x":0.5, "y":0}, {"label":"@", "x":1.5, "y":0}, {"label":"#", "x":2.5, "y":0}, {"label":"$", "x":3.5, "y":0}, {"label":"%", "x":4.5, "y":0}, {"label":"Q", "x":0, "y":1}, {"label":"W", "x":1, "y":1}, {"label":"E", "x":2, "y":1}, {"label":"R", "x":3, "y":1}, {"label":"T", "x":4, "y":1}, {"label":"Y", "x":5, "y":1}, {"label":"U", "x":6, "y":1}, {"label":"I", "x":7, "y":1}, {"label":"O", "x":8, "y":1}, {"label":"P", "x":9, "y":1}, {"label":"A", "x":0, "y":2}, {"label":"S", "x":1, "y":2}, {"label":"D", "x":2, "y":2}, {"label":"F", "x":3, "y":2}, {"label":"G", "x":4, "y":2}, {"label":"H", "x":5, "y":2}, {"label":"J", "x":6, "y":2}, {"label":"K", "x":7, "y":2}, {"label":"L", "x":8, "y":2}, {"label":"Enter", "x":9, "y":2}, {"label":"Z", "x":0.5, "y":3}, {"label":"X", "x":1.5, "y":3}, {"label":"C", "x":2.5, "y":3}, {"label":"V", "x":3.5, "y":3}, {"x":4.5, "y":3, "w":2}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}] + } + } +} diff --git a/qmk/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c b/qmk/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c new file mode 100644 index 00000000..54ff0f9d --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 Worldspawn + * + * 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 + +enum g4m3ralpha_layers { + _HOME, + _FN, + _FNCHAR, + _FKEYS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_HOME] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + LCTL_T(KC_Z), LALT_T(KC_X), LT(_FN, KC_C), LT(_FNCHAR, KC_V), LSFT_T(KC_SPC), RGUI_T(KC_B), RALT_T(KC_N), RCTL_T(KC_M) + ), + + [_FN] = LAYOUT( + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_ESC, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, + KC_LCTL, KC_LALT, KC_TRNS, MO(_FKEYS), LSFT_T(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL + ), + + [_FNCHAR] = LAYOUT( + RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPD, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV, KC_NO, KC_MINS, KC_EQL, KC_BSLS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_BSPC, + KC_LCTL, KC_LALT, MO(_FKEYS), KC_TRNS, LSFT_T(KC_SPC), KC_COMM, KC_DOT, KC_SLSH + ), + + [_FKEYS] = LAYOUT( + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_SPI, + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, LSFT_T(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _FN: + writePinHigh(D3); + writePinLow(D2); + break; + case _FNCHAR: + writePinLow(D3); + writePinHigh(D2); + break; + case _FKEYS: + writePinHigh(D3); + writePinHigh(D2); + break; + default: // for any other layers, or the default layer + writePinLow(D3); + writePinLow(D2); + break; + } + return state; +} + +bool led_update_user(led_t led_state) { + writePin(D0, led_state.caps_lock); + return false; +} diff --git a/qmk/keyboards/wsk/g4m3ralpha/readme.md b/qmk/keyboards/wsk/g4m3ralpha/readme.md new file mode 100644 index 00000000..ae4f0655 --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/readme.md @@ -0,0 +1,19 @@ +# G4M3R Alpha + +![Alpha](https://i.imgur.com/kETSyyg.png) + +A modification based on the 28-key, semi-ortho keyboard designed by PyroL. + +* Keyboard Maintainer: [Worldspawn00](https://www.github.com/Worldspawn00) +* Hardware Supported: G4M3R Alpha PCB, Pro Micro +* Hardware Availability: https://www.etsy.com/shop/WorldspawnsKeebs + +Make example for this keyboard (after setting up your build environment): + + make wsk/g4m3ralpha:default + +Flashing example for this keyboard: + + make wsk/g4m3ralpha:default:flash + +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/qmk/keyboards/wsk/g4m3ralpha/rules.mk b/qmk/keyboards/wsk/g4m3ralpha/rules.mk new file mode 100644 index 00000000..676a400f --- /dev/null +++ b/qmk/keyboards/wsk/g4m3ralpha/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/wsk/sl40/config.h b/qmk/keyboards/wsk/sl40/config.h index 523e82b4..0eb6a625 100644 --- a/qmk/keyboards/wsk/sl40/config.h +++ b/qmk/keyboards/wsk/sl40/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + #pragma once #include "config_common.h" diff --git a/qmk/keyboards/wsk/sl40/info.json b/qmk/keyboards/wsk/sl40/info.json index 98fd353d..15b2822b 100644 --- a/qmk/keyboards/wsk/sl40/info.json +++ b/qmk/keyboards/wsk/sl40/info.json @@ -7,6 +7,10 @@ "layouts": { "LAYOUT": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"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":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1}, {"x":12.25, "y":1, "w":1.75}, {"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":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3, "w":1.25}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":6.25}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1},{"label":"T", "x":5, "y":1}, {"label":"Y", "x":6, "y":1}, {"label":"U", "x":7, "y":1}, {"label":"I", "x":8, "y":1}, {"label":"O", "x":9, "y":1}, {"label":"P", "x":10, "y":1}, {"label":"{", "x":11, "y":1}, {"label":"}", "x":12, "y":1}, {"label":"BS", "x":13, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.25, "y":2}, {"label":"S", "x":2.25, "y":2}, {"label":"D", "x":3.25, "y":2}, {"label":"F", "x":4.25, "y":2}, {"label":"G", "x":5.25, "y":2}, {"label":"H", "x":6.25, "y":2}, {"label":"J", "x":7.25, "y":2}, {"label":"K", "x":8.25, "y":2}, {"label":"L", "x":9.25, "y":2}, {"label":":", "x":10.25, "y":2}, {"label":"\"", "x":11.25, "y":2}, {"label":"Enter", "x":12.25, "y":2, "w":1.75}, {"label":"Shift", "x":0, "y":3, "w":1.75}, {"label":"Z", "x":1.75, "y":3}, {"label":"X", "x":2.75, "y":3}, {"label":"C", "x":3.75, "y":3}, {"label":"V", "x":4.75, "y":3}, {"label":"B", "x":5.75, "y":3}, {"label":"N", "x":6.75, "y":3}, {"label":"M", "x":7.75, "y":3}, {"label":"<", "x":8.75, "y":3}, {"label":">", "x":9.75, "y":3}, {"label":"?", "x":10.75, "y":3}, {"x":11.75, "y":3}, {"label":"Shift", "x":12.75, "y":3, "w":1.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4}, {"x":4.75, "y":4, "w":2.25}, {"x":7, "y":4, "w":2}, {"x":9, "y":4}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}] } } } + diff --git a/qmk/keyboards/wsk/sl40/keymaps/default/keymap.c b/qmk/keyboards/wsk/sl40/keymaps/default/keymap.c index 97bf6276..8055d7fd 100644 --- a/qmk/keyboards/wsk/sl40/keymaps/default/keymap.c +++ b/qmk/keyboards/wsk/sl40/keymaps/default/keymap.c @@ -1,19 +1,42 @@ +/* Copyright 2020 Worldspawn + * + * 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 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, 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_BSPC, - KC_TAB, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [0] = LAYOUT_all( + KC_ESC, 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_BSPC, + KC_TAB, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), - [1] = LAYOUT( - 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_DEL, - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, - KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) + [1] = LAYOUT_all( + 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_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_all( + 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 + ) }; - diff --git a/qmk/keyboards/wsk/sl40/keymaps/prototype/keymap.c b/qmk/keyboards/wsk/sl40/keymaps/prototype/keymap.c new file mode 100644 index 00000000..cc5a2eb8 --- /dev/null +++ b/qmk/keyboards/wsk/sl40/keymaps/prototype/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Worldspawn + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_BSPC, + KC_TAB, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + 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_DEL, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + diff --git a/qmk/keyboards/wsk/sl40/readme.md b/qmk/keyboards/wsk/sl40/readme.md index 5c74b7c2..86fab353 100644 --- a/qmk/keyboards/wsk/sl40/readme.md +++ b/qmk/keyboards/wsk/sl40/readme.md @@ -1,6 +1,6 @@ # SL40 -![SL40](https://i.imgur.com/HeeUwVj.png) +![SL40](https://i.imgur.com/DX5Znfd.png) The SL40 is a 14 column staggered 40% keyboard. @@ -12,5 +12,9 @@ Make example for this keyboard (after setting up your build environment): make wsk/sl40:default +Flashing example for this keyboard (after setting up your build environment): + + make wsk/sl40: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). diff --git a/qmk/keyboards/wsk/sl40/sl40.c b/qmk/keyboards/wsk/sl40/sl40.c index 22b3bd41..6367367a 100644 --- a/qmk/keyboards/wsk/sl40/sl40.c +++ b/qmk/keyboards/wsk/sl40/sl40.c @@ -1 +1,17 @@ +/* Copyright 2020 Worldspawn + * + * 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 "sl40.h" diff --git a/qmk/keyboards/wsk/sl40/sl40.h b/qmk/keyboards/wsk/sl40/sl40.h index 94543c1f..e0c28629 100644 --- a/qmk/keyboards/wsk/sl40/sl40.h +++ b/qmk/keyboards/wsk/sl40/sl40.h @@ -1,16 +1,45 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + #pragma once #include "quantum.h" #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K306, K310, K311, K312, K313 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1d, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, \ + K30, K31, K32, K36, K3a, K3b, K3c, K3d \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, KC_NO, KC_NO, KC_NO, K306, KC_NO, KC_NO, KC_NO, K310, K311, K312, K313 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, KC_NO, K1d }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d }, \ + { K30, K31, K32, KC_NO, KC_NO, KC_NO, K36, KC_NO, KC_NO, KC_NO, K3a, K3b, K3c, K3d } \ +} + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1d, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, \ + K30, K31, K32, K34, K36, K38, K39, K3a, K3b, K3c, K3d \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, KC_NO, K1d }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d }, \ + { K30, K31, K32, KC_NO, K34, KC_NO, K36, KC_NO, K38, K39, K3a, K3b, K3c, K3d } \ } diff --git a/qmk/keyboards/wuque/ikki68/config.h b/qmk/keyboards/wuque/ikki68/config.h new file mode 100644 index 00000000..af66b21c --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2020 wuquestudio + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x696B +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wuque studio +#define PRODUCT ikki68 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D1, D0, D2, D3, D5, D4, D6, D7, B4, B5, F0, F1, B6, F4, F5, F6,F7 } + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*======= RGB function=======*/ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/qmk/keyboards/wuque/ikki68/ikki68.c b/qmk/keyboards/wuque/ikki68/ikki68.c new file mode 100644 index 00000000..57aa7bf5 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/ikki68.c @@ -0,0 +1,30 @@ +/* Copyright 2020 wuquestudio + * + * 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 "ikki68.h" + +void matrix_init_kb(void) { + setPinOutput(C6); + + matrix_init_user(); +} +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(C6, !led_state.caps_lock); + } + return res; +} diff --git a/qmk/keyboards/wuque/ikki68/ikki68.h b/qmk/keyboards/wuque/ikki68/ikki68.h new file mode 100644 index 00000000..32107489 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/ikki68.h @@ -0,0 +1,33 @@ +/* Copyright 2020 wuquestudio + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_68_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, K0G, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F, K4G \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F, K0G }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, K3F, KC_NO }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F, K4G }, \ +} diff --git a/qmk/keyboards/wuque/ikki68/info.json b/qmk/keyboards/wuque/ikki68/info.json new file mode 100644 index 00000000..914d26e8 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "ikki68", + "url": "https://ikki68.com/", + "maintainer": "qmk", + "width": 17.5, + "height": 5, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K01 (B0,D0)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,F0)", "x":10, "y":0}, + {"label":"K0B (B0,F1)", "x":11, "y":0}, + {"label":"K0C (B0,B6)", "x":12, "y":0}, + {"label":"K0E (B0,F5)", "x":13, "y":0, "w":2}, + {"label":"K0F (B0,F6)", "x":15.5, "y":0}, + {"label":"K0G (B0,F7)", "x":16.5, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1, "w":1.5}, + {"label":"K12 (B1,D2)", "x":1.5, "y":1}, + {"label":"K13 (B1,D3)", "x":2.5, "y":1}, + {"label":"K14 (B1,D5)", "x":3.5, "y":1}, + {"label":"K15 (B1,D4)", "x":4.5, "y":1}, + {"label":"K16 (B1,D6)", "x":5.5, "y":1}, + {"label":"K17 (B1,D7)", "x":6.5, "y":1}, + {"label":"K18 (B1,B4)", "x":7.5, "y":1}, + {"label":"K19 (B1,B5)", "x":8.5, "y":1}, + {"label":"K1A (B1,F0)", "x":9.5, "y":1}, + {"label":"K1B (B1,F1)", "x":10.5, "y":1}, + {"label":"K1C (B1,B6)", "x":11.5, "y":1}, + {"label":"K1D (B1,F4)", "x":12.5, "y":1}, + {"label":"K1E (B1,F5)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (B1,F6)", "x":15.5, "y":1}, + {"label":"K1G (B1,F7)", "x":16.5, "y":1}, + {"label":"K20 (B2,D1)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,F0)", "x":9.75, "y":2}, + {"label":"K2B (B2,F1)", "x":10.75, "y":2}, + {"label":"K2C (B2,B6)", "x":11.75, "y":2}, + {"label":"K2D (B2,F4)", "x":12.75, "y":2, "w":2.25}, + {"label":"K31 (B3,D0)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,F0)", "x":10.25, "y":3}, + {"label":"K3B (B3,F1)", "x":11.25, "y":3}, + {"label":"K3D (B3,F4)", "x":12.25, "y":3, "w":2.75}, + {"label":"K3F (B3,F6)", "x":15.5, "y":3}, + {"label":"K40 (E6,D1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K43 (E6,D3)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (E6,F0)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (E6,F1)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D (E6,F4)", "x":12.5, "y":4, "w":1.25}, + {"label":"K4E (E6,F5)", "x":14.5, "y":4}, + {"label":"K4F (E6,F6)", "x":15.5, "y":4}, + {"label":"K4G (E6,F7)", "x":16.5, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/wuque/ikki68/keymaps/default/keymap.c b/qmk/keyboards/wuque/ikki68/keymaps/default/keymap.c new file mode 100644 index 00000000..13f869e3 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 wuquestudio + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_68_ansi( + 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_BSPC, KC_HOME, 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_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_68_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/qmk/keyboards/wuque/ikki68/keymaps/default/readme.md b/qmk/keyboards/wuque/ikki68/keymaps/default/readme.md new file mode 100644 index 00000000..ede286cc --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for ikki68 diff --git a/qmk/keyboards/wuque/ikki68/keymaps/via/keymap.c b/qmk/keyboards/wuque/ikki68/keymaps/via/keymap.c new file mode 100644 index 00000000..7825082e --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 wuquestudio + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_68_ansi( + 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_BSPC, KC_HOME, 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_END, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_68_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RESET, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_68_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_68_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/qmk/keyboards/wuque/ikki68/keymaps/via/readme.md b/qmk/keyboards/wuque/ikki68/keymaps/via/readme.md new file mode 100644 index 00000000..163846fd --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for ikki68 diff --git a/qmk/keyboards/wuque/ikki68/keymaps/via/rules.mk b/qmk/keyboards/wuque/ikki68/keymaps/via/rules.mk new file mode 100644 index 00000000..43061db1 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/wuque/ikki68/readme.md b/qmk/keyboards/wuque/ikki68/readme.md new file mode 100644 index 00000000..70f777a6 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/readme.md @@ -0,0 +1,20 @@ +# ikki68 + +![ikki68](https://ikki68.com/wp-content/uploads/2020/06/cover-ikki68-coronation-2.jpg) +​ +Hope this kit is the same as ikki, every rebirth will be stronger +More Info at [wuquestudio](https://shop.wuquestudio.com/). +​ +* Keyboard Maintainer: [wuquestudio](https://shop.wuquestudio.com) +* Hardware Supported: ikki 68 Standard +* Hardware Availability: [wuquestudio](https://shop.wuquestudio.com/products/ikki68) +​ +Make example for this keyboard (after setting up your build environment): + + make wuque/ikki68:default + +Flashing example for this keyboard: + + make wuque/ikki68: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). diff --git a/qmk/keyboards/wuque/ikki68/rules.mk b/qmk/keyboards/wuque/ikki68/rules.mk new file mode 100644 index 00000000..bb9bbe20 --- /dev/null +++ b/qmk/keyboards/wuque/ikki68/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + + +# Bootloader selection +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 68_ansi diff --git a/qmk/keyboards/xd60/info.json b/qmk/keyboards/xd60/info.json index c69e8a78..dbe9a798 100644 --- a/qmk/keyboards/xd60/info.json +++ b/qmk/keyboards/xd60/info.json @@ -1,8 +1,8 @@ { - "keyboard_name": "XD60", - "maintainer": "qmk", - "width": 15, - "height": 5, + "keyboard_name": "XD60", + "maintainer": "qmk", + "width": 15, + "height": 5, "layouts": { "LAYOUT_all": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] @@ -12,8 +12,153 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"BS", "x":13, "y":0, "w":1}, + {"label":"BS", "x":14, "y":0, "w":1}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"FN", "x":14, "y":3, "w":1}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso": { "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"Space", "x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"GUI", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_iso_split_bs_rshift": { + "layout": [ + {"label":"\u00ac", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"BS", "x":13, "y":0, "w":1}, + {"label":"BS", "x":14, "y":0, "w":1}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"FN", "x":14, "y":3, "w":1}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] } } } diff --git a/qmk/keyboards/xd60/rev2/rules.mk b/qmk/keyboards/xd60/rev2/rules.mk index 1c96804e..56a01b3c 100644 --- a/qmk/keyboards/xd60/rev2/rules.mk +++ b/qmk/keyboards/xd60/rev2/rules.mk @@ -23,7 +23,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/qmk/keyboards/xd60/rev3/rules.mk b/qmk/keyboards/xd60/rev3/rules.mk index 3c7c9671..56a01b3c 100644 --- a/qmk/keyboards/xd60/rev3/rules.mk +++ b/qmk/keyboards/xd60/rev3/rules.mk @@ -26,4 +26,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/qmk/keyboards/xd60/xd60.h b/qmk/keyboards/xd60/xd60.h index 3946138c..dc6a1080 100644 --- a/qmk/keyboards/xd60/xd60.h +++ b/qmk/keyboards/xd60/xd60.h @@ -46,6 +46,20 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } +#define LAYOUT_60_ansi_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} + #define LAYOUT_60_iso( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ @@ -59,3 +73,17 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } + +#define LAYOUT_60_iso_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} diff --git a/qmk/keyboards/xd68/keymaps/via/keymap.c b/qmk/keyboards/xd68/keymaps/via/keymap.c index 6ffed775..64be6af3 100644 --- a/qmk/keyboards/xd68/keymaps/via/keymap.c +++ b/qmk/keyboards/xd68/keymaps/via/keymap.c @@ -1,5 +1,8 @@ #include QMK_KEYBOARD_H +#define _BL 0 +#define _FL 1 + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -7,19 +10,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |----------------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|#| Rtrn|PgDn| * |----------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |App|Ctrl|FN |Lef|Dow|Rig | + * |Ctrl|Win |Alt | Space |Alt|FN |Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' */ - [0] = LAYOUT_65_ansi( + [_BL] = 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_BSPC, KC_HOME, 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_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + 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_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), /* Keymap _FL: Function Layer @@ -35,27 +38,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |HUD |SAD |VAD | RGB_Tog | | | | | * `----------------------------------------------------------------' */ - [1] = LAYOUT_65_ansi( + [_FL] = LAYOUT_all( KC_GRV, 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_DEL, KC_INS, RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUI, _______, RGB_SAI, RGB_VAI, RGB_MOD, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, _______, _______, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT - ), - - [2] = LAYOUT_65_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT_65_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + ) }; diff --git a/qmk/keyboards/xd68/rules.mk b/qmk/keyboards/xd68/rules.mk index c8b7950c..8d52ba32 100644 --- a/qmk/keyboards/xd68/rules.mk +++ b/qmk/keyboards/xd68/rules.mk @@ -32,4 +32,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode -LAYOUTS = 65_ansi 65_iso \ No newline at end of file +LAYOUTS = 65_ansi 65_iso diff --git a/qmk/keyboards/xd68/xd68.h b/qmk/keyboards/xd68/xd68.h index 2916d72d..f4347928 100644 --- a/qmk/keyboards/xd68/xd68.h +++ b/qmk/keyboards/xd68/xd68.h @@ -6,6 +6,38 @@ // readability #define XXX KC_NO +/* XD68 ALL (VIA) layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e | + * |----------------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d| 2e | + * |----------------------------------------------------------------| + * | 30 |31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 48| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k45, k48, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, k4b, XXX, k48, k4a, k4c, k4d, k4e} \ +} + + /* XD68 ANSI layout * ,----------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | diff --git a/qmk/keyboards/xd75/info.json b/qmk/keyboards/xd75/info.json new file mode 100644 index 00000000..66b18c50 --- /dev/null +++ b/qmk/keyboards/xd75/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "XD75", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x15": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/xd75/keymaps/tomswartz07/keymap.c b/qmk/keyboards/xd75/keymaps/tomswartz07/keymap.c new file mode 100644 index 00000000..175ddb53 --- /dev/null +++ b/qmk/keyboards/xd75/keymaps/tomswartz07/keymap.c @@ -0,0 +1,125 @@ +/* Copyright 2017 Wunder + * + * 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 + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | - | = | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | Del | [ | ] | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ENTER | | | END | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | ' | | | PG UP | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | LOWER | BKSP | ENTER | SPACE | RAISE | LEFT | DOWN | UP | RIGHT | | | PG DN | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_MINS, KC_EQL, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_LBRC, KC_RBRC, KC_HOME, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_NO, KC_NO, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, KC_NO, KC_NO, KC_PGUP, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RALT, KC_NO, KC_PGDN + ), + +/* LOWER + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | ~ | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | DEL | | | | | | | _ | + | { | } | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | Home | End | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | Vol - | VOL + | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_ortho_5x15( /* LOWER */ + KC_TILD, 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_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______ + ), + +/* RAISE + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | `~ | | | | | | | | | | | Del | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | DEL | | | | | | | - | = | [ | ] | \ | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_ortho_5x15( /* RAISE */ + 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_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* ADJUST + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | RGB HD | RGB HI | | | | | | | PR SCR | SCR LK | INSERT | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | | RGB SD | RGB SI | LEFT | DOWN | UP | RIGHT | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ |RGB RMD | RGB VD | RGB VI | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RGB TG | RGB MD | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_ADJUST] = LAYOUT_ortho_5x15( /* ADJUST */ + _______, 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_NLCK, KC_SLSH, + _______, RESET, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_INS, + KC_MPRV, KC_MPLY, KC_MNXT, _______, RGB_SAD, RGB_SAI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, RGB_RMOD,RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/qmk/keyboards/xelus/kangaroo/chconf.h b/qmk/keyboards/xelus/kangaroo/chconf.h new file mode 100644 index 00000000..03f63da3 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/xelus/kangaroo/config.h b/qmk/keyboards/xelus/kangaroo/config.h new file mode 100644 index 00000000..0c3e6e29 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/config.h @@ -0,0 +1,62 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5845 // XE +#define PRODUCT_ID 0x524F // RO +#define DEVICE_VER 0x0001 +#define MANUFACTURER Xelus +#define PRODUCT Kangaroo + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 11 + +#define MATRIX_COL_PINS { B10, B2, B11, A10, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_ROW_PINS { A9, A8, B15, B14, B13, B12, A4, A5, A6, A7, B0, B1 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* 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 + +// I2C OLED defines +#define I2C1_SCL 8 +#define I2C1_SDA 9 + +#define I2C1_SCL_PAL_MODE 1 +#define I2C1_SDA_PAL_MODE 1 + +#define I2C1_TIMINGR_PRESC 0U +#define I2C1_TIMINGR_SCLDEL 3U +#define I2C1_TIMINGR_SDADEL 1U +#define I2C1_TIMINGR_SCLH 3U +#define I2C1_TIMINGR_SCLL 9U + +// I2C EEPROM +#define EEPROM_I2C_CAT24C512 + +// Dynamic EEPROM +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 65535 diff --git a/qmk/keyboards/xelus/kangaroo/halconf.h b/qmk/keyboards/xelus/kangaroo/halconf.h new file mode 100644 index 00000000..de0f29ce --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/xelus/kangaroo/info.json b/qmk/keyboards/xelus/kangaroo/info.json new file mode 100644 index 00000000..63fd452f --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Kangaroo", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/xelus/kangaroo", + "maintainer": "qmk", + "width": 22.5, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"label":"PrtSc", "x":4.25, "y":0}, {"label":"Scroll Lock", "x":5.25, "y":0}, {"label":"Pause", "x":6.25, "y":0}, {"label":"Esc", "x":7.5, "y":0}, {"label":"F1", "x":9.5, "y":0}, {"label":"F2", "x":10.5, "y":0}, {"label":"F3", "x":11.5, "y":0}, {"label":"F4", "x":12.5, "y":0}, {"label":"F5", "x":14, "y":0}, {"label":"F6", "x":15, "y":0}, {"label":"F7", "x":16, "y":0}, {"label":"F8", "x":17, "y":0}, {"label":"F9", "x":18.5, "y":0}, {"label":"F10", "x":19.5, "y":0}, {"label":"F11", "x":20.5, "y":0}, {"label":"F12", "x":21.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"label":"Insert", "x":4.25, "y":1.25}, {"label":"Home", "x":5.25, "y":1.25}, {"label":"PgUp", "x":6.25, "y":1.25}, {"label":"~", "x":7.5, "y":1.25}, {"label":"!", "x":8.5, "y":1.25}, {"label":"@", "x":9.5, "y":1.25}, {"label":"#", "x":10.5, "y":1.25}, {"label":"$", "x":11.5, "y":1.25}, {"label":"%", "x":12.5, "y":1.25}, {"label":"^", "x":13.5, "y":1.25}, {"label":"&", "x":14.5, "y":1.25}, {"label":"*", "x":15.5, "y":1.25}, {"label":"(", "x":16.5, "y":1.25}, {"label":")", "x":17.5, "y":1.25}, {"label":"_", "x":18.5, "y":1.25}, {"label":"+", "x":19.5, "y":1.25}, {"x":20.5, "y":1.25}, {"x":21.5, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":3, "y":2.25}, {"label":"Delete", "x":4.25, "y":2.25}, {"label":"End", "x":5.25, "y":2.25}, {"label":"PgDn", "x":6.25, "y":2.25}, {"label":"Tab", "x":7.5, "y":2.25, "w":1.5}, {"label":"Q", "x":9, "y":2.25}, {"label":"W", "x":10, "y":2.25}, {"label":"E", "x":11, "y":2.25}, {"label":"R", "x":12, "y":2.25}, {"label":"T", "x":13, "y":2.25}, {"label":"Y", "x":14, "y":2.25}, {"label":"U", "x":15, "y":2.25}, {"label":"I", "x":16, "y":2.25}, {"label":"O", "x":17, "y":2.25}, {"label":"P", "x":18, "y":2.25}, {"label":"{", "x":19, "y":2.25}, {"label":"}", "x":20, "y":2.25}, {"label":"|", "x":21, "y":2.25, "w":1.5}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":3.25}, {"label":"Caps Lock", "x":7.5, "y":3.25, "w":1.75}, {"label":"A", "x":9.25, "y":3.25}, {"label":"S", "x":10.25, "y":3.25}, {"label":"D", "x":11.25, "y":3.25}, {"label":"F", "x":12.25, "y":3.25}, {"label":"G", "x":13.25, "y":3.25}, {"label":"H", "x":14.25, "y":3.25}, {"label":"J", "x":15.25, "y":3.25}, {"label":"K", "x":16.25, "y":3.25}, {"label":"L", "x":17.25, "y":3.25}, {"label":":", "x":18.25, "y":3.25}, {"label":"\"", "x":19.25, "y":3.25}, {"label":"Enter", "x":20.25, "y":3.25, "w":2.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":3, "y":4.25}, {"label":"\u2191", "x":5.25, "y":4.25}, {"label":"Shift", "x":7.5, "y":4.25, "w":2.25}, {"label":"Z", "x":9.75, "y":4.25}, {"label":"X", "x":10.75, "y":4.25}, {"label":"C", "x":11.75, "y":4.25}, {"label":"V", "x":12.75, "y":4.25}, {"label":"B", "x":13.75, "y":4.25}, {"label":"N", "x":14.75, "y":4.25}, {"label":"M", "x":15.75, "y":4.25}, {"label":"<", "x":16.75, "y":4.25}, {"label":">", "x":17.75, "y":4.25}, {"label":"?", "x":18.75, "y":4.25}, {"x":19.75, "y":4.25, "w":1.75}, {"x":21.5, "y":4.25}, {"x":0, "y":5.25}, {"x":1, "y":5.25}, {"x":2, "y":5.25}, {"x":3, "y":5.25}, {"label":"\u2190", "x":4.25, "y":5.25}, {"label":"\u2193", "x":5.25, "y":5.25}, {"label":"\u2192", "x":6.25, "y":5.25}, {"label":"Ctrl", "x":7.5, "y":5.25, "w":1.25}, {"label":"Win", "x":8.75, "y":5.25, "w":1.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"x":11.25, "y":5.25, "w":6.25}, {"label":"Alt", "x":17.5, "y":5.25, "w":1.25}, {"label":"Win", "x":18.75, "y":5.25, "w":1.25}, {"label":"Menu", "x":20, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":21.25, "y":5.25, "w":1.25}] + } + } +} diff --git a/qmk/keyboards/xelus/kangaroo/kangaroo.c b/qmk/keyboards/xelus/kangaroo/kangaroo.c new file mode 100644 index 00000000..a7a3d248 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/kangaroo.c @@ -0,0 +1,24 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * 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 "kangaroo.h" + +void board_init(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} + +void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } diff --git a/qmk/keyboards/xelus/kangaroo/kangaroo.h b/qmk/keyboards/xelus/kangaroo/kangaroo.h new file mode 100644 index 00000000..f8aebc4f --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/kangaroo.h @@ -0,0 +1,43 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define _____ KC_NO + +#define LAYOUT_all( \ + K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, K0108, K0009, K0109, \ + K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0209, K0309, K0210, K0010, \ + K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, K0409, K0509, K0410, \ + K0600, K0700, K0601, K0701, K0703, K0604, K0704, K0605, K0705, K0606, K0706, K0607, K0707, K0608, K0708, K0609, K0709, \ + K0800, K0900, K0801, K0901, K0902, K0903, K0804, K0904, K0805, K0905, K0806, K0906, K0807, K0907, K0808, K0908, K0809, K0909, \ + K1000, K1100, K1001, K1101, K1002, K1102, K1003, K1103, K1004, K1104, K1106, K1008, K1108, K1009, K1109 \ +) { \ + { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008, K0009, K0010 }, \ + { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108, K0109, _____ }, \ + { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208, K0209, K0210 }, \ + { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308, K0309, _____ }, \ + { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408, K0409, K0410 }, \ + { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508, K0509, _____ }, \ + { K0600, K0601, _____, _____, K0604, K0605, K0606, K0607, K0608, K0609, _____ }, \ + { K0700, K0701, _____, K0703, K0704, K0705, K0706, K0707, K0708, K0709, _____ }, \ + { K0800, K0801, _____, _____, K0804, K0805, K0806, K0807, K0808, K0809, _____ }, \ + { K0900, K0901, K0902, K0903, K0904, K0905, K0906, K0907, K0908, K0909, _____ }, \ + { K1000, K1001, K1002, K1003, K1004, _____, _____, _____, K1008, K1009, _____ }, \ + { K1100, K1101, K1102, K1103, K1104, _____, K1106, _____, K1108, K1109, _____ } \ +} diff --git a/qmk/keyboards/xelus/kangaroo/keymaps/default/keymap.c b/qmk/keyboards/xelus/kangaroo/keymaps/default/keymap.c new file mode 100644 index 00000000..2e877c4f --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_INS, KC_HOME, KC_PGUP, 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_BSPC, + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_DEL, KC_END, KC_PGDN, 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_PPLS, KC_P4, KC_P5, KC_P6, 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_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_PENT, KC_PDOT, KC_P0, KC_P0, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + + [1] = LAYOUT_all( + RESET , 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, 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) +}; diff --git a/qmk/keyboards/xelus/kangaroo/keymaps/via/keymap.c b/qmk/keyboards/xelus/kangaroo/keymaps/via/keymap.c new file mode 100644 index 00000000..ca29e199 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_INS, KC_HOME, KC_PGUP, 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_BSPC, + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_DEL, KC_END, KC_PGDN, 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_PPLS, KC_P4, KC_P5, KC_P6, 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_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_PENT, KC_PDOT, KC_P0, KC_P0, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + + [1] = LAYOUT_all( + 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, 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), + + [2] = LAYOUT_all( + 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, 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), + + [3] = LAYOUT_all( + 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, 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) +}; diff --git a/qmk/keyboards/xelus/kangaroo/keymaps/via/rules.mk b/qmk/keyboards/xelus/kangaroo/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/xelus/kangaroo/mcuconf.h b/qmk/keyboards/xelus/kangaroo/mcuconf.h new file mode 100644 index 00000000..8d706de2 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/qmk/keyboards/xelus/kangaroo/readme.md b/qmk/keyboards/xelus/kangaroo/readme.md new file mode 100644 index 00000000..e91f32f9 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/readme.md @@ -0,0 +1,13 @@ +# Kangaroo + +Left Hand Fullsized Keyboard designed by Jono. + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: Kangaroo +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make xelus/kangaroo:default + +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). diff --git a/qmk/keyboards/xelus/kangaroo/rules.mk b/qmk/keyboards/xelus/kangaroo/rules.mk new file mode 100644 index 00000000..2a0281f9 --- /dev/null +++ b/qmk/keyboards/xelus/kangaroo/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# comment out to disable the options. +# + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/yd60mq/config.h b/qmk/keyboards/yd60mq/config.h index 26c39a5b..54aed0c9 100644 --- a/qmk/keyboards/yd60mq/config.h +++ b/qmk/keyboards/yd60mq/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x594D // "YM" +#define PRODUCT_ID 0x604D // 60 "M" #define MANUFACTURER YMDK #define PRODUCT YD60MQ #define DESCRIPTION Keyboard diff --git a/qmk/keyboards/yd60mq/keymaps/via/keymap.c b/qmk/keyboards/yd60mq/keymaps/via/keymap.c new file mode 100644 index 00000000..ab503ee2 --- /dev/null +++ b/qmk/keyboards/yd60mq/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2020 rbange https://github.com/rbange + * + * 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 + +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_GRV, + 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_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_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, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + RESET, 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, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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, BL_DEC, BL_TOGG, BL_INC, 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 + ), + + [2] = LAYOUT_all( + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_all( + 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/qmk/keyboards/yd60mq/keymaps/via/rules.mk b/qmk/keyboards/yd60mq/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/yd60mq/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/yd60mq/rules.mk b/qmk/keyboards/yd60mq/rules.mk index 3e4d8eaa..615e4865 100644 --- a/qmk/keyboards/yd60mq/rules.mk +++ b/qmk/keyboards/yd60mq/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/qmk/keyboards/ymd75/README.md b/qmk/keyboards/ymd75/README.md index 7c4779c9..cb2bcbdd 100644 --- a/qmk/keyboards/ymd75/README.md +++ b/qmk/keyboards/ymd75/README.md @@ -3,7 +3,10 @@ 75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides. * Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK) -* Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip. +* Hardware Supported: + - rev1 (ATmega32a) + - rev2 (ATmega32a) + - rev3 (ATmega32u4) * Hardware Availability: Make example for this keyboard (after setting up your build environment): diff --git a/qmk/keyboards/ymd75/config.h b/qmk/keyboards/ymd75/config.h index 0ea23bc4..69102014 100644 --- a/qmk/keyboards/ymd75/config.h +++ b/qmk/keyboards/ymd75/config.h @@ -23,12 +23,9 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 #define MANUFACTURER YMDK #define PRODUCT YMD75 / MT84 -#define DESCRIPTION 75% Keyboard - #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 diff --git a/qmk/keyboards/ymd75/info.json b/qmk/keyboards/ymd75/info.json index 64412dd2..fe27c0c5 100644 --- a/qmk/keyboards/ymd75/info.json +++ b/qmk/keyboards/ymd75/info.json @@ -6,7 +6,92 @@ "height": 6, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"End", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Fn", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"#", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"End", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + {"label":"Page Up", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"Page Down", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] }, "LAYOUT_75_iso": { "layout": [ diff --git a/qmk/keyboards/ymd75/keymaps/default_iso/keymap.c b/qmk/keyboards/ymd75/keymaps/default_iso/keymap.c index 86af81e2..2008dddf 100644 --- a/qmk/keyboards/ymd75/keymaps/default_iso/keymap.c +++ b/qmk/keyboards/ymd75/keymaps/default_iso/keymap.c @@ -20,15 +20,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_75_iso( /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + RGB_MOD, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_VOLD, /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ diff --git a/qmk/keyboards/ymd75/rev1/config.h b/qmk/keyboards/ymd75/rev1/config.h index e9009ee0..d9796d9d 100644 --- a/qmk/keyboards/ymd75/rev1/config.h +++ b/qmk/keyboards/ymd75/rev1/config.h @@ -25,3 +25,4 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define DEVICE_VER 0x0100 diff --git a/qmk/keyboards/ymd75/rev2/config.h b/qmk/keyboards/ymd75/rev2/config.h index 9718b19d..a9578d72 100644 --- a/qmk/keyboards/ymd75/rev2/config.h +++ b/qmk/keyboards/ymd75/rev2/config.h @@ -6,3 +6,4 @@ #define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define DEVICE_VER 0x0200 diff --git a/qmk/keyboards/ymd75/rev2/rev2.h b/qmk/keyboards/ymd75/rev2/rev2.h index 85e07c57..95285838 100644 --- a/qmk/keyboards/ymd75/rev2/rev2.h +++ b/qmk/keyboards/ymd75/rev2/rev2.h @@ -30,7 +30,7 @@ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ - { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ + { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ } #define LAYOUT_75_iso_rwkl( \ diff --git a/qmk/keyboards/ymd75/rev3/config.h b/qmk/keyboards/ymd75/rev3/config.h new file mode 100644 index 00000000..6118b96b --- /dev/null +++ b/qmk/keyboards/ymd75/rev3/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define DIODE_DIRECTION ROW2COL +#define DEVICE_VER 0x0300 +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 4 diff --git a/qmk/keyboards/ymd75/rev3/rev3.c b/qmk/keyboards/ymd75/rev3/rev3.c new file mode 100644 index 00000000..96e1a475 --- /dev/null +++ b/qmk/keyboards/ymd75/rev3/rev3.c @@ -0,0 +1,32 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 "ymd75.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D1); } + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, led_state.caps_lock); + } + return true; +} diff --git a/qmk/keyboards/ymd75/rev3/rev3.h b/qmk/keyboards/ymd75/rev3/rev3.h new file mode 100644 index 00000000..d25579ea --- /dev/null +++ b/qmk/keyboards/ymd75/rev3/rev3.h @@ -0,0 +1,117 @@ +#pragma once +#include "quantum.h" + + +/* LAYOUT + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Sup │Alt │ Space │Alt│Sup│Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + +#define LAYOUT( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K84, K96, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K86, \ + K10, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \ + K00, K01, K02, K06, K08, K07, K05, K04, K03, K66 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, KC_NO, K93, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \ +} + +/* LAYOUT_75_iso + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Sup │Alt │ Space │Alt│Mo │Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + +#define LAYOUT_75_iso( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K96, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K84, K86, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \ + K00, K01, K02, K06, K08, K07, K05, K04, K03, K66 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K93, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, KC_NO, K84, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \ +} + +/* LAYOUT_75_iso_rwkl + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │Ctrl│Sup │Alt │ Space │ Alt │ Ctl │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ + +#define LAYOUT_75_iso_rwkl( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K96, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K84, K86, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \ + K00, K01, K02, K06, K08, K05, K04, K03, K66 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K93, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, KC_NO, K84, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \ +} diff --git a/qmk/keyboards/ymd75/rev3/rules.mk b/qmk/keyboards/ymd75/rev3/rules.mk new file mode 100644 index 00000000..9506e636 --- /dev/null +++ b/qmk/keyboards/ymd75/rev3/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +KEY_LOCK_ENABLE = yes # Enable KC_LOCK support diff --git a/qmk/keyboards/ymd75/ymd75.h b/qmk/keyboards/ymd75/ymd75.h index afeb0956..134f0806 100644 --- a/qmk/keyboards/ymd75/ymd75.h +++ b/qmk/keyboards/ymd75/ymd75.h @@ -6,4 +6,6 @@ #include "rev1.h" #elif defined(KEYBOARD_ymd75_rev2) #include "rev2.h" +#elif defined(KEYBOARD_ymd75_rev3) + #include "rev3.h" #endif diff --git a/qmk/keyboards/yugo_m/model_m_101/config.h b/qmk/keyboards/yugo_m/model_m_101/config.h new file mode 100644 index 00000000..76580a60 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/config.h @@ -0,0 +1,100 @@ +/* +Copyright 2020 Nidzo Tomic + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x8E81 // Yugo-M +#define DEVICE_VER 0x0001 +#define MANUFACTURER IBM +#define PRODUCT Yugo-M (Model M replacement controller) +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * 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) + * +*/ +#define MATRIX_ROW_PINS { B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_COL_PINS { A9, A8, B15, B14, B13, B12, B11, B10, B2, B1, B0, A7, A6, A5, A4, A3 } +#define UNUSED_PINS { A0, A1, A2, A10, A13, B9, C13, C14, C15 } + + + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#define DEBOUNCE 5 + +/* 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 + + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/yugo_m/model_m_101/info.json b/qmk/keyboards/yugo_m/model_m_101/info.json new file mode 100644 index 00000000..ec0c0f28 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "IBM Model M 101/102", + "url": "https://github.com/tomic1785/qmk_firmware/tree/stm32_model_m/keyboards/yugo_m/model_m_101", + "maintainer": "Nidzo Tomic", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/qmk/keyboards/yugo_m/model_m_101/keymaps/default/keymap.c b/qmk/keyboards/yugo_m/model_m_101/keymaps/default/keymap.c new file mode 100644 index 00000000..52f79457 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 Nidzo Tomic + * + * 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 + +enum keyboard_layers { + _BL, // Base Layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-------------------------------------------------------------------------------------------------. + * |Esc| | F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |PSc|ScL| Ps| | + * | | + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp| |Ins|Hom|PgU| |Num| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | + * |-----------------------------------------------------------| |-----------| | + * |CapsLk| A| S| D| F| G| H| J| K| L| ;| '| #|Ent | | 4| 5| 6| +| + * |-----------------------------------------------------------| |---------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up| | 1| 2| 3| | + * |-----------------------------------------------------------| |---| |-----------| | + * |Ctrl | |Alt | Space |Alt Gr| |Ctrl | | Lt| Dn| Rt| | 0| ,|Ent| + * `-------------------------------------------------------------------------------------------------' + */ + [_BL] = LAYOUT_all( + 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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), +}; diff --git a/qmk/keyboards/yugo_m/model_m_101/keymaps/default/readme.md b/qmk/keyboards/yugo_m/model_m_101/keymaps/default/readme.md new file mode 100644 index 00000000..ba8b9123 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for 101/102 key keyboards. diff --git a/qmk/keyboards/yugo_m/model_m_101/model_m_101.c b/qmk/keyboards/yugo_m/model_m_101/model_m_101.c new file mode 100644 index 00000000..34755cf4 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/model_m_101.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Nidzo Tomic + * + * 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 "model_m_101.h" + +void keyboard_pre_init_kb(void) { + // Set our LED pins as output + setPinOutput(A2); + setPinOutput(A1); + setPinOutput(A0); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(A2, !led_state.num_lock); + writePin(A1, !led_state.caps_lock); + writePin(A0, !led_state.scroll_lock); + } + return res; +} diff --git a/qmk/keyboards/yugo_m/model_m_101/model_m_101.h b/qmk/keyboards/yugo_m/model_m_101/model_m_101.h new file mode 100644 index 00000000..7ee44f36 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/model_m_101.h @@ -0,0 +1,45 @@ +/* Copyright 2020 Nidzo Tomic + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +#define LAYOUT_all( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ +/* 00 */ { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ +/* 01 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ +/* 02 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ +/* 03 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ +/* 04 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ +/* 05 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ +/* 06 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \ +/* 07 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D }, \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ diff --git a/qmk/keyboards/yugo_m/model_m_101/readme.md b/qmk/keyboards/yugo_m/model_m_101/readme.md new file mode 100644 index 00000000..598f0fa7 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/readme.md @@ -0,0 +1,17 @@ +# Yugo-M + +![Yugo-M](https://raw.githubusercontent.com/tomic1785/Yugo-M-controller-project/master/Pictures/rev_09b.jpg) + +A drop-in replacement controller PCB for IBM Model M keyboards, based on the STM32 MCU. [More info on the Yugo-M project repository](https://github.com/tomic1785/Yugo-M-controller-project) + +* Keyboard Maintainer: [Nidzo Tomic](https://github.com/tomic1785) +* Hardware Supported: Yugo-M PCB + * Rev 0.9b + * Rev 1.1b +* Hardware Availability: [Check out the project repository](https://github.com/tomic1785/Yugo-M-controller-project) + +Make example for this keyboard (after setting up your build environment): + + make yugo_m/model_m_101:default + +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). diff --git a/qmk/keyboards/yugo_m/model_m_101/rules.mk b/qmk/keyboards/yugo_m/model_m_101/rules.mk new file mode 100644 index 00000000..6d1c5312 --- /dev/null +++ b/qmk/keyboards/yugo_m/model_m_101/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/yugo_m/readme.md b/qmk/keyboards/yugo_m/readme.md new file mode 100644 index 00000000..557c4262 --- /dev/null +++ b/qmk/keyboards/yugo_m/readme.md @@ -0,0 +1,11 @@ +# Yugo-M - An STM32-based IBM Model M controller + +A drop-in replacement controller PCB for IBM Model M keyboards. +Currently available only for 101/102 key keyboards. + +* Keyboard Maintainer: [Nidzo Tomic](https://github.com/tomic1785) +* Hardware Supported: Yugo-M PCB + * Rev 0.9b + * Rev 1.1b + +For more info visit the project repository: [Yugo-M-controller-project](https://github.com/tomic1785/Yugo-M-controller-project) diff --git a/qmk/keyboards/yushakobo/quick7/keymaps/tester/config.h b/qmk/keyboards/yushakobo/quick7/keymaps/tester/config.h new file mode 100644 index 00000000..b9a075bf --- /dev/null +++ b/qmk/keyboards/yushakobo/quick7/keymaps/tester/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2020 yushakobo + +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 . +*/ + +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ +#define RGBLIGHT_LAYERS +#define RGBLIGHT_MAX_LAYERS 4 +#define RGBLIGHT_LED_MAP {\ + 0, 1, 2,\ + 5, 4, 3,\ + 6, 7, 8,\ + 9, 10, 11, 12\ +} diff --git a/qmk/keyboards/yushakobo/quick7/keymaps/tester/keymap.c b/qmk/keyboards/yushakobo/quick7/keymaps/tester/keymap.c new file mode 100644 index 00000000..57e4a28f --- /dev/null +++ b/qmk/keyboards/yushakobo/quick7/keymaps/tester/keymap.c @@ -0,0 +1,157 @@ +/* Copyright 2020 yushakobo + * + * 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 FAVORITE_COLOR HSV_CYAN + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE, + KEY_00, + KEY_01, + KEY_02, + KEY_10, + KEY_11, + KEY_12, + KEY_20, + KEY_21, + KEY_22 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KEY_00, KEY_01, KEY_02, + KEY_10, KEY_11, KEY_12, + KEY_20, KEY_21, KEY_22 + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KEY_00: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 0); + } else { + rgblight_sethsv_at(HSV_WHITE, 0); + } + break; + case KEY_01: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 1); + } else { + rgblight_sethsv_at(HSV_WHITE, 1); + } + break; + case KEY_02: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 2); + } else { + rgblight_sethsv_at(HSV_WHITE, 2); + } + break; + case KEY_10: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 3); + } else { + rgblight_sethsv_at(HSV_WHITE, 3); + } + break; + case KEY_11: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 4); + } else { + rgblight_sethsv_at(HSV_WHITE, 4); + } + break; + case KEY_12: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 5); + } else { + rgblight_sethsv_at(HSV_WHITE, 5); + } + break; + case KEY_20: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 6); + } else { + rgblight_sethsv_at(HSV_WHITE, 6); + } + break; + case KEY_21: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 7); + } else { + rgblight_sethsv_at(HSV_WHITE, 7); + } + break; + case KEY_22: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 8); + } else { + rgblight_sethsv_at(HSV_WHITE, 8); + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} + +const rgblight_segment_t PROGMEM quick7_capslock[] = RGBLIGHT_LAYER_SEGMENTS( + {9,1,FAVORITE_COLOR}, + {12,1,FAVORITE_COLOR} +); +const rgblight_segment_t PROGMEM quick7_numlock[] = RGBLIGHT_LAYER_SEGMENTS( + {10,1,FAVORITE_COLOR}, + {11,1,FAVORITE_COLOR} +); + +const rgblight_segment_t* const PROGMEM quick7_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + quick7_capslock, + quick7_numlock +); + +void keyboard_post_init_user(void){ + rgblight_layers = quick7_rgb_layers; + rgblight_sethsv(HSV_WHITE); +} + +bool led_update_user(led_t led_state){ + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_set_layer_state(1, led_state.num_lock); + return true; +} \ No newline at end of file diff --git a/qmk/keyboards/yushakobo/quick7/keymaps/tester/readme.md b/qmk/keyboards/yushakobo/quick7/keymaps/tester/readme.md new file mode 100644 index 00000000..41ba72ff --- /dev/null +++ b/qmk/keyboards/yushakobo/quick7/keymaps/tester/readme.md @@ -0,0 +1,12 @@ +# The default keymap for quick7 + +### Base Layer + +|Left/Right|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Vol+|Vol-| +|Right|RGB HUE-|RGB HUE+| + +No input at all. You can just test how deep the key's actuation point is, and when does the key releases. + +4 underglow LEDs indicates the status of CapsLock and NumLock. diff --git a/qmk/keyboards/yushakobo/quick7/keymaps/via/keymap.c b/qmk/keyboards/yushakobo/quick7/keymaps/via/keymap.c new file mode 100644 index 00000000..9c64042b --- /dev/null +++ b/qmk/keyboards/yushakobo/quick7/keymaps/via/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 yushakobo + * + * 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FUNC1, + _VIA1, + _VIA2 +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_MUTE, MO(_FUNC1), RGB_MOD, + S(KC_TAB), KC_UP, KC_TAB, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC1] = LAYOUT( + RESET, KC_TRNS, RGB_TOG, + KC_HOME, KC_VOLU, KC_END, + KC_MPRV, KC_VOLD, KC_MNXT + ), + [_VIA1] = LAYOUT( + YUSHAURL,XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + [_VIA2] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case YUSHAURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://yushakobo.jp/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} diff --git a/qmk/keyboards/yushakobo/quick7/keymaps/via/readme.md b/qmk/keyboards/yushakobo/quick7/keymaps/via/readme.md new file mode 100644 index 00000000..ff097878 --- /dev/null +++ b/qmk/keyboards/yushakobo/quick7/keymaps/via/readme.md @@ -0,0 +1,27 @@ +# The default VIA keymap for quick7 + +#### Rotary Encoder is not configurable through VIA + +### Base Layer +``` +Left Encoder(CW: Vol+, CCW: Vol-) +Right Encoder(CW: RGB HUE-, CCW: RGB HUE+) +,----------- --------- ------------, +| MUTE | Func1 | RGB MODE | + ----------- --------- ------------ +| Shift+Tab | UP | TAB | + ----------- --------- ------------ +| LEFT | DOWN | RIGHT | +`----------- --------- ------------' +``` + +### Func1 Layer +``` +,----------- --------- ------------, +| RESET | Func1 | RGB TOGGLE | + ----------- --------- ------------ +| HOME | VOL+ | END | + ----------- --------- ------------ +| MEDIA << | VOL- | MEDIA >> | +`----------- --------- ------------' +``` \ No newline at end of file diff --git a/qmk/keyboards/yushakobo/quick7/keymaps/via/rules.mk b/qmk/keyboards/yushakobo/quick7/keymaps/via/rules.mk new file mode 100644 index 00000000..036bd6d1 --- /dev/null +++ b/qmk/keyboards/yushakobo/quick7/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/zvecr/split_blackpill/rules.mk b/qmk/keyboards/zvecr/split_blackpill/rules.mk index 6feec7dd..55bca894 100644 --- a/qmk/keyboards/zvecr/split_blackpill/rules.mk +++ b/qmk/keyboards/zvecr/split_blackpill/rules.mk @@ -1,13 +1,8 @@ # MCU name MCU = STM32F103 -# GENERIC STM32F103C8T6 board - stm32duino bootloader -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = STM32_F103_STM32DUINO -STM32_BOOTLOADER_ADDRESS = 0x80000000 - -DFU_ARGS = -d 1eaf:0003 -a2 -R -DFU_SUFFIX_ARGS = -v 1eaf -p 0003 +# Bootloader selection +BOOTLOADER = stm32duino # Build Options # change yes to no to disable diff --git a/qmk/keyboards/zvecr/zv48/f401/rules.mk b/qmk/keyboards/zvecr/zv48/f401/rules.mk index e41d5ef7..950442af 100644 --- a/qmk/keyboards/zvecr/zv48/f401/rules.mk +++ b/qmk/keyboards/zvecr/zv48/f401/rules.mk @@ -1,27 +1,5 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/qmk/keyboards/zvecr/zv48/f411/rules.mk b/qmk/keyboards/zvecr/zv48/f411/rules.mk index 61add3ae..4f7f52e6 100644 --- a/qmk/keyboards/zvecr/zv48/f411/rules.mk +++ b/qmk/keyboards/zvecr/zv48/f411/rules.mk @@ -1,27 +1,5 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/qmk/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c b/qmk/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c index 4b0b33e2..09b3c285 100644 --- a/qmk/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c +++ b/qmk/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c @@ -1,115 +1,88 @@ +/* + * 60 ANSI Arrow Keymap with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + * + * Copyright (C) 2020 Sendy YK + * + * 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 3 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 +enum layer_names { + _BASE, // Default Layer + _FN // Fn Layer +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_arrow(KC_GRV, 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_DEL, - KC_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, BL_DEC, BL_TOGG, BL_INC, BL_STEP, 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 - ) + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer + [_FN] = LAYOUT_60_ansi_arrow( + KC_GRV, 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_DEL, + KC_BRIU, _______, _______, KC_END, RESET, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, _______, KC_EJCT, + KC_BRID, _______, KC_SLCK, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, KC_MUTE, + KC_VOLU, _______, _______, KC_CALC, _______, _______, KC_NLCK, KC_MAIL, _______, _______, KC_PAUS, KC_PGUP, _______, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, _______, KC_MPRV, KC_PGDN, KC_MNXT + ) }; void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(0, 0, 0); + rgblight_enable_noeeprom(); + rgblight_setrgb(100, 255, 100); } -/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ - void update_led(void) { - /* Num Lock Indicator */ - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } - /* Scroll Lock Indicator */ - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(0, 100, 255); - } - } +// RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator +void update_led(void) { + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 2); + } +} - void led_set_user(uint8_t usb_led) { - /* Caps Lock Indicator */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); +void led_set_user(uint8_t usb_led) { + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(255, 110, 0); + } + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer Indicator + case _FN: + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 1); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(100, 255, 100); + break; } - /* Layer Indicator */ - else { - switch (get_highest_layer(layer_state)) { - /* Fn Layer [1] Indicator */ - case 1: - rgblight_setrgb(255, 110, 0); - break; - /* Fn Layer [2] Indicator */ - case 2: - rgblight_setrgb(255, 110, 0); - break; - /* Default Layer [0] Indicator */ - default: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } - } + update_led(); + } +} layer_state_t layer_state_set_user(layer_state_t state) { - update_led(); - return state; + update_led(); + return state; } diff --git a/qmk/layouts/community/60_ansi_arrow/mrsendyyk/readme.md b/qmk/layouts/community/60_ansi_arrow/mrsendyyk/readme.md index 4ddd6703..a2dedd4c 100644 --- a/qmk/layouts/community/60_ansi_arrow/mrsendyyk/readme.md +++ b/qmk/layouts/community/60_ansi_arrow/mrsendyyk/readme.md @@ -1,50 +1,70 @@ -# [Sendy YK](https://mr.sendyyk.com)'s 60_ansi_arrow Keymap -`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. +# 60 ANSI Arrow Keymap by [Sendy YK](https://mr.sendyyk.com) -### Default Layer [0] +With RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +## Default Layer + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/qmk_firmware/development/images/60_ansi_arrow_keymap_base.png) + +## Fn Layer + +![_FN](https://raw.githubusercontent.com/mrsendyyk/qmk_firmware/development/images/60_ansi_arrow_keymap_fn.png) + +## RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + +### Caps Lock Indicator + +```c + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(255, 110, 0); + } ``` -### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +### Num Lock Indicator + +```c + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } ``` -### Fn Layer [2] -Press and hold *right* **Alt** key. +### Scroll Lock Indicator +```c + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 2); + } ``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + +### Layer Indicator + +```c + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer Indicator + case _FN: + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 1); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(100, 255, 100); + break; + } + update_led(); + } ``` + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :mrsendyyk + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/qmk/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk b/qmk/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk index 479eb15e..5c3115dc 100644 --- a/qmk/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk +++ b/qmk/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk @@ -1 +1 @@ -USER_NAME := mrsendyyk \ No newline at end of file +USER_NAME := mrsendyyk diff --git a/qmk/layouts/community/alice/stanrc85-alice/keymap.c b/qmk/layouts/community/alice/stanrc85-alice/keymap.c new file mode 100644 index 00000000..2adaabcd --- /dev/null +++ b/qmk/layouts/community/alice/stanrc85-alice/keymap.c @@ -0,0 +1,52 @@ +/* +Copyright 2020 Stanrc85 + +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 +#include "stanrc85.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_alice( + KC_ESC, 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_CTLE, 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_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, MO(_FN2_60), + KC_LCTL, KC_LALT, LT_BPCF, KC_LGUI, LT_SPCF, TD_TWIN, TD_TCTL + ), + + [_DEFAULT] = LAYOUT_alice( + KC_ESC, 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_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, MO(_FN2_60), + KC_LCTL, KC_LALT, KC_SPC, MO(_FN1_60), KC_SPC, KC_RALT, KC_RCTL + ), + + [_FN1_60] = LAYOUT_alice( + _______, KC_TILD, 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_DEL, + _______, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + _______, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN2_60] = LAYOUT_alice( + BL_TOGG, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, VLK_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TG(_DEFAULT) + ) +}; \ No newline at end of file diff --git a/qmk/layouts/community/alice/stanrc85-alice/rules.mk b/qmk/layouts/community/alice/stanrc85-alice/rules.mk new file mode 100644 index 00000000..9db643c8 --- /dev/null +++ b/qmk/layouts/community/alice/stanrc85-alice/rules.mk @@ -0,0 +1 @@ +USER_NAME := stanrc85 \ No newline at end of file diff --git a/qmk/layouts/community/ergodox/333fred/config.h b/qmk/layouts/community/ergodox/333fred/config.h index 5a91ea3a..0509ddbb 100644 --- a/qmk/layouts/community/ergodox/333fred/config.h +++ b/qmk/layouts/community/ergodox/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #include QMK_KEYBOARD_CONFIG_H diff --git a/qmk/layouts/community/ergodox/333fred/keymap.c b/qmk/layouts/community/ergodox/333fred/keymap.c index 13459276..b9aefd92 100644 --- a/qmk/layouts/community/ergodox/333fred/keymap.c +++ b/qmk/layouts/community/ergodox/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" diff --git a/qmk/layouts/community/ergodox/drashna/config.h b/qmk/layouts/community/ergodox/drashna/config.h index 8ad589f9..a595a93c 100644 --- a/qmk/layouts/community/ergodox/drashna/config.h +++ b/qmk/layouts/community/ergodox/drashna/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #ifdef RGBLIGHT_ENABLE @@ -15,7 +31,7 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity #undef DEBOUNCE -#define DEBOUNCE 15 +#define DEBOUNCE 20 #define TAPPING_TERM_PER_KEY @@ -25,8 +41,7 @@ # undef RGB_MATRIX_LED_PROCESS_LIMIT # undef RGB_MATRIX_LED_FLUSH_LIMIT # if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) -# define RGBLIGHT_LIMIT_VAL 175 -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS (RGBLIGHT_LIMIT_VAL + 25) +# define RGBLIGHT_LIMIT_VAL 100 # undef RGBLIGHT_SLEEP # endif #endif diff --git a/qmk/layouts/community/ergodox/drashna/keymap.c b/qmk/layouts/community/ergodox/drashna/keymap.c index 8f5aaf6c..5f1c0c8a 100644 --- a/qmk/layouts/community/ergodox/drashna/keymap.c +++ b/qmk/layouts/community/ergodox/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" #ifdef UNICODEMAP_ENABLE @@ -6,9 +22,6 @@ #ifndef UNICODE_ENABLE # define UC(x) KC_NO #endif -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; -#endif enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE, @@ -315,8 +328,21 @@ void keyboard_post_init_keymap(void) { void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); } + +static bool mouse_button_one, trackball_button_one; + +void trackball_check_click(bool pressed, report_mouse_t* mouse) { + if (mouse_button_one | pressed) { + mouse->buttons |= MOUSE_BTN1; + } else { + mouse->buttons &= ~MOUSE_BTN1; + } + trackball_button_one = pressed; +} #endif + + bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_1: @@ -358,33 +384,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } run_trackball_cleanup(); break; -#if !defined(MOUSEKEY_ENABLE) && defined(POINTING_DEVICE_ENABLE) - case KC_BTN1 ... KC_BTN3: - { - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= (1 << (keycode - KC_BTN1)); // this is defined in report.h - } else { - currentReport.buttons &= ~(1 << (keycode - KC_BTN1)); - } - pointing_device_set_report(currentReport); - pointing_device_send(); - break; - } +#if !defined(MOUSEKEY_ENABLE) + case KC_MS_BTN1: + mouse_button_one = record->event.pressed; + trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1); + break; + case KC_MS_BTN2: + trackball_register_button(record->event.pressed, MOUSE_BTN2); + break; + case KC_MS_BTN3: + trackball_register_button(record->event.pressed, MOUSE_BTN3); + break; # endif #endif } - // switch (keycode) { - // case KC_P00: - // if (!record->event.pressed) { - // register_code(KC_KP_0); - // unregister_code(KC_KP_0); - // register_code(KC_KP_0); - // unregister_code(KC_KP_0); - // } - // return false; - // break; - //} return true; } @@ -457,7 +470,8 @@ void rgb_matrix_indicators_user(void) { if (userspace_config.rgb_layer_change) # endif { - switch (get_highest_layer(layer_state)) { + bool mods_enabled = IS_LAYER_ON(_MODS); + switch (get_highest_layer(layer_state|default_layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; @@ -473,36 +487,30 @@ void rgb_matrix_indicators_user(void) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; - default: { - bool mods_enabled = IS_LAYER_ON(_MODS); - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); - break; - } + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _WORKMAN: + rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _NORMAN: + rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _MALTRON: + rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _EUCALYN: + rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _CARPLAX: + rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); break; - } } } } diff --git a/qmk/layouts/community/numpad_5x4/mrsendyyk/keymap.c b/qmk/layouts/community/numpad_5x4/mrsendyyk/keymap.c new file mode 100644 index 00000000..2b013b6c --- /dev/null +++ b/qmk/layouts/community/numpad_5x4/mrsendyyk/keymap.c @@ -0,0 +1,34 @@ +/* + * Numpad 5x4 Keymap + * + * Copyright (C) 2020 Sendy YK + * + * 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 3 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 + +enum layer_names { + _BASE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ) +}; diff --git a/qmk/layouts/community/numpad_5x4/mrsendyyk/readme.md b/qmk/layouts/community/numpad_5x4/mrsendyyk/readme.md new file mode 100644 index 00000000..9669c8fc --- /dev/null +++ b/qmk/layouts/community/numpad_5x4/mrsendyyk/readme.md @@ -0,0 +1,14 @@ +# Numpad 5x4 Keymap by [Sendy YK](https://mr.sendyyk.com). + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/qmk_firmware/development/images/numpad_5x4_keymap.png) + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :mrsendyyk + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/qmk/layouts/community/numpad_5x4/mrsendyyk/rules.mk b/qmk/layouts/community/numpad_5x4/mrsendyyk/rules.mk new file mode 100644 index 00000000..5c3115dc --- /dev/null +++ b/qmk/layouts/community/numpad_5x4/mrsendyyk/rules.mk @@ -0,0 +1 @@ +USER_NAME := mrsendyyk diff --git a/qmk/layouts/community/numpad_5x6/drashna/config.h b/qmk/layouts/community/numpad_5x6/drashna/config.h index 29045148..97c1170d 100644 --- a/qmk/layouts/community/numpad_5x6/drashna/config.h +++ b/qmk/layouts/community/numpad_5x6/drashna/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once // #define B6_AUDIO diff --git a/qmk/layouts/community/numpad_5x6/drashna/keymap.c b/qmk/layouts/community/numpad_5x6/drashna/keymap.c index 3d325a4c..5c87ebf7 100644 --- a/qmk/layouts/community/numpad_5x6/drashna/keymap.c +++ b/qmk/layouts/community/numpad_5x6/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" #define F2_MCRO LT(_GAMEPAD, KC_F2) diff --git a/qmk/layouts/community/ortho_4x12/drashna/config.h b/qmk/layouts/community/ortho_4x12/drashna/config.h index 5342549e..6a99fcda 100644 --- a/qmk/layouts/community/ortho_4x12/drashna/config.h +++ b/qmk/layouts/community/ortho_4x12/drashna/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) diff --git a/qmk/layouts/community/ortho_4x12/drashna/keymap.c b/qmk/layouts/community/ortho_4x12/drashna/keymap.c index d2957d8f..8070a7d3 100644 --- a/qmk/layouts/community/ortho_4x12/drashna/keymap.c +++ b/qmk/layouts/community/ortho_4x12/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" #ifdef RGBLIGHT_ENABLE diff --git a/qmk/layouts/community/ortho_4x12/greatwizard/README.md b/qmk/layouts/community/ortho_4x12/greatwizard/README.md new file mode 100644 index 00000000..9eadb634 --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/greatwizard/README.md @@ -0,0 +1,149 @@ +# GreatWizard ortholinear 4x12 keymap + +## Base layers + +### Qwerty + +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Workman + +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | H | T | G | Y | N | E | O | I | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | M | C | V | K | L | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Colemak + +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | R | S | T | D | H | N | E | I | O | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Dvorak + +``` +,-----------------------------------------------------------------------------------. +| Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | / | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Game + +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |Right | +`-----------------------------------------------------------------------------------' +``` + +## Momentarily Layers + +### Lower + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +### Raise + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PageUp|PageDn| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +### Adjust (Lower + Raise) + +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +|CPSLCK| Reset|EP_RST| | | | Game |Qwerty|Workmn|Colemk|Dvorak| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` + +### Fn (rgblight and backlight layout) + +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | |RGBVA-|RGBVA+| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | |RGBSA-|RGBSA+|RGBLYR| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | |RGBTOG|RGBHU-|RGBHU+|RGBMOD| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | |BLTOGG| BL- | BL+ |BLBRTG| +`-----------------------------------------------------------------------------------' +``` + +## One Shot Key Layers + +### GIT + +Double tap on Alt to activate it. + +``` +,-----------------------------------------------------------------------------------. +| |CHRPCK| SHOW |REBASE|RESET | TAG | | PULL | INIT |REMOTE| PUSH | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | ADD |STATUS| DIFF |FETCH | GREP |STASH | |CHECKT| LOG | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | |COMMIT| MV |BRANCH| |MERGE | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` diff --git a/qmk/layouts/community/ortho_4x12/greatwizard/config.h b/qmk/layouts/community/ortho_4x12/greatwizard/config.h new file mode 100644 index 00000000..48dab19c --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/greatwizard/config.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#define LAYERS_ORTHO +#define LAYER_GAME +#define LAYER_GIT +#define LAYER_FN + +#define TAP_DANCE_LALT_GIT +#define TAP_DANCE_LSFT_CAPS diff --git a/qmk/layouts/community/ortho_4x12/greatwizard/keymap.c b/qmk/layouts/community/ortho_4x12/greatwizard/keymap.c new file mode 100644 index 00000000..a895aaf9 --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/greatwizard/keymap.c @@ -0,0 +1,209 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "greatwizard.h" + +#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) +#define LAYOUT_ortho_4x12_base( \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ + ) \ + LAYOUT_ortho_4x12_wrapper( \ + KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ + KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + TD_LSCP, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_ENT, \ + FN, KC_LCTL, TD_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ) +#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( + _______________QWERTY_LEFT1________________, _______________QWERTY_RIGHT1_______________, + _______________QWERTY_LEFT2________________, _______________QWERTY_RIGHT2_______________, KC_QUOT, + _______________QWERTY_LEFT3________________, _______________QWERTY_RIGHT3_______________ + ), + + /* Workman + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( + _______________WORKMAN_LEFT1_______________, _______________WORKMAN_RIGHT1______________, + _______________WORKMAN_LEFT2_______________, _______________WORKMAN_RIGHT2______________, KC_QUOT, + _______________WORKMAN_LEFT3_______________, _______________WORKMAN_RIGHT3______________ + ), + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( + _______________COLEMAK_LEFT1_______________, _______________COLEMAK_RIGHT1______________, + _______________COLEMAK_LEFT2_______________, _______________COLEMAK_RIGHT2______________, KC_QUOT, + _______________COLEMAK_LEFT3_______________, _______________COLEMAK_RIGHT3______________ + ), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( + _______________DVORAK_LEFT1________________, _______________DVORAK_RIGHT1_______________, + _______________DVORAK_LEFT2________________, _______________DVORAK_RIGHT2_______________, KC_SLSH, + _______________DVORAK_LEFT3________________, _______________DVORAK_RIGHT3_______________ + ), + + /* Game + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + [_GAME] = LAYOUT_ortho_4x12_wrapper( + KC_TAB, _______________QWERTY_LEFT1________________, _______________QWERTY_RIGHT1_______________, KC_BSPC, + KC_ESC, _______________QWERTY_LEFT2________________, _______________QWERTY_RIGHT2_______________, KC_QUOT, + TD_LSCP, _______________QWERTY_LEFT3________________, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + FN, KC_LCTL, TD_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12_wrapper( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PageUp|PageDn| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |CPSLCK| Reset|EP_RST| | | | Game |Qwerty|Workmn|Colemk|Dvorak| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12_wrapper( + 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_CAPS, RESET, EEP_RST, _______, _______, _______, GAME, QWERTY, WORKMAN, COLEMAK, DVORAK, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Fn (rgblight and backlight layout) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | |RGBVA-|RGBVA+| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |RGBSA-|RGBSA+|RGBLYR| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | |RGBTOG|RGBHU-|RGBHU+|RGBMOD| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |BLTOGG| BL- | BL+ |BLBRTG| + * `-----------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_4x12_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_LYR, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_HUI, RGB_MOD, + _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_BRTG + ), + + /* GIT + * ,-----------------------------------------------------------------------------------. + * | |CHRPCK| SHOW |REBASE|RESET | TAG | | PULL | INIT |REMOTE| PUSH | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ADD |STATUS| DIFF |FETCH | GREP |STASH | |CHECKT| LOG | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |COMMIT| MV |BRANCH| |MERGE | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_GIT] = LAYOUT_ortho_4x12_wrapper( + _______, _________________GIT_LEFT1_________________, _________________GIT_RIGHT1________________, _______, + _______, _________________GIT_LEFT2_________________, _________________GIT_RIGHT2________________, _______, + _______, _________________GIT_LEFT3_________________, _________________GIT_RIGHT3________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/layouts/community/ortho_4x12/greatwizard/rules.mk b/qmk/layouts/community/ortho_4x12/greatwizard/rules.mk new file mode 100644 index 00000000..bbc8f14c --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/greatwizard/rules.mk @@ -0,0 +1,7 @@ +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes # Enable Tap Dance + +LAYERS_ORTHO = yes +LAYER_GAME = yes +LAYER_GIT = yes +LAYER_FN = yes diff --git a/qmk/layouts/community/ortho_4x12/jackhumbert/config.h b/qmk/layouts/community/ortho_4x12/jackhumbert/config.h new file mode 100644 index 00000000..ea554c05 --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/jackhumbert/config.h @@ -0,0 +1,54 @@ + /* Copyright 2015-2020 Jack Humbert + * + * 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 . + */ + + #pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/qmk/layouts/community/ortho_4x12/jackhumbert/keymap.c b/qmk/layouts/community/ortho_4x12/jackhumbert/keymap.c new file mode 100644 index 00000000..8f07e375 --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/jackhumbert/keymap.c @@ -0,0 +1,157 @@ +/* Copyright 2015-2020 Jack Humbert + * + * 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 + + +enum planck_layers { + _COLEMAK, + _SHIFT_COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define S_SFT MO(_SHIFT_COLEMAK) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | q | w | f | p | g | j | l | u | y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | - | a | r | s | t | d | h | n | e | i | o | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | z | x | c | v | b | k | m | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shft | Ctrl | Alt | GUI |Lower | Shft | Spc |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, LOWER, S_SFT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak, Shifted + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | _ | A | R | S | T | D | H | N | E | I | O | ` | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Z | X | C | V | B | K | M | ! | @ | ? | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_SHIFT_COLEMAK] = LAYOUT_planck_grid( + S(KC_TAB), S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_G), S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_COLN, _______, + S(KC_MINS), S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_D), S(KC_H), S(KC_N), S(KC_E), S(KC_I), S(KC_O), KC_GRV, + S(KC_ESC), S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), S(KC_K), S(KC_M), KC_EXLM, KC_AT, KC_QUES, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, S(KC_LEFT), S(KC_DOWN), S(KC_UP), S(KC_RGHT) +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | 7 | 8 | 9 | | Del | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | | 4 | 5 | 6 | | | F5 | F6 | F7 | F8 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | 0 | 1 | 2 | 3 | | | F1 | F2 | F3 | F4 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Home | Pgup | Pgdn | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + _______, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, KC_DEL, KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_DEL, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + _______, KC_0, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | | < | $ | > | | | [ | _ | ] | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | \ | ( | " | ) | # | % | { | = | } | ] | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | : | * | + | | | & | ^ | ~ | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + _______, XXXXXXX, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, _______, + _______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______, + _______, XXXXXXX, KC_COLN, KC_ASTR, KC_PLUS, XXXXXXX, XXXXXXX, KC_AMPR, KC_CIRC, KC_TILD, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, + _______, XXXXXXX, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +}; + +void encoder_update(bool clockwise) { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/qmk/layouts/community/ortho_4x12/jackhumbert/readme.md b/qmk/layouts/community/ortho_4x12/jackhumbert/readme.md new file mode 100644 index 00000000..a3b05e64 --- /dev/null +++ b/qmk/layouts/community/ortho_4x12/jackhumbert/readme.md @@ -0,0 +1,9 @@ +![Jack's Planck Keymap](https://i.imgur.com/763RLNC.png) + +# Jack's Planck Keymap + +[Link to KLE of above image](http://www.keyboard-layout-editor.com/#/gists/8d5e8d5ee3884333bc5c4a231035f145) + +Mostly standard Colemak, but the shift and symbol layers are influenced from BEAKL: https://ieants.cc/code/keyboard/beakl/ + +Unfortunately I haven't figured out a good way to adapt this to a 2u format yet. \ No newline at end of file diff --git a/qmk/layouts/community/ortho_4x12/jotix/keymap.c b/qmk/layouts/community/ortho_4x12/jotix/keymap.c index 867e40a3..9d208f0a 100644 --- a/qmk/layouts/community/ortho_4x12/jotix/keymap.c +++ b/qmk/layouts/community/ortho_4x12/jotix/keymap.c @@ -2,17 +2,12 @@ enum layers { _QWERTY, - _RAISE, _LOWER, - _FN, + _RAISE, }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define FN MO(_FN) -#define TGLOWER TG(LOWER) -#define TGRAISE TG(_RAISE) -#define RALTDEL RALT_T(KC_DEL) static bool is_ctl_pressed; static bool is_esc_pressed; @@ -24,47 +19,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, KC_SLSH, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_ENT, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_LCTL,KC_LGUI,KC_LALT,FN, LOWER, KC_SPC, KC_SPC, RAISE, RALTDEL,KC_LEFT,KC_DOWN,KC_RGHT + KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), [_LOWER] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_VOLD,KC_MUTE,KC_VOLU,KC_HOME,KC_PGUP,KC_LCBR,KC_RCBR,KC_PIPE,KC_DQUO,_______,_______, + _______,KC_VOLD,KC_MUTE,KC_VOLU,DM_PLY1,DM_REC1,DM_RSTP,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_END, KC_PGDN,KC_UNDS,KC_PLUS,KC_WH_U,KC_BTN1,KC_MS_U,KC_BTN2, + _______,KC_MPRV,KC_MPLY,KC_MNXT,DM_PLY2,DM_REC2,KC_INS, KC_APP, _______,_______,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,TGRAISE,_______,KC_WH_D,KC_MS_L,KC_MS_D,KC_MS_R + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), [_RAISE] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_CAPS,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______, + KC_CAPS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,DM_REC1,DM_REC2,DM_RSTP,DM_PLY1,DM_PLY2,KC_MINS,KC_EQL, _______,_______,_______,_______, + _______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,TGLOWER,_______,_______,_______,_______,_______,_______ -// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ -), - -[_FN] = LAYOUT_ortho_4x12 ( -// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,KC_F1, KC_F2, KC_F3, KC_F4, _______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,KC_PSLS, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,KC_P0, KC_PDOT,KC_LPRN,KC_RPRN + _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), }; diff --git a/qmk/layouts/community/ortho_4x12/jotix/rules.mk b/qmk/layouts/community/ortho_4x12/jotix/rules.mk index a1adef2a..9e6797ed 100644 --- a/qmk/layouts/community/ortho_4x12/jotix/rules.mk +++ b/qmk/layouts/community/ortho_4x12/jotix/rules.mk @@ -1,2 +1 @@ -MOUSEKEY_ENABLE = yes DYNAMIC_MACRO_ENABLE = yes diff --git a/qmk/layouts/community/ortho_4x12/junonum/keymap.c b/qmk/layouts/community/ortho_4x12/junonum/keymap.c index 619de0d7..e5eab884 100644 --- a/qmk/layouts/community/ortho_4x12/junonum/keymap.c +++ b/qmk/layouts/community/ortho_4x12/junonum/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, CTRLTAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTEN, - _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), [_COLEMAK] = LAYOUT_ortho_4x12( @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT_ortho_4x12( - KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINUS, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQUAL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY @@ -125,8 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float dpad_song_off[][2] = SONG(MAJOR_SOUND); #endif -// Disable LED on Rev6 -#ifdef KEYBOARD_planck_rev6 +#ifndef BACKLIGHT_ENABLE layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/qmk/layouts/community/ortho_4x12/junonum/rules.mk b/qmk/layouts/community/ortho_4x12/junonum/rules.mk index e206273f..9f5d7e98 100644 --- a/qmk/layouts/community/ortho_4x12/junonum/rules.mk +++ b/qmk/layouts/community/ortho_4x12/junonum/rules.mk @@ -1,9 +1,13 @@ SRC += muse.c -ifeq ($(strip $(KEYBOARD)), planck/rev6) - BACKLIGHT_ENABLE = no -else +ifeq ($(strip $(KEYBOARD)),$(filter $(strip $(KEYBOARD)), planck/rev2 planck/rev3 planck/rev4 planck/rev5)) BACKLIGHT_ENABLE = yes +else + BACKLIGHT_ENABLE = no +endif + +ifeq ($(strip $(KEYBOARD)), vitamins_included/rev1) + NKRO_ENABLE = no endif MIDI_ENABLE=no diff --git a/qmk/layouts/community/ortho_5x12/333fred/config.h b/qmk/layouts/community/ortho_5x12/333fred/config.h index 2e5dfe2e..bdbeead5 100644 --- a/qmk/layouts/community/ortho_5x12/333fred/config.h +++ b/qmk/layouts/community/ortho_5x12/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define USE_SERIAL diff --git a/qmk/layouts/community/ortho_5x12/333fred/keymap.c b/qmk/layouts/community/ortho_5x12/333fred/keymap.c index a228a49d..e270b408 100644 --- a/qmk/layouts/community/ortho_5x12/333fred/keymap.c +++ b/qmk/layouts/community/ortho_5x12/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/qmk/layouts/community/ortho_5x12/drashna/config.h b/qmk/layouts/community/ortho_5x12/drashna/config.h index 7504338f..76bd642a 100644 --- a/qmk/layouts/community/ortho_5x12/drashna/config.h +++ b/qmk/layouts/community/ortho_5x12/drashna/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once /* ws2812 RGB LED */ diff --git a/qmk/layouts/community/ortho_5x12/drashna/keymap.c b/qmk/layouts/community/ortho_5x12/drashna/keymap.c index 0ee9dfb1..98c349b2 100644 --- a/qmk/layouts/community/ortho_5x12/drashna/keymap.c +++ b/qmk/layouts/community/ortho_5x12/drashna/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" /* diff --git a/qmk/layouts/community/ortho_5x12/greatwizard/README.md b/qmk/layouts/community/ortho_5x12/greatwizard/README.md new file mode 100644 index 00000000..4158af5a --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/greatwizard/README.md @@ -0,0 +1,233 @@ +# GreatWizard ortholinear 5x12 keymap + +## Base layers + +### Qwerty + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Qwerty Programmer + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Workman + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | D | R | W | B | J | F | U | P | ; | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | H | T | G | Y | N | E | O | I | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | M | C | V | K | L | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Workman Programmer + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | D | R | W | B | J | F | U | P | ; | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | H | T | G | Y | N | E | O | I | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | M | C | V | K | L | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Colemak + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | R | S | T | D | H | N | E | I | O | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Colemak Programmer + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | R | S | T | D | H | N | E | I | O | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Dvorak + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | ' | , | . | P | Y | F | G | C | R | L | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | / | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Dvorak Programmer + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | ' | , | . | P | Y | F | G | C | R | L | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | / | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### Game + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | ' | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Fn | Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |Right | +`-----------------------------------------------------------------------------------' +``` + +## Momentarily Layers + +### Lower + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +### Raise + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PageUp|PageDn| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +### Adjust (Lower + Raise) + +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Reset|EP_RST| | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +|CPSLCK| | | | | | Game |Qwerty|Workmn|Colemk|Dvorak| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | |QwertP|WrkmnP|ColmkP|DvorkP| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` + +### Fn (rgblight and backlight layout) + +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | |RGBVA-|RGBVA+| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | |RGBSA-|RGBSA+|RGBLYR| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | |RGBTOG|RGBHU-|RGBHU+|RGBMOD| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | |BLTOGG| BL- | BL+ |BLBRTG| +`-----------------------------------------------------------------------------------' +``` + +## One Shot Key Layers + +### GIT + +Double tap on Alt to activate it. + +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| |CHRPCK| SHOW |REBASE|RESET | TAG | | PULL | INIT |REMOTE| PUSH | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | ADD |STATUS| DIFF |FETCH | GREP |STASH | |CHECKT| LOG | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | |COMMIT| MV |BRANCH| |MERGE | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` diff --git a/qmk/layouts/community/ortho_5x12/greatwizard/config.h b/qmk/layouts/community/ortho_5x12/greatwizard/config.h new file mode 100644 index 00000000..598a7e56 --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/greatwizard/config.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#define LAYERS_ORTHO +#define LAYERS_PROGRAMMER +#define LAYER_GAME +#define LAYER_GIT +#define LAYER_FN + +#define TAP_DANCE_LALT_GIT +#define TAP_DANCE_LSFT_CAPS diff --git a/qmk/layouts/community/ortho_5x12/greatwizard/keymap.c b/qmk/layouts/community/ortho_5x12/greatwizard/keymap.c new file mode 100644 index 00000000..77d758b0 --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/greatwizard/keymap.c @@ -0,0 +1,342 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "greatwizard.h" + +#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) +#define LAYOUT_ortho_5x12_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ + ) \ + LAYOUT_ortho_5x12_wrapper( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ + KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_DEL, \ + KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_ENT, \ + FN, KC_LCTL, TD_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ) +#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_5x12_base_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, + _______________QWERTY_LEFT1________________, _______________QWERTY_RIGHT1_______________, + _______________QWERTY_LEFT2________________, _______________QWERTY_RIGHT2_______________, KC_QUOT, + TD_LSCP, _______________QWERTY_LEFT3________________, _______________QWERTY_RIGHT3_______________ + ), + + /* Qwerty Programmer + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY_PROGRAMMER] = LAYOUT_ortho_5x12_base_wrapper( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + _______________QWERTY_LEFT1________________, _______________QWERTY_RIGHT1_______________, + _______________QWERTY_LEFT2________________, _______________QWERTY_RIGHT2_______________, KC_QUOT, + PG_LSCP, _______________QWERTY_LEFT3________________, _______________QWERTY_RIGHT3_______________ + ), + + /* Workman + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, + _______________WORKMAN_LEFT1_______________, _______________WORKMAN_RIGHT1______________, + _______________WORKMAN_LEFT2_______________, _______________WORKMAN_RIGHT2______________, KC_QUOT, + TD_LSCP, _______________WORKMAN_LEFT3_______________, _______________WORKMAN_RIGHT3______________ + ), + + /* Workman Programmer + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_WORKMAN_PROGRAMMER] = LAYOUT_ortho_5x12_base_wrapper( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + _______________WORKMAN_LEFT1_______________, _______________WORKMAN_RIGHT1______________, + _______________WORKMAN_LEFT2_______________, _______________WORKMAN_RIGHT2______________, KC_QUOT, + PG_LSCP, _______________WORKMAN_LEFT3_______________, _______________WORKMAN_RIGHT3______________ + ), + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, + _______________COLEMAK_LEFT1_______________, _______________COLEMAK_RIGHT1______________, + _______________COLEMAK_LEFT2_______________, _______________COLEMAK_RIGHT2______________, KC_QUOT, + TD_LSCP, _______________COLEMAK_LEFT3_______________, _______________COLEMAK_RIGHT3______________ + ), + + /* Colemak Programmer + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_COLEMAK_PROGRAMMER] = LAYOUT_ortho_5x12_base_wrapper( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + _______________COLEMAK_LEFT1_______________, _______________COLEMAK_RIGHT1______________, + _______________COLEMAK_LEFT2_______________, _______________COLEMAK_RIGHT2______________, KC_QUOT, + PG_LSCP, _______________COLEMAK_LEFT3_______________, _______________COLEMAK_RIGHT3______________ + ), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_ortho_5x12_base_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, + _______________DVORAK_LEFT1________________, _______________DVORAK_RIGHT1_______________, + _______________DVORAK_LEFT2________________, _______________DVORAK_RIGHT2_______________, KC_SLSH, + TD_LSCP, _______________DVORAK_LEFT3________________, _______________DVORAK_RIGHT3_______________ + ), + + /* Dvorak Programmer + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK_PROGRAMMER] = LAYOUT_ortho_5x12_base_wrapper( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + _______________DVORAK_LEFT1________________, _______________DVORAK_RIGHT1_______________, + _______________DVORAK_LEFT2________________, _______________DVORAK_RIGHT2_______________, KC_SLSH, + PG_LSCP, _______________DVORAK_LEFT3________________, _______________DVORAK_RIGHT3_______________ + ), + + /* X Programmer Shifted + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_PROGRAMMER_SHIFTED] = LAYOUT_ortho_5x12_wrapper( + PG_GRV, PG_1, PG_2, PG_3, PG_4, PG_5, PG_6, PG_7, PG_8, PG_9, PG_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Game + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Fn | Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + [_GAME] = LAYOUT_ortho_5x12_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, KC_BSPC, + KC_TAB, _______________QWERTY_LEFT1________________, _______________QWERTY_RIGHT1_______________, KC_DEL, + KC_ESC, _______________QWERTY_LEFT2________________, _______________QWERTY_RIGHT2_______________, KC_QUOT, + TD_LSCP, _______________QWERTY_LEFT3________________, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + FN, KC_LCTL, TD_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_5x12_wrapper( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |PageUp|PageDn| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_5x12_wrapper( + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, _______, + KC_GRV, _______________NUMBER_LEFT_________________, _______________NUMBER_RIGHT________________, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset|EP_RST| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |CPSLCK| | | | | | Game |Qwerty|Workmn|Colemk|Dvorak| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |QwertP|WrkmnP|ColmkP|DvorkP| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_5x12_wrapper( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, GAME, QWERTY, WORKMAN, COLEMAK, DVORAK, _______, + _______, _______, _______, _______, _______, _______, _______, QWERTYP, WORKMNP, COLEMKP, DVORAKP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Fn (rgblight and backlight layout) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |RGBVA-|RGBVA+| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |RGBSA-|RGBSA+|RGBLYR| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | |RGBTOG|RGBHU-|RGBHU+|RGBMOD| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |BLTOGG| BL- | BL+ |BLBRTG| + * `-----------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_5x12_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, RGB_LYR, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_HUI, RGB_MOD, + _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_BRTG + ), + + /* GIT + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |CHRPCK| SHOW |REBASE|RESET | TAG | | PULL | INIT |REMOTE| PUSH | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ADD |STATUS| DIFF |FETCH | GREP |STASH | |CHECKT| LOG | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |COMMIT| MV |BRANCH| |MERGE | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_GIT] = LAYOUT_ortho_5x12_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _________________GIT_LEFT1_________________, _________________GIT_RIGHT1________________, _______, + _______, _________________GIT_LEFT2_________________, _________________GIT_RIGHT2________________, _______, + _______, _________________GIT_LEFT3_________________, _________________GIT_RIGHT3________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/layouts/community/ortho_5x12/greatwizard/rules.mk b/qmk/layouts/community/ortho_5x12/greatwizard/rules.mk new file mode 100644 index 00000000..fbff04ed --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/greatwizard/rules.mk @@ -0,0 +1,8 @@ +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes # Enable Tap Dance + +LAYERS_ORTHO = yes +LAYERS_PROGRAMMER = yes +LAYER_GAME = yes +LAYER_GIT = yes +LAYER_FN = yes diff --git a/qmk/layouts/community/ortho_5x12/riblee/config.h b/qmk/layouts/community/ortho_5x12/riblee/config.h new file mode 100644 index 00000000..8dbff5e1 --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/riblee/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 . + */ + +#pragma once +#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX diff --git a/qmk/layouts/community/ortho_5x12/riblee/keymap.c b/qmk/layouts/community/ortho_5x12/riblee/keymap.c new file mode 100644 index 00000000..ba5eb07b --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/riblee/keymap.c @@ -0,0 +1,163 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 "riblee.h" + + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_A] = ACTION_TAP_DANCE_FN(dance_key_a), + [TD_E] = ACTION_TAP_DANCE_FN(dance_key_e), + [TD_I] = ACTION_TAP_DANCE_FN(dance_key_i), + [TD_O] = ACTION_TAP_DANCE_FN(dance_key_o), + [TD_U] = ACTION_TAP_DANCE_FN(dance_key_u), +}; + +// Tap Dance keys +#define C_KC_A TD(TD_A) +#define C_KC_E TD(TD_E) +#define C_KC_I TD(TD_I) +#define C_KC_O TD(TD_O) +#define C_KC_U TD(TD_U) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, C_KC_E, KC_R, KC_T, KC_Y, C_KC_U, C_KC_I, C_KC_O, KC_P, KC_DEL, + KC_ESC, C_KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset |Debug | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | NKRO | Swap |Un swp|UC Mod| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; \ No newline at end of file diff --git a/qmk/layouts/community/ortho_5x12/riblee/readme.md b/qmk/layouts/community/ortho_5x12/riblee/readme.md new file mode 100644 index 00000000..231f7afd --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/riblee/readme.md @@ -0,0 +1,85 @@ +# Riblee preonic + +This layout is modified to support accent Hungarian keys via Unicode and Tap Dance + +``` + +Qwerty +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' + +Colemak +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | R | S | T | D | H | N | E | I | O | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' + +Dvorak +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | / | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' + +Lower +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | +`-----------------------------------------------------------------------------------' + +Raise +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' + +Adjust (Lower + Raise) +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| |Reset |Debug | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | NKRO | Swap |Un swp|UC Mod| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' + +``` \ No newline at end of file diff --git a/qmk/layouts/community/ortho_5x12/riblee/rules.mk b/qmk/layouts/community/ortho_5x12/riblee/rules.mk new file mode 100644 index 00000000..517f2700 --- /dev/null +++ b/qmk/layouts/community/ortho_5x12/riblee/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/qmk/layouts/community/ortho_5x12/xyverz/keymap.c b/qmk/layouts/community/ortho_5x12/xyverz/keymap.c index 00fca1b4..22147c3a 100644 --- a/qmk/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/qmk/layouts/community/ortho_5x12/xyverz/keymap.c @@ -8,6 +8,9 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUS #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias #define RGB_SNK RGB_M_SN // Snake Animation alias +#define MACLOCK LGUI(LCTL(KC_Q)) // Lock my MacBook! +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -18,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | - | A | S | D | F | G | H | J | K | L | ; | " | + * | ` | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -26,16 +29,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_5x12 ( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL , \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Colemak * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Grv | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -47,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = LAYOUT_ortho_5x12 ( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), @@ -60,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | " | , | . | P | Y | F | G | C | R | L | / | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | ` | A | O | E | U | I | D | H | T | N | S | - | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -68,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT_ortho_5x12 ( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), @@ -127,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | |MACLCK| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_5x12 ( \ @@ -135,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MACLOCK \ ) }; diff --git a/qmk/layouts/community/split_3x6_3/ddeklerk/keymap.c b/qmk/layouts/community/split_3x6_3/ddeklerk/keymap.c new file mode 100644 index 00000000..6ffc5732 --- /dev/null +++ b/qmk/layouts/community/split_3x6_3/ddeklerk/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 + +enum layers { + _BASE, + _GAME, + _FN1, + _FN2, + _FN3, + _ADJUST +}; + +#define BASE DF(_BASE) +#define GAME DF(_GAME) +#define FN1 LT(_FN1, KC_BSPC) +#define FN2 LT(_FN2, KC_ENT) +#define FN3SPC LT(_FN3, KC_SPC) + +#define CTRLESC MT(MOD_LCTL, KC_ESC) +#define CTRLMIN MT(MOD_RCTL, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_split_3x6_3( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, XXXXXXX, + CTRLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, CTRLMIN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LGUI, FN1, FN3SPC, FN3SPC, FN2, KC_RALT + ), + [_GAME] = LAYOUT_split_3x6_3( + KC_3, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_BSPC, + KC_2, CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_UP, KC_ENT, + KC_1, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT, + KC_LALT, _______, KC_SPC, _______, _______, _______ + ), + [_FN1] = LAYOUT_split_3x6_3( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_split_3x6_3( + KC_GRV, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_QUES, KC_PLUS, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_SLSH, KC_EQL, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_split_3x6_3( + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_APP, _______, _______, _______, _______, KC_PGDN, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_split_3x6_3( + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, BASE, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _FN1, _FN2, _ADJUST); +}; diff --git a/qmk/layouts/community/split_3x6_3/drashna/config.h b/qmk/layouts/community/split_3x6_3/drashna/config.h new file mode 100644 index 00000000..7db51fb6 --- /dev/null +++ b/qmk/layouts/community/split_3x6_3/drashna/config.h @@ -0,0 +1,74 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + +#pragma once + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#undef USE_I2C +#undef SSD1306OLED + +#define USE_SERIAL_PD2 + +// #define TAPPING_FORCE_HOLD +// #define TAPPING_TERM 100 + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 27 + +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 5 +# define RGBLIGHT_LIMIT_VAL 120 +#endif + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif + +#ifdef AUDIO_ENABLE +# define B6_AUDIO +# define NO_MUSIC_MODE +#endif + +#ifdef HAPTIC_ENABLE +# define SOLENOID_PIN B7 +#endif + +#undef PRODUCT +#define PRODUCT Drashna Hacked Corne Keyboard + +#define OLED_FONT_H "layouts/community/split_3x6_3/drashna/glcdfont.c" +// #define OLED_FONT_WIDTH 5 +// #define OLED_FONT_HEIGHT 7 + +#define OLED_DISABLE_TIMEOUT +#define TAPPING_TERM_PER_KEY diff --git a/qmk/layouts/community/split_3x6_3/drashna/glcdfont.c b/qmk/layouts/community/split_3x6_3/drashna/glcdfont.c new file mode 100644 index 00000000..10ce3b34 --- /dev/null +++ b/qmk/layouts/community/split_3x6_3/drashna/glcdfont.c @@ -0,0 +1,232 @@ +#include "progmem.h" + +// Corne 8x6 font with QMK Firmware Logo +// Online editor: https://helixfonteditor.netlify.com/ + +// clang-format off +const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, +0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, +0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, +0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, +0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, +0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, +0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, +0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, +0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, +0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x81, +0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, +0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, +0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, +0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, +0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, +0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, +0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, +0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x03, 0x01, 0x00, 0x00, 0x00, 0x00, +0x01, 0x03, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x03, 0x01, +0x00, 0x00, 0x00, 0x07, 0x07, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x07, 0x07, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x07, +0x07, 0x00, 0x00, 0x00, 0x01, 0x03, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x03, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/qmk/layouts/community/split_3x6_3/drashna/keymap.c b/qmk/layouts/community/split_3x6_3/drashna/keymap.c new file mode 100644 index 00000000..30e3958f --- /dev/null +++ b/qmk/layouts/community/split_3x6_3/drashna/keymap.c @@ -0,0 +1,232 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" + +extern uint8_t is_master; + +#ifdef RGBLIGHT_ENABLE +// Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; + +/* + * The `LAYOUT_crkbd_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +#define LAYOUT_split_3x6_3_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_split_3x6_3_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ + ) +#define LAYOUT_split_3x6_3_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_split_3x6_3_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_split_3x6_3_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_split_3x6_3_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_split_3x6_3_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_split_3x6_3_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_split_3x6_3_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_split_3x6_3_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_split_3x6_3_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MODS] = LAYOUT_split_3x6_3_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT, + _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_split_3x6_3_wrapper( + KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + KC_F12, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_split_3x6_3_wrapper( \ + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_split_3x6_3_wrapper( \ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, + HPT_TOG, KC_NUKE, _______, _______, TG_MODS, HPT_FBK + ) +}; +// clang-format on + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifndef SPLIT_KEYBOARD + if (keycode == RESET && !is_master) { + return false; + } +#endif + } + return true; +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { +# ifndef SPLIT_KEYBOARD + if (is_master) { +# endif + return OLED_ROTATION_270; +# ifndef SPLIT_KEYBOARD + } else { + return rotation; + } +# endif +} +#endif + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ALT_T(KC_A): + return TAPPING_TERM + 100; + default: + return TAPPING_TERM; + } +} + +#ifdef RGB_MATRIX_ENABLE + +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } + +void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } + +void check_default_layer(uint8_t mode, uint8_t type) { + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); + break; + case _WORKMAN: + rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type); + break; + case _NORMAN: + rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type); + break; + case _MALTRON: + rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type); + break; + case _EUCALYN: + rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type); + break; + case _CARPLAX: + rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type); + break; + } +} + +void rgb_matrix_indicators_user(void) { + if (userspace_config.rgb_layer_change && +# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +# endif +# if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +# else + rgb_matrix_config.enable +# endif + ) { + switch (get_highest_layer(layer_state)) { + case _GAMEPAD: + rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _DIABLO: + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _RAISE: + rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _LOWER: + rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + case _ADJUST: + rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); + break; + default: { + check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); + break; + } + } + check_default_layer(0, LED_FLAG_MODIFIER); + } +} +#endif diff --git a/qmk/layouts/community/split_3x6_3/drashna/rules.mk b/qmk/layouts/community/split_3x6_3/drashna/rules.mk new file mode 100644 index 00000000..6ac1554b --- /dev/null +++ b/qmk/layouts/community/split_3x6_3/drashna/rules.mk @@ -0,0 +1,28 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifeq ($(strip $(KEYBOARD)), crkbd/rev1) + OLED_DRIVER_ENABLE = yes + RGB_MATRIX_ENABLE = WS2812 + HAPTIC_ENABLE = SOLENOID + BOOTLOADER = qmk-dfu +endif diff --git a/qmk/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c b/qmk/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c index acbf16ad..565e9990 100644 --- a/qmk/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c +++ b/qmk/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c @@ -1,67 +1,44 @@ +/* + * 60_ansi_arrow Keymap + * + * Copyright (C) 2020 Sendy YK + * + * 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 3 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 -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_arrow(KC_GRV, 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_DEL, - KC_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, BL_DEC, BL_TOGG, BL_INC, BL_STEP, 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 - ) +enum layer_names { + _BASE, // Default Layer + _FN // Fn Layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer + [_FN] = LAYOUT_60_ansi_arrow( + KC_GRV, 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_DEL, + KC_BRIU, _______, _______, KC_END, RESET, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, _______, KC_EJCT, + KC_BRID, _______, KC_SLCK, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, KC_MUTE, + KC_VOLU, _______, _______, KC_CALC, _______, _______, KC_NLCK, KC_MAIL, _______, _______, KC_PAUS, KC_PGUP, _______, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, _______, KC_MPRV, KC_PGDN, KC_MNXT + ) }; diff --git a/qmk/layouts/default/60_ansi_arrow/info.json b/qmk/layouts/default/60_ansi_arrow/info.json index 6bd85a6b..639433ea 100644 --- a/qmk/layouts/default/60_ansi_arrow/info.json +++ b/qmk/layouts/default/60_ansi_arrow/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "60% ANSI Arrow Layout", - "url": "", - "maintainer": "qmk", + "url": "https://mr.sendyyk.com", + "maintainer": "Sendy YK ", "width": 15, "height": 5, "layouts": { diff --git a/qmk/layouts/default/60_ansi_arrow/readme.md b/qmk/layouts/default/60_ansi_arrow/readme.md index 8d6e6c45..e379caa3 100644 --- a/qmk/layouts/default/60_ansi_arrow/readme.md +++ b/qmk/layouts/default/60_ansi_arrow/readme.md @@ -1,50 +1,22 @@ -# 60_ansi_arrow -`LAYOUT_60_ansi_arrow` +# 60_ansi_arrow Keymap -### Default Layer [0] +by [Sendy YK](https://mr.sendyyk.com). -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +## Default Layer -### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +![_BASE](https://raw.githubusercontent.com/mrsendyyk/qmk_firmware/development/images/60_ansi_arrow_keymap_base.png) -### Fn Layer [2] -Press and hold *right* **Alt** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +## Fn Layer + +![_FN](https://raw.githubusercontent.com/mrsendyyk/qmk_firmware/development/images/60_ansi_arrow_keymap_fn.png) + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :default_60_ansi_arrow + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/qmk/layouts/default/64_ansi/default_64_ansi/keymap.c b/qmk/layouts/default/64_ansi/default_64_ansi/keymap.c new file mode 100644 index 00000000..ff1356e9 --- /dev/null +++ b/qmk/layouts/default/64_ansi/default_64_ansi/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_ansi( + 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_BSPC, + 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_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_LSFT, 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_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_ansi( + KC_GRV, 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_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_64_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/layouts/default/64_ansi/info.json b/qmk/layouts/default/64_ansi/info.json new file mode 100644 index 00000000..f30a94e3 --- /dev/null +++ b/qmk/layouts/default/64_ansi/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "60% 64-key ANSI Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/layouts/default/64_ansi/layout.json b/qmk/layouts/default/64_ansi/layout.json new file mode 100644 index 00000000..6fc5bbe7 --- /dev/null +++ b/qmk/layouts/default/64_ansi/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2},"","","","","","","","","","","","","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] diff --git a/qmk/layouts/default/64_ansi/readme.md b/qmk/layouts/default/64_ansi/readme.md new file mode 100644 index 00000000..5fd079d4 --- /dev/null +++ b/qmk/layouts/default/64_ansi/readme.md @@ -0,0 +1,14 @@ +# 64_ansi + + LAYOUT_64_ansi + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ diff --git a/qmk/layouts/default/64_iso/default_64_iso/keymap.c b/qmk/layouts/default/64_iso/default_64_iso/keymap.c new file mode 100644 index 00000000..a0ac1a15 --- /dev/null +++ b/qmk/layouts/default/64_iso/default_64_iso/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 noroadsleft + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_iso( + 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_BSPC, + 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_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_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_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_iso( + KC_GRV, 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_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_64_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/layouts/default/64_iso/info.json b/qmk/layouts/default/64_iso/info.json new file mode 100644 index 00000000..cc279848 --- /dev/null +++ b/qmk/layouts/default/64_iso/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "60% \"64-key\" ISO Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/qmk/layouts/default/64_iso/layout.json b/qmk/layouts/default/64_iso/layout.json new file mode 100644 index 00000000..8754c4d9 --- /dev/null +++ b/qmk/layouts/default/64_iso/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5,w2:1.25,h2:2,x2:0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] diff --git a/qmk/layouts/default/64_iso/readme.md b/qmk/layouts/default/64_iso/readme.md new file mode 100644 index 00000000..f487382f --- /dev/null +++ b/qmk/layouts/default/64_iso/readme.md @@ -0,0 +1,14 @@ +# 64_iso + + LAYOUT_64_iso + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ diff --git a/qmk/layouts/default/65_iso_blocker_split_bs/default_65_iso_blocker_split_bs/keymap.c b/qmk/layouts/default/65_iso_blocker_split_bs/default_65_iso_blocker_split_bs/keymap.c new file mode 100644 index 00000000..11536c7d --- /dev/null +++ b/qmk/layouts/default/65_iso_blocker_split_bs/default_65_iso_blocker_split_bs/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│Bsp│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │PgD│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│GUI │Alt │                        │ Alt│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_iso_blocker_split_bs( + 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_BSPC, KC_HOME, + 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_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, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/qmk/layouts/default/65_iso_blocker_split_bs/info.json b/qmk/layouts/default/65_iso_blocker_split_bs/info.json new file mode 100644 index 00000000..cadeeea8 --- /dev/null +++ b/qmk/layouts/default/65_iso_blocker_split_bs/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "65% ISO layout with blocker and split Backspace", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "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":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/qmk/layouts/default/65_iso_blocker_split_bs/layout.json b/qmk/layouts/default/65_iso_blocker_split_bs/layout.json new file mode 100644 index 00000000..e1c4f7ff --- /dev/null +++ b/qmk/layouts/default/65_iso_blocker_split_bs/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","","","",""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",""], +[{w:1.75},"","","","","","","","","","","","","",{x:1.25},""], +[{w:1.25},"","","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{x:0.5},"","",""] diff --git a/qmk/layouts/default/65_iso_blocker_split_bs/readme.md b/qmk/layouts/default/65_iso_blocker_split_bs/readme.md new file mode 100644 index 00000000..37425ee0 --- /dev/null +++ b/qmk/layouts/default/65_iso_blocker_split_bs/readme.md @@ -0,0 +1,5 @@ +# 65_iso_blocker_split_bs + + LAYOUT_65_iso_blocker_split_bs + +This is the 65% ISO layout with a blocker next to the arrows and split Backspace. diff --git a/qmk/layouts/default/alice/default_alice/keymap.c b/qmk/layouts/default/alice/default_alice/keymap.c new file mode 100644 index 00000000..28ab2195 --- /dev/null +++ b/qmk/layouts/default/alice/default_alice/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 MudkipMao + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐  ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───────┐ + * │Esc│ │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ┌┴──┬┘ ┌┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┴┐ + * │PUp│ │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ┌┴──┬┘ ┌┴─────┼───┼───┼───┼───┼───┤ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴──────┴┐ + * │PDn│ │ Caps │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │ + * └───┘ ┌┴──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┬──┴┐ + * │ Shift │ Z │ X │ C │ V │ B │ │ B │ N │ M │ , │ . │ / │ Shift │Shf│ + * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴──┐ ├───┴───┴──┬┴───┴┬──┴───┴──────┬──┴──┬┘ + * │ Ctl │ │ Alt │ │ GUI │ │ │ Alt │ │ Ctl │ + * └─────┘ └─────┴───────┴─────┘ └──────────┴─────┘ └─────┘ + */ + [0] = LAYOUT_alice( + KC_ESC, 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_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_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_RSFT, + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ) +}; diff --git a/qmk/layouts/default/alice/info.json b/qmk/layouts/default/alice/info.json new file mode 100644 index 00000000..3521a4b7 --- /dev/null +++ b/qmk/layouts/default/alice/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Alice layout", + "url": "", + "maintainer": "qmk", + "width": 18.35, + "height": 5.1, + "layouts": { + "LAYOUT_alice": { + "layout": [ + {"x":0.4, "y":0}, + {"x":1.55, "y":0.1}, + {"x":2.55, "y":0.1}, + {"x":3.55, "y":0}, + {"x":4.55, "y":0.1}, + {"x":5.55, "y":0.1}, + {"x":6.55, "y":0.1}, + {"x":7.55, "y":0.1}, + {"x":9.75, "y":0.1}, + {"x":10.75, "y":0.1}, + {"x":11.75, "y":0.1}, + {"x":12.75, "y":0.1}, + {"x":13.75, "y":0}, + {"x":14.75, "y":0.1}, + {"x":15.75, "y":0.1, "w":2}, + + {"x":0.2, "y":1.0}, + {"x":1.35, "y":1.1, "w":1.5}, + {"x":2.85, "y":1.1}, + {"x":3.85, "y":1.1}, + {"x":4.85, "y":1.1}, + {"x":5.85, "y":1.1}, + {"x":6.85, "y":1.1}, + {"x":9.45, "y":1.1}, + {"x":10.45, "y":1.1}, + {"x":11.45, "y":1.1}, + {"x":12.45, "y":1.1}, + {"x":13.45, "y":1.1}, + {"x":14.45, "y":1.1}, + {"x":15.45, "y":1.1}, + {"x":16.45, "y":1.1, "w":1.5}, + + {"x":0, "y":2.0}, + {"x":1.15, "y":2.1, "w":1.75}, + {"x":2.9, "y":2.1}, + {"x":3.9, "y":2.1}, + {"x":4.9, "y":2.1}, + {"x":5.9, "y":2.1}, + {"x":6.9, "y":2.1}, + {"x":9.9, "y":2.1}, + {"x":10.9, "y":2.1}, + {"x":11.9, "y":2.1}, + {"x":12.9, "y":2.1}, + {"x":13.9, "y":2.1}, + {"x":14.9, "y":2.1}, + {"x":15.9, "y":2.1, "w":2.25}, + + {"x":0.95, "y":3.1, "w":2.25}, + {"x":3.2, "y":3.1}, + {"x":4.2, "y":3.1}, + {"x":5.2, "y":3.1}, + {"x":6.2, "y":3.1}, + {"x":7.2, "y":3.1}, + {"x":9.6, "y":3.1}, + {"x":10.6, "y":3.1}, + {"x":11.6, "y":3.1}, + {"x":12.6, "y":3.1}, + {"x":13.6, "y":3.1}, + {"x":14.6, "y":3.1}, + {"x":15.6, "y":3.1, "w":1.75}, + {"x":17.35, "y":3.1}, + + {"x":0.95, "y":4.1, "w":1.5}, + {"x":3.85, "y":4.1, "w":1.5}, + {"x":5.35, "y":4.1, "w":2}, + {"x":7.35, "y":4.1, "w":1.25}, + {"x":9.6, "y":4.1, "w":2.75}, + {"x":12.35, "y":4.1, "w":1.5}, + {"x":16.65, "y":4.1, "w":1.5} + ] + } + } +} diff --git a/qmk/layouts/default/alice/layout.json b/qmk/layouts/default/alice/layout.json new file mode 100644 index 00000000..b399ccf0 --- /dev/null +++ b/qmk/layouts/default/alice/layout.json @@ -0,0 +1,21 @@ +[{y:0.9,x:0.55,a:7},"",{x:2.15},"",{x:8.55},""], +[{y:-0.9,x:1.7},"","",{x:10.55},"",{w:2},""], +[{y:-0.1,x:0.35},""], +[{y:-0.95,x:12.95},""], +[{y:-0.95,x:1.5,w:1.5},"","",{x:9.95},"","",{w:1.5},""], +[{y:-0.1,x:0.15},""], +[{y:-0.9,x:1.3,w:1.75},"","",{x:9.35},"",{x:0},"",{w:2.25},""], +[{x:1.1,w:2.25},"","",{x:8.75},"","",{w:1.75},"",""], +[{x:1.1,w:1.5},"",{x:13.55,w:1.5},""], +[{r:12,y:-6,x:5},"","","",""], +[{x:4.5},"","","",""], +[{x:4.8},"","","",""], +[{x:5.3},"","","",""], +[{x:6.45,w:2},"",{w:1.25},""], +[{y:-0.95,x:4.95,w:1.5},""], +[{r:-12,y:-1.45,x:8.55},"","","",""], +[{x:8.05},"","","",""], +[{x:8.2},"","","",""], +[{x:7.75},"","","",""], +[{x:7.75,w:2.75},""], +[{y:-0.95,x:10.5,w:1.5},""] diff --git a/qmk/layouts/default/alice/readme.md b/qmk/layouts/default/alice/readme.md new file mode 100644 index 00000000..a52d4971 --- /dev/null +++ b/qmk/layouts/default/alice/readme.md @@ -0,0 +1,3 @@ +# alice + + LAYOUT_alice diff --git a/qmk/layouts/default/readme.md b/qmk/layouts/default/readme.md new file mode 100644 index 00000000..9e1e7cfb --- /dev/null +++ b/qmk/layouts/default/readme.md @@ -0,0 +1,734 @@ +# Community Layouts + +## Summary of Layouts + +### 60% Form Factor + +``` +LAYOUT_60_abnt2 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi_arrow +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_60_ansi_split_bs_rshift +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_60_hhkb +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + │ │ │ │ │ │ + └───┴─────┴───────────────────────────┴─────┴───┘ +``` + +``` +LAYOUT_60_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_iso_split_bs_rshift +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_iso_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_60_tsangan_hhkb +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_64_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_64_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### 65%+ Form Factor + +``` +LAYOUT_65_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker_split_bs +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_65_iso_blocker +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_iso_blocker_split_bs +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_66_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┬─┴─┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┼───┴┬──┴───┴───┴───┴───┴───┴─┬─┴──┬┴───┼────┬───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ +└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘ +``` + +``` +LAYOUT_66_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┬─┴─┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┼───┴┬──┴───┴───┴───┴───┴───┴─┬─┴──┬┴───┼────┬───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ +└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘ +``` + +``` +LAYOUT_68_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ ││ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬─┬──┴┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_68_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬─┬──┴┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘ +``` + +### 75% Form Factor + +``` +LAYOUT_75_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_75_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +### Tenkeyless Layouts + +``` +LAYOUT_tkl_ansi +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_tkl_iso +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ +``` + +### Fullsize Form Factor + +``` +LAYOUT_fullsize_ansi +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ +``` + +``` +LAYOUT_fullsize_iso +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ +``` + + +### Split Layouts + +``` +LAYOUT_alice + ┌───┐  ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ┌┴──┬┘ ┌┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┴┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +┌┴──┬┘ ┌┴─────┼───┼───┼───┼───┼───┤ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴──────┴┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ ┌┴──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───────┬──┴┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴──┐ ├───┴───┴──┬┴───┴┬──┴───┴──────┬──┴──┬┘ + │ │ │ │ │ │ │ │ │ │ │ + └─────┘ └─────┴───────┴─────┘ └──────────┴─────┘ └─────┘ +``` + +``` +LAYOUT_ergodox +┌─────┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┤ │ │ ├───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ ├───┤ ├───┤ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┤ │ │ ├───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─┬───┼───┼───┼───┼───┼───┴───┘ └───┴───┼───┼───┼───┼───┼───┬─┘ + │ │ │ │ │ │ ┌───┬───┐ ┌───┬───┐ │ │ │ │ │ │ + └───┴───┴───┴───┴───┘ │ │ │ │ │ │ └───┴───┴───┴───┴───┘ + ┌───┼───┼───┤ ├───┼───┼───┐ + │ │ │ │ │ │ │ │ + │ │ ├───┤ ├───┤ │ │ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +``` +LAYOUT_split_3x5_3 +┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + ┌───┬───┬───┐ ┌───┬───┬───┐ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +``` +LAYOUT_split_3x6_3 +┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┐ ┌───┬───┬───┐ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +### Numpads + +``` +LAYOUT_numpad_4x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_5x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_5x6 +┌───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ │ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ +├───┼───┼───┴───┼───┤ │ +│ │ │ │ │ │ +└───┴───┴───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_6x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +### Ortholinear Layouts + +``` +LAYOUT_ortho_3x10 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x10 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x12 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x12 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x14 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x15 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_6x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_planck_mit +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───────┴───┴───┴───┴───┴───┘ +``` diff --git a/qmk/lib/python/milc.py b/qmk/lib/python/milc.py index eb18984e..0cdd43dc 100644 --- a/qmk/lib/python/milc.py +++ b/qmk/lib/python/milc.py @@ -18,9 +18,11 @@ import logging import os import re import shlex +import subprocess import sys from decimal import Decimal from pathlib import Path +from platform import platform from tempfile import NamedTemporaryFile from time import sleep @@ -94,29 +96,54 @@ def format_ansi(text): return text + ansi_colors['style_reset_all'] -class ANSIFormatter(logging.Formatter): - """A log formatter that inserts ANSI color. +class ANSIFormatterMixin(object): + """A log formatter mixin that inserts ANSI color. """ def format(self, record): - msg = super(ANSIFormatter, self).format(record) + msg = super(ANSIFormatterMixin, self).format(record) return format_ansi(msg) -class ANSIEmojiLoglevelFormatter(ANSIFormatter): - """A log formatter that makes the loglevel an emoji on UTF capable terminals. +class ANSIStrippingMixin(object): + """A log formatter mixin that strips ANSI. + """ + def format(self, record): + msg = super(ANSIStrippingMixin, self).format(record) + record.levelname = ansi_escape.sub('', record.levelname) + return ansi_escape.sub('', msg) + + +class EmojiLoglevelMixin(object): + """A log formatter mixin that makes the loglevel an emoji on UTF capable terminals. """ def format(self, record): if UNICODE_SUPPORT: record.levelname = EMOJI_LOGLEVELS[record.levelname].format(**ansi_colors) - return super(ANSIEmojiLoglevelFormatter, self).format(record) + return super(EmojiLoglevelMixin, self).format(record) -class ANSIStrippingFormatter(ANSIFormatter): - """A log formatter that strips ANSI. +class ANSIFormatter(ANSIFormatterMixin, logging.Formatter): + """A log formatter that colorizes output. """ - def format(self, record): - msg = super(ANSIStrippingFormatter, self).format(record) - return ansi_escape.sub('', msg) + pass + + +class ANSIStrippingFormatter(ANSIStrippingMixin, ANSIFormatterMixin, logging.Formatter): + """A log formatter that strips ANSI + """ + pass + + +class ANSIEmojiLoglevelFormatter(EmojiLoglevelMixin, ANSIFormatterMixin, logging.Formatter): + """A log formatter that adds Emoji and ANSI + """ + pass + + +class ANSIStrippingEmojiLoglevelFormatter(ANSIStrippingMixin, EmojiLoglevelMixin, ANSIFormatterMixin, logging.Formatter): + """A log formatter that adds Emoji and strips ANSI + """ + pass class Configuration(object): @@ -288,11 +315,12 @@ class MILC(object): self.config_file = None self.default_arguments = {} self.version = 'unknown' - self.release_lock() + self.platform = platform() # Figure out our program name self.prog_name = sys.argv[0][:-3] if sys.argv[0].endswith('.py') else sys.argv[0] self.prog_name = self.prog_name.split('/')[-1] + self.release_lock() # Initialize all the things self.read_config_file() @@ -315,6 +343,8 @@ class MILC(object): strings. If *args or **kwargs are passed they will be used to %-format the strings. + + If `self.config.general.color` is False any ANSI escape sequences in the text will be stripped. """ if args and kwargs: raise RuntimeError('You can only specify *args or **kwargs, not both!') @@ -322,8 +352,27 @@ class MILC(object): args = args or kwargs text = format_ansi(text) + if not self.config.general.color: + text = ansi_escape.sub('', text) + print(text % args) + def run(self, command, *args, **kwargs): + """Run a command with subprocess.run + The *args and **kwargs arguments get passed directly to `subprocess.run`. + """ + if isinstance(command, str): + raise TypeError('`command` must be a non-text sequence such as list or tuple.') + + if 'windows' in self.platform.lower(): + safecmd = map(shlex.quote, command) + safecmd = ' '.join(safecmd) + command = [os.environ['SHELL'], '-c', safecmd] + + self.log.debug('Running command: %s', command) + + return subprocess.run(command, *args, **kwargs) + def initialize_argparse(self): """Prepare to process arguments from sys.argv. """ @@ -678,14 +727,13 @@ class MILC(object): self.log_print_level = logging.DEBUG self.log_file = self.config['general']['log_file'] or self.log_file - self.log_file_format = self.config['general']['log_file_fmt'] self.log_file_format = ANSIStrippingFormatter(self.config['general']['log_file_fmt'], self.config['general']['datetime_fmt']) self.log_format = self.config['general']['log_fmt'] if self.config.general.color: - self.log_format = ANSIEmojiLoglevelFormatter(self.args.log_fmt, self.config.general.datetime_fmt) + self.log_format = ANSIEmojiLoglevelFormatter(self.config.general.log_fmt, self.config.general.datetime_fmt) else: - self.log_format = ANSIStrippingFormatter(self.args.log_fmt, self.config.general.datetime_fmt) + self.log_format = ANSIStrippingEmojiLoglevelFormatter(self.config.general.log_fmt, self.config.general.datetime_fmt) if self.log_file: self.log_file_handler = logging.FileHandler(self.log_file, self.log_file_mode) diff --git a/qmk/lib/python/qmk/cli/__init__.py b/qmk/lib/python/qmk/cli/__init__.py index 47f60c60..47e1b443 100644 --- a/qmk/lib/python/qmk/cli/__init__.py +++ b/qmk/lib/python/qmk/cli/__init__.py @@ -6,12 +6,14 @@ import sys from milc import cli +from . import c2json from . import cformat from . import compile from . import config from . import docs from . import doctor from . import flash +from . import generate from . import hello from . import info from . import json diff --git a/qmk/lib/python/qmk/cli/c2json.py b/qmk/lib/python/qmk/cli/c2json.py new file mode 100644 index 00000000..8c8bd1f5 --- /dev/null +++ b/qmk/lib/python/qmk/cli/c2json.py @@ -0,0 +1,62 @@ +"""Generate a keymap.json from a keymap.c file. +""" +import json +import sys + +from milc import cli + +import qmk.keymap +import qmk.path + + +@cli.argument('--no-cpp', arg_only=True, action='store_false', help='Do not use \'cpp\' on keymap.c') +@cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to') +@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") +@cli.argument('-kb', '--keyboard', arg_only=True, required=True, help='The keyboard\'s name') +@cli.argument('-km', '--keymap', arg_only=True, required=True, help='The keymap\'s name') +@cli.argument('filename', arg_only=True, help='keymap.c file') +@cli.subcommand('Creates a keymap.json from a keymap.c file.') +def c2json(cli): + """Generate a keymap.json from a keymap.c file. + + This command uses the `qmk.keymap` module to generate a keymap.json from a keymap.c file. The generated keymap is written to stdout, or to a file if -o is provided. + """ + cli.args.filename = qmk.path.normpath(cli.args.filename) + + # Error checking + if not cli.args.filename.exists(): + cli.log.error('C file does not exist!') + cli.print_usage() + exit(1) + + if str(cli.args.filename) == '-': + # TODO(skullydazed/anyone): Read file contents from STDIN + cli.log.error('Reading from STDIN is not (yet) supported.') + cli.print_usage() + exit(1) + + # Environment processing + if cli.args.output == ('-'): + cli.args.output = None + + # Parse the keymap.c + keymap_json = qmk.keymap.c2json(cli.args.keyboard, cli.args.keymap, cli.args.filename, use_cpp=cli.args.no_cpp) + + # Generate the keymap.json + try: + keymap_json = qmk.keymap.generate_json(keymap_json['keymap'], keymap_json['keyboard'], keymap_json['layout'], keymap_json['layers']) + except KeyError: + cli.log.error('Something went wrong. Try to use --no-cpp.') + sys.exit(1) + + if cli.args.output: + cli.args.output.parent.mkdir(parents=True, exist_ok=True) + if cli.args.output.exists(): + cli.args.output.replace(cli.args.output.name + '.bak') + cli.args.output.write_text(json.dumps(keymap_json)) + + if not cli.args.quiet: + cli.log.info('Wrote keymap to %s.', cli.args.output) + + else: + print(json.dumps(keymap_json)) diff --git a/qmk/lib/python/qmk/cli/doctor.py b/qmk/lib/python/qmk/cli/doctor.py index 4d7ba521..caa98a71 100644 --- a/qmk/lib/python/qmk/cli/doctor.py +++ b/qmk/lib/python/qmk/cli/doctor.py @@ -10,6 +10,7 @@ from pathlib import Path from milc import cli from qmk import submodules +from qmk.constants import QMK_FIRMWARE from qmk.questions import yesno from qmk.commands import run @@ -57,7 +58,7 @@ def parse_gcc_version(version): return { 'major': int(m.group(1)), 'minor': int(m.group(2)) if m.group(2) else 0, - 'patch': int(m.group(3)) if m.group(3) else 0 + 'patch': int(m.group(3)) if m.group(3) else 0, } @@ -149,25 +150,50 @@ def check_udev_rules(): ok = True udev_dir = Path("/etc/udev/rules.d/") desired_rules = { - 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")}, - 'input_club': {_udev_rule("1c11", "b007")}, - 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")}, - 'bootloadhid': {_udev_rule("16c0", "05df")}, + 'atmel-dfu': { + _udev_rule("03EB", "2FEF"), # ATmega16U2 + _udev_rule("03EB", "2FF0"), # ATmega32U2 + _udev_rule("03EB", "2FF3"), # ATmega16U4 + _udev_rule("03EB", "2FF4"), # ATmega32U4 + _udev_rule("03EB", "2FF9"), # AT90USB64 + _udev_rule("03EB", "2FFB") # AT90USB128 + }, + 'kiibohd': {_udev_rule("1C11", "B007")}, + 'stm32': { + _udev_rule("1EAF", "0003"), # STM32duino + _udev_rule("0483", "DF11") # STM32 DFU + }, + 'bootloadhid': {_udev_rule("16C0", "05DF")}, + 'usbasploader': {_udev_rule("16C0", "05DC")}, + 'massdrop': {_udev_rule("03EB", "6124", 'ENV{ID_MM_DEVICE_IGNORE}="1"')}, 'caterina': { - _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"') + # Spark Fun Electronics + _udev_rule("1B4F", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz + _udev_rule("1B4F", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz + _udev_rule("1B4F", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) + # Pololu Electronics + _udev_rule("1FFB", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 + # Arduino SA + _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro + # Adafruit Industries LLC + _udev_rule("239A", "000C", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 + _udev_rule("239A", "000D", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz + _udev_rule("239A", "000E", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz + # dog hunter AG + _udev_rule("2A03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2A03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro } } # These rules are no longer recommended, only use them to check for their presence. deprecated_rules = { - 'dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, - 'input_club': {_deprecated_udev_rule("1c11")}, + 'atmel-dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, + 'kiibohd': {_deprecated_udev_rule("1c11")}, 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, - 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'} + 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, + 'tmk': {_deprecated_udev_rule("feed")} } if udev_dir.exists(): @@ -193,7 +219,7 @@ def check_udev_rules(): if deprecated_rule and deprecated_rule.issubset(current_rules): cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. See https://docs.qmk.fm/#/faq_build?id=linux-udev-rules for more details.", bootloader) return ok @@ -291,6 +317,8 @@ def doctor(cli): cli.log.error('Unsupported OS detected: %s', platform_id) ok = False + cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) + # Make sure the basic CLI tools we need are available and can be executed. bin_ok = check_binaries() @@ -328,3 +356,5 @@ def doctor(cli): else: cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.') # FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something + + return ok diff --git a/qmk/lib/python/qmk/cli/generate/__init__.py b/qmk/lib/python/qmk/cli/generate/__init__.py new file mode 100644 index 00000000..4dc7607e --- /dev/null +++ b/qmk/lib/python/qmk/cli/generate/__init__.py @@ -0,0 +1 @@ +from . import api diff --git a/qmk/lib/python/qmk/cli/generate/api.py b/qmk/lib/python/qmk/cli/generate/api.py new file mode 100644 index 00000000..9807a9cd --- /dev/null +++ b/qmk/lib/python/qmk/cli/generate/api.py @@ -0,0 +1,58 @@ +"""This script automates the generation of the QMK API data. +""" +from pathlib import Path +from shutil import copyfile +import json + +from milc import cli + +from qmk.datetime import current_datetime +from qmk.info import info_json +from qmk.keyboard import list_keyboards + + +@cli.subcommand('Creates a new keymap for the keyboard of your choosing', hidden=False if cli.config.user.developer else True) +def generate_api(cli): + """Generates the QMK API data. + """ + api_data_dir = Path('api_data') + v1_dir = api_data_dir / 'v1' + keyboard_list = v1_dir / 'keyboard_list.json' + keyboard_all = v1_dir / 'keyboards.json' + usb_file = v1_dir / 'usb.json' + + if not api_data_dir.exists(): + api_data_dir.mkdir() + + kb_all = {'last_updated': current_datetime(), 'keyboards': {}} + usb_list = {'last_updated': current_datetime(), 'devices': {}} + + # Generate and write keyboard specific JSON files + for keyboard_name in list_keyboards(): + kb_all['keyboards'][keyboard_name] = info_json(keyboard_name) + keyboard_dir = v1_dir / 'keyboards' / keyboard_name + keyboard_info = keyboard_dir / 'info.json' + keyboard_readme = keyboard_dir / 'readme.md' + keyboard_readme_src = Path('keyboards') / keyboard_name / 'readme.md' + + keyboard_dir.mkdir(parents=True, exist_ok=True) + keyboard_info.write_text(json.dumps(kb_all['keyboards'][keyboard_name])) + + if keyboard_readme_src.exists(): + copyfile(keyboard_readme_src, keyboard_readme) + + if 'usb' in kb_all['keyboards'][keyboard_name]: + usb = kb_all['keyboards'][keyboard_name]['usb'] + + if usb['vid'] not in usb_list['devices']: + usb_list['devices'][usb['vid']] = {} + + if usb['pid'] not in usb_list['devices'][usb['vid']]: + usb_list['devices'][usb['vid']][usb['pid']] = {} + + usb_list['devices'][usb['vid']][usb['pid']][keyboard_name] = usb + + # Write the global JSON files + keyboard_list.write_text(json.dumps({'last_updated': current_datetime(), 'keyboards': sorted(kb_all['keyboards'])})) + keyboard_all.write_text(json.dumps(kb_all)) + usb_file.write_text(json.dumps(usb_list)) diff --git a/qmk/lib/python/qmk/cli/info.py b/qmk/lib/python/qmk/cli/info.py index 5e4b3914..44ce1186 100644 --- a/qmk/lib/python/qmk/cli/info.py +++ b/qmk/lib/python/qmk/cli/info.py @@ -16,7 +16,7 @@ ROW_LETTERS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop' COL_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijilmnopqrstuvwxyz' -def show_keymap(info_json, title_caps=True): +def show_keymap(kb_info_json, title_caps=True): """Render the keymap in ascii art. """ keymap_path = locate_keymap(cli.config.info.keyboard, cli.config.info.keymap) @@ -36,7 +36,7 @@ def show_keymap(info_json, title_caps=True): else: cli.echo('{fg_cyan}layer_%s{fg_reset}:', layer_num) - print(render_layout(info_json['layouts'][layout_name]['layout'], layer)) + print(render_layout(kb_info_json['layouts'][layout_name]['layout'], layer)) def show_layouts(kb_info_json, title_caps=True): @@ -48,10 +48,10 @@ def show_layouts(kb_info_json, title_caps=True): print(layout_art) # Avoid passing dirty data to cli.echo() -def show_matrix(info_json, title_caps=True): +def show_matrix(kb_info_json, title_caps=True): """Render the layout with matrix labels in ascii art. """ - for layout_name, layout in info_json['layouts'].items(): + for layout_name, layout in kb_info_json['layouts'].items(): # Build our label list labels = [] for key in layout['layout']: @@ -69,54 +69,54 @@ def show_matrix(info_json, title_caps=True): else: cli.echo('{fg_blue}matrix_%s{fg_reset}:', layout_name) - print(render_layout(info_json['layouts'][layout_name]['layout'], labels)) + print(render_layout(kb_info_json['layouts'][layout_name]['layout'], labels)) -def print_friendly_output(info_json): +def print_friendly_output(kb_info_json): """Print the info.json in a friendly text format. """ - cli.echo('{fg_blue}Keyboard Name{fg_reset}: %s', info_json.get('keyboard_name', 'Unknown')) - cli.echo('{fg_blue}Manufacturer{fg_reset}: %s', info_json.get('manufacturer', 'Unknown')) - if 'url' in info_json: - cli.echo('{fg_blue}Website{fg_reset}: %s', info_json.get('url', '')) - if info_json.get('maintainer', 'qmk') == 'qmk': + cli.echo('{fg_blue}Keyboard Name{fg_reset}: %s', kb_info_json.get('keyboard_name', 'Unknown')) + cli.echo('{fg_blue}Manufacturer{fg_reset}: %s', kb_info_json.get('manufacturer', 'Unknown')) + if 'url' in kb_info_json: + cli.echo('{fg_blue}Website{fg_reset}: %s', kb_info_json.get('url', '')) + if kb_info_json.get('maintainer', 'qmk') == 'qmk': cli.echo('{fg_blue}Maintainer{fg_reset}: QMK Community') else: - cli.echo('{fg_blue}Maintainer{fg_reset}: %s', info_json['maintainer']) - cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', info_json.get('keyboard_folder', 'Unknown')) - cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(info_json['layouts'].keys()))) - if 'width' in info_json and 'height' in info_json: - cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (info_json['width'], info_json['height'])) - cli.echo('{fg_blue}Processor{fg_reset}: %s', info_json.get('processor', 'Unknown')) - cli.echo('{fg_blue}Bootloader{fg_reset}: %s', info_json.get('bootloader', 'Unknown')) + cli.echo('{fg_blue}Maintainer{fg_reset}: %s', kb_info_json['maintainer']) + cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', kb_info_json.get('keyboard_folder', 'Unknown')) + cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) + if 'width' in kb_info_json and 'height' in kb_info_json: + cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (kb_info_json['width'], kb_info_json['height'])) + cli.echo('{fg_blue}Processor{fg_reset}: %s', kb_info_json.get('processor', 'Unknown')) + cli.echo('{fg_blue}Bootloader{fg_reset}: %s', kb_info_json.get('bootloader', 'Unknown')) if cli.config.info.layouts: - show_layouts(info_json, True) + show_layouts(kb_info_json, True) if cli.config.info.matrix: - show_matrix(info_json, True) + show_matrix(kb_info_json, True) if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': - show_keymap(info_json, True) + show_keymap(kb_info_json, True) -def print_text_output(info_json): +def print_text_output(kb_info_json): """Print the info.json in a plain text format. """ - for key in sorted(info_json): + for key in sorted(kb_info_json): if key == 'layouts': - cli.echo('{fg_blue}layouts{fg_reset}: %s', ', '.join(sorted(info_json['layouts'].keys()))) + cli.echo('{fg_blue}layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) else: - cli.echo('{fg_blue}%s{fg_reset}: %s', key, info_json[key]) + cli.echo('{fg_blue}%s{fg_reset}: %s', key, kb_info_json[key]) if cli.config.info.layouts: - show_layouts(info_json, False) + show_layouts(kb_info_json, False) if cli.config.info.matrix: - show_matrix(info_json, False) + show_matrix(kb_info_json, False) if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': - show_keymap(info_json, False) + show_keymap(kb_info_json, False) @cli.argument('-kb', '--keyboard', help='Keyboard to show info for.') @@ -134,11 +134,11 @@ def info(cli): if not cli.config.info.keyboard: cli.log.error('Missing paramater: --keyboard') cli.subcommands['info'].print_help() - exit(1) + return False if not is_keyboard(cli.config.info.keyboard): cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard) - exit(1) + return False # Build the info.json file kb_info_json = info_json(cli.config.info.keyboard) @@ -146,13 +146,10 @@ def info(cli): # Output in the requested format if cli.args.format == 'json': print(json.dumps(kb_info_json)) - exit() - - if cli.args.format == 'text': + elif cli.args.format == 'text': print_text_output(kb_info_json) - elif cli.args.format == 'friendly': print_friendly_output(kb_info_json) - else: cli.log.error('Unknown format: %s', cli.args.format) + return False diff --git a/qmk/lib/python/qmk/cli/json/keymap.py b/qmk/lib/python/qmk/cli/json/keymap.py index c97a2d04..2af9faaa 100644 --- a/qmk/lib/python/qmk/cli/json/keymap.py +++ b/qmk/lib/python/qmk/cli/json/keymap.py @@ -13,4 +13,4 @@ def json_keymap(cli): """Renamed to `qmk json2c`. """ cli.log.error('This command has been renamed to `qmk json2c`.') - exit(1) + return False diff --git a/qmk/lib/python/qmk/cli/json2c.py b/qmk/lib/python/qmk/cli/json2c.py index af0d80a9..42607806 100644 --- a/qmk/lib/python/qmk/cli/json2c.py +++ b/qmk/lib/python/qmk/cli/json2c.py @@ -22,12 +22,12 @@ def json2c(cli): # TODO(skullydazed/anyone): Read file contents from STDIN cli.log.error('Reading from STDIN is not (yet) supported.') cli.print_usage() - exit(1) + return False if not cli.args.filename.exists(): cli.log.error('JSON file does not exist!') cli.print_usage() - exit(1) + return False # Environment processing if cli.args.output and cli.args.output.name == '-': @@ -38,7 +38,7 @@ def json2c(cli): user_keymap = json.load(fd) # Generate the keymap - keymap_c = qmk.keymap.generate(user_keymap['keyboard'], user_keymap['layout'], user_keymap['layers']) + keymap_c = qmk.keymap.generate_c(user_keymap['keyboard'], user_keymap['layout'], user_keymap['layers']) if cli.args.output: cli.args.output.parent.mkdir(parents=True, exist_ok=True) diff --git a/qmk/lib/python/qmk/cli/kle2json.py b/qmk/lib/python/qmk/cli/kle2json.py index 798f95fd..3d1bb8c4 100644 --- a/qmk/lib/python/qmk/cli/kle2json.py +++ b/qmk/lib/python/qmk/cli/kle2json.py @@ -37,7 +37,8 @@ def kle2json(cli): file_path = Path(os.environ['ORIG_CWD'], cli.args.filename) # Check for valid file_path for more graceful failure if not file_path.exists(): - return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path) + cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path) + return False out_path = file_path.parent raw_code = file_path.open().read() # Check if info.json exists, allow overwrite with force @@ -50,8 +51,7 @@ def kle2json(cli): except Exception as e: cli.log.error('Could not parse KLE raw data: %s', raw_code) cli.log.exception(e) - # FIXME: This should be better - return cli.log.error('Could not parse KLE raw data.') + return False keyboard = OrderedDict( keyboard_name=kle.name, url='', diff --git a/qmk/lib/python/qmk/cli/list/keyboards.py b/qmk/lib/python/qmk/cli/list/keyboards.py index ca0c5661..8b6c4516 100644 --- a/qmk/lib/python/qmk/cli/list/keyboards.py +++ b/qmk/lib/python/qmk/cli/list/keyboards.py @@ -1,28 +1,13 @@ """List the keyboards currently defined within QMK """ -# We avoid pathlib here because this is performance critical code. -import os -import glob - from milc import cli -BASE_PATH = os.path.join(os.getcwd(), "keyboards") + os.path.sep -KB_WILDCARD = os.path.join(BASE_PATH, "**", "rules.mk") - - -def find_name(path): - """Determine the keyboard name by stripping off the base_path and rules.mk. - """ - return path.replace(BASE_PATH, "").replace(os.path.sep + "rules.mk", "") +import qmk.keyboard @cli.subcommand("List the keyboards currently defined within QMK") def list_keyboards(cli): """List the keyboards currently defined within QMK """ - # find everywhere we have rules.mk where keymaps isn't in the path - paths = [path for path in glob.iglob(KB_WILDCARD, recursive=True) if 'keymaps' not in path] - - # Extract the keyboard name from the path and print it - for keyboard_name in sorted(map(find_name, paths)): + for keyboard_name in qmk.keyboard.list_keyboards(): print(keyboard_name) diff --git a/qmk/lib/python/qmk/cli/list/keymaps.py b/qmk/lib/python/qmk/cli/list/keymaps.py index b18289eb..49bc84b2 100644 --- a/qmk/lib/python/qmk/cli/list/keymaps.py +++ b/qmk/lib/python/qmk/cli/list/keymaps.py @@ -15,7 +15,7 @@ def list_keymaps(cli): """ if not is_keyboard(cli.config.list_keymaps.keyboard): cli.log.error('Keyboard %s does not exist!', cli.config.list_keymaps.keyboard) - exit(1) + return False for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard): print(name) diff --git a/qmk/lib/python/qmk/cli/new/keymap.py b/qmk/lib/python/qmk/cli/new/keymap.py index 474fe797..52c56499 100644 --- a/qmk/lib/python/qmk/cli/new/keymap.py +++ b/qmk/lib/python/qmk/cli/new/keymap.py @@ -29,15 +29,15 @@ def new_keymap(cli): # check directories if not kb_path.exists(): cli.log.error('Keyboard %s does not exist!', kb_path) - exit(1) + return False if not keymap_path_default.exists(): cli.log.error('Keyboard default %s does not exist!', keymap_path_default) - exit(1) + return False if keymap_path_new.exists(): cli.log.error('Keymap %s already exists!', keymap_path_new) - exit(1) + return False # create user directory with default keymap files shutil.copytree(keymap_path_default, keymap_path_new, symlinks=True) diff --git a/qmk/lib/python/qmk/commands.py b/qmk/lib/python/qmk/commands.py index 4db4667a..4ec7d2ea 100644 --- a/qmk/lib/python/qmk/commands.py +++ b/qmk/lib/python/qmk/commands.py @@ -7,7 +7,6 @@ import subprocess import shlex import shutil -from milc import cli import qmk.keymap @@ -80,10 +79,9 @@ def run(command, *args, **kwargs): raise TypeError('`command` must be a non-text sequence such as list or tuple.') if 'windows' in platform_id: - safecmd = map(shlex.quote, command) + safecmd = map(str, command) + safecmd = map(shlex.quote, safecmd) safecmd = ' '.join(safecmd) command = [os.environ['SHELL'], '-c', safecmd] - cli.log.debug('Running command: %s', command) - return subprocess.run(command, *args, **kwargs) diff --git a/qmk/lib/python/qmk/constants.py b/qmk/lib/python/qmk/constants.py index 36a20adf..94ab68e5 100644 --- a/qmk/lib/python/qmk/constants.py +++ b/qmk/lib/python/qmk/constants.py @@ -9,7 +9,11 @@ QMK_FIRMWARE = Path.cwd() MAX_KEYBOARD_SUBFOLDERS = 5 # Supported processor types -ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303' -AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None -ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS -VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85' +CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411' +LUFA_PROCESSORS = 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None +VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85' + +# Common format strings +DATE_FORMAT = '%Y-%m-%d' +DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z' +TIME_FORMAT = '%H:%M:%S' diff --git a/qmk/lib/python/qmk/datetime.py b/qmk/lib/python/qmk/datetime.py new file mode 100644 index 00000000..4bffcc62 --- /dev/null +++ b/qmk/lib/python/qmk/datetime.py @@ -0,0 +1,29 @@ +"""Functions to work with dates and times in a uniform way. + +The results of these functions are cached for 5 seconds to provide uniform time strings across short running processes. Long running processes that need more precise timekeeping should not use these functions. +""" +from time import gmtime, strftime + +from qmk.constants import DATE_FORMAT, DATETIME_FORMAT, TIME_FORMAT +from qmk.decorators import lru_cache + + +@lru_cache(timeout=5) +def current_date(): + """Returns the current time in UTZ as a formatted string. + """ + return strftime(DATE_FORMAT, gmtime()) + + +@lru_cache(timeout=5) +def current_datetime(): + """Returns the current time in UTZ as a formatted string. + """ + return strftime(DATETIME_FORMAT, gmtime()) + + +@lru_cache(timeout=5) +def current_time(): + """Returns the current time in UTZ as a formatted string. + """ + return strftime(TIME_FORMAT, gmtime()) diff --git a/qmk/lib/python/qmk/decorators.py b/qmk/lib/python/qmk/decorators.py index f8f2facb..629402b0 100644 --- a/qmk/lib/python/qmk/decorators.py +++ b/qmk/lib/python/qmk/decorators.py @@ -2,6 +2,7 @@ """ import functools from pathlib import Path +from time import monotonic from milc import cli @@ -84,3 +85,38 @@ def automagic_keymap(func): return func(*args, **kwargs) return wrapper + + +def lru_cache(timeout=10, maxsize=128, typed=False): + """Least Recently Used Cache- cache the result of a function. + + Args: + + timeout + How many seconds to cache results for. + + maxsize + The maximum size of the cache in bytes + + typed + When `True` argument types will be taken into consideration, for example `3` and `3.0` will be treated as different keys. + """ + def wrapper_cache(func): + func = functools.lru_cache(maxsize=maxsize, typed=typed)(func) + func.expiration = monotonic() + timeout + + @functools.wraps(func) + def wrapped_func(*args, **kwargs): + if monotonic() >= func.expiration: + func.expiration = monotonic() + timeout + + func.cache_clear() + + return func(*args, **kwargs) + + wrapped_func.cache_info = func.cache_info + wrapped_func.cache_clear = func.cache_clear + + return wrapped_func + + return wrapper_cache diff --git a/qmk/lib/python/qmk/info.py b/qmk/lib/python/qmk/info.py index de7632e3..e92c3335 100644 --- a/qmk/lib/python/qmk/info.py +++ b/qmk/lib/python/qmk/info.py @@ -6,26 +6,41 @@ from pathlib import Path from milc import cli -from qmk.constants import ARM_PROCESSORS, AVR_PROCESSORS, VUSB_PROCESSORS +from qmk.constants import CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS from qmk.c_parse import find_layouts from qmk.keyboard import config_h, rules_mk +from qmk.keymap import list_keymaps +from qmk.makefile import parse_rules_mk_file from qmk.math import compute def info_json(keyboard): """Generate the info.json data for a specific keyboard. """ + cur_dir = Path('keyboards') + rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk') + if 'DEFAULT_FOLDER' in rules: + keyboard = rules['DEFAULT_FOLDER'] + rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk', rules) + info_data = { 'keyboard_name': str(keyboard), 'keyboard_folder': str(keyboard), + 'keymaps': {}, 'layouts': {}, 'maintainer': 'qmk', } - for layout_name, layout_json in _find_all_layouts(keyboard).items(): + # Populate the list of JSON keymaps + for keymap in list_keymaps(keyboard, c=False, fullpath=True): + info_data['keymaps'][keymap.name] = {'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap}/keymap.json'} + + # Populate layout data + for layout_name, layout_json in _find_all_layouts(keyboard, rules).items(): if not layout_name.startswith('LAYOUT_kc'): info_data['layouts'][layout_name] = layout_json + # Merge in the data from info.json, config.h, and rules.mk info_data = merge_info_jsons(keyboard, info_data) info_data = _extract_config_h(info_data) info_data = _extract_rules_mk(info_data) @@ -88,9 +103,9 @@ def _extract_rules_mk(info_data): rules = rules_mk(info_data['keyboard_folder']) mcu = rules.get('MCU') - if mcu in ARM_PROCESSORS: + if mcu in CHIBIOS_PROCESSORS: arm_processor_rules(info_data, rules) - elif mcu in AVR_PROCESSORS: + elif mcu in LUFA_PROCESSORS + VUSB_PROCESSORS: avr_processor_rules(info_data, rules) else: cli.log.warning("%s: Unknown MCU: %s" % (info_data['keyboard_folder'], mcu)) @@ -99,22 +114,24 @@ def _extract_rules_mk(info_data): return info_data -def _find_all_layouts(keyboard): - """Looks for layout macros associated with this keyboard. - """ - layouts = {} - rules = rules_mk(keyboard) - keyboard_path = Path(rules.get('DEFAULT_FOLDER', keyboard)) - - # Pull in all layouts defined in the standard files +def _search_keyboard_h(path): current_path = Path('keyboards/') - for directory in keyboard_path.parts: + layouts = {} + for directory in path.parts: current_path = current_path / directory keyboard_h = '%s.h' % (directory,) keyboard_h_path = current_path / keyboard_h if keyboard_h_path.exists(): layouts.update(find_layouts(keyboard_h_path)) + return layouts + + +def _find_all_layouts(keyboard, rules): + """Looks for layout macros associated with this keyboard. + """ + layouts = _search_keyboard_h(Path(keyboard)) + if not layouts: # If we didn't find any layouts above we widen our search. This is error # prone which is why we want to encourage people to follow the standard above. @@ -152,8 +169,6 @@ def arm_processor_rules(info_data, rules): if info_data['bootloader'] == 'unknown': if 'STM32' in info_data['processor']: info_data['bootloader'] = 'stm32-dfu' - elif info_data.get('manufacturer') == 'Input Club': - info_data['bootloader'] = 'kiibohd-dfu' if 'STM32' in info_data['processor']: info_data['platform'] = 'STM32' diff --git a/qmk/lib/python/qmk/keyboard.py b/qmk/lib/python/qmk/keyboard.py index d1f2a301..9ebb2d77 100644 --- a/qmk/lib/python/qmk/keyboard.py +++ b/qmk/lib/python/qmk/keyboard.py @@ -3,10 +3,30 @@ from array import array from math import ceil from pathlib import Path +import os +from glob import glob from qmk.c_parse import parse_config_h_file from qmk.makefile import parse_rules_mk_file +base_path = os.path.join(os.getcwd(), "keyboards") + os.path.sep + + +def _find_name(path): + """Determine the keyboard name by stripping off the base_path and rules.mk. + """ + return path.replace(base_path, "").replace(os.path.sep + "rules.mk", "") + + +def list_keyboards(): + """Returns a list of all keyboards. + """ + # We avoid pathlib here because this is performance critical code. + kb_wildcard = os.path.join(base_path, "**", "rules.mk") + paths = [path for path in glob(kb_wildcard, recursive=True) if 'keymaps' not in path] + + return sorted(map(_find_name, paths)) + def config_h(keyboard): """Parses all the config.h files for a keyboard. diff --git a/qmk/lib/python/qmk/keymap.py b/qmk/lib/python/qmk/keymap.py index 78510a8a..31c61ae6 100644 --- a/qmk/lib/python/qmk/keymap.py +++ b/qmk/lib/python/qmk/keymap.py @@ -1,11 +1,18 @@ """Functions that help you work with QMK keymaps. """ from pathlib import Path +import json +import subprocess + +from pygments.lexers.c_cpp import CLexer +from pygments.token import Token +from pygments import lex from milc import cli from qmk.keyboard import rules_mk import qmk.path +import qmk.commands # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H @@ -22,22 +29,39 @@ __KEYMAP_GOES_HERE__ """ -def template(keyboard): - """Returns the `keymap.c` template for a keyboard. +def template_json(keyboard): + """Returns a `keymap.json` template for a keyboard. - If a template exists in `keyboards//templates/keymap.c` that - text will be used instead of `DEFAULT_KEYMAP_C`. + If a template exists in `keyboards//templates/keymap.json` that text will be used instead of an empty dictionary. + + Args: + keyboard + The keyboard to return a template for. + """ + template_file = Path('keyboards/%s/templates/keymap.json' % keyboard) + template = {'keyboard': keyboard} + if template_file.exists(): + template.update(json.loads(template_file.read_text())) + + return template + + +def template_c(keyboard): + """Returns a `keymap.c` template for a keyboard. + + If a template exists in `keyboards//templates/keymap.c` that text will be used instead of an empty dictionary. Args: keyboard The keyboard to return a template for. """ template_file = Path('keyboards/%s/templates/keymap.c' % keyboard) - if template_file.exists(): - return template_file.read_text() + template = template_file.read_text() + else: + template = DEFAULT_KEYMAP_C - return DEFAULT_KEYMAP_C + return template def _strip_any(keycode): @@ -49,16 +73,66 @@ def _strip_any(keycode): return keycode -def is_keymap_dir(keymap): +def is_keymap_dir(keymap, c=True, json=True, additional_files=None): """Return True if Path object `keymap` has a keymap file inside. + + Args: + keymap + A Path() object for the keymap directory you want to check. + + c + When true include `keymap.c` keymaps. + + json + When true include `keymap.json` keymaps. + + additional_files + A sequence of additional filenames to check against to determine if a directory is a keymap. All files must exist for a match to happen. For example, if you want to match a C keymap with both a `config.h` and `rules.mk` file: `is_keymap_dir(keymap_dir, json=False, additional_files=['config.h', 'rules.mk'])` """ - for file in ('keymap.c', 'keymap.json'): + files = [] + + if c: + files.append('keymap.c') + + if json: + files.append('keymap.json') + + for file in files: if (keymap / file).is_file(): + if additional_files: + for file in additional_files: + if not (keymap / file).is_file(): + return False + return True -def generate(keyboard, layout, layers): - """Returns a keymap.c for the specified keyboard, layout, and layers. +def generate_json(keymap, keyboard, layout, layers): + """Returns a `keymap.json` for the specified keyboard, layout, and layers. + + Args: + keymap + A name for this keymap. + + keyboard + The name of the keyboard. + + layout + The LAYOUT macro this keymap uses. + + layers + An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. + """ + new_keymap = template_json(keyboard) + new_keymap['keymap'] = keymap + new_keymap['layout'] = layout + new_keymap['layers'] = layers + + return new_keymap + + +def generate_c(keyboard, layout, layers): + """Returns a `keymap.c` or `keymap.json` for the specified keyboard, layout, and layers. Args: keyboard @@ -70,20 +144,53 @@ def generate(keyboard, layout, layers): layers An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. """ + new_keymap = template_c(keyboard) layer_txt = [] - for layer_num, layer in enumerate(layers): if layer_num != 0: layer_txt[-1] = layer_txt[-1] + ',' - layer = map(_strip_any, layer) layer_keys = ', '.join(layer) layer_txt.append('\t[%s] = %s(%s)' % (layer_num, layout, layer_keys)) keymap = '\n'.join(layer_txt) - keymap_c = template(keyboard) + new_keymap = new_keymap.replace('__KEYMAP_GOES_HERE__', keymap) - return keymap_c.replace('__KEYMAP_GOES_HERE__', keymap) + return new_keymap + + +def write_file(keymap_filename, keymap_content): + keymap_filename.parent.mkdir(parents=True, exist_ok=True) + keymap_filename.write_text(keymap_content) + + cli.log.info('Wrote keymap to {fg_cyan}%s', keymap_filename) + + return keymap_filename + + +def write_json(keyboard, keymap, layout, layers): + """Generate the `keymap.json` and write it to disk. + + Returns the filename written to. + + Args: + keyboard + The name of the keyboard + + keymap + The name of the keymap + + layout + The LAYOUT macro this keymap uses. + + layers + An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. + """ + keymap_json = generate_json(keyboard, keymap, layout, layers) + keymap_content = json.dumps(keymap_json) + keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.json' + + return write_file(keymap_file, keymap_content) def write(keyboard, keymap, layout, layers): @@ -104,15 +211,10 @@ def write(keyboard, keymap, layout, layers): layers An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. """ - keymap_c = generate(keyboard, layout, layers) + keymap_content = generate_c(keyboard, layout, layers) keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c' - keymap_file.parent.mkdir(parents=True, exist_ok=True) - keymap_file.write_text(keymap_c) - - cli.log.info('Wrote keymap to {fg_cyan}%s', keymap_file) - - return keymap_file + return write_file(keymap_file, keymap_content) def locate_keymap(keyboard, keymap): @@ -154,37 +256,246 @@ def locate_keymap(keyboard, keymap): return community_layout / 'keymap.c' -def list_keymaps(keyboard): - """ List the available keymaps for a keyboard. +def list_keymaps(keyboard, c=True, json=True, additional_files=None, fullpath=False): + """List the available keymaps for a keyboard. Args: - keyboard: the keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3 + keyboard + The keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3 + + c + When true include `keymap.c` keymaps. + + json + When true include `keymap.json` keymaps. + + additional_files + A sequence of additional filenames to check against to determine if a directory is a keymap. All files must exist for a match to happen. For example, if you want to match a C keymap with both a `config.h` and `rules.mk` file: `is_keymap_dir(keymap_dir, json=False, additional_files=['config.h', 'rules.mk'])` + + fullpath + When set to True the full path of the keymap relative to the `qmk_firmware` root will be provided. Returns: - a set with the names of the available keymaps + a sorted list of valid keymap names. """ # parse all the rules.mk files for the keyboard rules = rules_mk(keyboard) names = set() if rules: - # qmk_firmware/keyboards keyboards_dir = Path('keyboards') - # path to the keyboard's directory kb_path = keyboards_dir / keyboard + # walk up the directory tree until keyboards_dir # and collect all directories' name with keymap.c file in it while kb_path != keyboards_dir: keymaps_dir = kb_path / "keymaps" - if keymaps_dir.exists(): - names = names.union([keymap.name for keymap in keymaps_dir.iterdir() if is_keymap_dir(keymap)]) + + if keymaps_dir.is_dir(): + for keymap in keymaps_dir.iterdir(): + if is_keymap_dir(keymap, c, json, additional_files): + keymap = keymap if fullpath else keymap.name + names.add(keymap) + kb_path = kb_path.parent # if community layouts are supported, get them if "LAYOUTS" in rules: for layout in rules["LAYOUTS"].split(): cl_path = Path('layouts/community') / layout - if cl_path.exists(): - names = names.union([keymap.name for keymap in cl_path.iterdir() if is_keymap_dir(keymap)]) + if cl_path.is_dir(): + for keymap in cl_path.iterdir(): + if is_keymap_dir(keymap, c, json, additional_files): + keymap = keymap if fullpath else keymap.name + names.add(keymap) return sorted(names) + + +def _c_preprocess(path): + """ Run a file through the C pre-processor + + Args: + path: path of the keymap.c file + + Returns: + the stdout of the pre-processor + """ + pre_processed_keymap = qmk.commands.run(['cpp', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + return pre_processed_keymap.stdout + + +def _get_layers(keymap): # noqa C901 : until someone has a good idea how to simplify/split up this code + """ Find the layers in a keymap.c file. + + Args: + keymap: the content of the keymap.c file + + Returns: + a dictionary containing the parsed keymap + """ + layers = list() + opening_braces = '({[' + closing_braces = ')}]' + keymap_certainty = brace_depth = 0 + is_keymap = is_layer = is_adv_kc = False + layer = dict(name=False, layout=False, keycodes=list()) + for line in lex(keymap, CLexer()): + if line[0] is Token.Name: + if is_keymap: + # If we are inside the keymap array + # we know the keymap's name and the layout macro will come, + # followed by the keycodes + if not layer['name']: + if line[1].startswith('LAYOUT') or line[1].startswith('KEYMAP'): + # This can happen if the keymap array only has one layer, + # for macropads and such + layer['name'] = '0' + layer['layout'] = line[1] + else: + layer['name'] = line[1] + elif not layer['layout']: + layer['layout'] = line[1] + elif is_layer: + # If we are inside a layout macro, + # collect all keycodes + if line[1] == '_______': + kc = 'KC_TRNS' + elif line[1] == 'XXXXXXX': + kc = 'KC_NO' + else: + kc = line[1] + if is_adv_kc: + # If we are inside an advanced keycode + # collect everything and hope the user + # knew what he/she was doing + layer['keycodes'][-1] += kc + else: + layer['keycodes'].append(kc) + + # The keymaps array's signature: + # const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] + # + # Only if we've found all 6 keywords in this specific order + # can we know for sure that we are inside the keymaps array + elif line[1] == 'PROGMEM' and keymap_certainty == 2: + keymap_certainty = 3 + elif line[1] == 'keymaps' and keymap_certainty == 3: + keymap_certainty = 4 + elif line[1] == 'MATRIX_ROWS' and keymap_certainty == 4: + keymap_certainty = 5 + elif line[1] == 'MATRIX_COLS' and keymap_certainty == 5: + keymap_certainty = 6 + elif line[0] is Token.Keyword: + if line[1] == 'const' and keymap_certainty == 0: + keymap_certainty = 1 + elif line[0] is Token.Keyword.Type: + if line[1] == 'uint16_t' and keymap_certainty == 1: + keymap_certainty = 2 + elif line[0] is Token.Punctuation: + if line[1] in opening_braces: + brace_depth += 1 + if is_keymap: + if is_layer: + # We found the beginning of a non-basic keycode + is_adv_kc = True + layer['keycodes'][-1] += line[1] + elif line[1] == '(' and brace_depth == 2: + # We found the beginning of a layer + is_layer = True + elif line[1] == '{' and keymap_certainty == 6: + # We found the beginning of the keymaps array + is_keymap = True + elif line[1] in closing_braces: + brace_depth -= 1 + if is_keymap: + if is_adv_kc: + layer['keycodes'][-1] += line[1] + if brace_depth == 2: + # We found the end of a non-basic keycode + is_adv_kc = False + elif line[1] == ')' and brace_depth == 1: + # We found the end of a layer + is_layer = False + layers.append(layer) + layer = dict(name=False, layout=False, keycodes=list()) + elif line[1] == '}' and brace_depth == 0: + # We found the end of the keymaps array + is_keymap = False + keymap_certainty = 0 + elif is_adv_kc: + # Advanced keycodes can contain other punctuation + # e.g.: MT(MOD_LCTL | MOD_LSFT, KC_ESC) + layer['keycodes'][-1] += line[1] + + elif line[0] is Token.Literal.Number.Integer and is_keymap and not is_adv_kc: + # If the pre-processor finds the 'meaning' of the layer names, + # they will be numbers + if not layer['name']: + layer['name'] = line[1] + + else: + # We only care about + # operators and such if we + # are inside an advanced keycode + # e.g.: MT(MOD_LCTL | MOD_LSFT, KC_ESC) + if is_adv_kc: + layer['keycodes'][-1] += line[1] + + return layers + + +def parse_keymap_c(keymap_file, use_cpp=True): + """ Parse a keymap.c file. + + Currently only cares about the keymaps array. + + Args: + keymap_file: path of the keymap.c file + + use_cpp: if True, pre-process the file with the C pre-processor + + Returns: + a dictionary containing the parsed keymap + """ + if use_cpp: + keymap_file = _c_preprocess(keymap_file) + else: + keymap_file = keymap_file.read_text() + + keymap = dict() + keymap['layers'] = _get_layers(keymap_file) + return keymap + + +def c2json(keyboard, keymap, keymap_file, use_cpp=True): + """ Convert keymap.c to keymap.json + + Args: + keyboard: The name of the keyboard + + keymap: The name of the keymap + + layout: The LAYOUT macro this keymap uses. + + keymap_file: path of the keymap.c file + + use_cpp: if True, pre-process the file with the C pre-processor + + Returns: + a dictionary in keymap.json format + """ + keymap_json = parse_keymap_c(keymap_file, use_cpp) + + dirty_layers = keymap_json.pop('layers', None) + keymap_json['layers'] = list() + for layer in dirty_layers: + layer.pop('name') + layout = layer.pop('layout') + if not keymap_json.get('layout', False): + keymap_json['layout'] = layout + keymap_json['layers'].append(layer.pop('keycodes')) + + keymap_json['keyboard'] = keyboard + keymap_json['keymap'] = keymap + return keymap_json diff --git a/qmk/lib/python/qmk/questions.py b/qmk/lib/python/qmk/questions.py index 27f43ac1..865c6bbd 100644 --- a/qmk/lib/python/qmk/questions.py +++ b/qmk/lib/python/qmk/questions.py @@ -1,7 +1,12 @@ """Functions to collect user input. """ -from milc import cli, format_ansi +from milc import cli + +try: + from milc import format_ansi +except ImportError: + from milc.ansi import format_ansi def yesno(prompt, *args, default=None, **kwargs): diff --git a/qmk/lib/python/qmk/tests/.gitignore b/qmk/lib/python/qmk/tests/.gitignore new file mode 100644 index 00000000..eeb6581b --- /dev/null +++ b/qmk/lib/python/qmk/tests/.gitignore @@ -0,0 +1,2 @@ +# Ignore generated info.json from pytest +info.json diff --git a/qmk/lib/python/qmk/tests/test_cli_commands.py b/qmk/lib/python/qmk/tests/test_cli_commands.py index 68f8ed60..7ac0bcbd 100644 --- a/qmk/lib/python/qmk/tests/test_cli_commands.py +++ b/qmk/lib/python/qmk/tests/test_cli_commands.py @@ -1,10 +1,11 @@ -import subprocess +from subprocess import STDOUT, PIPE + from qmk.commands import run def check_subcommand(command, *args): cmd = ['bin/qmk', command] + list(args) - result = run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) + result = run(cmd, stdout=PIPE, stderr=STDOUT, universal_newlines=True) return result @@ -28,6 +29,11 @@ def test_compile(): check_returncode(result) +def test_compile_json(): + result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default_json') + check_returncode(result) + + def test_flash(): result = check_subcommand('flash', '-kb', 'handwired/onekey/pytest', '-km', 'default', '-n') check_returncode(result) @@ -45,8 +51,9 @@ def test_config(): def test_kle2json(): - result = check_subcommand('kle2json', 'kle.txt', '-f') + result = check_subcommand('kle2json', 'lib/python/qmk/tests/kle.txt', '-f') check_returncode(result) + assert 'Wrote out' in result.stdout def test_doctor(): @@ -152,3 +159,15 @@ def test_info_matrix_render(): assert 'LAYOUT_ortho_1x1' in result.stdout assert '│0A│' in result.stdout assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout + + +def test_c2json(): + result = check_subcommand("c2json", "-kb", "handwired/onekey/pytest", "-km", "default", "keyboards/handwired/onekey/keymaps/default/keymap.c") + check_returncode(result) + assert result.stdout.strip() == '{"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT_ortho_1x1", "layers": [["KC_A"]]}' + + +def test_c2json_nocpp(): + result = check_subcommand("c2json", "--no-cpp", "-kb", "handwired/onekey/pytest", "-km", "default", "keyboards/handwired/onekey/keymaps/pytest_nocpp/keymap.c") + check_returncode(result) + assert result.stdout.strip() == '{"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_ENTER"]]}' diff --git a/qmk/lib/python/qmk/tests/test_qmk_keymap.py b/qmk/lib/python/qmk/tests/test_qmk_keymap.py index d8669e54..f1ecf293 100644 --- a/qmk/lib/python/qmk/tests/test_qmk_keymap.py +++ b/qmk/lib/python/qmk/tests/test_qmk_keymap.py @@ -1,19 +1,39 @@ import qmk.keymap -def test_template_onekey_proton_c(): - templ = qmk.keymap.template('handwired/onekey/proton_c') +def test_template_c_onekey_proton_c(): + templ = qmk.keymap.template_c('handwired/onekey/proton_c') assert templ == qmk.keymap.DEFAULT_KEYMAP_C -def test_template_onekey_pytest(): - templ = qmk.keymap.template('handwired/onekey/pytest') +def test_template_json_onekey_proton_c(): + templ = qmk.keymap.template_json('handwired/onekey/proton_c') + assert templ == {'keyboard': 'handwired/onekey/proton_c'} + + +def test_template_c_onekey_pytest(): + templ = qmk.keymap.template_c('handwired/onekey/pytest') assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n' -def test_generate_onekey_pytest(): - templ = qmk.keymap.generate('handwired/onekey/pytest', 'LAYOUT', [['KC_A']]) +def test_template_json_onekey_pytest(): + templ = qmk.keymap.template_json('handwired/onekey/pytest') + assert templ == {'keyboard': 'handwired/onekey/pytest', "documentation": "This file is a keymap.json file for handwired/onekey/pytest"} + + +def test_generate_c_onekey_pytest(): + templ = qmk.keymap.generate_c('handwired/onekey/pytest', 'LAYOUT', [['KC_A']]) assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n' +def test_generate_json_onekey_pytest(): + templ = qmk.keymap.generate_json('default', 'handwired/onekey/pytest', 'LAYOUT', [['KC_A']]) + assert templ == {"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_A"]]} + + +def test_parse_keymap_c(): + parsed_keymap_c = qmk.keymap.parse_keymap_c('keyboards/handwired/onekey/keymaps/default/keymap.c') + assert parsed_keymap_c == {'layers': [{'name': '0', 'layout': 'LAYOUT_ortho_1x1', 'keycodes': ['KC_A']}]} + + # FIXME(skullydazed): Add a test for qmk.keymap.write that mocks up an FD. diff --git a/qmk/quantum/config_common.h b/qmk/quantum/config_common.h index 84edc463..c1e6698e 100644 --- a/qmk/quantum/config_common.h +++ b/qmk/quantum/config_common.h @@ -44,7 +44,7 @@ # define PINB_ADDRESS 0x3 # define PINC_ADDRESS 0x6 # define PIND_ADDRESS 0x9 -# elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) +# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define ADDRESS_BASE 0x00 # define PINA_ADDRESS 0x0 # define PINB_ADDRESS 0x3 @@ -307,7 +307,7 @@ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ sei(); \ } while (0) -# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define SERIAL_UART_BAUD 115200 # define SERIAL_UART_DATA UDR1 /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ diff --git a/qmk/quantum/keymap.h b/qmk/quantum/keymap.h index 34a9c8f8..de3bece1 100644 --- a/qmk/quantum/keymap.h +++ b/qmk/quantum/keymap.h @@ -40,6 +40,10 @@ along with this program. If not, see . #if defined(PROTOCOL_CHIBIOS) # define RESET QK_RESET #endif +// Gross hack, remove me and change RESET keycode to QK_BOOT +#if defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) +# undef RESET +#endif #include "quantum_keycodes.h" diff --git a/qmk/quantum/keymap_extras/keymap_spanish_dvorak.h b/qmk/quantum/keymap_extras/keymap_spanish_dvorak.h index b6bc734c..38f579ae 100644 --- a/qmk/quantum/keymap_extras/keymap_spanish_dvorak.h +++ b/qmk/quantum/keymap_extras/keymap_spanish_dvorak.h @@ -26,7 +26,7 @@ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ * │     │ . │ , │ Ñ │ P │ Y │ F │ G │ C │ H │ L │ ` │ + │     │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ - * │      │ A │ O │ E │ U │ I │ D │ R │ T │ N │ S │ ' │ Ç │    │ + * │      │ A │ O │ E │ U │ I │ D │ R │ T │ N │ S │ ´ │ Ç │    │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ * │    │ < │ - │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │          │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ @@ -119,7 +119,7 @@ #define DV_CIRC S(DV_GRV) // ^ (dead) #define DV_ASTR S(DV_PLUS) // * // Row 3 -#define DV_DIAE S(DV_GRV) // ¨ (dead) +#define DV_DIAE S(DV_ACUT) // ¨ (dead) // Row 4 #define DV_RABK S(DV_LABK) // > #define DV_UNDS S(DV_MINS) // _ diff --git a/qmk/quantum/keymap_extras/sendstring_belgian.h b/qmk/quantum/keymap_extras/sendstring_belgian.h index 5e9a079a..5e7218a2 100644 --- a/qmk/quantum/keymap_extras/sendstring_belgian.h +++ b/qmk/quantum/keymap_extras/sendstring_belgian.h @@ -88,7 +88,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // P Q R S T U V W BE_P, BE_Q, BE_R, BE_S, BE_T, BE_U, BE_V, BE_W, // X Y Z [ \ ] ^ _ - BE_X, BE_Y, BE_Z, BE_CIRC, BE_LABK, BE_DLR, BE_SECT, BE_MINS, + BE_X, BE_Y, BE_Z, BE_DCIR, BE_LABK, BE_DLR, BE_SECT, BE_MINS, // ` a b c d e f g BE_MICR, BE_A, BE_B, BE_C, BE_D, BE_E, BE_F, BE_G, // h i j k l m n o diff --git a/qmk/quantum/keymap_extras/sendstring_french.h b/qmk/quantum/keymap_extras/sendstring_french.h index 17ea3ed4..ab65f28e 100644 --- a/qmk/quantum/keymap_extras/sendstring_french.h +++ b/qmk/quantum/keymap_extras/sendstring_french.h @@ -74,13 +74,13 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, FR_EXLM, FR_QUOT, FR_DQUO, FR_DLR, FR_UGRV, FR_AMPR, FR_QUOT, + KC_SPC, FR_EXLM, FR_DQUO, FR_DQUO, FR_DLR, FR_UGRV, FR_AMPR, FR_QUOT, // ( ) * + , - . / FR_LPRN, FR_RPRN, FR_ASTR, FR_EQL, FR_COMM, FR_MINS, FR_SCLN, FR_COLN, // 0 1 2 3 4 5 6 7 FR_AGRV, FR_AMPR, FR_EACU, FR_DQUO, FR_QUOT, FR_LPRN, FR_MINS, FR_EGRV, // 8 9 : ; < = > ? - FR_CCED, FR_AGRV, FR_COLN, FR_SCLN, FR_LABK, FR_EQL, FR_LABK, FR_COMM, + FR_UNDS, FR_CCED, FR_COLN, FR_SCLN, FR_LABK, FR_EQL, FR_LABK, FR_COMM, // @ A B C D E F G FR_AGRV, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G, // H I J K L M N O diff --git a/qmk/quantum/mcu_selection.mk b/qmk/quantum/mcu_selection.mk index 33a0cabc..295dfd31 100644 --- a/qmk/quantum/mcu_selection.mk +++ b/qmk/quantum/mcu_selection.mk @@ -82,37 +82,37 @@ ifneq ($(findstring MK20DX256, $(MCU)),) BOARD ?= PJRC_TEENSY_3_1 endif -ifneq ($(findstring STM32F303, $(MCU)),) +ifneq ($(findstring STM32F042, $(MCU)),) # Cortex version - MCU = cortex-m4 + MCU = cortex-m0 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 + ARMV = 6 ## chip/board settings # - the next two should match the directories in # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) MCU_FAMILY = STM32 - MCU_SERIES = STM32F3xx + MCU_SERIES = STM32F0xx # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ - MCU_LDSCRIPT ?= STM32F303xC + MCU_LDSCRIPT ?= STM32F042x6 # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f3xx + MCU_STARTUP ?= stm32f0xx # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F303XC + BOARD ?= GENERIC_STM32_F042X6 - USE_FPU ?= yes + USE_FPU ?= no # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32F072, $(MCU)),) @@ -144,41 +144,8 @@ ifneq ($(findstring STM32F072, $(MCU)),) USE_FPU ?= no # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 -endif - -ifneq ($(findstring STM32F042, $(MCU)),) - # Cortex version - MCU = cortex-m0 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 - - ## chip/board settings - # - the next two should match the directories in - # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F0xx - - # Linker script to use - # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ - # or /ld/ - MCU_LDSCRIPT ?= STM32F042x6 - - # Startup code to use - # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f0xx - - # Board: it should exist either in /os/hal/boards/, - # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F042X6 - - USE_FPU ?= no - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32F103, $(MCU)),) @@ -210,11 +177,110 @@ ifneq ($(findstring STM32F103, $(MCU)),) USE_FPU ?= no # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif -ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) +ifneq ($(findstring STM32F303, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F3xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F303xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f3xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F303XC + + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif + +ifneq ($(findstring STM32F401, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F401xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F401 + + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif + +ifneq ($(findstring STM32F411, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F411xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F411 + + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif + +ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) PROTOCOL = LUFA # Processor frequency. diff --git a/qmk/quantum/process_keycode/process_midi.c b/qmk/quantum/process_keycode/process_midi.c index b2fb902e..e5257701 100644 --- a/qmk/quantum/process_keycode/process_midi.c +++ b/qmk/quantum/process_keycode/process_midi.c @@ -68,10 +68,12 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) { uint8_t tone = keycode - MIDI_TONE_MIN; uint8_t velocity = compute_velocity(midi_config.velocity); if (record->event.pressed) { - uint8_t note = midi_compute_note(keycode); - midi_send_noteon(&midi_device, channel, note, velocity); - dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); - tone_status[tone] = note; + if (tone_status[tone] == MIDI_INVALID_NOTE) { + uint8_t note = midi_compute_note(keycode); + midi_send_noteon(&midi_device, channel, note, velocity); + dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); + tone_status[tone] = note; + } } else { uint8_t note = tone_status[tone]; if (note != MIDI_INVALID_NOTE) { diff --git a/qmk/quantum/process_keycode/process_rgb.c b/qmk/quantum/process_keycode/process_rgb.c index a1e46e03..5dd8e780 100644 --- a/qmk/quantum/process_keycode/process_rgb.c +++ b/qmk/quantum/process_keycode/process_rgb.c @@ -23,6 +23,7 @@ typedef void (*rgb_func_pointer)(void); * * noinline to optimise for firmware size not speed (not in hot path) */ +#if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)) static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) { if (is_shifted) { dec_func(); @@ -30,6 +31,7 @@ static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, inc_func(); } } +#endif /** * Wrapper for animation mode @@ -56,7 +58,9 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { // Split keyboards need to trigger on key-up for edge-case issue if (!record->event.pressed) { #endif +#if (defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)) || (defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)) uint8_t shifted = get_mods() & MOD_MASK_SHIFT; +#endif switch (keycode) { case RGB_TOG: #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) @@ -163,7 +167,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #endif return false; case RGB_MODE_RAINBOW: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_MOOD) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end); #endif #if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT) @@ -171,7 +175,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #endif return false; case RGB_MODE_SWIRL: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_SWIRL) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end); #endif #if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_PINWHEEL) @@ -179,27 +183,27 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #endif return false; case RGB_MODE_SNAKE: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_SNAKE) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_SNAKE) handleKeycodeRGBMode(RGBLIGHT_MODE_SNAKE, RGBLIGHT_MODE_SNAKE_end); #endif return false; case RGB_MODE_KNIGHT: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_KNIGHT) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_KNIGHT) handleKeycodeRGBMode(RGBLIGHT_MODE_KNIGHT, RGBLIGHT_MODE_KNIGHT_end); #endif return false; case RGB_MODE_XMAS: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_CHRISTMAS) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_CHRISTMAS) rgblight_mode(RGBLIGHT_MODE_CHRISTMAS); #endif return false; case RGB_MODE_GRADIENT: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_STATIC_GRADIENT) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_STATIC_GRADIENT) handleKeycodeRGBMode(RGBLIGHT_MODE_STATIC_GRADIENT, RGBLIGHT_MODE_STATIC_GRADIENT_end); #endif return false; case RGB_MODE_RGBTEST: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RGB_TEST) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RGB_TEST) rgblight_mode(RGBLIGHT_MODE_RGB_TEST); #endif return false; diff --git a/qmk/quantum/process_keycode/process_unicode_common.c b/qmk/quantum/process_keycode/process_unicode_common.c index 84c44d98..80be3162 100644 --- a/qmk/quantum/process_keycode/process_unicode_common.c +++ b/qmk/quantum/process_keycode/process_unicode_common.c @@ -136,20 +136,10 @@ __attribute__((weak)) void unicode_input_cancel(void) { set_mods(unicode_saved_mods); // Reregister previously set mods } -__attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) { - if (hex == 0x0) { - return KC_0; - } else if (hex < 0xA) { - return KC_1 + (hex - 0x1); - } else { - return KC_A + (hex - 0xA); - } -} - void register_hex(uint16_t hex) { for (int i = 3; i >= 0; i--) { uint8_t digit = ((hex >> (i * 4)) & 0xF); - tap_code(hex_to_keycode(digit)); + tap_code16(hex_to_keycode(digit)); } } @@ -162,10 +152,10 @@ void register_hex32(uint32_t hex) { uint8_t digit = ((hex >> (i * 4)) & 0xF); if (digit == 0) { if (!onzerostart) { - tap_code(hex_to_keycode(digit)); + tap_code16(hex_to_keycode(digit)); } } else { - tap_code(hex_to_keycode(digit)); + tap_code16(hex_to_keycode(digit)); onzerostart = false; } } diff --git a/qmk/quantum/rgb_matrix_drivers.c b/qmk/quantum/rgb_matrix_drivers.c index 0403d6c9..0685a347 100644 --- a/qmk/quantum/rgb_matrix_drivers.c +++ b/qmk/quantum/rgb_matrix_drivers.c @@ -31,7 +31,9 @@ static void init(void) { i2c_init(); # ifdef IS31FL3731 IS31FL3731_init(DRIVER_ADDR_1); +# ifdef DRIVER_ADDR_2 IS31FL3731_init(DRIVER_ADDR_2); +# endif # elif defined(IS31FL3733) IS31FL3733_init(DRIVER_ADDR_1, 0); # elif defined(IS31FL3737) @@ -55,7 +57,9 @@ static void init(void) { // This actually updates the LED drivers # ifdef IS31FL3731 IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); +# endif # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); @@ -69,7 +73,9 @@ static void init(void) { # ifdef IS31FL3731 static void flush(void) { IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif } const rgb_matrix_driver_t rgb_matrix_driver = { diff --git a/qmk/quantum/rgblight.c b/qmk/quantum/rgblight.c index 211ec975..76bb6eb8 100644 --- a/qmk/quantum/rgblight.c +++ b/qmk/quantum/rgblight.c @@ -132,11 +132,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + led1->r = r; + led1->g = g; + led1->b = b; #ifdef RGBW - (*led1).w = 0; + led1->w = 0; #endif } diff --git a/qmk/quantum/split_common/split_util.c b/qmk/quantum/split_common/split_util.c index 90735eda..e8e944d7 100644 --- a/qmk/quantum/split_common/split_util.c +++ b/qmk/quantum/split_common/split_util.c @@ -72,7 +72,7 @@ bool usbIsActive(void) { return false; } -#elif defined(PROTOCOL_LUFA) +#elif defined(PROTOCOL_LUFA) && defined(OTGPADE) static inline bool usbIsActive(void) { USB_OTGPAD_On(); // enables VBUS pad wait_us(5); diff --git a/qmk/quantum/via.c b/qmk/quantum/via.c index f2599d1d..7c3b7f92 100644 --- a/qmk/quantum/via.c +++ b/qmk/quantum/via.c @@ -186,7 +186,7 @@ bool process_record_via(uint16_t keycode, keyrecord_t *record) { // Keyboard level code can override this to handle custom messages from VIA. // See raw_hid_receive() implementation. -// DO NOT call raw_hid_send() in the overide function. +// DO NOT call raw_hid_send() in the override function. __attribute__((weak)) void raw_hid_receive_kb(uint8_t *data, uint8_t length) { uint8_t *command_id = &(data[0]); *command_id = id_unhandled; diff --git a/qmk/requirements.txt b/qmk/requirements.txt index aa6ee1ba..d2080357 100644 --- a/qmk/requirements.txt +++ b/qmk/requirements.txt @@ -4,3 +4,4 @@ appdirs argcomplete colorama hjson +pygments diff --git a/qmk/shell.nix b/qmk/shell.nix index 93db7b37..6c828524 100644 --- a/qmk/shell.nix +++ b/qmk/shell.nix @@ -2,8 +2,8 @@ let nixpkgs = builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/903266491b7b9b0379e88709feca0af900def0d9.tar.gz"; - sha256 = "1b5wjrfgyha6s15k1yjyx41hvrpmd5szpkpkxk6l5hyrfqsr8wip"; + url = "https://github.com/NixOS/nixpkgs/archive/c4b26e702044dbf40f8236136c099d8ab6778514.tar.gz"; + sha256 = "0w6hgs01qzni3a7cvgadjlmcdlb6vay3w910vh4k9fc949ii7s60"; }; pkgs = import nixpkgs { }; @@ -25,6 +25,7 @@ let argcomplete colorama hjson + pygments # requirements-dev.txt nose2 flake8 diff --git a/qmk/tmk_core/common.mk b/qmk/tmk_core/common.mk index 3c9de33c..fdf2aa09 100644 --- a/qmk/tmk_core/common.mk +++ b/qmk/tmk_core/common.mk @@ -99,11 +99,15 @@ ifeq ($(strip $(COMMAND_ENABLE)), yes) endif ifeq ($(strip $(NKRO_ENABLE)), yes) - ifneq ($(PROTOCOL),VUSB) + ifeq ($(PROTOCOL), VUSB) + $(info NKRO is not currently supported on V-USB, and has been disabled.) + else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else ifneq ($(BLUETOOTH),) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else TMK_COMMON_DEFS += -DNKRO_ENABLE SHARED_EP_ENABLE = yes - else - $(info NKRO is not currently supported on V-USB, and has been disabled.) endif endif @@ -161,6 +165,8 @@ ifeq ($(strip $(LTO_ENABLE)), yes) EXTRAFLAGS += -flto TMK_COMMON_DEFS += -DLTO_ENABLE TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE +else ifdef LINK_TIME_OPTIMIZATION_ENABLE + $(error The LINK_TIME_OPTIMIZATION_ENABLE flag has been renamed to LTO_ENABLE.) endif # Search Path diff --git a/qmk/tmk_core/common/chibios/eeprom_stm32.h b/qmk/tmk_core/common/chibios/eeprom_stm32.h index e6891459..ea0ce064 100644 --- a/qmk/tmk_core/common/chibios/eeprom_stm32.h +++ b/qmk/tmk_core/common/chibios/eeprom_stm32.h @@ -36,12 +36,14 @@ # define MCU_STM32F103RB #elif defined(EEPROM_EMU_STM32F072xB) # define MCU_STM32F072CB +#elif defined(EEPROM_EMU_STM32F042x6) +# define MCU_STM32F042K6 #else # error "not implemented." #endif #ifndef EEPROM_PAGE_SIZE -# if defined(MCU_STM32F103RB) +# if defined(MCU_STM32F103RB) || defined(MCU_STM32F042K6) # define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte # define FEE_DENSITY_PAGES 2 // How many pages are used # elif defined(MCU_STM32F103ZE) || defined(MCU_STM32F103RE) || defined(MCU_STM32F103RD) || defined(MCU_STM32F303CC) || defined(MCU_STM32F072CB) @@ -55,6 +57,8 @@ #ifndef EEPROM_START_ADDRESS # if defined(MCU_STM32F103RB) || defined(MCU_STM32F072CB) # define FEE_MCU_FLASH_SIZE 128 // Size in Kb +# elif defined(MCU_STM32F042K6) +# define FEE_MCU_FLASH_SIZE 32 // Size in Kb # elif defined(MCU_STM32F103ZE) || defined(MCU_STM32F103RE) # define FEE_MCU_FLASH_SIZE 512 // Size in Kb # elif defined(MCU_STM32F103RD) diff --git a/qmk/tmk_core/common/chibios/flash_stm32.c b/qmk/tmk_core/common/chibios/flash_stm32.c index e166fc5e..e8b3dc4b 100644 --- a/qmk/tmk_core/common/chibios/flash_stm32.c +++ b/qmk/tmk_core/common/chibios/flash_stm32.c @@ -25,6 +25,9 @@ #elif defined(EEPROM_EMU_STM32F072xB) # define STM32F072xB # include "stm32f0xx.h" +#elif defined(EEPROM_EMU_STM32F042x6) +# define STM32F042x6 +# include "stm32f0xx.h" #else # error "not implemented." #endif diff --git a/qmk/tmk_core/protocol/usb_descriptor.h b/qmk/tmk_core/protocol/usb_descriptor.h index 79dd8701..02a4b1ce 100644 --- a/qmk/tmk_core/protocol/usb_descriptor.h +++ b/qmk/tmk_core/protocol/usb_descriptor.h @@ -60,6 +60,11 @@ typedef struct { USB_Descriptor_Interface_t Keyboard_Interface; USB_HID_Descriptor_HID_t Keyboard_HID; USB_Descriptor_Endpoint_t Keyboard_INEndpoint; +#else + // Shared Interface + USB_Descriptor_Interface_t Shared_Interface; + USB_HID_Descriptor_HID_t Shared_HID; + USB_Descriptor_Endpoint_t Shared_INEndpoint; #endif #ifdef RAW_ENABLE @@ -77,7 +82,7 @@ typedef struct { USB_Descriptor_Endpoint_t Mouse_INEndpoint; #endif -#ifdef SHARED_EP_ENABLE +#if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) // Shared Interface USB_Descriptor_Interface_t Shared_Interface; USB_HID_Descriptor_HID_t Shared_HID; @@ -139,6 +144,7 @@ enum usb_interfaces { #ifndef KEYBOARD_SHARED_EP KEYBOARD_INTERFACE, #else + SHARED_INTERFACE, # define KEYBOARD_INTERFACE SHARED_INTERFACE #endif @@ -153,7 +159,7 @@ enum usb_interfaces { MOUSE_INTERFACE, #endif -#ifdef SHARED_EP_ENABLE +#if defined(SHARED_EP_ENABLE) && !defined(KEYBOARD_SHARED_EP) SHARED_INTERFACE, #endif diff --git a/qmk/users/333fred/333fred.c b/qmk/users/333fred/333fred.c index 79df8c4d..621b9e66 100644 --- a/qmk/users/333fred/333fred.c +++ b/qmk/users/333fred/333fred.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include "333fred.h" #include "quantum.h" #include "action.h" diff --git a/qmk/users/333fred/333fred.h b/qmk/users/333fred/333fred.h index 716b61a2..0532ff2d 100644 --- a/qmk/users/333fred/333fred.h +++ b/qmk/users/333fred/333fred.h @@ -1,16 +1,37 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #include "quantum.h" #include "layout_macros.h" #define BASE 0 -#define CODE 1 // code layer -#define CODEFLOW 2 -#define SYMB 3 -#define MDIA 4 // media keys -#define VIM 5 -#define GAME 6 -#define GAME_ARROW 7 +#define CODEFLOW 1 +#define SYMB 2 +#define MDIA 3 // media keys +#define VIM 4 +#define GAME 5 +#define GAME_ARROW 6 // Tap dance config shared between my keyboards enum tap_dance_declarations { diff --git a/qmk/users/333fred/config.h b/qmk/users/333fred/config.h index 5974b789..0bbaa38a 100644 --- a/qmk/users/333fred/config.h +++ b/qmk/users/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define PERMISSIVE_HOLD diff --git a/qmk/users/333fred/layout_macros.h b/qmk/users/333fred/layout_macros.h index 3b163f6c..d46a4190 100644 --- a/qmk/users/333fred/layout_macros.h +++ b/qmk/users/333fred/layout_macros.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define SIX_TRNS _______, _______, _______, _______, _______, _______ diff --git a/qmk/users/333fred/rgb.c b/qmk/users/333fred/rgb.c index c86cd1c7..d2871433 100644 --- a/qmk/users/333fred/rgb.c +++ b/qmk/users/333fred/rgb.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include "quantum.h" #include "333fred.h" diff --git a/qmk/users/333fred/rules.mk b/qmk/users/333fred/rules.mk index 191422e3..265a6c18 100644 --- a/qmk/users/333fred/rules.mk +++ b/qmk/users/333fred/rules.mk @@ -7,3 +7,4 @@ endif TAP_DANCE_ENABLE=yes NKRO_ENABLE = yes PERMISSIVE_HOLD = yes +LTO_ENABLE = yes diff --git a/qmk/users/csc027/csc027.c b/qmk/users/csc027/csc027.c index de1bad6f..60f17a7e 100644 --- a/qmk/users/csc027/csc027.c +++ b/qmk/users/csc027/csc027.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 "csc027.h" // Declare the strings in PROGMEM using the convenience macro diff --git a/qmk/users/csc027/csc027.h b/qmk/users/csc027/csc027.h index 6daae2a3..e13f1286 100644 --- a/qmk/users/csc027/csc027.h +++ b/qmk/users/csc027/csc027.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 . +*/ + #pragma once #include "quantum.h" @@ -22,7 +39,7 @@ enum custom_layers { _RS, // Raise _LW, // Lower _MS, // Mouse - _GT, // Git + _WT, // Windows Terminal _CN, // Convenience _GG, // General Gaming _CS // Counter-Strike: Global Offensive diff --git a/qmk/users/csc027/custom_audio.c b/qmk/users/csc027/custom_audio.c index 96e0e660..7746a4d1 100644 --- a/qmk/users/csc027/custom_audio.c +++ b/qmk/users/csc027/custom_audio.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 "csc027.h" #include "custom_audio.h" diff --git a/qmk/users/csc027/custom_audio.h b/qmk/users/csc027/custom_audio.h index daea1e65..f51bfcf9 100644 --- a/qmk/users/csc027/custom_audio.h +++ b/qmk/users/csc027/custom_audio.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 . +*/ + #pragma once #if defined(AUDIO_ENABLE) diff --git a/qmk/users/csc027/custom_rgb.c b/qmk/users/csc027/custom_rgb.c index 000483b2..1d3232d7 100644 --- a/qmk/users/csc027/custom_rgb.c +++ b/qmk/users/csc027/custom_rgb.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 "csc027.h" #include "custom_rgb.h" diff --git a/qmk/users/csc027/custom_rgb.h b/qmk/users/csc027/custom_rgb.h index 47fdeb7b..de63fc81 100644 --- a/qmk/users/csc027/custom_rgb.h +++ b/qmk/users/csc027/custom_rgb.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 . +*/ + #pragma once #if defined(RGBLIGHT_ENABLE) diff --git a/qmk/users/csc027/defines.h b/qmk/users/csc027/defines.h index 3f599ad6..22000192 100644 --- a/qmk/users/csc027/defines.h +++ b/qmk/users/csc027/defines.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 . +*/ + #pragma once #include "csc027.h" @@ -14,12 +31,12 @@ * - There is a "Nxt L" function that cycles through the QWERTY and * game layers. This has been implemented by hard coding the jump to the * next layer in each of the layers using the TO() macro. Currently, the - * "Nxt L" function skips over the momentary layers (i.e., Mouse, Git, - * Lower, Raise, and Convenience layers). + * "Nxt L" function skips over the momentary layers (i.e., Mouse, Lower, + * Raise, Windows Terminal, and Convenience layers). * - There is a "Rst L" function that resets the current layer to the * QWERTY layer. - * - The "Git" one shot function goes to the macro layer which has Git - * commands implemented. + * - The "Wt" momentary function goes to the macro layer which has Windows + * Terminal shortcuts. * - The Right Shift key also doubles as an Enter key if it is tapped rather * than held. * @@ -30,7 +47,7 @@ * |-----------------------------------| |-----------------------------------| * |Shift| Z | X | C | V | B | | N | M | , | . | / |Sf/En| * |-----------------------------------| |-----------------------------------| - * |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Git |Nxt L|Rst L| + * |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Wt |Nxt L|Rst L| * `-----------------------------------' `-----------------------------------' */ @@ -42,7 +59,7 @@ #define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC #define _____________________QWERTY_R2_____________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT #define _____________________QWERTY_R3_____________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC_RSFE -#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GG), XXXXXXX +#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, MO(_WT), TO(_GG), XXXXXXX /* Raise Layer * @@ -123,8 +140,7 @@ #define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ #define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX - -/* MIT Layout (Mouse) +/* Mouse Layer * * The mouse layer adds keys to use the keyboard like a mouse. * @@ -149,33 +165,7 @@ #define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ #define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX -/* MIT Layout (Git) - * - * The macro layer that has common git commands. - * - * ,-----------------------------------. ,-----------------------------------. - * | |Chery| Show|Rebas|Reset| Tag | | | Pull| Init|Rmote| Push| | - * |-----------------------------------| |-----------------------------------| - * | | Add |Sttus| Diff|Fetch| Grep| |Stash| |ChkOt| Log | | | - * |-----------------------------------| |-----------------------------------| - * | | | |Comit| Move|Brnch| | |Merge| | | | | - * |-----------------------------------| |-----------------------------------| - * | | | | | | | | | | | | | | - * `-----------------------------------' `-----------------------------------' - */ - -#define _______________________GIT_L1______________________ XXXXXXX, MC_cherrypick, MC_show, MC_rebase, MC_reset, MC_tag -#define _______________________GIT_L2______________________ _______, MC_add, MC_status, MC_diff, MC_fetch, MC_grep -#define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, MC_commit, MC_mv, MC_branch -#define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______ - -#define _______________________GIT_R1______________________ XXXXXXX, MC_pull, MC_init, MC_remote, MC_push, XXXXXXX -#define _______________________GIT_R2______________________ MC_stash, XXXXXXX, MC_checkout, MC_log, XXXXXXX, XXXXXXX -#define _______________________GIT_R3______________________ XXXXXXX, MC_merge, XXXXXXX, XXXXXXX, XXXXXXX, _______ -#define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX - - -/* MIT Layout (Convenience) +/* Convenience Layer * * The Convenience layer adds miscellaneous chords to the keyboard. * @@ -209,6 +199,29 @@ #define ___________________CONVENIENCE_R3__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ #define ___________________CONVENIENCE_R4__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +/* Windows Terminal Layer + * + * ,-----------------------------------. ,-----------------------------------. + * | | | | | | | | | | | | |BkSpc| + * |-----------------------------------| |-----------------------------------| + * | | |Split|Close| | | |FcsLf|FcsDn|FcsUp|FcsRt| | | + * |-----------------------------------| |-----------------------------------| + * | | | | |VSplt| | | | | | | | | + * |-----------------------------------| |-----------------------------------| + * | | | | | | | | | | | | | | + * `-----------------------------------' `-----------------------------------' + */ + +#define ________________WINDOWS_TERMINAL_L1________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define ________________WINDOWS_TERMINAL_L2________________ _______, XXXXXXX, MC_trps, MC_trpc, XXXXXXX, XXXXXXX +#define ________________WINDOWS_TERMINAL_L3________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, MC_trpv, XXXXXXX +#define ________________WINDOWS_TERMINAL_L4________________ _______, _______, _______, _______, _______, _______ + +#define ________________WINDOWS_TERMINAL_R1________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC +#define ________________WINDOWS_TERMINAL_R2________________ MC_trpl, MC_trpd, MC_trpu, MC_trpr, XXXXXXX, XXXXXXX +#define ________________WINDOWS_TERMINAL_R3________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ +#define ________________WINDOWS_TERMINAL_R4________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + /* General Game Layer * * ,-----------------------------------. ,-----------------------------------. @@ -281,32 +294,17 @@ * These macros help synchronize the keycodes between the string declaration, string pointer declaration, and enum order. */ - #define CUSTOM_MACROS(CUSTOM_NAME, CUSTOM_STRING, CUSTOM_DELIM) \ - CUSTOM_NAME(add) CUSTOM_STRING("git add ") CUSTOM_DELIM() \ - CUSTOM_NAME(branch) CUSTOM_STRING("git branch ") CUSTOM_DELIM() \ - CUSTOM_NAME(checkout) CUSTOM_STRING("git checkout ") CUSTOM_DELIM() \ - CUSTOM_NAME(cherrypick) CUSTOM_STRING("git cherry-pick ") CUSTOM_DELIM() \ - CUSTOM_NAME(commit) CUSTOM_STRING("git commit -m \"\""SS_TAP(X_LEFT)) CUSTOM_DELIM() \ - CUSTOM_NAME(diff) CUSTOM_STRING("git diff ") CUSTOM_DELIM() \ - CUSTOM_NAME(fetch) CUSTOM_STRING("git fetch ") CUSTOM_DELIM() \ - CUSTOM_NAME(grep) CUSTOM_STRING("git grep ") CUSTOM_DELIM() \ - CUSTOM_NAME(log) CUSTOM_STRING("git log --decorate --oneline --graph ") CUSTOM_DELIM() \ - CUSTOM_NAME(init) CUSTOM_STRING("git init ") CUSTOM_DELIM() \ - CUSTOM_NAME(mv) CUSTOM_STRING("git mv ") CUSTOM_DELIM() \ - CUSTOM_NAME(merge) CUSTOM_STRING("git merge ") CUSTOM_DELIM() \ - CUSTOM_NAME(push) CUSTOM_STRING("git push ") CUSTOM_DELIM() \ - CUSTOM_NAME(pull) CUSTOM_STRING("git pull ") CUSTOM_DELIM() \ - CUSTOM_NAME(rebase) CUSTOM_STRING("git rebase ") CUSTOM_DELIM() \ - CUSTOM_NAME(remote) CUSTOM_STRING("git remote ") CUSTOM_DELIM() \ - CUSTOM_NAME(reset) CUSTOM_STRING("git reset ") CUSTOM_DELIM() \ - CUSTOM_NAME(show) CUSTOM_STRING("git show ") CUSTOM_DELIM() \ - CUSTOM_NAME(stash) CUSTOM_STRING("git stash ") CUSTOM_DELIM() \ - CUSTOM_NAME(status) CUSTOM_STRING("git status ") CUSTOM_DELIM() \ - CUSTOM_NAME(tag) CUSTOM_STRING("git tag ") CUSTOM_DELIM() \ - CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \ - CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \ - CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \ + CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \ + CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \ + CUSTOM_NAME(trps) CUSTOM_STRING(SS_LALT(SS_LSFT("-"))) CUSTOM_DELIM() \ + CUSTOM_NAME(trpv) CUSTOM_STRING(SS_LALT(SS_LSFT("+"))) CUSTOM_DELIM() \ + CUSTOM_NAME(trpc) CUSTOM_STRING(SS_LCTL(SS_LSFT("w"))) CUSTOM_DELIM() \ + CUSTOM_NAME(trpl) CUSTOM_STRING(SS_LALT(SS_TAP(X_LEFT))) CUSTOM_DELIM() \ + CUSTOM_NAME(trpd) CUSTOM_STRING(SS_LALT(SS_TAP(X_DOWN))) CUSTOM_DELIM() \ + CUSTOM_NAME(trpu) CUSTOM_STRING(SS_LALT(SS_TAP(X_UP))) CUSTOM_DELIM() \ + CUSTOM_NAME(trpr) CUSTOM_STRING(SS_LALT(SS_TAP(X_RIGHT))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \ + CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \ CUSTOM_NAME(vtdr) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_RIGHT)))) diff --git a/qmk/users/csc027/usb_led.c b/qmk/users/csc027/usb_led.c index 473b153a..78fbdcdf 100644 --- a/qmk/users/csc027/usb_led.c +++ b/qmk/users/csc027/usb_led.c @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 "csc027.h" #include "usb_led.h" #include "led.h" diff --git a/qmk/users/csc027/usb_led.h b/qmk/users/csc027/usb_led.h index 7451b469..6248b312 100644 --- a/qmk/users/csc027/usb_led.h +++ b/qmk/users/csc027/usb_led.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Constantine Chen @csc027 + +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 . +*/ + #pragma once bool led_update_user(led_t usb_led); diff --git a/qmk/users/cwebster2/config.h b/qmk/users/cwebster2/config.h new file mode 100644 index 00000000..78733687 --- /dev/null +++ b/qmk/users/cwebster2/config.h @@ -0,0 +1,57 @@ +/* Copyright 2020 Casey Webster + * + * 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 . + */ +#pragma once + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY +//#define TAPPING_FORCE_HOLD +#undef PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define NO_ACTION_ONESHOT + +#ifdef AUTO_SHIFT_ENABLE + #define AUTO_SHIFT_TIMEOUT 200 + #define NO_AUTO_SHIFT_SPECIAL + #define NO_AUTO_SHIFT_ALPHA +#endif + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 16 +#undef MOUSEKEY_WHEEL_DELAY +#define MOUSEKEY_WHEEL_DELAY 0 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 64 + +#ifdef LOCKING_SUPPORT_ENABLE +# undef LOCKING_SUPPORT_ENABLE +#endif +#ifdef LOCKING_RESYNC_ENABLE +# undef LOCKING_RESYNC_ENABLE +#endif + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#ifndef NO_DEBUG + #define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) + #define NO_PRINT +#endif // !NO_PRINT diff --git a/qmk/users/cwebster2/cwebster2.c b/qmk/users/cwebster2/cwebster2.c new file mode 100644 index 00000000..cfebc12c --- /dev/null +++ b/qmk/users/cwebster2/cwebster2.c @@ -0,0 +1,65 @@ +/* Copyright 2020 Casey Webster + * + * 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 "cwebster2.h" + +userspace_config_t userspace_config; + +__attribute__((weak)) void matrix_scan_keymap(void) {} + +void matrix_scan_user(void) { + static bool has_ran_yet; + if (!has_ran_yet) { + has_ran_yet = true; + startup_user(); + } + + matrix_scan_keymap(); +} + +void keyboard_post_init_rgb(void) { +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION) + /*if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); }*/ + /*if (rgblight_config.enable) {*/ + /*layer_state_set_user(layer_state);*/ + /*uint16_t old_hue = rgblight_config.hue;*/ + uint16_t old_hue = 170; + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 255; i > 0; i--) { + rgblight_sethsv_noeeprom( ( i + old_hue) % 255, 255, 255); + matrix_scan(); + wait_ms(10); + } + /*}*/ +#endif + /*layer_state_set_user(layer_state);*/ +} + +__attribute__((weak)) void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { + userspace_config.raw = 0; + userspace_config.rgb_layer_change = true; + eeconfig_update_user(userspace_config.raw); + eeconfig_init_keymap(); + keyboard_init(); +} + +bool hasAllBitsInMask(uint8_t value, uint8_t mask) { + value &= 0xF; + mask &= 0xF; + + return (value & mask) == mask; +} diff --git a/qmk/users/cwebster2/cwebster2.h b/qmk/users/cwebster2/cwebster2.h new file mode 100644 index 00000000..3d315d67 --- /dev/null +++ b/qmk/users/cwebster2/cwebster2.h @@ -0,0 +1,51 @@ +/* Copyright 2020 Casey Webster + * + * 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 . + */ +#pragma once + +#include "my_miryoku.h" +#include "keycodes.h" +#include "eeprom.h" + +#define LAYOUT_kyria_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_zen_wrapper(...) LAYOUT(__VA_ARGS__) + +enum userspace_layers { + _COLEMAK = 0, + _QWERTY, + _GAME, + _FN, + _SYMBOLS, + _NUM, + _NAV, + _MOUSE, + _MEDIA, + __LAST +}; + +void keyboard_post_init_rgb(void); +void matrix_scan_keymap(void); +void eeconfig_init_keymap(void); +bool hasAllBitsInMask(uint8_t value, uint8_t mask); + + +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} userspace_config_t; + +extern userspace_config_t userspace_config; diff --git a/qmk/users/cwebster2/keycodes.c b/qmk/users/cwebster2/keycodes.c new file mode 100644 index 00000000..39b4341b --- /dev/null +++ b/qmk/users/cwebster2/keycodes.c @@ -0,0 +1,53 @@ +/* Copyright 2020 Casey Webster + * + * 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 "keycodes.h" + +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t my_colon_timer; + + switch (keycode) { + case KC_LCCL: + if (record->event.pressed) { + my_colon_timer = timer_read(); + register_code(KC_LCTL); + } else { + unregister_code(KC_LCTL); + if (timer_elapsed(my_colon_timer) < TAPPING_TERM) { + SEND_STRING(":"); + } + } + return false; + } + return process_record_keymap(keycode, record); +} + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LGUI_T(KC_A): + case LALT_T(KC_S): + case LCTL_T(KC_D): + case LSFT_T(KC_F): + case RSFT_T(KC_J): + case RCTL_T(KC_K): + case RALT_T(KC_L): + case RGUI_T(KC_SCLN): + return TAPPING_TERM + 150; + default: + return TAPPING_TERM; + } +} diff --git a/qmk/users/cwebster2/keycodes.h b/qmk/users/cwebster2/keycodes.h new file mode 100644 index 00000000..b6363d64 --- /dev/null +++ b/qmk/users/cwebster2/keycodes.h @@ -0,0 +1,27 @@ +/* Copyright 2020 Casey Webster + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H + +enum userspace_custom_keycodes { + KC_LCCL = SAFE_RANGE, + NEW_SAFE_RANGE +}; + +#define KC_CTLBS CTL_T(KC_BSPC) +#define KC_ALTCL LALT_T(KC_CAPS) +#define KC_LOCK LGUI(LCTL(KC_L)) diff --git a/qmk/users/cwebster2/my_miryoku.h b/qmk/users/cwebster2/my_miryoku.h new file mode 100644 index 00000000..943855ad --- /dev/null +++ b/qmk/users/cwebster2/my_miryoku.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Casey Webster + * + * 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 . + */ +#pragma once + +#define _______QWERTY_L1______ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _______QWERTY_L2______ LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G +#define _______QWERTY_L3______ KC_Z, KC_X, KC_C, KC_V, KC_B +#define _______QWERTY_R1______ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _______QWERTY_R2______ KC_H, RSFT_T(KC_J), RCTL_T(KC_K), RALT_T(KC_L), RGUI_T(KC_SCLN) +#define _______QWERTY_R3______ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +#define _______COLEMAK_L1_____ KC_Q, KC_W, KC_F, KC_P, KC_B +#define _______COLEMAK_L2_____ LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G +#define _______COLEMAK_L3_____ KC_Z, KC_X, KC_C, KC_D, KC_V +#define _______COLEMAK_R1_____ KC_J, KC_L, KC_U, KC_Y, KC_QUOT +#define _______COLEMAK_R2_____ KC_M, RSFT_T(KC_N), RCTL_T(KC_E), RALT_T(KC_I), RGUI_T(KC_O) +#define _______COLEMAK_R3_____ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH + +#define _______THUMBS_L_______ LT(_MOUSE,KC_ESC), LT(_NAV,KC_SPC), LT(_MEDIA, KC_TAB) +#define _______THUMBS_R_______ LT(_FN, KC_ENT), LT(_NUM,KC_BSPC), LT(_SYMBOLS,KC_DEL) + +#define _______NAKED_R___T____ KC_ENT, KC_BSPC, KC_DEL +#define _______NAKED_L___T____ KC_ESC, KC_SPC, KC_TAB + +#define _______INACTIVE_R1____ KC_LOCK, KC_TRNS, KC_TRNS, KC_TRNS, RESET +#define _______INACTIVE_R2____ KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI +#define _______INACTIVE_R3____ KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS + +#define _______INACTIVE_L1____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LOCK +#define _______INACTIVE_L2____ KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_TRNS +#define _______INACTIVE_L3____ KC_TRNS, KC_RALT, KC_LEFT, KC_RGHT, KC_TRNS + +#define _______INACTIVE__T____ KC_TRNS, KC_TRNS, KC_TRNS + + +#define _______SYM______L1____ KC_RCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_LCBR +#define _______SYM______L2____ KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS +#define _______SYM______L3____ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE +#define _______SYM_______T____ KC_LPRN, KC_RPRN, KC_UNDS + +#define _______NUM______L1____ KC_RBRC, KC_7, KC_8, KC_9, KC_LBRC +#define _______NUM______L2____ KC_SCLN, KC_4, KC_5, KC_6, KC_EQL +#define _______NUM______L3____ KC_GRV, KC_1, KC_2, KC_3, KC_SLSH +#define _______NUM_______T____ KC_DOT, KC_0, KC_MINS + +#define _______FN_______L1____ KC_F12, KC_F7, KC_F8, KC_F9, KC_SYSREQ +#define _______FN_______L2____ KC_F11, KC_F4, KC_F5, KC_F6, KC_TRNS +#define _______FN_______L3____ KC_F10, KC_F1, KC_F2, KC_F3, KC_BSLS +#define _______FN________T____ KC_MENU, KC_SLSH, KC_TRNS + +#define _______NAV______R1____ KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_AGIN +#define _______NAV______R2____ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS +#define _______NAV______R3____ KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS +#define _______NAV_______T____ KC_ENT, KC_BSPC, KC_DEL + +#define _______MEDIA____R1____ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI +#define _______MEDIA____R2____ KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, KC_TRNS +#define _______MEDIA____R3____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +#define _______MEDIA_____T____ KC_MSTP, KC_MPLY, KC_MUTE + +#define _______MOUSE____R1____ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +#define _______MOUSE____R2____ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS +#define _______MOUSE____R3____ KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_TRNS +#define _______MOUSE_____T____ KC_BTN1, KC_BTN3, KC_BTN2 diff --git a/qmk/users/cwebster2/rules.mk b/qmk/users/cwebster2/rules.mk new file mode 100644 index 00000000..f39d4ebc --- /dev/null +++ b/qmk/users/cwebster2/rules.mk @@ -0,0 +1,13 @@ +AUTO_SHIFT_ENABLE = no # Enable autoshift +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +BOOTMAGIC_ENABLE = no +GRAVE_ESC_ENABLE = no +CONSOLE_ENABLE = no +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +LTO_ENABLE = yes + +SRC += cwebster2.c +SRC += keycodes.c diff --git a/qmk/users/draevin/LICENSE b/qmk/users/draevin/LICENSE new file mode 100644 index 00000000..33c17847 --- /dev/null +++ b/qmk/users/draevin/LICENSE @@ -0,0 +1,14 @@ +Copyright 2020 Draevin Luke @draevin + +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 . diff --git a/qmk/users/draevin/README.md b/qmk/users/draevin/README.md new file mode 100644 index 00000000..e635fdf2 --- /dev/null +++ b/qmk/users/draevin/README.md @@ -0,0 +1,38 @@ +# Userspace - Draevin + +## Notable Files + +- [draevin.h](draevin.h) - Standard layers, keys, and tap dance key and config for all my boards +- [draevin.c](draevin.c) - Colemak/QWERTY switch, KC_MAKE, and Shift/CAPS TD +- [wrappers](wrappers.h) - QWERTY, Colemak, F Row, Num Row, and `_FN` layer layout wrappers + +## Keymap themes + +Some general ideas shared between my maps + +- Colemak and QWERTY layouts + - In wrappers + - All are Colemak default with `CM_QW` switch +- Nav and punctuation `_FN` layer + - In wrappers + - Right hand home arrows + - Pinky `HOME`/`END` for ***speed*** + - Inner grouping symbols to decrease reach +- Split space + - Left thumb `MO(_FN)` is standard, but on the wrong side in the Quefrency map (silly soldering error, but not bad enough to fix) + - Quefrency is still *technically* split though, right? `*<:^)` +- Re-organized right mods + - Personal preference on wanting easier right thumb `CTRL` +- Real `DEL` key + - I can't seem to get away from it with layering, so all my maps have a delete key + - Sinc/Quefrency have it in the +5 column on the right + - DZ60 has it in the split backspace +- `KC_MAKE` + +## Keymaps + +- [DZ60](../../keyboards/dz60/keymaps/draevin/keymap.c) +- [Sinc 80](../../keyboards/keebio/sinc/keymaps/draevin/keymap.c) +- [Quefrency 65 w/ Macro](../../keyboards/keebio/quefrency/keymaps/draevin/keymap.c) + - Horribly under-utilized macro block because I thought I needed more keys than I actually do (so sad) + - Left side volume and paging rotary diff --git a/qmk/users/draevin/config.h b/qmk/users/draevin/config.h new file mode 100644 index 00000000..9a3bb743 --- /dev/null +++ b/qmk/users/draevin/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke @draevin + +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 . +*/ + +#pragma once + +#define TAPPING_TOGGLE 2 +#define TAPPING_TERM 150 + +#define MOUSEKEY_WHEEL_DELAY 20 +#define MOUSEKEY_WHEEL_INTERVAL 80 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 30 \ No newline at end of file diff --git a/qmk/users/draevin/draevin.c b/qmk/users/draevin/draevin.c new file mode 100644 index 00000000..95570bf3 --- /dev/null +++ b/qmk/users/draevin/draevin.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke @draevin + +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 "draevin.h" + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CM_QW: // Switch between Colemak and QWERTY + if (record->event.pressed) { + layer_invert(_CM); + layer_invert(_QW); + } + return false; + case KC_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":flash\n"); + reset_keyboard(); + } + break; + case PRNPAIR: + if (record->event.pressed) { + SEND_STRING("()"); + tap_code(KC_LEFT); + } + break; + case BRCPAIR: + if (record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); + if (shifted) { + unregister_code(KC_LSFT); + unregister_code(KC_RSFT); + SEND_STRING("{}"SS_TAP(X_LEFT)); + } + else { + SEND_STRING("[]"SS_TAP(X_LEFT)); + } + } + break; + } + return true; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) // shift/caps TD +}; diff --git a/qmk/users/draevin/draevin.h b/qmk/users/draevin/draevin.h new file mode 100644 index 00000000..20dc77d9 --- /dev/null +++ b/qmk/users/draevin/draevin.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke @draevin + +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 . +*/ + +#pragma once + +#include QMK_KEYBOARD_H +#include "wrappers.h" + +enum my_layers { + _CM, + _QW, + _FN, +}; + +enum my_keycodes { + CM_QW = SAFE_RANGE, // Switch between Colemak and QWERTY + KC_MAKE, + PRNPAIR, + BRCPAIR, + NEW_SAFE_RANGE +}; + +enum my_taps { + TD_CAPS // shift/caps TD +}; diff --git a/qmk/users/draevin/rules.mk b/qmk/users/draevin/rules.mk new file mode 100644 index 00000000..7d674049 --- /dev/null +++ b/qmk/users/draevin/rules.mk @@ -0,0 +1,12 @@ +SRC += draevin.c + +LTO_ENABLE = yes +MOUSEKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +CONSOLE_ENABLE = no +SLEEP_LED_ENABLE = no \ No newline at end of file diff --git a/qmk/users/draevin/wrappers.h b/qmk/users/draevin/wrappers.h new file mode 100644 index 00000000..006a9aa9 --- /dev/null +++ b/qmk/users/draevin/wrappers.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke @draevin + +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 . +*/ + +#pragma once + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + +#define _________________FROW_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FROW_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G +#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D +#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O +#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define ___________________FN_L1___________________ _______, _______, KC_WH_U, _______, BRCPAIR +#define ___________________FN_L2___________________ KC_HOME, _______, KC_WH_D, _______, PRNPAIR + +#define ___________________FN_R1___________________ KC_RBRC, _______, KC_UP, _______, _______ +#define ___________________FN_R2___________________ KC_RPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END +#define ___________________FN_R3___________________ _______, _______, RGB_TOG, RGB_MOD, KC_BSLS diff --git a/qmk/users/drashna/config.h b/qmk/users/drashna/config.h index 7d83c788..9fc65e5c 100644 --- a/qmk/users/drashna/config.h +++ b/qmk/users/drashna/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once // Use custom magic number so that when switching branches, EEPROM always gets reset @@ -7,11 +23,6 @@ #define USB_POLLING_INTERVAL_MS 1 #ifdef AUDIO_ENABLE -# if __GNUC__ > 5 -# if __has_include("drashna_song_list.h") -# include "drashna_song_list.h" -# endif // if file exists -# endif // __GNUC__ # define AUDIO_CLICKY # define STARTUP_SONG SONG(RICK_ROLL) @@ -49,7 +60,7 @@ // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 // # define EECONFIG_RGB_MATRIX (uint32_t *)16 -# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) +# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad) # define DISABLE_RGB_MATRIX_ALPHAS_MODS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT @@ -63,7 +74,7 @@ # define DISABLE_RGB_MATRIX_CYCLE_ALL # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON @@ -100,7 +111,7 @@ #ifdef QMK_KEYS_PER_SCAN # undef QMK_KEYS_PER_SCAN -# define QMK_KEYS_PER_SCAN 1 +# define QMK_KEYS_PER_SCAN 2 #endif // !QMK_KEYS_PER_SCAN // this makes it possible to do rolling combos (zx) with keys that @@ -111,6 +122,7 @@ #undef PERMISSIVE_HOLD //#define TAPPING_FORCE_HOLD //#define RETRO_TAPPING +#define TAPPING_TERM_PER_KEY #define FORCE_NKRO diff --git a/qmk/users/drashna/drashna.c b/qmk/users/drashna/drashna.c index 5c0f1802..ec648462 100644 --- a/qmk/users/drashna/drashna.c +++ b/qmk/users/drashna/drashna.c @@ -1,19 +1,18 @@ -/* -Copyright 2017 Christopher Courtney @drashna - -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 . -*/ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" diff --git a/qmk/users/drashna/drashna.h b/qmk/users/drashna/drashna.h index dd2b0225..772005a0 100644 --- a/qmk/users/drashna/drashna.h +++ b/qmk/users/drashna/drashna.h @@ -1,19 +1,18 @@ -/* -Copyright 2017 Christopher Courtney @drashna - -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 . -*/ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ #pragma once #include QMK_KEYBOARD_H diff --git a/qmk/users/drashna/oled_stuff.c b/qmk/users/drashna/oled_stuff.c index 6503b970..46288aad 100644 --- a/qmk/users/drashna/oled_stuff.c +++ b/qmk/users/drashna/oled_stuff.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" extern uint8_t is_master; diff --git a/qmk/users/drashna/oled_stuff.h b/qmk/users/drashna/oled_stuff.h index 662e206b..7f2786d0 100644 --- a/qmk/users/drashna/oled_stuff.h +++ b/qmk/users/drashna/oled_stuff.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "quantum.h" diff --git a/qmk/users/drashna/pimoroni_trackball.c b/qmk/users/drashna/pimoroni_trackball.c index c5bb560b..9ae094c0 100644 --- a/qmk/users/drashna/pimoroni_trackball.c +++ b/qmk/users/drashna/pimoroni_trackball.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "pimoroni_trackball.h" #include "i2c_master.h" @@ -6,7 +22,7 @@ static int16_t x_offset = 0; static int16_t y_offset = 0; static int16_t h_offset = 0; static int16_t v_offset = 0; -static float precisionSpeed = 1; +static float precisionSpeed = 1; #ifndef I2C_TIMEOUT # define I2C_TIMEOUT 100 @@ -47,17 +63,37 @@ __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* m } } -float trackball_get_precision(void) { return precisionSpeed; } -void trackball_set_precision(float precision) { precisionSpeed = precision; } -bool trackball_is_scrolling(void) { return scrolling; } -void trackball_set_scrolling(bool scroll) { scrolling = scroll; } +void trackball_register_button(bool pressed, enum mouse_buttons button) { + report_mouse_t currentReport = pointing_device_get_report(); + if (pressed) { + currentReport.buttons |= button; + } else { + currentReport.buttons &= ~button; + } + pointing_device_set_report(currentReport); +} -__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00,0x00,0x00,0x4F); } +float trackball_get_precision(void) { return precisionSpeed; } +void trackball_set_precision(float precision) { precisionSpeed = precision; } +bool trackball_is_scrolling(void) { return scrolling; } +void trackball_set_scrolling(bool scroll) { scrolling = scroll; } + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + + +__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); } void pointing_device_task(void) { - static bool debounce; + static bool debounce; static uint16_t debounce_timer; - uint8_t state[5] = {}; + uint8_t state[5] = {}; if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { if (!state[4] && !debounce) { if (scrolling) { @@ -85,7 +121,7 @@ void pointing_device_task(void) { } } else { if (state[4]) { - debounce = true; + debounce = true; debounce_timer = timer_read(); } } @@ -97,7 +133,6 @@ void pointing_device_task(void) { trackball_check_click(state[4] & (1 << 7), &mouse); - #ifndef PIMORONI_TRACKBALL_ROTATE update_member(&mouse.x, &x_offset); update_member(&mouse.y, &y_offset); @@ -110,5 +145,7 @@ void pointing_device_task(void) { update_member(&mouse.v, &h_offset); #endif pointing_device_set_report(mouse); - pointing_device_send(); + if (has_report_changed(mouse, pointing_device_get_report())) { + pointing_device_send(); + } } diff --git a/qmk/users/drashna/pimoroni_trackball.h b/qmk/users/drashna/pimoroni_trackball.h index 7e8a7cc8..83d248d3 100644 --- a/qmk/users/drashna/pimoroni_trackball.h +++ b/qmk/users/drashna/pimoroni_trackball.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "quantum.h" @@ -11,6 +27,7 @@ void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); void trackball_check_click(bool pressed, report_mouse_t *mouse); +void trackball_register_button(bool pressed, enum mouse_buttons button); float trackball_get_precision(void); void trackball_set_precision(float precision); diff --git a/qmk/users/drashna/process_records.c b/qmk/users/drashna/process_records.c index 8e3d3356..19bdef73 100644 --- a/qmk/users/drashna/process_records.c +++ b/qmk/users/drashna/process_records.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" uint16_t copy_paste_timer; @@ -21,304 +37,171 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { process_record_user_oled(keycode, record); #endif // OLED - if (process_record_keymap(keycode, record) && process_record_secrets(keycode, record) + if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record) #ifdef RGB_MATRIX_ENABLE && process_record_user_rgb_matrix(keycode, record) #endif #ifdef RGBLIGHT_ENABLE && process_record_user_rgb_light(keycode, record) #endif - ) { - switch (keycode) { - case KC_QWERTY ... KC_WORKMAN: - if (record->event.pressed) { - uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); - if (!mods) { - set_single_persistent_default_layer(keycode - KC_QWERTY); - } else if (mods & MOD_MASK_SHIFT) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 4); - } else if (mods & MOD_MASK_CTRL) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 8); - } - } - break; + && true)) { + return false; + } - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { + switch (keycode) { + case KC_QWERTY ... KC_WORKMAN: + if (record->event.pressed) { + uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); + if (!mods) { + set_single_persistent_default_layer(keycode - KC_QWERTY); + } else if (mods & MOD_MASK_SHIFT) { + set_single_persistent_default_layer(keycode - KC_QWERTY + 4); + } else if (mods & MOD_MASK_CTRL) { + set_single_persistent_default_layer(keycode - KC_QWERTY + 8); + } + } + break; + + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { #ifndef MAKE_BOOTLOADER - uint8_t temp_mod = mod_config(get_mods()); - uint8_t temp_osm = mod_config(get_oneshot_mods()); - clear_mods(); - clear_oneshot_mods(); + uint8_t temp_mod = mod_config(get_mods()); + uint8_t temp_osm = mod_config(get_oneshot_mods()); + clear_mods(); + clear_oneshot_mods(); #endif - send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY); + send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY); #ifndef MAKE_BOOTLOADER - if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) #endif - { - send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY); + { + send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY); #ifndef MAKE_BOOTLOADER - } else { - send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY); -#endif - } - send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); -#ifdef RGB_MATRIX_SPLIT_RIGHT - send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); -# ifndef OLED_DRIVER_ENABLE - send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); -# endif -#endif - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); - } - - break; - - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - break; - - case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them -#ifdef TAP_DANCE_ENABLE - if (record->event.pressed) { - for (uint8_t index = 0; index < 4; index++) { - diablo_timer[index].key_interval = 0; - } - } -#endif // TAP_DANCE_ENABLE - break; - - case KC_CCCV: // One key copy/paste - if (record->event.pressed) { - copy_paste_timer = timer_read(); } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - tap_code16(LCTL(KC_C)); - } else { // Tap, paste - tap_code16(LCTL(KC_V)); - } - } - break; -#ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); - } - break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_string("┬─┬ノ( º _ ºノ)"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_string("¯\\_(ツ)_/¯"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_string("ಠ_ಠ"); - } - break; + send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY); #endif - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - if (record->event.pressed) { - userspace_config.rgb_layer_change ^= 1; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_layer_change) { -# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) - rgblight_enable_noeeprom(); -# endif - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) -# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) - } else { - rgblight_disable_noeeprom(); -# endif - } } + send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); +#ifdef RGB_MATRIX_SPLIT_RIGHT + send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); +# ifndef OLED_DRIVER_ENABLE + send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); +# endif +#endif + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); + } + + break; + + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); + } + break; + + case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them +#ifdef TAP_DANCE_ENABLE + if (record->event.pressed) { + for (uint8_t index = 0; index < 4; index++) { + diablo_timer[index].key_interval = 0; + } + } +#endif // TAP_DANCE_ENABLE + break; + + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + tap_code16(LCTL(KC_C)); + } else { // Tap, paste + tap_code16(LCTL(KC_V)); + } + } + break; +#ifdef UNICODE_ENABLE + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_string("┬─┬ノ( º _ ºノ)"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_string("¯\\_(ツ)_/¯"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_string("ಠ_ಠ"); + } + break; +#endif + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) { + userspace_config.rgb_layer_change ^= 1; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_layer_change) { +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + rgblight_enable_noeeprom(); +# endif + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) +# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) + } else { + rgblight_disable_noeeprom(); +# endif + } + } #endif // RGBLIGHT_ENABLE - break; + break; #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - case RGB_TOG: - // Split keyboards need to trigger on key-up for edge-case issue + case RGB_TOG: + // Split keyboards need to trigger on key-up for edge-case issue # ifndef SPLIT_KEYBOARD - if (record->event.pressed) { + if (record->event.pressed) { # else - if (!record->event.pressed) { + if (!record->event.pressed) { # endif # if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_toggle(); + rgblight_toggle(); # endif # if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_toggle(); + rgb_matrix_toggle(); # endif - } - return false; - break; - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { - bool is_eeprom_updated; + } + return false; + break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + if (record->event.pressed) { + bool is_eeprom_updated; # if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled - if (userspace_config.rgb_layer_change) { - userspace_config.rgb_layer_change = false; - dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - is_eeprom_updated = true; - } + // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (userspace_config.rgb_layer_change) { + userspace_config.rgb_layer_change = false; + dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + is_eeprom_updated = true; + } # endif # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { - userspace_config.rgb_matrix_idle_anim = false; - dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); - is_eeprom_updated = true; - } -# endif - if (is_eeprom_updated) { - eeconfig_update_user(userspace_config.raw); - } + if (userspace_config.rgb_matrix_idle_anim) { + userspace_config.rgb_matrix_idle_anim = false; + dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); + is_eeprom_updated = true; } - -# if defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES) - if (keycode == RGB_MODE_FORWARD && record->event.pressed) { - uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); - if (shifted) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step_reverse(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step_reverse(); -# endif - } else { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step(); -# endif - } - } else if (keycode == RGB_MODE_REVERSE && record->event.pressed) { - uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); - if (shifted) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step(); -# endif - } else { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_step_reverse(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_step_reverse(); -# endif - } - } else if (keycode == RGB_HUI) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_hue(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_hue(); -# endif - } - } else if (keycode == RGB_HUD) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_hue(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_hue(); -# endif - } - } else if (keycode == RGB_SAI) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_sat(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_sat(); -# endif - } - } else if (keycode == RGB_SAD) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_sat(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_sat(); -# endif - } - } else if (keycode == RGB_VAI) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_val(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_val(); -# endif - } - } else if (keycode == RGB_VAD) { -# ifndef SPLIT_KEYBOARD - if (record->event.pressed) { -# else - if (!record->event.pressed) { -# endif -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_val(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_val(); -# endif - } - } else if (keycode == RGB_SPI) { - if (record->event.pressed) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_increase_speed(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_increase_speed(); -# endif - } - } else if (keycode == RGB_SPD) { - if (record->event.pressed) { -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) - rgblight_decrease_speed(); -# endif -# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) - rgb_matrix_decrease_speed(); -# endif - } - } - return false; # endif + if (is_eeprom_updated) { + eeconfig_update_user(userspace_config.raw); + } + } #endif - } } return true; } diff --git a/qmk/users/drashna/process_records.h b/qmk/users/drashna/process_records.h index 999882d4..d41be962 100644 --- a/qmk/users/drashna/process_records.h +++ b/qmk/users/drashna/process_records.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "drashna.h" diff --git a/qmk/users/drashna/rgb_matrix_stuff.c b/qmk/users/drashna/rgb_matrix_stuff.c index c9c3224f..52e26123 100644 --- a/qmk/users/drashna/rgb_matrix_stuff.c +++ b/qmk/users/drashna/rgb_matrix_stuff.c @@ -1,5 +1,21 @@ -#include "drashna.h" +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" +#include "rgb_matrix.h" #include "lib/lib8tion/lib8tion.h" extern led_config_t g_led_config; diff --git a/qmk/users/drashna/rgb_matrix_stuff.h b/qmk/users/drashna/rgb_matrix_stuff.h index 35b01047..592f9c9e 100644 --- a/qmk/users/drashna/rgb_matrix_stuff.h +++ b/qmk/users/drashna/rgb_matrix_stuff.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "quantum.h" diff --git a/qmk/users/drashna/rgb_stuff.c b/qmk/users/drashna/rgb_stuff.c index defee9ac..d98f7cc2 100644 --- a/qmk/users/drashna/rgb_stuff.c +++ b/qmk/users/drashna/rgb_stuff.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "drashna.h" #include "rgb_stuff.h" #include "eeprom.h" @@ -152,14 +168,15 @@ void matrix_scan_rgb_light(void) { void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { rgblight_sethsv_noeeprom(hue, sat, val); - wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly + // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly rgblight_mode_noeeprom(mode); } layer_state_t layer_state_set_rgb_light(layer_state_t state) { #ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { - switch (get_highest_layer(state)) { + uint8_t mode = layer_state_cmp(state,_MODS) ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; + switch (get_highest_layer(state|default_layer_state)) { case _MACROS: rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); break; @@ -181,37 +198,30 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) { case _ADJUST: rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); break; - default: // for any other layers, or the default layer - { - uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; - switch (get_highest_layer(default_layer_state)) { - case _COLEMAK: - rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); - break; - case _DVORAK: - rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); - break; - case _WORKMAN: - rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); - break; - case _NORMAN: - rgblight_set_hsv_and_mode(HSV_CORAL, mode); - break; - case _MALTRON: - rgblight_set_hsv_and_mode(HSV_YELLOW, mode); - break; - case _EUCALYN: - rgblight_set_hsv_and_mode(HSV_PINK, mode); - break; - case _CARPLAX: - rgblight_set_hsv_and_mode(HSV_BLUE, mode); - break; - default: - rgblight_set_hsv_and_mode(HSV_CYAN, mode); - break; - } + case _COLEMAK: + rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); + break; + case _DVORAK: + rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); + break; + case _WORKMAN: + rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); + break; + case _NORMAN: + rgblight_set_hsv_and_mode(HSV_CORAL, mode); + break; + case _MALTRON: + rgblight_set_hsv_and_mode(HSV_YELLOW, mode); + break; + case _EUCALYN: + rgblight_set_hsv_and_mode(HSV_PINK, mode); + break; + case _CARPLAX: + rgblight_set_hsv_and_mode(HSV_BLUE, mode); + break; + default: + rgblight_set_hsv_and_mode(HSV_CYAN, mode); break; - } } } #endif // RGBLIGHT_ENABLE diff --git a/qmk/users/drashna/rgb_stuff.h b/qmk/users/drashna/rgb_stuff.h index 98a552db..0153adb5 100644 --- a/qmk/users/drashna/rgb_stuff.h +++ b/qmk/users/drashna/rgb_stuff.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "quantum.h" diff --git a/qmk/users/drashna/rgblight_breathe_table.h b/qmk/users/drashna/rgblight_breathe_table.h index 4c6ae38f..b6f7a13a 100644 --- a/qmk/users/drashna/rgblight_breathe_table.h +++ b/qmk/users/drashna/rgblight_breathe_table.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #ifndef RGBLIGHT_EFFECT_BREATHE_TABLE #define RGBLIGHT_EFFECT_BREATHE_TABLE diff --git a/qmk/users/drashna/tap_dances.c b/qmk/users/drashna/tap_dances.c index 65019ab7..01873489 100644 --- a/qmk/users/drashna/tap_dances.c +++ b/qmk/users/drashna/tap_dances.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "tap_dances.h" #define NUM_OF_DIABLO_KEYS 4 diff --git a/qmk/users/drashna/tap_dances.h b/qmk/users/drashna/tap_dances.h index 44fa0b93..7f73f280 100644 --- a/qmk/users/drashna/tap_dances.h +++ b/qmk/users/drashna/tap_dances.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "drashna.h" diff --git a/qmk/users/drashna/template.c b/qmk/users/drashna/template.c index 833447da..f98964ae 100644 --- a/qmk/users/drashna/template.c +++ b/qmk/users/drashna/template.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 "template.h" // Add reconfigurable functions here, for keymap customization diff --git a/qmk/users/drashna/template.h b/qmk/users/drashna/template.h index 178f96e2..cb1ad75d 100644 --- a/qmk/users/drashna/template.h +++ b/qmk/users/drashna/template.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include QMK_KEYBOARD_H diff --git a/qmk/users/drashna/wrappers.h b/qmk/users/drashna/wrappers.h index d22e2959..ed4022aa 100644 --- a/qmk/users/drashna/wrappers.h +++ b/qmk/users/drashna/wrappers.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + #pragma once #include "drashna.h" /* @@ -17,6 +33,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) #define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__) +#define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__) /* Blocks for each of the four major keyboard layouts diff --git a/qmk/users/dudeofawesome/dudeofawesome.h b/qmk/users/dudeofawesome/dudeofawesome.h index 91557925..dbbbd21e 100644 --- a/qmk/users/dudeofawesome/dudeofawesome.h +++ b/qmk/users/dudeofawesome/dudeofawesome.h @@ -7,6 +7,10 @@ #define TAPPING_TOGGLE 2 #ifdef AUDIO_ENABLE + #ifdef WORKMAN_SOUND + #undef WORKMAN_SOUND + #endif + #define WORKMAN_SOUND \ E__NOTE(_GS7), \ ED_NOTE(_E7), \ diff --git a/qmk/users/greatwizard/config.h b/qmk/users/greatwizard/config.h new file mode 100644 index 00000000..2ee9e509 --- /dev/null +++ b/qmk/users/greatwizard/config.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#define TAP_CODE_DELAY 5 + +#define RGBLIGHT_ANIMATIONS + +#ifdef TAP_DANCE_ENABLE +# define TAPPING_TERM 175 +# define PERMISSIVE_HOLD +#endif + +#ifdef AUTO_SHIFT_ENABLE +# define AUTO_SHIFT_TIMEOUT 135 +# define NO_AUTO_SHIFT_SPECIAL +# define NO_AUTO_SHIFT_NUMERIC +#endif diff --git a/qmk/users/greatwizard/fn.h b/qmk/users/greatwizard/fn.h new file mode 100644 index 00000000..f842bf04 --- /dev/null +++ b/qmk/users/greatwizard/fn.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +#define FN MO(_FN) diff --git a/qmk/users/greatwizard/game.c b/qmk/users/greatwizard/game.c new file mode 100644 index 00000000..eecabfa4 --- /dev/null +++ b/qmk/users/greatwizard/game.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "game.h" + +bool process_record_game(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case GAME: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAME); + } + return false; + } + return true; +} diff --git a/qmk/users/greatwizard/game.h b/qmk/users/greatwizard/game.h new file mode 100644 index 00000000..504129b4 --- /dev/null +++ b/qmk/users/greatwizard/game.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +bool process_record_game(uint16_t keycode, keyrecord_t *record); diff --git a/qmk/users/greatwizard/git.c b/qmk/users/greatwizard/git.c new file mode 100644 index 00000000..4bf68fe6 --- /dev/null +++ b/qmk/users/greatwizard/git.c @@ -0,0 +1,127 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "git.h" + +bool process_record_git(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case GIT_ADD: + if (record->event.pressed) { + SEND_STRING("git add "); + } + return false; + case GIT_BRANCH: + if (record->event.pressed) { + SEND_STRING("git branch "); + } + return false; + case GIT_CHECKOUT: + if (record->event.pressed) { + SEND_STRING("git checkout "); + } + return false; + case GIT_CHERRYPICK: + if (record->event.pressed) { + SEND_STRING("git cherry-pick "); + } + return false; + case GIT_COMMIT: + if (record->event.pressed) { + SEND_STRING("git commit -m \"\""SS_TAP(X_LEFT)); + } + return false; + case GIT_DIFF: + if (record->event.pressed) { + SEND_STRING("git diff "); + } + return false; + case GIT_FETCH: + if (record->event.pressed) { + SEND_STRING("git fetch "); + } + return false; + case GIT_GREP: + if (record->event.pressed) { + SEND_STRING("git grep "); + } + return false; + case GIT_LOG: + if (record->event.pressed) { + SEND_STRING("git log --decorate --oneline --graph "); + } + return false; + case GIT_INIT: + if (record->event.pressed) { + SEND_STRING("git init "); + } + return false; + case GIT_MV: + if (record->event.pressed) { + SEND_STRING("git mv "); + } + return false; + case GIT_MERGE: + if (record->event.pressed) { + SEND_STRING("git merge "); + } + return false; + case GIT_PUSH: + if (record->event.pressed) { + SEND_STRING("git push "); + } + return false; + case GIT_PULL: + if (record->event.pressed) { + SEND_STRING("git pull "); + } + return false; + case GIT_REBASE: + if (record->event.pressed) { + SEND_STRING("git rebase "); + } + return false; + case GIT_REMOTE: + if (record->event.pressed) { + SEND_STRING("git remote "); + } + return false; + case GIT_RESET: + if (record->event.pressed) { + SEND_STRING("git reset "); + } + return false; + case GIT_SHOW: + if (record->event.pressed) { + SEND_STRING("git show "); + } + return false; + case GIT_STASH: + if (record->event.pressed) { + SEND_STRING("git stash "); + } + return false; + case GIT_STATUS: + if (record->event.pressed) { + SEND_STRING("git status "); + } + return false; + case GIT_TAG: + if (record->event.pressed) { + SEND_STRING("git tag "); + } + return false; + } + return true; +} diff --git a/qmk/users/greatwizard/git.h b/qmk/users/greatwizard/git.h new file mode 100644 index 00000000..c3b4a617 --- /dev/null +++ b/qmk/users/greatwizard/git.h @@ -0,0 +1,39 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +bool process_record_git(uint16_t keycode, keyrecord_t *record); + +#define GIT_BRC GIT_BRANCH +#define GIT_CKT GIT_CHECKOUT +#define GIT_CPK GIT_CHERRYPICK +#define GIT_CMT GIT_COMMIT +#define GIT_DIF GIT_DIFF +#define GIT_FTC GIT_FETCH +#define GIT_GRP GIT_GREP +#define GIT_INI GIT_INIT +#define GIT_MRG GIT_MERGE +#define GIT_PUS GIT_PUSH +#define GIT_PUL GIT_PULL +#define GIT_RBS GIT_REBASE +#define GIT_RMT GIT_REMOTE +#define GIT_RST GIT_RESET +#define GIT_SHW GIT_SHOW +#define GIT_STS GIT_STASH +#define GIT_STT GIT_STATUS diff --git a/qmk/users/greatwizard/greatwizard.c b/qmk/users/greatwizard/greatwizard.c new file mode 100644 index 00000000..46ee4143 --- /dev/null +++ b/qmk/users/greatwizard/greatwizard.c @@ -0,0 +1,112 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "greatwizard.h" + +void eeconfig_init_user(void) { + user_config_t user_config; + user_config.raw = 0; +#ifdef RGBLIGHT_ENABLE + user_config.rgb_layer_change = true; +#endif + eeconfig_update_user(user_config.raw); + keyboard_init(); +} + +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_ENABLE + keyboard_post_init_rgb(); +#endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef RGBLIGHT_ENABLE + process_record_rgb(keycode, record); +#endif +#ifdef LAYER_GAME + process_record_game(keycode, record); +#endif +#ifdef LAYER_GIT + process_record_git(keycode, record); +#endif +#ifdef LAYERS_PROGRAMMER + process_record_pg(keycode, record); +#endif + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + } + return true; +} + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: +#ifdef LAYERS_PROGRAMMER + case _PROGRAMMER_SHIFTED: +#endif + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + break; + default: + if (clockwise) { + tap_code(KC_MEDIA_NEXT_TRACK); + } else { + tap_code(KC_MEDIA_PREV_TRACK); + } + break; + } +} +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +#ifdef RGBLIGHT_ENABLE + state = layer_state_set_rgb(state); +#endif +#ifdef LAYERS_ORTHO + state = layer_state_set_ortho(state); +#endif + return state; +} + +bool led_update_user(led_t led_state) { +#ifdef RGBLIGHT_ENABLE + led_update_rgb(led_state); +#endif + return true; +} diff --git a/qmk/users/greatwizard/greatwizard.h b/qmk/users/greatwizard/greatwizard.h new file mode 100644 index 00000000..d2e15854 --- /dev/null +++ b/qmk/users/greatwizard/greatwizard.h @@ -0,0 +1,135 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "keymap_helpers.h" +#ifdef TAP_DANCE_ENABLE +# include "tap_dances.h" +#endif +#ifdef RGBLIGHT_ENABLE +# include "underglow.h" +#endif +#ifdef LAYER_FN +# include "fn.h" +#endif +#ifdef LAYER_GAME +# include "game.h" +#endif +#ifdef LAYER_GIT +# include "git.h" +#endif +#ifdef LAYERS_ORTHO +# include "ortho.h" +#endif +#ifdef LAYERS_PROGRAMMER +# include "programmer.h" +#endif + +typedef union { + uint32_t raw; + struct { +#ifdef RGBLIGHT_ENABLE + bool rgb_layer_change : 1; +#endif + }; +} user_config_t; + +enum layers { + _QWERTY, + _WORKMAN, + _COLEMAK, + _DVORAK, +#ifdef LAYER_GAME + _GAME, +#endif +#ifdef LAYERS_PROGRAMMER + _QWERTY_PROGRAMMER, + _WORKMAN_PROGRAMMER, + _COLEMAK_PROGRAMMER, + _DVORAK_PROGRAMMER, + _PROGRAMMER_SHIFTED, +#endif +#ifdef LAYERS_ORTHO + _LOWER, + _RAISE, + _ADJUST, +#endif +#ifdef LAYER_FN + _FN, +#endif +#ifdef LAYER_GIT + _GIT, +#endif +}; + +enum keycodes { + // Persistent layers switcher keys + QWERTY = SAFE_RANGE, + WORKMAN, + COLEMAK, + DVORAK, +#ifdef LAYER_GAME + GAME, +#endif +#ifdef LAYERS_PROGRAMMER + // Workman Programmer + QWERTY_PROGRAMMER, + WORKMAN_PROGRAMMER, + COLEMAK_PROGRAMMER, + DVORAK_PROGRAMMER, + PROGRAMMER_SHIFTED, + PG_GRV, + PG_1, + PG_2, + PG_3, + PG_4, + PG_5, + PG_6, + PG_7, + PG_8, + PG_9, + PG_0, +#endif + // RGB Underglow lights based on the layer key + RGB_LAYER, +#ifdef LAYER_GIT + // GIT commands + GIT_ADD, + GIT_BRANCH, + GIT_CHECKOUT, + GIT_CHERRYPICK, + GIT_COMMIT, + GIT_DIFF, + GIT_FETCH, + GIT_GREP, + GIT_LOG, + GIT_INIT, + GIT_MV, + GIT_MERGE, + GIT_PUSH, + GIT_PULL, + GIT_REBASE, + GIT_REMOTE, + GIT_RESET, + GIT_SHOW, + GIT_STASH, + GIT_STATUS, + GIT_TAG +#endif +}; + +#define RGB_LYR RGB_LAYER diff --git a/qmk/users/greatwizard/keymap_helpers.h b/qmk/users/greatwizard/keymap_helpers.h new file mode 100644 index 00000000..af9f4dfa --- /dev/null +++ b/qmk/users/greatwizard/keymap_helpers.h @@ -0,0 +1,61 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H + +#define _______________QWERTY_LEFT1________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _______________QWERTY_LEFT2________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _______________QWERTY_LEFT3________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _______________QWERTY_RIGHT1_______________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _______________QWERTY_RIGHT2_______________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _______________QWERTY_RIGHT3_______________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +#define _______________WORKMAN_LEFT1_______________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _______________WORKMAN_LEFT2_______________ KC_A, KC_S, KC_H, KC_T, KC_G +#define _______________WORKMAN_LEFT3_______________ KC_Z, KC_X, KC_M, KC_C, KC_V + +#define _______________WORKMAN_RIGHT1______________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _______________WORKMAN_RIGHT2______________ KC_Y, KC_N, KC_E, KC_O, KC_I +#define _______________WORKMAN_RIGHT3______________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH + +#define _______________COLEMAK_LEFT1_______________ KC_Q, KC_W, KC_F, KC_P, KC_G +#define _______________COLEMAK_LEFT2_______________ KC_A, KC_R, KC_S, KC_T, KC_D +#define _______________COLEMAK_LEFT3_______________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _______________COLEMAK_RIGHT1______________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _______________COLEMAK_RIGHT2______________ KC_H, KC_N, KC_E, KC_I, KC_O +#define _______________COLEMAK_RIGHT3______________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH + +#define _______________DVORAK_LEFT1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _______________DVORAK_LEFT2________________ KC_A, KC_O, KC_E, KC_U, KC_I +#define _______________DVORAK_LEFT3________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X + +#define _______________DVORAK_RIGHT1_______________ KC_F, KC_G, KC_C, KC_R, KC_L +#define _______________DVORAK_RIGHT2_______________ KC_D, KC_H, KC_T, KC_N, KC_S +#define _______________DVORAK_RIGHT3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z + +#define _______________NUMBER_LEFT_________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define _______________NUMBER_RIGHT________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define _________________GIT_LEFT1_________________ GIT_CPK, GIT_SHW, GIT_RBS, GIT_RST, GIT_TAG +#define _________________GIT_LEFT2_________________ GIT_ADD, GIT_STT, GIT_DIF, GIT_FTC, GIT_GRP +#define _________________GIT_LEFT3_________________ _______, _______, GIT_CMT, GIT_MV, GIT_BRC + +#define _________________GIT_RIGHT1________________ _______, GIT_PUL, GIT_INI, GIT_RMT, GIT_PUS +#define _________________GIT_RIGHT2________________ GIT_STS, _______, GIT_CKT, GIT_LOG, _______ +#define _________________GIT_RIGHT3________________ _______, GIT_MRG, _______, _______, _______ diff --git a/qmk/users/greatwizard/ortho.c b/qmk/users/greatwizard/ortho.c new file mode 100644 index 00000000..90b25b93 --- /dev/null +++ b/qmk/users/greatwizard/ortho.c @@ -0,0 +1,21 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "ortho.h" + +layer_state_t layer_state_set_ortho(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} diff --git a/qmk/users/greatwizard/ortho.h b/qmk/users/greatwizard/ortho.h new file mode 100644 index 00000000..7fb5d5e6 --- /dev/null +++ b/qmk/users/greatwizard/ortho.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +layer_state_t layer_state_set_ortho(layer_state_t state); + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) diff --git a/qmk/users/greatwizard/programmer.c b/qmk/users/greatwizard/programmer.c new file mode 100644 index 00000000..e0f71ea0 --- /dev/null +++ b/qmk/users/greatwizard/programmer.c @@ -0,0 +1,174 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "programmer.h" + +bool process_record_pg(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY_PROGRAMMER: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY_PROGRAMMER); + } + return false; + case WORKMAN_PROGRAMMER: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN_PROGRAMMER); + } + return false; + case COLEMAK_PROGRAMMER: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK_PROGRAMMER); + } + return false; + case DVORAK_PROGRAMMER: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK_PROGRAMMER); + } + return false; + case PG_GRV: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("`"); + set_mods(current_mods); + } else { + SEND_STRING("~"); + } + } + return false; + case PG_1: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("1"); + set_mods(current_mods); + } else { + SEND_STRING("!"); + } + } + return false; + case PG_2: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("2"); + set_mods(current_mods); + } else { + SEND_STRING("@"); + } + } + return false; + case PG_3: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("3"); + set_mods(current_mods); + } else { + SEND_STRING("#"); + } + } + return false; + case PG_4: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("4"); + set_mods(current_mods); + } else { + SEND_STRING("$"); + } + } + return false; + case PG_5: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("5"); + set_mods(current_mods); + } else { + SEND_STRING("%"); + } + } + return false; + case PG_6: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("6"); + set_mods(current_mods); + } else { + SEND_STRING("^"); + } + } + return false; + case PG_7: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("7"); + set_mods(current_mods); + } else { + SEND_STRING("&"); + } + } + return false; + case PG_8: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("8"); + set_mods(current_mods); + } else { + SEND_STRING("*"); + } + } + return false; + case PG_9: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("9"); + set_mods(current_mods); + } else { + SEND_STRING("("); + } + } + return false; + case PG_0: + if (record->event.pressed) { + uint8_t current_mods = get_mods(); + if (current_mods & MOD_MASK_SHIFT) { + clear_mods(); + SEND_STRING("0"); + set_mods(current_mods); + } else { + SEND_STRING(")"); + } + } + return false; + } + return true; +} diff --git a/qmk/users/greatwizard/programmer.h b/qmk/users/greatwizard/programmer.h new file mode 100644 index 00000000..a79aada2 --- /dev/null +++ b/qmk/users/greatwizard/programmer.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +bool process_record_pg(uint16_t keycode, keyrecord_t *record); + +#define QWERTYP QWERTY_PROGRAMMER +#define WORKMNP WORKMAN_PROGRAMMER +#define COLEMKP COLEMAK_PROGRAMMER +#define DVORAKP DVORAK_PROGRAMMER +#ifdef TAP_DANCE_LSFT_CAPS +# define PG_LSCP TD(TD_PG_LSFT_CAPS) +#else +# define PG_LSCP LM(_PROGRAMMER_SHIFTED, MOD_LSFT) +#endif diff --git a/qmk/users/greatwizard/readme.md b/qmk/users/greatwizard/readme.md new file mode 100644 index 00000000..bc2df7f9 --- /dev/null +++ b/qmk/users/greatwizard/readme.md @@ -0,0 +1,32 @@ +# GreatWizard Userspace + +## Features + +- ⌨️ Switchable and persistent base layers: Qwerty, Workman, Workman, Colemak, Dvorak, 🎮 Game +- ⌨️ Programmer flavored base layers available +- 💃🕺 Tap Dances +- 🆙 Auto Shift +- 👨‍💻 One shot keys git commands layer +- 🌈 RGB Underglow lights based on the layer +- ⚙️ Rotary encoder for volume level and next/previous media +- 🗜️ Enable link time optimization + +## Community Layouts + +- [ortholinear 4x12](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/ortho_4x12/greatwizard) +- [ortholinear 5x12](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/ortho_5x12/greatwizard) + +## Build Options + +### Layers + +- `LAYERS_ORTHO`: add Lower, Raise and Adjust layers/keycodes +- `LAYERS_PROGRAMMER`: add Programmer layers/keycodes +- `LAYER_GAME`: add Game layer/keycode +- `LAYER_GIT`: add GIT layer/keycode +- `LAYER_FN`: add Fn layer/keycode + +### Tap Dances + +- `TAP_DANCE_LALT_GIT`: Double tap on LGUI to use the one shot keys git commands layer +- `TAP_DANCE_LSFT_CAPS`: Double tap on LSHIFT to set Caps Lock diff --git a/qmk/users/greatwizard/rules.mk b/qmk/users/greatwizard/rules.mk new file mode 100644 index 00000000..92bb4ccd --- /dev/null +++ b/qmk/users/greatwizard/rules.mk @@ -0,0 +1,31 @@ +SRC += greatwizard.c + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dances.c +endif + +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + SRC += underglow.c +endif + +ifeq ($(strip $(LAYER_GAME)), yes) + SRC += game.c +endif + +ifeq ($(strip $(LAYER_GIT)), yes) + SRC += git.c +endif + +ifeq ($(strip $(LAYERS_ORTHO)), yes) + SRC += ortho.c +endif + +ifeq ($(strip $(LAYERS_PROGRAMMER)), yes) + SRC += programmer.c +endif + +ifneq ($(PLATFORM),CHIBIOS) + LTO_ENABLE = yes # Enable link time optimization +endif + +AUTO_SHIFT_ENABLE = yes # Autoshift by holding down a key diff --git a/qmk/users/greatwizard/tap_dances.c b/qmk/users/greatwizard/tap_dances.c new file mode 100644 index 00000000..c6be995c --- /dev/null +++ b/qmk/users/greatwizard/tap_dances.c @@ -0,0 +1,105 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "tap_dances.h" + +uint8_t cur_dance(qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } else return 8; +} + +static tap tap_state = { + .is_press_action = true, + .state = 0 +}; + +#ifdef TAP_DANCE_LALT_GIT +void lalt_finished(qk_tap_dance_state_t *state, void *user_data) { + tap_state.state = cur_dance(state); + switch (tap_state.state) { + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + case DOUBLE_TAP: + set_oneshot_layer(_GIT, ONESHOT_START); + break; + } +} + +void lalt_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (tap_state.state) { + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + case DOUBLE_TAP: + clear_oneshot_layer_state(ONESHOT_PRESSED); + break; + } + tap_state.state = 0; +} +#endif + +#ifdef TAP_DANCE_LSFT_CAPS +# ifdef LAYERS_PROGRAMMER +void pg_lsft_finished(qk_tap_dance_state_t *state, void *user_data) { + tap_state.state = cur_dance(state); + switch (tap_state.state) { + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + layer_on(_PROGRAMMER_SHIFTED); + break; + case DOUBLE_SINGLE_TAP: + case DOUBLE_TAP: + tap_code(KC_CAPS); + layer_on(_PROGRAMMER_SHIFTED); + break; + } +} + +void pg_lsft_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (tap_state.state) { + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + layer_off(_PROGRAMMER_SHIFTED); + break; + } + tap_state.state = 0; +} +# endif +#endif + +qk_tap_dance_action_t tap_dance_actions[] = { +#ifdef TAP_DANCE_LALT_GIT + [TD_LALT_GIT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lalt_finished, lalt_reset), +#endif +#ifdef TAP_DANCE_LSFT_CAPS + [TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), +# ifdef LAYERS_PROGRAMMER + [TD_PG_LSFT_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, pg_lsft_finished, pg_lsft_reset), +# endif +#endif +}; diff --git a/qmk/users/greatwizard/tap_dances.h b/qmk/users/greatwizard/tap_dances.h new file mode 100644 index 00000000..944ae455 --- /dev/null +++ b/qmk/users/greatwizard/tap_dances.h @@ -0,0 +1,65 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +typedef struct { + bool is_press_action; + uint8_t state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD, + DOUBLE_TAP, + DOUBLE_HOLD, + DOUBLE_SINGLE_TAP, + TRIPLE_TAP, + TRIPLE_HOLD +}; + +enum { +#ifdef TAP_DANCE_LALT_GIT + TD_LALT_GIT, +#endif +#ifdef TAP_DANCE_LSFT_CAPS + TD_LSFT_CAPS, +# ifdef LAYERS_PROGRAMMER + TD_PG_LSFT_CAPS, +# endif +#endif +}; + +uint8_t cur_dance(qk_tap_dance_state_t *state); + +#ifdef TAP_DANCE_LALT_GIT +void lalt_finished(qk_tap_dance_state_t *state, void *user_data); +void lalt_reset(qk_tap_dance_state_t *state, void *user_data); +# define TD_LALT TD(TD_LALT_GIT) +#endif + +#ifdef TAP_DANCE_LSFT_CAPS +# ifdef LAYERS_PROGRAMMER +void pg_lsft_finished(qk_tap_dance_state_t *state, void *user_data); +void pg_lsft_reset(qk_tap_dance_state_t *state, void *user_data); +# endif +#endif + +#ifdef TAP_DANCE_LSFT_CAPS +# define TD_LSCP TD(TD_LSFT_CAPS) +#endif diff --git a/qmk/users/greatwizard/underglow.c b/qmk/users/greatwizard/underglow.c new file mode 100644 index 00000000..db31290a --- /dev/null +++ b/qmk/users/greatwizard/underglow.c @@ -0,0 +1,109 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 "underglow.h" + +void keyboard_post_init_rgb(void) { + user_config_t user_config; + user_config.raw = eeconfig_read_user(); + if (!user_config.rgb_layer_change) { + return; + } + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_orange(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} + +bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_LAYER: + if (record->event.pressed) { + user_config_t user_config; + user_config.raw = eeconfig_read_user(); + user_config.rgb_layer_change ^= 1; + eeconfig_update_user(user_config.raw); + if (user_config.rgb_layer_change) { + layer_state_set(layer_state); + } + } + return false; + case RGB_MODE_FORWARD ... RGB_MODE_RGBTEST: + if (record->event.pressed) { + user_config_t user_config; + user_config.raw = eeconfig_read_user(); + if (user_config.rgb_layer_change) { + user_config.rgb_layer_change = false; + eeconfig_update_user(user_config.raw); + } + } + return true; + } + return true; +} + +layer_state_t layer_state_set_rgb(layer_state_t state) { + user_config_t user_config; + user_config.raw = eeconfig_read_user(); + if (!user_config.rgb_layer_change) { + return state; + } + switch (get_highest_layer(state)) { + case _QWERTY: +#ifdef LAYERS_PROGRAMMER + case _PROGRAMMER_SHIFTED: +#endif + rgblight_sethsv_noeeprom_orange(); + break; +#ifdef LAYERS_ORTHO + case _LOWER: + rgblight_sethsv_noeeprom_red(); + break; + case _RAISE: + rgblight_sethsv_noeeprom_blue(); + break; + case _ADJUST: + rgblight_sethsv_noeeprom_purple(); + break; +#endif +#ifdef LAYER_FN + case _FN: + rgblight_sethsv_noeeprom_chartreuse(); + break; +#endif +#ifdef LAYER_GIT + case _GIT: + rgblight_sethsv_noeeprom_teal(); + break; +#endif + default: + rgblight_sethsv_noeeprom_white(); + break; + } + return state; +} + +bool led_update_rgb(led_t led_state) { + user_config_t user_config; + user_config.raw = eeconfig_read_user(); + if (!user_config.rgb_layer_change) { + return true; + } + if (led_state.caps_lock) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + } else { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + } + return true; +} diff --git a/qmk/users/greatwizard/underglow.h b/qmk/users/greatwizard/underglow.h new file mode 100644 index 00000000..7e073b85 --- /dev/null +++ b/qmk/users/greatwizard/underglow.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Guillaume Gérard + * + * 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 . + */ +#pragma once + +#include QMK_KEYBOARD_H +#include "greatwizard.h" + +void keyboard_post_init_rgb(void); +bool process_record_rgb(uint16_t keycode, keyrecord_t *record); +layer_state_t layer_state_set_rgb(layer_state_t state); +bool led_update_rgb(led_t led_state); diff --git a/qmk/users/riblee/readme.md b/qmk/users/riblee/readme.md new file mode 100644 index 00000000..54f5cc8b --- /dev/null +++ b/qmk/users/riblee/readme.md @@ -0,0 +1,14 @@ +Copyright 2020 Janos Daniel Reibl @riblee + +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 . diff --git a/qmk/users/riblee/riblee.c b/qmk/users/riblee/riblee.c new file mode 100644 index 00000000..e1fe607e --- /dev/null +++ b/qmk/users/riblee/riblee.c @@ -0,0 +1,166 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 "riblee.h" + +const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); + +// Tap Dance functions +void dance_key_a (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("a"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("á"); + } else { + send_unicode_string("Á"); + } + + reset_tap_dance(state); + } +} + +void dance_key_e (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("e"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("é"); + } else { + send_unicode_string("É"); + } + + reset_tap_dance(state); + } +} + +void dance_key_i (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("i"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("í"); + } else { + send_unicode_string("Í"); + } + + reset_tap_dance(state); + } +} + +void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("o"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ó"); + } else { + send_unicode_string("Ó"); + } + + reset_tap_dance(state); + } else if (state->count == 3) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ö"); + } else { + send_unicode_string("Ö"); + } + + reset_tap_dance(state); + } else if (state->count == 4) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ő"); + } else { + send_unicode_string("Ő"); + } + + reset_tap_dance(state); + } +} + +void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("u"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ú"); + } else { + send_unicode_string("Ú"); + } + + reset_tap_dance(state); + } else if (state->count == 3) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ü"); + } else { + send_unicode_string("Ü"); + } + + reset_tap_dance(state); + } else if (state->count == 4) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ű"); + } else { + send_unicode_string("Ű"); + } + + reset_tap_dance(state); + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(keycode_config(KC_LGUI)); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } else { + unregister_code(keycode_config(KC_LGUI)); + } + return false; + break; + } + return true; +}; diff --git a/qmk/users/riblee/riblee.h b/qmk/users/riblee/riblee.h new file mode 100644 index 00000000..bdaa9f32 --- /dev/null +++ b/qmk/users/riblee/riblee.h @@ -0,0 +1,56 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 . + */ + +#pragma once + +#include QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + BACKLIT +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// Tap Dance declarations +enum { + TD_A, + TD_E, + TD_I, + TD_O, + TD_U, +}; + +void dance_key_a (qk_tap_dance_state_t *, void *); +void dance_key_e (qk_tap_dance_state_t *, void *); +void dance_key_i (qk_tap_dance_state_t *, void *); +void dance_key_o (qk_tap_dance_state_t *, void *); +void dance_key_u (qk_tap_dance_state_t *, void *); + +layer_state_t layer_state_set_user(layer_state_t); +bool process_record_user(uint16_t keycode, keyrecord_t *record); \ No newline at end of file diff --git a/qmk/users/riblee/rules.mk b/qmk/users/riblee/rules.mk new file mode 100644 index 00000000..31c0645d --- /dev/null +++ b/qmk/users/riblee/rules.mk @@ -0,0 +1 @@ +SRC += riblee.c \ No newline at end of file diff --git a/qmk/users/sigul/sigul.h b/qmk/users/sigul/sigul.h index 3182ab02..6adc6706 100644 --- a/qmk/users/sigul/sigul.h +++ b/qmk/users/sigul/sigul.h @@ -25,6 +25,7 @@ enum userspace_custom_keycodes { SECRET2, SECRET3, SECRET4, + SECRET5, NEW_SAFE_RANGE // start new keyboard-level declarations with NEW_SAFE_RANGE }; diff --git a/qmk/users/spotpuff/rules.mk b/qmk/users/spotpuff/rules.mk new file mode 100644 index 00000000..27905483 --- /dev/null +++ b/qmk/users/spotpuff/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/qmk/util/linux_install.sh b/qmk/util/linux_install.sh index 0343b07e..fb896838 100644 --- a/qmk/util/linux_install.sh +++ b/qmk/util/linux_install.sh @@ -235,3 +235,17 @@ fi # Global install tasks install_bootloadhid pip3 install --user -r ${util_dir}/../requirements.txt + +if uname -a | grep -qi microsoft; then + echo "********************************************************************************" + echo "* Detected Windows Subsystem for Linux. *" + echo "* Currently, WSL has no access to USB devices and so flashing from within the *" + echo "* WSL terminal will not work. *" + echo "* *" + echo "* Please install the QMK Toolbox instead: *" + echo "* https://github.com/qmk/qmk_toolbox/releases *" + echo "* Then, map your WSL filesystem as a network drive: *" + echo "* \\\\\\\\wsl$\\ *" + echo "********************************************************************************" + echo +fi diff --git a/qmk/util/msys2_install.sh b/qmk/util/msys2_install.sh index b9219964..5abe4a59 100644 --- a/qmk/util/msys2_install.sh +++ b/qmk/util/msys2_install.sh @@ -1,72 +1,22 @@ #!/bin/bash -dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -download_dir=~/qmk_utils -armtools=gcc-arm-none-eabi util_dir=$(dirname "$0") echo "Installing dependencies needed for the installation" -pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip +pacman --needed --noconfirm --disable-download-timeout -Sy \ + base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \ + mingw-w64-x86_64-python-pip \ + mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \ + mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \ + mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-dfu-util mingw-w64-x86_64-teensy-loader-cli -source "$dir/win_shared_install.sh" - -function install_avr { - pacman --needed --noconfirm --disable-download-timeout -S \ - mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \ - mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli -} - -function install_arm { - rm -f -r "$armtools" - wget -O gcc-arm-none-eabi-8-2019-q3-update-win32.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-win32.zip" - echo "Extracting ARM toolchain..." - unzip -q -d gcc-arm-none-eabi gcc-arm-none-eabi-8-2019-q3-update-win32.zip - rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip - - pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-dfu-util -} - -pushd "$download_dir" - -install_avr - -if [ ! -d "$armtools" ]; then - echo - echo "The ARM toolchain is not installed." - echo "This is needed for building ARM based keyboards." - install_arm -else - while true; do - echo - echo "The ARM toolchain is already installed" - read -p "Do you want to reinstall? (Y/N) " res - case $res in - [Yy]* ) install_arm; break;; - [Nn]* ) break;; - * ) echo "Invalid answer";; - esac - done -fi -popd +echo "Installing drivers" +tmpdir=$(mktemp -d) +cp "${util_dir}/drivers.txt" $tmpdir +pushd $tmpdir > /dev/null +wget "https://github.com/qmk/qmk_driver_installer/releases/download/v1.01/qmk_driver_installer.exe" +cmd.exe //c "qmk_driver_installer.exe --all --force drivers.txt" +popd > /dev/null +rm -r $tmpdir pip3 install -r "${util_dir}/../requirements.txt" - -cp -f "$dir/activate_msys2.sh" "$download_dir/" - -if grep "^source ~/qmk_utils/activate_msys2.sh$" ~/.bashrc -then - echo - echo "The line source ~/qmk_utils/activate_msys2.sh is already added to your /.bashrc" - echo "Not adding it twice!" -else - echo - echo "Adding 'source ~/qmk_utils/activate_msys2.sh' to the end of your" - echo ".bashrc file. Without this make won't find the needed utils." - echo "source ~/qmk_utils/activate_msys2.sh" >> ~/.bashrc; -fi - -echo -echo "******************************************************************************" -echo "Installation completed!" -echo "Please close this Window and restart MSYS2 MinGW" -echo "******************************************************************************" diff --git a/qmk/util/qmk_install.sh b/qmk/util/qmk_install.sh index 76ecf5fc..714ee914 100644 --- a/qmk/util/qmk_install.sh +++ b/qmk/util/qmk_install.sh @@ -7,19 +7,21 @@ case $(uname -a) in *Darwin*) exec "${util_dir}/macos_install.sh" ;; - *Linux*Microsoft*) - exec "${util_dir}/wsl_install.sh" - ;; *FreeBSD*) exec "${util_dir}/freebsd_install.sh" ;; *Linux*) exec "${util_dir}/linux_install.sh" ;; - MSYS_NT*|MINGW64_NT*|MINGW32_NT*) + MINGW64_NT*) exec "${util_dir}/msys2_install.sh" ;; + MSYS_NT*|MINGW32_NT*) + echo "Please open a MinGW 64-bit terminal window and re-run this script." + exit 1 + ;; *) echo "Environment not supported. Please see https://docs.qmk.fm for details on how to configure the QMK Firmware build tools manually." + exit 1 ;; esac diff --git a/qmk/util/udev/50-qmk.rules b/qmk/util/udev/50-qmk.rules new file mode 100644 index 00000000..d2abf490 --- /dev/null +++ b/qmk/util/udev/50-qmk.rules @@ -0,0 +1,60 @@ +# Atmel DFU +### ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" +### ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" +### ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" +### ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" +### AT90USB64 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" +### AT90USB128 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" + +# Input Club +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" + +# STM32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" +# STM32 DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess" + +# BootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess" + +# USBAspLoader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess" + +# ModemManager should ignore the following devices +# Atmel SAM-BA (Massdrop) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Caterina (Pro Micro) +## Spark Fun Electronics +### Pro Micro 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Pro Micro 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### LilyPad 3V3/8MHz (and some Pro Micro clones) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Pololu Electronics +### A-Star 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Arduino SA +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## Adafruit Industries LLC +### Feather 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### ItsyBitsy 32U4 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +## dog hunter AG +### Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +### Micro +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"