diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000000..8855d1107f15 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Generate Docs + +on: + push: + branches: + - master + paths: + - 'tmk_core/**' + - 'quantum/**' + - 'platforms/**' + - 'docs/**' + - '.github/workflows/docs.yml' + +jobs: + generate: + runs-on: ubuntu-latest + container: qmkfm/base_container + + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Install dependencies + run: | + apt-get update && apt-get install -y rsync nodejs npm doxygen + npm install -g moxygen + + - name: Build docs + run: | + qmk --verbose generate-docs + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: .build/docs + GIT_CONFIG_EMAIL: hello@qmk.fm diff --git a/.github/workflows/info.yml b/.github/workflows/lint.yml similarity index 80% rename from .github/workflows/info.yml rename to .github/workflows/lint.yml index bb3a50847766..cd67de9d8be2 100644 --- a/.github/workflows/info.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ on: - 'keyboards/**' jobs: - info: + lint: runs-on: ubuntu-latest container: qmkfm/base_container @@ -27,7 +27,7 @@ jobs: echo ${{ github.event.pull_request.base.sha }} echo '${{ steps.file_changes.outputs.files}}' - - name: Run qmk info + - name: Run qmk lint shell: 'bash {0}' run: | QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') @@ -45,10 +45,11 @@ jobs: 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 + $?)) + qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB} + exit_code=$(($exit_code + $?)) fi done + if [[ $exit_code -gt 255 ]]; then + exit 255 + fi exit $exit_code diff --git a/.travis.yml b/.travis.yml index f2e8a8411df3..a6533d613007 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,21 +18,16 @@ addons: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-7 packages: - - pandoc - diffutils - dos2unix - - doxygen - clang-format-7 - libstdc++-7-dev -install: - - npm install -g moxygen script: - git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH - git rev-parse --short HEAD - git diff --name-only HEAD $TRAVIS_BRANCH - bash util/travis_test.sh - bash util/travis_build.sh - - bash util/travis_docs.sh after_script: bash util/travis_compiled_push.sh notifications: diff --git a/common_features.mk b/common_features.mk index 5f232d5f0dda..ba66c5324839 100644 --- a/common_features.mk +++ b/common_features.mk @@ -17,6 +17,7 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ + $(QUANTUM_DIR)/led.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c diff --git a/docs/_summary.md b/docs/_summary.md index 2e874fb1cd6d..44030d812d47 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -105,6 +105,7 @@ * [Encoders](feature_encoders.md) * [Haptic Feedback](feature_haptic_feedback.md) * [Joystick](feature_joystick.md) + * [LED Indicators](feature_led_indicators.md) * [Proton C Conversion](proton_c_conversion.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [Split Keyboard](feature_split_keyboard.md) diff --git a/docs/cli_commands.md b/docs/cli_commands.md index c970b1efa688..69df82f95329 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -178,6 +178,24 @@ Creates a keymap.json from a keymap.c. qmk c2json [--no-cpp] [-o OUTPUT] filename ``` +## `qmk lint` + +Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns. + +**Usage**: + +``` +qmk lint [-km KEYMAP] [-kb KEYBOARD] [--strict] +``` + +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. + +**Examples**: + +Do a basic lint check: + + qmk lint -kb rominronin/katana60/rev2 + ## `qmk list-keyboards` This command lists all the keyboards currently defined in `qmk_firmware` @@ -268,6 +286,16 @@ This command starts a local HTTP server which you can use for browsing or improv qmk docs [-p PORT] ``` +## `qmk generate-docs` + +This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. External tools such as [serve](https://www.npmjs.com/package/serve) can be used to browse the generated files. + +**Usage**: + +``` +qmk generate-docs +``` + ## `qmk kle2json` This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite. @@ -309,4 +337,3 @@ This command runs the python test suite. If you make changes to python code you ``` qmk pytest ``` - diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index bf3a60377cdd..a459042b32e2 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -88,108 +88,6 @@ keyrecord_t record { } ``` -# LED Control - -QMK provides methods to read 5 of the LEDs defined in the HID spec: - -* Num Lock -* Caps Lock -* Scroll Lock -* Compose -* Kana - -There are two ways to get the lock LED state: - -* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or -* by calling `led_t host_keyboard_led_state()` - -!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. - -Two more deprecated functions exist that provide the LED state as a `uint8_t`: - -* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` -* `uint8_t host_keyboard_leds()` - -## `led_update_user()` - -This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. - -By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and -return `false` when you would prefer not to run the code in `led_update_kb()`. - -Some examples include: - - - overriding the LEDs to use them for something else like layer indication - - return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior. - - play a sound when an LED turns on or off. - - return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior. - -?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead. - -### Example `led_update_kb()` Implementation - -```c -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(B0, !led_state.num_lock); - writePin(B1, !led_state.caps_lock); - writePin(B2, !led_state.scroll_lock); - writePin(B3, !led_state.compose); - writePin(B4, !led_state.kana); - } - return res; -} -``` - -### Example `led_update_user()` Implementation - -This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state. - -```c -#ifdef AUDIO_ENABLE - float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); - float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); -#endif - -bool led_update_user(led_t led_state) { - #ifdef AUDIO_ENABLE - static uint8_t caps_state = 0; - if (caps_state != led_state.caps_lock) { - led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); - caps_state = led_state.caps_lock; - } - #endif - return true; -} -``` - -### `led_update_*` Function Documentation - -* Keyboard/Revision: `bool led_update_kb(led_t led_state)` -* Keymap: `bool led_update_user(led_t led_state)` - -## `host_keyboard_led_state()` - -Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). - -## Setting Physical LED State - -Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. - -### Ergodox Boards - -The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. - -In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. - -Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). - # Keyboard Initialization Code There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use. diff --git a/docs/feature_led_indicators.md b/docs/feature_led_indicators.md new file mode 100644 index 000000000000..10e095ab155b --- /dev/null +++ b/docs/feature_led_indicators.md @@ -0,0 +1,116 @@ +# LED Indicators + +QMK provides methods to read 5 of the LEDs defined in the HID spec: + +* Num Lock +* Caps Lock +* Scroll Lock +* Compose +* Kana + +There are three ways to get the lock LED state: +* by specifying configuration options within `config.h` +* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or +* by calling `led_t host_keyboard_led_state()` + +!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. + +Two more deprecated functions exist that provide the LED state as a `uint8_t`: + +* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` +* `uint8_t host_keyboard_leds()` + +## Configuration Options + +To configure the indicators, `#define` these in your `config.h`: + +|Define |Default |Description | +|---------------------|-------------|-------------------------------------------| +|`LED_NUM_LOCK_PIN` |*Not defined*|The pin that controls the `Num Lock` LED | +|`LED_CAPS_LOCK_PIN` |*Not defined*|The pin that controls the `Caps Lock` LED | +|`LED_SCROLL_LOCK_PIN`|*Not defined*|The pin that controls the `Scroll Lock` LED| +|`LED_COMPOSE_PIN` |*Not defined*|The pin that controls the `Compose` LED | +|`LED_KANA_PIN` |*Not defined*|The pin that controls the `Kana` LED | +|`LED_PIN_ON_STATE` |`1` |The state of the indicator pins when the LED is "on" - `1` for high, `0` for low| + +Unless you are designing your own keyboard, you generally should not need to change the above config options. + +## `led_update_*()` + +When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. + +By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and +return `false` when you would prefer not to run the code in `led_update_kb()`. + +Some examples include: + + - overriding the LEDs to use them for something else like layer indication + - return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior. + - play a sound when an LED turns on or off. + - return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior. + +?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead. + +### Example `led_update_kb()` Implementation + +```c +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(B0, !led_state.num_lock); + writePin(B1, !led_state.caps_lock); + writePin(B2, !led_state.scroll_lock); + writePin(B3, !led_state.compose); + writePin(B4, !led_state.kana); + } + return res; +} +``` + +### Example `led_update_user()` Implementation + +This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state. + +```c +#ifdef AUDIO_ENABLE + float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); + float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +#endif + +bool led_update_user(led_t led_state) { + #ifdef AUDIO_ENABLE + static uint8_t caps_state = 0; + if (caps_state != led_state.caps_lock) { + led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); + caps_state = led_state.caps_lock; + } + #endif + return true; +} +``` + +### `led_update_*` Function Documentation + +* Keyboard/Revision: `bool led_update_kb(led_t led_state)` +* Keymap: `bool led_update_user(led_t led_state)` + +## `host_keyboard_led_state()` + +Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). + +## Setting Physical LED State + +Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. + +### Ergodox Boards + +The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. + +In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. + +Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 23b2886edbb2..762056b34320 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
Changing the **Value** sets the overall brightness.
+![QMK Color Wheel with HSV Values](https://i.imgur.com/vkYVo66.jpg) + ## Keycodes |Key |Aliases |Description | diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index d49d0d092807..742b56572ca4 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -3,6 +3,25 @@ Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we've grown we've discovered some patterns that work well, and ask that you conform to them to make it easier for other people to benefit from your hard work. +## Use QMK Lint + +We have provided a tool, `qmk lint`, which will let you check over your keyboard for problems. We suggest using it frequently while working on your keyboard and keymap. + +Example passing check: + +``` +$ qmk lint -kb rominronin/katana60/rev2 +Ψ Lint check passed! +``` + +Example failing check: + +``` +$ qmk lint -kb clueboard/66/rev3 +☒ Missing keyboards/clueboard/66/rev3/readme.md +☒ Lint check failed! +``` + ## Naming Your Keyboard/Project All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. Forward slash (`/`) is used as a sub-folder separation character. diff --git a/docs/index.html b/docs/index.html index 68bd00f6dddd..5cab97a57fa3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -46,6 +46,7 @@ '/unicode': '/feature_unicode', '/python_development': '/cli_development', '/getting_started_build_tools':'/newbs_getting_started', + '/tutorial':'/newbs', }, basePath: '/', name: 'QMK Firmware', diff --git a/docs/ko-kr/README.md b/docs/ko-kr/README.md new file mode 100644 index 000000000000..881b4b5aced5 --- /dev/null +++ b/docs/ko-kr/README.md @@ -0,0 +1,33 @@ +# Quantum Mechanical Keyboard Firmware + +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## QMK Firmware 란? + +QMK(*Quantum Mechanical Keyboard 양자 기계식 키보드*)란 QMK 컴워어, QMK 툴박스, qmk.fm 를 관리하고 있는 오픈소스 커뮤니티 입니다. QMK펌웨어는 [tmk\_keyboard](http://github.com/tmk/tmk_keyboard)를 바탕으로 만들어진 키보드펌웨어이며, Atmel AVR컨트롤러와 [OLKB 제품군](http://olkb.com) [ErgoDox EZ](http://www.ergodox-ez.com), 그리고 [Clueboard 제품군](http://clueboard.co/) 이용할때 매우 편리합니다. 또한 QMK는 ChibiOS를 사용하여 ARM기반의 컨트롤러로도 사용할수 있습니다. 마지막으로 QMK는 커스텀회로와 핸드와이어드 키보드을 작동시키는데에도 사용가능합니다. + + +## 설치하기 + +만약 당신이 QMK에 키보드, 키맵, 또는 새로운 기능을 추가하고싶다면, 가장쉬운 방법은 Github를 통해 [저장소(REPO)를 추가하고]((https://github.com/qmk/qmk_firmware#fork-destination-box)) 로컬에서 변화 또는 수정하고, [PULL REQUEST](https://github.com/qmk/qmk_firmware/pulls)을 통해 업로드 할수 있습니다. + +또다른 방법으로는, 직접 파일들 로컬로 다운로드 하거나([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), git (`git@github.com:qmk/qmk_firmware.git`), https (`https://github.com/qmk/qmk_firmware.git`)을 통해 클론을 만들수 있습니다. + +## 컴파일 + +먼저 컴파일을 하기전 AVR 이나 ARM [개발환경](getting_started_build_tools.md)을 구축해야 합니다. 모든준비가 끝났다면 `make`를 다음과 같이 키보드와 키맵을 선택하여 컴파일 할 수 있습니다. + + make planck/rev4:default + +이 커맨드는 `rev4`버전의 `planck`를 `default`키맵으로 컴파일 할것입니다. 다만 모든 키보드는 파일, 수정본 또는 세부프로젝트를 가지고있지 않음으로 수정본 부분을 생략될수 있습니다. + + make preonic:default + +## 커스터마이징 + +QMK는 사용할 수 있는 매우 다양한 [기능](features.md)과 체계화된 [참고자료](http://docs.qmk.fm)들이 있습니다. 그중 대부분은 [키맵](keymap.md)을 수정하거나 [키코드](keycodes.md)를 변경하는데에 특화되어 있습니다. diff --git a/docs/ko-kr/getting_started_build_tools.md b/docs/ko-kr/getting_started_build_tools.md new file mode 100644 index 000000000000..3aae69d25d9d --- /dev/null +++ b/docs/ko-kr/getting_started_build_tools.md @@ -0,0 +1,156 @@ +# 컴파일 도구 설치 + +이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다 + + + + +**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](newbs.md)페이지를 확인하세요. + +계속하기전에 당신의 서브모듈(외부라이브러리)이 최신인지 `make git-submodule`을 사용하여 확인하세요. + +## 리눅스 + +당신이 항상 최신 파일을 가지고 있는지는 `sudo util/qmk_install.sh`을 이용하여 간단히 확인할 수 있습니다. 이 명령어는 당신이 필요한 모든 속성물(dependencies)를 설치할 것입니다. **이 명령어는 `apt-get upgrade`를 사용합니다** + +또한 당신의 직접 필요한 것들을 설치할 수도 있습니다. 하지만 이 자료는 항상 최신의 자료을 가지고 있지 않습니다. + +현재로써 필요한 것은 다음과 같습니다. 하지만 당신이 하는 작업에 따라 당신은 다음 패키지를 다 쓰지 않을 수도 있습니다. 또한 환경에 따라 모든 다음 패키지는 다른이름으로 존재하거나, 없을 수도 있습니다. + +``` +build-essential +gcc +unzip +wget +zip +gcc-avr +binutils-avr +avr-libc +dfu-programmer +dfu-util +gcc-arm-none-eabi +binutils-arm-none-eabi +libnewlib-arm-none-eabi +git +``` + +당신이 사용하는 패키지 매니져에서 이러한 방법으로 설치하십시요. + +데비안 / 우분투 예시: + + sudo apt-get update + sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi + +페도라 / 레드햇 예시: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + +아치 / 맨자로(Manjaro) 예시: + + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util + +## 닉스 (NIX) + +만약 당신이 [NixOS](https://nixos.org/)를 사용중이거나 NIX를 리눅스 또는 맥에서 사용중이라면 `nix-shell`를 root 디렉토리에서 사용하여 컴파일 환경의 구축할 수 있습니다. + +기본적으로 다음 커맨드는 AVR과 ARM 컴파일러를 설치할것입니다. 만약 필요 없다면 `avr` 또는 `arm`을 인수에서 해제할 수 있습니다. + + nix-shell --arg arm false + +## 맥 +당신이 홈브루([homebrew](http://brew.sh/))를 사용한다면, 다음을 입력하세요. + + brew tap osx-cross/avr + brew tap PX4/homebrew-px4 + brew update + brew install avr-gcc@7 + brew link --force avr-gcc@7 + brew install dfu-programmer + brew install dfu-util + brew install gcc-arm-none-eabi + brew install avrdude + +이 방법을 가장 추천합니다. 만약 홈브루가 없다면 커맨드라인 환경에서 매우 편한 [Homebrew](http://brew.sh/)를 다운받는 것을 추천합니다. 참고로 `avr-gcc@7`를 설치하는 중 `make`과 `make install`는 대개 20분 넘게 걸리고 CPU 사용량이 높아집니다. + +## msys2를 사용하는 윈도우 (추천) +윈도우 비스타 부터 최신버젼까지 가장추천되는 환경은 [msys2](http://www.msys2.org)를 이용하는 것입니다. (윈도우 7과 윈도우 10에서 모두 테스트되었음) + +* 이 사이트에 있는 설명을 이용해 msys2를 설치하세요: http://www.msys2.org +* ``MSYS2 MingGW 64-bit`` 를 여세요 +* QMK폴더로 이동하세요. c드라이브 루트에 있는경우: + * `$ cd /c/qmk_firmware` +* `util/qmk_install.sh`을 실행시키고 나오는데요 따라하세요 + +### 크리에이터 업데이트 +만약 당신의 윈도우 10이 크리에이터 업데이트 버전 또는 더 높은 버전이라면 바로 컴파일과 프로그램 업로드(flashing)를 할 수 있습니다. 크리에이터 업데이트 전 버전이라면 컴파일만 가능합니다. 만약 당신이 잘 모르겠거나 업데이트된 버전이 아니라면 [이 링크](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)를 확인해 보십시오. + +### 리눅스용 윈도우 하위 시스템 사용 (Windows10 Subsystem for Linux) +크리에이터 업데이트에 추가로 만약 당신이 리눅스용 윈도우 하위 시스템이 필요하다면 이 링크에서 다운받으십시오: [설명](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/) + +만약 당신이 이미 리눅스용 윈도우 하위 시스템을 Anniversary업데이트를 통해 받았다면 이 링크에서 16.04LTS로 업데이트 하는것을 추천합니다. 왜냐하면 업데이트 없이는 일부키보드가 14.04LTS에 포함되있는 도구들로 컴파일되지 않을수 있기때문입니다 : [WSL 업데이트](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) + + +### Git +만약 당신이 이미 파일을 로컬로 복제하였다면 이 섹션을 무시하십시요. + +당신은 파일을 기본적인 git을 사용하여 로컬로 복제해야 합니다. **주의, WSL Git을 사용하면 안됩니다** [Git](https://git-scm.com/download/win) 이 링크에서 git을 다운받고 설치하십시오. +그리고 [기본설정](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), 유저네임과 이메일을 설정하는 것은 만약 당신이 온라인에 기여할 계획이라면 매우 중요합니다. + +Git의 설치가 완료되었다면 Git Bash커맨드을 열고 당신의 복제 QMK파일이 있는 위치로 이동하고 `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`를 실행 시키십니오. 이 커맨드는 새로운 `qmk_firmware`폴더를 이미 존재하는 것의 하위 폴더설정으로 생성할 것입니다. + +### 도구(Toolchain) 설정 +기본적으로 도구설정은 리눅스용 윈도우 하위 시스템이 설치될때 자동으로 설정됩니다. 하지만 수동적으로 하고 싶다면 여기 설명이 있습니다. (If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. ) + +1. "Bash On Ubuntu On Windows" 을 실행시키십시오. +2. 당신이 `qmk_firmware`를 복제한 위치로 가십시오. WSL(리눅스용 윈도우 하위 시스템 사용)에서 `/mnt/`로 시작되는 패스를 찾으십시오. 즉 당신은 다음과 같은 형식으로 입력해야 합니다. `cd /mnt/c/path/to/qmk_firmware` (Note that the paths start with `/mnt/`in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.) +3. `util/wsl_install.sh`를 실행시키고 화면에 나오는 지시를 따르십니오. +4. Bash command window를 재실행 시키십시오. +5. 이로써 당신은 컴파일과 프로그램 업로드(flashing)을 위한 준비가 모두 끝났습니다. + +### 중요한 참고사항 +*`util/wsl_install.sh` 명령어를 다시 실행시켜 최신 업데이트를 다운받을 수 있습니다. +* QMK 폴더의 위치는 윈도우 파일시스템을 기반으로 해야 됩니다. WSL는 외부실행파일를 작동 시킬수 없기 때문이죠. +* WSL의 Git은 윈도우용 Git과 **호환되지 않습니다** +* 파일을 수정하는 것은 WSL안과 밖에서 모두 가능합니다 하지만 만약 .makefile 혹은 .sh를 수정한다면 유닉스 라인엔딩(Unix line endings)을 지원하는 에디터를 사용하는지 확인하십이오. 그렇지 않다면 컴파일이 되지않을 수도 있습니다. + +## 윈두우 (비스타 혹은 더 최신) (비추천) + +이 섹션은 윈도우 비스타 혹은 더 최신버젼을 위한 오래된 설명입니다. [MSYS2](#windows-with-msys2-recommended)를 사용하는 것을 더 추천합니다. + +1. WinAVR을 설치하였다면 먼저 삭제하십시오. +2. [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe)을 설치하십시오. (Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**) +3. 만약 당신이 Infinity을 기반으로 하는 키보드에 프로그램 업로드를(flashing) 할거라면 dfu-util을 설치해야 합니다, [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware) 를 참고 하십시오. +4. [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)를 설치하십시오. 설치중 윈도우화면에서 GUI 추가 설치 옵션을 해재하십니오. **기본 설치 위치를 바꾸지 마십시오.** 이 명령어는 기본위치를 기반으로 하고 있습니다. +5. 레파지토리를 복제하십시오. [이 링크로 압축파일을 받고 앞축해제 하십시오.](https://github.com/qmk/qmk_firmware/archive/master.zip) 윈도우 탐색기에서 다운받은 파일을 여십시오. +6. `\util` 폴더를 여십시오. +7. `1-setup-path-win` .bat파일을 더블클릭해서 실행시키시오. 유저 계정 설정 변경을 허용해야될 수도 있습니다. 스페이스바를 눌러 설치가 성공적으로 완료되었다는 메세지를 닫을 수 있습니다. +8. `2-setup-environment-win` .bat파일에 우클릭해서 '관리자 권한으로 실행'으로 실행시키십시오. 이 작업을 꽤 오래 걸릴 수도 있습니다. 또한 드라이버 설정을 승인해야 될 수도 있습니다. 하지만 이 모든것이 끝나면 당신의 시스템의 설정이 모두 끝났습니다. + +만약 이 작업을 하는데에 문제가 있어 도움받고 싶다면 *Win_Check_Output.txt*을 생성하는 것이 도움이 될것입니다. 이 파일은 `Win_Check.bat`을 `\util`폴더에서 실행시켜 생성할 수 있습니다. + +## 도커(Docker) +만약 위작업들이 당신에게 좀 어렵게 느껴졌다면 도커(Docker)가 당신을 위한 최선일 수도 있습니다(의역). [Docker CE](https://docs.docker.com/install/#supported-platforms)를 설치한뒤 아래 커맨드를 `qmk_firmware` 디랙토리에서 실행시켜 키보드 또는 키맵을 생성시킵니다. +```bash +util/docker_build.sh keyboard:keymap +# 예: util/docker_build.sh ergodox_ez:steno +``` +이 커맨드는 원하는 키보드 또는 키맵을 컴파일하고 `.hex`또는 `.bin`파일을 프로그램 업로드를(flashing) 위해 QMK디랙토리에 생성할것입니다. 만약 `:keymap`이 생략된다면 `default`이 기본을로 사용됩니다. 참고로 여기서 사용되는 인수는 `make` 커맨드를 사용하여 컴파일할때와 동일합니다. + + +또한 스크립트를 그냥 아무 인수 없이도 사용가능합니다. 그렇게 된다면 프로그램은 하나씩 자동으로 인수입력을 요구 할것입니다. 어쩌면 이방법이 더 쉬울 수도 있습니다. +```bash +util/docker_build.sh +# 인수을 입력받습니다.(아무것도 쓰지 않고 놔두는면 기본값으로 설정됩니다) +``` + +다음과 같이 `target`를 사용하여 컴파일과 프로그램 업로드(flashing)을 동시에 할수도 있습니다. +```bash +util/docker_build.sh keyboard:keymap:target +# 예: util/docker_build.sh planck/rev6:default:dfu-util +``` +만약 당시이 리눅스를 사용한다면 이 커맨드들은 추가 설정 없이 바로 작동할 것입니다. 하지만 위도우 또는 맥 환경에서는 [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/)를 사용하여야 이 커맨드들을 사용가능합니다. Docker Machine설정은 꽤 지루하고 짜증남으로 추천하지 않고 [QMK Toolbox](https://github.com/qmk/qmk_toolbox)를 사용하는 것을 추천합니다. + +!> 윈도우에서 독커는 [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)을 활성화 설정하여야 사용가능합니다. 즉, 도커는 Hyper-V를 지원하지 않는 윈도우 7, 윈도우 8, 그리고 **윈도우 10 홈**과 같은 윈도우 버전에서 사용할수 없다는 것을 의미합니다. + +## Vagrant +만약 컴웨어를 사용하는데 문제가 있다면 Vagrant라는 이름의 툴을 사용해 볼 수 있습니다. 이 툴은 가상환경을 세팅해줌과 동시에 컴웨어를 사용하는데에 필요한 모든 설정을 해줄 것입니다. OLKB는 가상환경에 파일을 호스팅하지 않습니다. [Vagrant 가이드](getting_started_vagrant.md)에서 더 많은 정보를 확인할 수 있습니다. diff --git a/docs/ko-kr/getting_started_getting_help.md b/docs/ko-kr/getting_started_getting_help.md new file mode 100644 index 000000000000..2ae7917a0159 --- /dev/null +++ b/docs/ko-kr/getting_started_getting_help.md @@ -0,0 +1,17 @@ +# 도움 받기 + +QMK에서 도움을 받는 방법은 다양합니다. + +**주의, 아래 링크들은 영어로 이루어져 있으며 영어 사용이 가능해야 편리하게 이용할 수 있습니다.** + +## 디스코드 실시간 채팅 + +[QMK 디스코드 서버](https://discord.gg/Uq7gcHh)에서 QMK 개발자들과 실시간으로 대화를 나눌수있습니다. 이 디스코드에는 펌웨어, 툴박스, 하드웨어, 그리고 컨피겨레이터(configurator)에 관한 특별화된 채널이 운영되고 있습니다. + +## OLKB 서브레딧 + +공식 QMK 포럼은 [reddit.com](https://reddit.com) 에 [/r/olkb](https://reddit.com/r/olkb)입니다. + +## Github 이슈 + +[issue on GitHub](https://github.com/qmk/qmk_firmware/issues)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다. diff --git a/docs/ko-kr/getting_started_github.md b/docs/ko-kr/getting_started_github.md new file mode 100644 index 000000000000..2ff0ccb79689 --- /dev/null +++ b/docs/ko-kr/getting_started_github.md @@ -0,0 +1,67 @@ +# QMK와 함께 Github를 사용하는 방법 + +Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. + +Github는 자주 사용하는 사람이 아니면 좀 여려울수도 있습니다. 이 문서는 Github를 사용하는데 필요한 forking, cloning 그리고 submitting a pull request with QMK를 설명할 것입니다. + +?> 이 가이드는 당신이 git커맨드를 사용하는데 익숙하고 git환경을 당신의 시스템이 설치하였다는 전제하에 작성되었습니다. + +아래와 같이 [QMK Github 페이지](https://github.com/qmk/qmk_firmware)에서 당신은 "Fork"라고 쓰여있는 버튼을 볼 수 있습니다 + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +만약 당신이 어느기관 소속이고, 무슨 계정을 사용할것인지 골라야 한다면 개인 계정을 사용하는 것을 추천합니다. +"Fork"가 성공적으로 끝났다면 아래 보이는 "Clone or Download"를 눌러야 합니다. + +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +"HTTPS"채크 했는지 확인하고 나와 있는 링크를 복사하세요. + +![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) + +여기거 부터 커맨드라인을 사용합니다. 커맨드 라인에서 `git clone `을 치고 복사한 링크를 붙여넣은후 실행시키세요. + +``` +user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +당신은 이제 모든파일이 로컬시스템이 추가 되었습니다 그리고 이제 키맵을 추가하거나 컴파일, 프로그램 업로드(flashing)를 할 수 있습니다. +모든 추가 변경을 만든 뒤에는 add, commit, and push를 사용하여 당신의 Folk에 추가 할 수 있습니다. + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +이로써 당신이 만든 모든 변경들이 당신의 Github의 Folk에 추가 되었습니다. (`https://github.com//qmk_firmware`)에서 확인하고 "New Pull Request"를 눌러 변경사항을 QMK에 업로드할수 있습니다. + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +이 버튼을 누르면 당신이 만든 모든 변경사항들이 보여질 것입니다. 만약 모든 변경사항이 맘에 든다면 "Create Pull Request"를 눌러 요청을 확정할수 있습니다. + +**요청사항이 확정된다고 변경사항이 바로 적용되는 것은 아닙니다.** + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +요청을 한뒤 QMK개발자들은 댓글로 무엇이 변경되었는지 등을 물어 볼수있지만 끝에는 매인 디랙토리로 업로드 될것입니다. + +**"Thanks for contributing to QMK :)"** diff --git a/docs/newbs.md b/docs/newbs.md index 389e3f472184..02b0a070f577 100644 --- a/docs/newbs.md +++ b/docs/newbs.md @@ -1,4 +1,4 @@ -# The Complete Newbs Guide To QMK +# The QMK Tutorial Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard. diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md index aa3db5acb211..9a082d7d6dcf 100644 --- a/docs/one_shot_keys.md +++ b/docs/one_shot_keys.md @@ -22,7 +22,7 @@ Sometimes, you want to activate a one-shot key as part of a macro or tap dance r For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. -For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it. +For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it. !> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop. diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 22e8a3fe1a23..e0dd0770cbb1 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -73,6 +73,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - commented-out functions removed too - `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation) - prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite) + - prefer LED indicator [Configuration Options](https://docs.qmk.fm/#/feature_led_indicators?id=configuration-options) to custom `led_update_*()` implementations where possible - `keyboard.h` - `#include "quantum.h"` appears at the top - `LAYOUT` macros should use standard definitions if applicable diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.c b/keyboards/1upkeyboards/1up60hte/1up60hte.c index 3af0e9d400ac..460e42a0e576 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.c +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.c @@ -16,19 +16,3 @@ along with this program. If not, see . */ #include "1up60hte.h" - -void keyboard_pre_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(B6); - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B6); - } else { - writePinHigh(B6); - } - led_set_user(usb_led); -} \ No newline at end of file diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index 8c4d2fc308a5..c3ba030de995 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -40,6 +40,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 5264ef698b17..4020f4fdc0c0 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -17,6 +17,12 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#ifndef CONVERT_TO_PROTON_C +# define LED_NUM_LOCK_PIN B0 // RXLED +# define LED_CAPS_LOCK_PIN D5 // TXLED +# define LED_PIN_ON_STATE 0 +#endif + /* Underglow options */ #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c index 053620d333c0..0ff1041aacfe 100644 --- a/keyboards/1upkeyboards/sweet16/v1/v1.c +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c @@ -1,21 +1 @@ #include "v1.h" - -void led_set_kb(uint8_t usb_led) { -#ifndef CONVERT_TO_PROTON_C - /* Map RXLED to USB_LED_NUM_LOCK */ - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - setPinOutput(B0); - writePinLow(B0); - } else { - setPinInput(B0); - } - - /* Map TXLED to USB_LED_CAPS_LOCK */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - setPinOutput(D5); - writePinLow(D5); - } else { - setPinInput(D5); - } -#endif -} diff --git a/keyboards/acekeyboard/titan60/config.h b/keyboards/acekeyboard/titan60/config.h new file mode 100644 index 000000000000..d34622b2506e --- /dev/null +++ b/keyboards/acekeyboard/titan60/config.h @@ -0,0 +1,86 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xACE1 // Ace +#define PRODUCT_ID 0x5449 // TI +#define DEVICE_VER 0x0001 +#define MANUFACTURER Acekeyboard +#define PRODUCT titan60 + +/* 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) + * + */ + + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#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 + +/* 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 D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING + +#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 */ +# define RGBLIGHT_ANIMATIONS +#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 + + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/acekeyboard/titan60/info.json b/keyboards/acekeyboard/titan60/info.json new file mode 100644 index 000000000000..0839c7fb364a --- /dev/null +++ b/keyboards/acekeyboard/titan60/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "Titan60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all_ansi_std": { + "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}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + }, + + "LAYOUT_all_ansi_2u_lshift": { + "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}, {"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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + }, + + "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_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}, {"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_ansi_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.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.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_split_spacebar": { + "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":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}] + } + } +} diff --git a/keyboards/acekeyboard/titan60/keymaps/default/keymap.c b/keyboards/acekeyboard/titan60/keymaps/default/keymap.c new file mode 100644 index 000000000000..be3ed10bbcec --- /dev/null +++ b/keyboards/acekeyboard/titan60/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +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] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + [0] = 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, + 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_B, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/acekeyboard/titan60/keymaps/via/keymap.c b/keyboards/acekeyboard/titan60/keymaps/via/keymap.c new file mode 100644 index 000000000000..c78d8f0b17f3 --- /dev/null +++ b/keyboards/acekeyboard/titan60/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* +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] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + [0] = 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, + 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, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_60_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 + ), + + [3] = LAYOUT_60_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 + ) +}; \ No newline at end of file diff --git a/keyboards/acekeyboard/titan60/keymaps/via/rules.mk b/keyboards/acekeyboard/titan60/keymaps/via/rules.mk new file mode 100644 index 000000000000..5f615ff62b74 --- /dev/null +++ b/keyboards/acekeyboard/titan60/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + diff --git a/keyboards/acekeyboard/titan60/readme.md b/keyboards/acekeyboard/titan60/readme.md new file mode 100644 index 000000000000..f977b4b89f54 --- /dev/null +++ b/keyboards/acekeyboard/titan60/readme.md @@ -0,0 +1,17 @@ +# titan60 + +60% custom keyboard originally meant for the Saturn 60 + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: Titan 60 PCB +* Hardware Availability: [Acekeyboard](https://acekeyboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make acekeyboard/titan60:default + +Flashing example for this keyboard: + + make acekeyboard/titan60: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/keyboards/acekeyboard/titan60/rules.mk b/keyboards/acekeyboard/titan60/rules.mk new file mode 100644 index 000000000000..92f7aba54252 --- /dev/null +++ b/keyboards/acekeyboard/titan60/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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/acekeyboard/titan60/titan60.c b/keyboards/acekeyboard/titan60/titan60.c new file mode 100644 index 000000000000..64479f31c88f --- /dev/null +++ b/keyboards/acekeyboard/titan60/titan60.c @@ -0,0 +1,18 @@ +/* +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 "titan60.h" diff --git a/keyboards/acekeyboard/titan60/titan60.h b/keyboards/acekeyboard/titan60/titan60.h new file mode 100644 index 000000000000..0958967ee328 --- /dev/null +++ b/keyboards/acekeyboard/titan60/titan60.h @@ -0,0 +1,109 @@ +/* +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 + +#include "quantum.h" + +#define ___ KC_NO + + +#define LAYOUT_all_ansi_std( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \ + 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, ___, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_all_ansi_2u_lshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k47, k3c, k43, \ + k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \ +){ \ + { 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, k47, k48, k49, 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, 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, \ + 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k43, \ + k40, k41, k42, k46, 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, ___, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k43, \ + 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_split_spacebar( \ + 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, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, ___, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \ +} + + diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index b4cff82d4117..098891eee05d 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/alf/dc60/dc60.c b/keyboards/alf/dc60/dc60.c index 70979adf4efd..4096d10a6458 100644 --- a/keyboards/alf/dc60/dc60.c +++ b/keyboards/alf/dc60/dc60.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "dc60.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - - led_set_user(usb_led); -} diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h index fcf4e85a9f89..cd989350904c 100644 --- a/keyboards/alf/x11/config.h +++ b/keyboards/alf/x11/config.h @@ -48,10 +48,10 @@ along with this program. If not, see . /* 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 D0 // or D1, D2, D3, E6 +#define LED_NUM_LOCK_PIN E6 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/alf/x11/x11.c b/keyboards/alf/x11/x11.c index 9699918d5b23..28e77ecd3f6c 100644 --- a/keyboards/alf/x11/x11.c +++ b/keyboards/alf/x11/x11.c @@ -14,51 +14,3 @@ * along with this program. If not, see . */ #include "x11.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - setPinOutput(C6); - setPinOutput(E6); - setPinOutput(C7); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C6); - } else { - writePinHigh(C6); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } - - led_set_user(usb_led); -} diff --git a/keyboards/alps64/alps64.c b/keyboards/alps64/alps64.c index 0e4ef07bc038..61270aacedc1 100644 --- a/keyboards/alps64/alps64.c +++ b/keyboards/alps64/alps64.c @@ -15,23 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "alps64.h" - -void keyboard_pre_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(C5); - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) -{ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // output high - writePinHigh(C5); - } else { - // Hi-Z - writePinLow(C5); - } - - led_set_user(usb_led); -} diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 25453e696f1b..15903818b9ef 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN C5 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/amj60/amj60.c b/keyboards/amj60/amj60.c index 993a5917dbd9..02aa116d5477 100644 --- a/keyboards/amj60/amj60.c +++ b/keyboards/amj60/amj60.c @@ -1,30 +1 @@ #include "amj60.h" -#include "led.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(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - // * Set our LED pins as output - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3} #define UNUSED_PINS -#define BACKLIGHT_PIN B6 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN B6 + + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/amjpad/amjpad.c b/keyboards/amjpad/amjpad.c index ac5991bd087f..83cdedf688b9 100644 --- a/keyboards/amjpad/amjpad.c +++ b/keyboards/amjpad/amjpad.c @@ -1,30 +1 @@ #include "amjpad.h" -#include "led.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(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - // * Set our LED pins as output - DDRD |= (1<<6); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define LED_NUM_LOCK_PIN D6 +#define LED_PIN_ON_STATE 0 + /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c index 8cdf90280d46..68fbdf0d14c4 100644 --- a/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -25,7 +25,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { 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); + oled_write_P(PSTR("Active layer: "), false); switch (get_highest_layer(layer_state)) { case _MAIN: diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 17b00807e46f..72022a01bb5f 100644 --- a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -12,6 +12,18 @@ const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; #endif +/** + * Kodi shortcuts: + * + * ESC - Previous menu OR Home screen + * Enter - Select + * X - Stop + * Arrows to move + * + * For details have a look at: + * https://kodi.wiki/view/Keyboard_controls + */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT_ortho_2x4( KC_ESC, KC_UP, KC_ENTER, KC_X, @@ -32,11 +44,11 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { 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); + oled_write_P(PSTR("Active layer: "), false); switch (get_highest_layer(layer_state)) { case _MAIN: - oled_write_ln_P(PSTR("Main"), false); + oled_write_ln_P(PSTR("Kodi"), false); break; case _FN: oled_write_ln_P(PSTR("FN"), false); diff --git a/keyboards/atreus/keymaps/talljoe-atreus/config.h b/keyboards/atreus/keymaps/talljoe-atreus/config.h deleted file mode 100644 index 87b68ffc6520..000000000000 --- a/keyboards/atreus/keymaps/talljoe-atreus/config.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - -#define PREVENT_STUCK_MODIFIERS -#define SPACE_COUNT 2 - -#define TEMPLATE( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ - 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, K3D, \ - K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ -) LAYOUT( \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K10, K41, K42, K30, K44, K1D, K20, K45, K3C, K0D, K2B, K3D \ -) - -#define TEMPLATE_NUM( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ - 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, K3D, \ - K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ -) LAYOUT( \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K10, K41, K42, K30, K44, K1D, K20, K45, K48, K49, K2B, K3D \ -) - - -#define TEMPLATE_RESET LAYOUT( \ - 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, \ - RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ -) -#endif diff --git a/keyboards/atreus/keymaps/talljoe/config.h b/keyboards/atreus/keymaps/talljoe/config.h new file mode 100644 index 000000000000..64d5b58943a9 --- /dev/null +++ b/keyboards/atreus/keymaps/talljoe/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 SPACE_COUNT 3 + +#define TEMPLATE_TKL( \ + KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSP, KINS, KHOM, KPUP, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBLS, KDEL, KEND, LPDN, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ + KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ +) LAYOUT( \ + K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ + K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ + K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ + KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRSH, KBLS, KQUO, KADJ \ +) + +#define TEMPLATE_NUM( \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSL, KESC, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ + KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT \ +) LAYOUT( \ + K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ + K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ + K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ + KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRAL, KROS, KQUO, KADJ \ +) + +#define TEMPLATE_RESET LAYOUT( \ + 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, \ + RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +) diff --git a/keyboards/atreus/keymaps/talljoe-atreus/keymap.c b/keyboards/atreus/keymaps/talljoe/keymap.c similarity index 100% rename from keyboards/atreus/keymaps/talljoe-atreus/keymap.c rename to keyboards/atreus/keymaps/talljoe/keymap.c diff --git a/keyboards/atreus/keymaps/talljoe-atreus/rules.mk b/keyboards/atreus/keymaps/talljoe/rules.mk similarity index 100% rename from keyboards/atreus/keymaps/talljoe-atreus/rules.mk rename to keyboards/atreus/keymaps/talljoe/rules.mk diff --git a/keyboards/beatervan/beatervan.c b/keyboards/beatervan/beatervan.c new file mode 100644 index 000000000000..0730af001bda --- /dev/null +++ b/keyboards/beatervan/beatervan.c @@ -0,0 +1,16 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "beatervan.h" diff --git a/keyboards/beatervan/beatervan.h b/keyboards/beatervan/beatervan.h new file mode 100644 index 000000000000..e64580982548 --- /dev/null +++ b/keyboards/beatervan/beatervan.h @@ -0,0 +1,70 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K34, 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 }, \ + { K30, K31, K32, KC_NO, K34, KC_NO, K36, K37, K38, K39, KC_NO, KC_NO } \ +} + +#define LAYOUT_arrow( \ + 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, K37, 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, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, KC_NO, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ +} + +#define LAYOUT_command( \ + 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, K34, K33, K37, K38, K39, K3B \ +) \ +{ \ + { 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, KC_NO, KC_NO, K37, K38, K39, KC_NO, K3B } \ +} + +#define LAYOUT_arrow_command( \ + 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, K34, K33, K37, 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, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ +} diff --git a/keyboards/beatervan/config.h b/keyboards/beatervan/config.h new file mode 100644 index 000000000000..a8973ab4a61b --- /dev/null +++ b/keyboards/beatervan/config.h @@ -0,0 +1,55 @@ + +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x6F6A // "oj" +#define PRODUCT_ID 0x6276 // "bv" +#define DEVICE_VER 0x0001 +#define MANUFACTURER OJ +#define PRODUCT beatervan + +/* 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 { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, F4, F5, F6, F7, B1, B3, B2, B6 } +#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/keyboards/beatervan/info.json b/keyboards/beatervan/info.json new file mode 100644 index 000000000000..f6f3876422a3 --- /dev/null +++ b/keyboards/beatervan/info.json @@ -0,0 +1,204 @@ +{ + "keyboard_name": "beatervan", + "url": "", + "maintainer": "OJ", + "width": 12.75, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":":", "x":10.25, "y":1}, + {"label":"\"", "x":11.25, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3, "w":1.5}, + {"label":"Alt", "x":2.75, "y":3, "w":1.25}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"label":"Alt", "x":8.25, "y":3, "w":1.25}, + {"label":"Win", "x":9.5, "y":3, "w":1.5}, + {"label":"Menu", "x":11, "y":3, "w":1.75} ] + }, + + "LAYOUT_arrow": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":":", "x":10.25, "y":1}, + {"label":"\"", "x":11.25, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3, "w":1.5}, + {"label":"Alt", "x":2.75, "y":3, "w":1.25}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"x":8.25, "y":3, "w":1.5}, + {"label":"Alt", "x":9.75, "y":3}, + {"label":"Win", "x":10.75, "y":3}, + {"label":"Menu", "x":11.75, "y":3} ] + }, + + "LAYOUT_command": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":":", "x":10.25, "y":1}, + {"label":"\"", "x":11.25, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"x":8.25, "y":3, "w":1.5}, + {"label":"Alt", "x":9.75, "y":3, "w":1.5}, + {"label":"Win", "x":11.25, "y":3, "w":1.5} ] + }, + + "LAYOUT_arrow_command": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":":", "x":10.25, "y":1}, + {"label":"\"", "x":11.25, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"x":8.25, "y":3, "w":1.5}, + {"label":"Alt", "x":9.75, "y":3}, + {"label":"Win", "x":10.75, "y":3}, + {"label":"Menu", "x":11.75, "y":3} ] + } + } +} diff --git a/keyboards/beatervan/keymaps/default/keymap.c b/keyboards/beatervan/keymaps/default/keymap.c new file mode 100644 index 000000000000..a99b9c9e513b --- /dev/null +++ b/keyboards/beatervan/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3, +}; + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* 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, + MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1), + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_CM] = LAYOUT( /* Colemak */ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_L1] = LAYOUT( /* LAYER 1 */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______, + _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + _______, KC_LGUI, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT( /* LAYER 2 */ + _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT( /* LAYER 3 */ + _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/keyboards/beatervan/keymaps/default/readme.md b/keyboards/beatervan/keymaps/default/readme.md new file mode 100644 index 000000000000..ac84c08cfa68 --- /dev/null +++ b/keyboards/beatervan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tv44 \ No newline at end of file diff --git a/keyboards/beatervan/keymaps/oj/keymap.c b/keyboards/beatervan/keymaps/oj/keymap.c new file mode 100644 index 000000000000..6b32c4ddc1bd --- /dev/null +++ b/keyboards/beatervan/keymaps/oj/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3 +}; +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Qwerty */ + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_ESC, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_QUOT, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_CM] = LAYOUT( /* Colemak */ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_L1] = LAYOUT( /* NUM */ + 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_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, + _______, _______, _______, KC_PSCR, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT( /* F Keys */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_ENTER, + _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT( /* Gaming */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, _______, MO(_L2), KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_LSFT, KC_Z, KC_B, KC_SPC, KC_BSPC, _______, _______, TG(_L3) + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/keyboards/beatervan/keymaps/oj/readme.md b/keyboards/beatervan/keymaps/oj/readme.md new file mode 100644 index 000000000000..34c2f075c855 --- /dev/null +++ b/keyboards/beatervan/keymaps/oj/readme.md @@ -0,0 +1 @@ +#Objectively superior keymap for v44 diff --git a/keyboards/beatervan/readme.md b/keyboards/beatervan/readme.md new file mode 100644 index 000000000000..2b7dd59054dd --- /dev/null +++ b/keyboards/beatervan/readme.md @@ -0,0 +1,13 @@ +# Beatervan (minivan) + +A Pro-Micro based Minivan with THT diodes + +Keyboard Maintainer: OJ +Hardware Supported: Beatervan PCB, 32u4 "pro-micro" +Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make beatervan: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/keyboards/beatervan/rules.mk b/keyboards/beatervan/rules.mk new file mode 100644 index 000000000000..1ea4a84d525c --- /dev/null +++ b/keyboards/beatervan/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 = 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 on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bm16s/config.h b/keyboards/bm16s/config.h index 379e59bd9d8a..83f5bbbe89a9 100755 --- a/keyboards/bm16s/config.h +++ b/keyboards/bm16s/config.h @@ -2,8 +2,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 0x016B #define DEVICE_VER 0x0001 #define MANUFACTURER KPrepublic #define PRODUCT bm16s diff --git a/keyboards/bm16s/keymaps/via/keymap.c b/keyboards/bm16s/keymaps/via/keymap.c new file mode 100644 index 000000000000..71b0d2b0f5de --- /dev/null +++ b/keyboards/bm16s/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 Relocks + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_4x4( + KC_KP_7, KC_KP_8, KC_KP_9, MO(1), + KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, + KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT + ), + [1] = LAYOUT_ortho_4x4( + RESET, BL_STEP, KC_TRNS, KC_VOLU, + BL_TOGG, BL_DEC, BL_INC, KC_VOLD, + RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, + RGB_SAI, RGB_SAD, RGB_HUD, KC_TRNS + ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/keyboards/bm16s/keymaps/via/readme.md b/keyboards/bm16s/keymaps/via/readme.md new file mode 100644 index 000000000000..f5e43b909cba --- /dev/null +++ b/keyboards/bm16s/keymaps/via/readme.md @@ -0,0 +1 @@ +# Via keymap for bm16s diff --git a/keyboards/bm16s/keymaps/via/rules.mk b/keyboards/bm16s/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/bm16s/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/boardsource/microdox/keymaps/via/keymap.c b/keyboards/boardsource/microdox/keymaps/via/keymap.c new file mode 100644 index 000000000000..2f4785ad2e8e --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/via/keymap.c @@ -0,0 +1,104 @@ +/* +Copyright 2020 Jack Sangdahl <@toastedmangoes> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + SFT_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), + CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), + LT(3, KC_LGUI), MO(1), KC_SPC, KC_BSPC, MO(2), KC_ENT +), + +[1] = LAYOUT_split_3x5_3( + 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_ESC, KC_TAB, KC_CAPS, KC_TILD, KC_GRV, KC_QUOT, KC_DQUO, KC_MPRV, KC_MPLY, KC_MNXT, + KC_LGUI, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_RALT +), + +[2] = LAYOUT_split_3x5_3( + KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PSCR, KC_DEL, KC_INS, KC_HOME, KC_END, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_RIGHT, KC_UP, KC_VOLU, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_VOLD, + KC_PGDN, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_PGUP +), +[3] = LAYOUT_split_3x5_3( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, + KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_180; + return rotation; +} + +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 render_status(void) { + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR("^\n"), false); + oled_write_P(PSTR("Layer: Base\n"), false); + break; + case 1: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Raise\n"), false); + break; + case 2: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Lower\n"), false); + break; + case 3: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Adjust\n"), false); + break; + default: + oled_write_P(PSTR("B R L A O"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Other\n"), false); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} + +#endif diff --git a/keyboards/boardsource/microdox/keymaps/via/rules.mk b/keyboards/boardsource/microdox/keymaps/via/rules.mk new file mode 100644 index 000000000000..667a6b254f27 --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes +VIA_ENABLE = yes +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index 89f104cfea0d..5e1429c8d5b9 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -47,7 +47,12 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - + +#define LED_NUM_LOCK_PIN B7 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN C5 +#define LED_PIN_ON_STATE 0 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/bpiphany/kitten_paw/kitten_paw.c b/keyboards/bpiphany/kitten_paw/kitten_paw.c index 26cb533f2db0..e71b3c801199 100644 --- a/keyboards/bpiphany/kitten_paw/kitten_paw.c +++ b/keyboards/bpiphany/kitten_paw/kitten_paw.c @@ -1,51 +1 @@ #include "kitten_paw.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - CONFIG_LED_IO; - CONFIG_LED_IO; - print_dec(usb_led); - if (usb_led & (1<. */ #define UNUSED_PINS { B0, C4, D3 } +#define LED_NUM_LOCK_PIN C5 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/bpiphany/tiger_lily/tiger_lily.c b/keyboards/bpiphany/tiger_lily/tiger_lily.c index d2e7ba709527..f57f8b5f50ce 100644 --- a/keyboards/bpiphany/tiger_lily/tiger_lily.c +++ b/keyboards/bpiphany/tiger_lily/tiger_lily.c @@ -1,63 +1 @@ #include "tiger_lily.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<7); - DDRC |= (1<<5) | (1<<6); - - print_dec(usb_led); - - if (usb_led & (1<. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +#define LED_NUM_LOCK_PIN B7 +#define LED_CAPS_LOCK_PIN C5 +#define LED_SCROLL_LOCK_PIN C6 +#define LED_PIN_ON_STATE 0 + /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.c b/keyboards/bpiphany/unloved_bastard/unloved_bastard.c index 1975930603b8..f4b8032a01d5 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.c +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.c @@ -14,57 +14,3 @@ * along with this program. If not, see . */ #include "unloved_bastard.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); -} - -// C5 left -// C6 middle led -// B7 right led -void led_init_ports(void) { - DDRB |= (1<<7); - DDRC |= (1<<5); - DDRC |= (1<<6); - - PORTB |= (1<<7); - PORTC |= (1<<5); - PORTC |= (1<<6); -} - - -void led_set_kb(uint8_t usb_led) { - - if (usb_led & (1<. #pragma once #include "config_common.h" -#include - -#define USE_I2C -#define USE_SERIAL #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/claw44/i2c.c b/keyboards/claw44/i2c.c deleted file mode 100644 index 4bee5c639829..000000000000 --- a/keyboards/claw44/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/claw44/keymaps/default/config.h b/keyboards/claw44/keymaps/default/config.h index eff6ad3c7bac..d2ea02545b9b 100644 --- a/keyboards/claw44/keymaps/default/config.h +++ b/keyboards/claw44/keymaps/default/config.h @@ -20,16 +20,4 @@ along with this program. If not, see . #pragma once -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define SSD1306OLED - -#define USE_SERIAL_PD2 - -#define TAPPING_TERM 200 diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c index 088087c77301..65dbd67d98eb 100644 --- a/keyboards/claw44/keymaps/default/keymap.c +++ b/keyboards/claw44/keymaps/default/keymap.c @@ -1,168 +1,59 @@ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - - -extern uint8_t is_master; // 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 = SAFE_RANGE, - LOWER, - RAISE -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, +enum layer_number { + _QWERTY = 0, + _RAISE, + _LOWER, }; #define KC_ KC_TRNS #define KC_RST RESET -#define KC_L_SPC LT(_LOWER, KC_SPC) // lower -#define KC_R_ENT LT(_RAISE, KC_ENT) // raise -#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win -#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win -#define KC_C_BS LCTL_T(KC_BSPC) // ctrl -#define KC_A_DEL ALT_T(KC_DEL) // alt +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_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_MINS, - //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| - 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_RSFT, - //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' - KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL - // `----------+--------+---------+--------' `--------+---------+--------+---------' - ), - - // \ ^ ! & | @ = + * % - - // ( # $ " ' ~ ← ↓ ↑ → ` ) - // { [ ] } - - [_RAISE] = LAYOUT( \ - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, - //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' - _______, _______, _______, _______, _______, _______, _______, RESET - // `--------+--------+--------+--------' `--------+--------+--------+--------' - ), - - [_LOWER] = LAYOUT( \ - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, - //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' - RESET , _______, _______, _______, _______, _______, _______, _______ - // `--------+--------+--------+--------' `--------+--------+--------+--------' - ), + [_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_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_RSFT, + //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' + KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), + + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), }; - -void matrix_init_user(void) { - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -// When 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 matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { - // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); - } else { - matrix_write(matrix, read_logo()); - } -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { -#ifdef SSD1306OLED - 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); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - break; - } - return true; -} diff --git a/keyboards/claw44/keymaps/yfuku/config.h b/keyboards/claw44/keymaps/oled/config.h similarity index 78% rename from keyboards/claw44/keymaps/yfuku/config.h rename to keyboards/claw44/keymaps/oled/config.h index 244ffa7096d1..edde2c67caaa 100644 --- a/keyboards/claw44/keymaps/yfuku/config.h +++ b/keyboards/claw44/keymaps/oled/config.h @@ -20,17 +20,5 @@ along with this program. If not, see . #pragma once -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define SSD1306OLED - -#define USE_SERIAL_PD2 - -#define TAPPING_TERM 180 -#define IGNORE_MOD_TAP_INTERRUPT +#define OLED_FONT_H "keyboards/claw44/lib/glcdfont.c" diff --git a/keyboards/claw44/keymaps/oled/keymap.c b/keyboards/claw44/keymaps/oled/keymap.c new file mode 100644 index 000000000000..0d10c371a286 --- /dev/null +++ b/keyboards/claw44/keymaps/oled/keymap.c @@ -0,0 +1,137 @@ +#include QMK_KEYBOARD_H +#include + +// 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, + _RAISE, + _LOWER, +}; + +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_RSFT, + //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' + KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), + + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_layer_state(void) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Layer: Default"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Layer: Raise"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Layer: Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Layer: Undefined"), false); + } +} + +void render_logo(void) { + static const char PROGMEM 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(logo, false); +} + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { return keylog_str; } +const char *read_keylogs(void) { return keylogs_str; } + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_layer_state(); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + } else { + render_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + return true; +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; + return rotation; +} + +#endif diff --git a/keyboards/claw44/keymaps/oled/rules.mk b/keyboards/claw44/keymaps/oled/rules.mk new file mode 100644 index 000000000000..c582662134c4 --- /dev/null +++ b/keyboards/claw44/keymaps/oled/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/claw44/keymaps/yfuku/keymap.c b/keyboards/claw44/keymaps/yfuku/keymap.c deleted file mode 100644 index 77d459b928d3..000000000000 --- a/keyboards/claw44/keymaps/yfuku/keymap.c +++ /dev/null @@ -1,221 +0,0 @@ -#include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - -extern keymap_config_t keymap_config; - -extern uint8_t is_master; - -// 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 = SAFE_RANGE, - LOWER, - RAISE -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -// common -#define KC_ KC_TRNS -#define KC_XXXX KC_NO -#define KC_RST RESET -#define KC_VD KC__VOLDOWN -#define KC_VU KC__VOLUP - -// layer -#define KC_L_SPC LT(_LOWER, KC_SPC) -#define KC_R_ENT LT(_RAISE, KC_ENT) - -// shift_t -#define KC_S_TAB LSFT_T(KC_TAB) -#define KC_S_ESC LSFT_T(KC_ESC) -#define KC_S_JA LSFT_T(KC_LANG1) -#define KC_S_EN LSFT_T(KC_LANG2) - -// cmd_t -#define KC_M_F LCMD_T(KC_F) -#define KC_M_D LCMD_T(KC_D) -#define KC_M_J LCMD_T(KC_J) -#define KC_M_K LCMD_T(KC_K) - -// ctl_t -#define KC_C_S LCTL_T(KC_S) -#define KC_C_L LCTL_T(KC_L) -#define KC_C_BS LCTL_T(KC_BSPC) - -// alt_t -#define KC_A_D ALT_T(KC_D) -#define KC_A_K ALT_T(KC_K) -#define KC_A_Z ALT_T(KC_Z) -#define KC_A_SL ALT_T(KC_SLSH) -#define KC_A_DEL ALT_T(KC_DEL) - -// cmd+shift_t -#define KC_MS_Q SCMD_T(KC_Q) -#define KC_MS_A SCMD_T(KC_A) -#define KC_MS_S SCMD_T(KC_S) -#define KC_MS_SC SCMD_T(KC_SCLN) -#define KC_MS_ESC SCMD_T(KC_ESC) - -// -#define KC_MR RCMD(KC_R) -#define KC_MF RCMD(KC_F) -#define KC_MW RCMD(KC_W) -#define KC_MX RCMD(KC_X) -#define KC_MC RCMD(KC_C) -#define KC_MV RCMD(KC_V) -#define KC_MTAB RCMD(KC_TAB) -#define KC_MSF RCMD(RSFT(KC_F)) -#define KC_MSR RCMD(RSFT(KC_R)) -#define KC_MST RCMD(RSFT(KC_T)) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - // M_ = LCMD_T( - // A_ = ALT_T( - // C_ = LCTL_T( - // MS_ = SMD_T( - // R_ = LT(_RAISE - // L_ = LT(_LOWER - - [_QWERTY] = LAYOUT_kc( \ - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ESC , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - S_TAB, A ,C_S , D ,M_F , G , H ,M_J , K ,C_L ,SCLN,S_ESC, - //|----+----+----+----+----+----+ |----+----+----+----+----+----| - , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, , - //`----+----+----+----+----+----/ \----+----+----+----+----+----' - A_DEL,S_EN,L_SPC,C_BS, C_BS,R_ENT,S_JA,A_DEL - // `----+----+----+----' `----+----+----+----' - ), - - // \ ^ ! & | @ = + * % - - // ( # $ " ' ~ ← ↓ ↑ → ` ) - // { [ ] } - - [_RAISE] = LAYOUT_kc( \ - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,BSLS,CIRC,EXLM,AMPR,PIPE, AT ,EQL ,PLUS,ASTR,PERC,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LPRN,HASH,DLR ,DQT ,QUOT,TILD, LEFT,DOWN, UP ,RGHT,GRV ,RPRN, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,LCBR,LBRC, RBRC,RCBR, , , , , - //`----+----+----+----+----+----/ \----+----+----+----+----+----' - , ,BSPC, , , , ,RST - // `----+----+----+----' `----+----+----+----' - ), - - [_LOWER] = LAYOUT_kc( \ - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , ,MSF ,MSR ,MST , ,EQL ,PLUS,ASTR,PERC,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , ,COMM,DOT ,SLSH, , - //`----+----+----+--+-+----+----/ \----+----+----+----+----+----' - RST , , , , ,DEL , , - // `----+----+----+----' `----+----+----+----' - ), -}; - -void matrix_init_user(void) { - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -// When 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 matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { - // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); - } else { - matrix_write(matrix, read_logo()); - } -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { -#ifdef SSD1306OLED - 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); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - break; - } - return true; -} - diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c index 9fa1c806aa72..91f53d9c24ea 100644 --- a/keyboards/claw44/lib/glcdfont.c +++ b/keyboards/claw44/lib/glcdfont.c @@ -1,7 +1,17 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#include "progmem.h" +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -230,3 +240,4 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#endif // FONT5X7_H diff --git a/keyboards/claw44/lib/host_led_state_reader.c b/keyboards/claw44/lib/host_led_state_reader.c deleted file mode 100644 index 980823b318c3..000000000000 --- a/keyboards/claw44/lib/host_led_state_reader.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include "claw44.h" - -char host_led_state_str[24]; - -const char *read_host_led_state(void) -{ - uint8_t leds = host_keyboard_leds(); - snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", - (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); - - return host_led_state_str; -} diff --git a/keyboards/claw44/lib/keylogger.c b/keyboards/claw44/lib/keylogger.c deleted file mode 100644 index 092b6929bc2e..000000000000 --- a/keyboards/claw44/lib/keylogger.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include "claw44.h" - -char keylog_str[24] = {}; -char keylogs_str[21] = {}; -int keylogs_str_idx = 0; - -const char code_to_name[60] = { - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', - ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; - -void set_keylog(uint16_t keycode, keyrecord_t *record) { - char name = ' '; - if (keycode < 60) { - name = code_to_name[keycode]; - } - - // update keylog - snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", - record->event.key.row, record->event.key.col, - keycode, name); - - // update keylogs - if (keylogs_str_idx == sizeof(keylogs_str) - 1) { - keylogs_str_idx = 0; - for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { - keylogs_str[i] = ' '; - } - } - - keylogs_str[keylogs_str_idx] = name; - keylogs_str_idx++; -} - -const char *read_keylog(void) { - return keylog_str; -} - -const char *read_keylogs(void) { - return keylogs_str; -} diff --git a/keyboards/claw44/lib/layer_state_reader.c b/keyboards/claw44/lib/layer_state_reader.c deleted file mode 100644 index d92b6df5827f..000000000000 --- a/keyboards/claw44/lib/layer_state_reader.c +++ /dev/null @@ -1,35 +0,0 @@ - -#include QMK_KEYBOARD_H -#include -#include "claw44.h" - -#define L_BASE 0 -#define L_LOWER (1<<_LOWER) -#define L_RAISE (1<<_RAISE) -#define L_ADJUST (1<<_ADJUST) -#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) - -char layer_state_str[24]; - -const char *read_layer_state(void) { - switch (layer_state) - { - case L_BASE: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); - break; - case L_RAISE: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); - break; - case L_LOWER: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); - break; - case L_ADJUST: - case L_ADJUST_TRI: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); - break; - default: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); - } - - return layer_state_str; -} diff --git a/keyboards/claw44/lib/logo_reader.c b/keyboards/claw44/lib/logo_reader.c deleted file mode 100644 index b5b437b2b892..000000000000 --- a/keyboards/claw44/lib/logo_reader.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "claw44.h" - -const char *read_logo(void) { - static char 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}; - - return logo; -} diff --git a/keyboards/claw44/lib/mode_icon_reader.c b/keyboards/claw44/lib/mode_icon_reader.c deleted file mode 100644 index a9272bb9a780..000000000000 --- a/keyboards/claw44/lib/mode_icon_reader.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include "claw44.h" - -char mode_icon[24]; - -const char *read_mode_icon(bool swap) { - static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; - if (swap == false) { - snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); - } else { - snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); - } - - return mode_icon; -} diff --git a/keyboards/claw44/lib/rgb_state_reader.c b/keyboards/claw44/lib/rgb_state_reader.c deleted file mode 100644 index e0efe2e5288f..000000000000 --- a/keyboards/claw44/lib/rgb_state_reader.c +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef RGBLIGHT_ENABLE - -#include QMK_KEYBOARD_H -#include - -extern rgblight_config_t rgblight_config; -char rbf_info_str[24]; -const char *read_rgb_info(void) { - - snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", - rgblight_config.enable ? "on" : "- ", rgblight_config.mode, - rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - return rbf_info_str; -} -#endif diff --git a/keyboards/claw44/lib/timelogger.c b/keyboards/claw44/lib/timelogger.c deleted file mode 100644 index ecd4ed3ea8c0..000000000000 --- a/keyboards/claw44/lib/timelogger.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "claw44.h" - -char timelog_str[24] = {}; -int last_time = 0; -int elapsed_time = 0; - -void set_timelog(void) { - elapsed_time = timer_elapsed(last_time); - last_time = timer_read(); - snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); -} - -const char *read_timelog(void) { - return timelog_str; -} diff --git a/keyboards/claw44/rev1/config.h b/keyboards/claw44/rev1/config.h index f3406fee5c38..dc6e49dd9a6c 100644 --- a/keyboards/claw44/rev1/config.h +++ b/keyboards/claw44/rev1/config.h @@ -19,22 +19,21 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER yfuku -#define PRODUCT claw44 -#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yfuku +#define PRODUCT claw44 +#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys /* key matrix size */ -// Rows are doubled-up #define MATRIX_ROWS 8 -#define MATRIX_COLS 7 +#define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D4, C6, D7, E6 } - -// wiring of each half -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D2 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/claw44/rev1/matrix.c b/keyboards/claw44/rev1/matrix.c deleted file mode 100644 index a5896d9792a1..000000000000 --- a/keyboards/claw44/rev1/matrix.c +++ /dev/null @@ -1,358 +0,0 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "quantum.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(B0); - writePinHigh(D5); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - matrix_init_quantum(); -} - -uint8_t _matrix_scan(void) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) writePinLow(B0); - return 1; - } - writePinHigh(B0); - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - 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; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C -// for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ -// i2c_slave_buffer[i] = matrix[offset+i]; -// } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - writePinLow(D5); - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - writePinHigh(D5); - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/claw44/rev1/rev1.c b/keyboards/claw44/rev1/rev1.c index 9529636f5636..520a869e57ba 100644 --- a/keyboards/claw44/rev1/rev1.c +++ b/keyboards/claw44/rev1/rev1.c @@ -1,8 +1 @@ -#include "claw44.h" - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - //led_set_user(usb_led); -} -#endif +#include "rev1.h" diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h index c6c9057fdc4b..79ae9586dbc9 100644 --- a/keyboards/claw44/rev1/rev1.h +++ b/keyboards/claw44/rev1/rev1.h @@ -1,55 +1,33 @@ #pragma once -#include "../claw44.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - #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, R30, R31, R32, R33 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, L30, L31, L32, L33 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { KC_NO, KC_NO, R33, R32, R31, R30 } \ - } + 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, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, R33, R32, R31, R30 } \ + } #define LAYOUT_kc( \ - 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, R30, R31, R32, R33 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ - ) - -enum layer_number { - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST, -}; + 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, R30, R31, R32, R33 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk index 016bc362a1bd..b1af22c59a2a 100644 --- a/keyboards/claw44/rev1/rules.mk +++ b/keyboards/claw44/rev1/rules.mk @@ -1,7 +1,3 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c - # Build Options BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys @@ -10,7 +6,6 @@ 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 -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 @@ -20,12 +15,5 @@ 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 -# If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/layer_state_reader.c \ - ./lib/logo_reader.c \ - ./lib/keylogger.c \ - # ./lib/rgb_state_reader.c \ - # ./lib/mode_icon_reader.c \ - # ./lib/host_led_state_reader.c \ - # ./lib/timelogger.c \ +OLED_DRIVER_ENABLE = no # Add OLED displays support +SPLIT_KEYBOARD = yes diff --git a/keyboards/claw44/rev1/serial_config.h b/keyboards/claw44/rev1/serial_config.h deleted file mode 100644 index 4fab8e8ddfcf..000000000000 --- a/keyboards/claw44/rev1/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/claw44/rev1/split_scomm.c b/keyboards/claw44/rev1/split_scomm.c deleted file mode 100644 index a1fe6ba5b823..000000000000 --- a/keyboards/claw44/rev1/split_scomm.c +++ /dev/null @@ -1,91 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3]); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/claw44/rev1/split_scomm.h b/keyboards/claw44/rev1/split_scomm.h deleted file mode 100644 index 873d8939d81f..000000000000 --- a/keyboards/claw44/rev1/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/claw44/rev1/split_util.c b/keyboards/claw44/rev1/split_util.c deleted file mode 100644 index e1ff8b4379dc..000000000000 --- a/keyboards/claw44/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk index f872b9ebfaaa..f4d44b23b799 100644 --- a/keyboards/claw44/rules.mk +++ b/keyboards/claw44/rules.mk @@ -22,7 +22,6 @@ 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 -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 @@ -30,12 +29,4 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - DEFAULT_FOLDER = claw44/rev1 diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c deleted file mode 100644 index f6293c3dc231..000000000000 --- a/keyboards/claw44/serial.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of Simple API (OLD API, compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/claw44/serial.h b/keyboards/claw44/serial.h deleted file mode 100644 index 7e0c0847a431..000000000000 --- a/keyboards/claw44/serial.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE Simple API (OLD API, compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ -#if SERIAL_SLAVE_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -#endif -#if SERIAL_MASTER_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -#endif - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); - -#endif // USE Simple API - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c deleted file mode 100644 index 7dea1cc176f0..000000000000 --- a/keyboards/claw44/ssd1306.c +++ /dev/null @@ -1,345 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include -#include "print.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -struct CharacterMatrix display; - -extern const unsigned char font[] PROGMEM; - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#define ScreenOffInterval 60000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_master_init(); - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - - if(rotate){ - // the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); - }else{ - // Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); - } - - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - char data_ln[strlen(data)+2]; - snprintf(data_ln, sizeof(data_ln), "%s\n", data); - matrix_write(matrix, data_ln); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - /* - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } - */ -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 8d2994b7bdc2..648fa29a6fd7 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -53,6 +53,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define LED_NUM_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN F7 // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c index c1f3a70479d3..e7772f29084f 100644 --- a/keyboards/cospad/cospad.c +++ b/keyboards/cospad/cospad.c @@ -14,19 +14,3 @@ * along with this program. If not, see . */ #include "cospad.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} - -void led_init_ports(void) { - setPinOutput(B2); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(B2, !led_state.num_lock); - } - return true; -} diff --git a/keyboards/crazy_keyboard_68/config.h b/keyboards/crazy_keyboard_68/config.h new file mode 100644 index 000000000000..2558e7579181 --- /dev/null +++ b/keyboards/crazy_keyboard_68/config.h @@ -0,0 +1,146 @@ +/* +Copyright 2020 chent7 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 // by default from pcb +#define PRODUCT_ID 0x13DE +#define DEVICE_VER 0x0001 +#define MANUFACTURER chent7 +#define PRODUCT Crazy Keyboard 68 + +/* 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, F4 } +#define UNUSED_PINS + +/* 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 D0 // or D1, D2, D3, E6 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 84 +# 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/keyboards/crazy_keyboard_68/crazy_keyboard_68.c b/keyboards/crazy_keyboard_68/crazy_keyboard_68.c new file mode 100644 index 000000000000..f4f8515b7c57 --- /dev/null +++ b/keyboards/crazy_keyboard_68/crazy_keyboard_68.c @@ -0,0 +1,36 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "crazy_keyboard_68.h" + +void matrix_init_kb(void) { + led_init_ports(); + + matrix_init_user(); +} + +void led_init_ports(void) { + // Caps lock pin + setPinOutput(B0); + writePinHigh(B0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, !led_state.caps_lock); + } + return true; +} diff --git a/keyboards/crazy_keyboard_68/crazy_keyboard_68.h b/keyboards/crazy_keyboard_68/crazy_keyboard_68.h new file mode 100644 index 000000000000..c253824be456 --- /dev/null +++ b/keyboards/crazy_keyboard_68/crazy_keyboard_68.h @@ -0,0 +1,57 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +/* Crazy Keyboard 68 (ANSI) 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 | 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c| 2d | 2e | + * |----------------------------------------------------------------| + * | 31 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 43 | 46 | 49| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + * + * 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( \ + 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, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k43, 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, k1d, k1e}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/keyboards/crazy_keyboard_68/info.json b/keyboards/crazy_keyboard_68/info.json new file mode 100644 index 000000000000..fa9546a1b124 --- /dev/null +++ b/keyboards/crazy_keyboard_68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "crazy_keyboard_68", + "url": "", + "maintainer": "chent7", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "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, "w":2}, + {"label":"k0e", "x":15, "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":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k1e", "x":15, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k22", "x":1.75, "y":2}, + {"label":"k23", "x":2.75, "y":2}, + {"label":"k24", "x":3.75, "y":2}, + {"label":"k25", "x":4.75, "y":2}, + {"label":"k26", "x":5.75, "y":2}, + {"label":"k27", "x":6.75, "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, "w":2.25}, + {"label":"k2e", "x":15, "y":2}, + {"label":"k31", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k3e", "x":15, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k43", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k49", "x":10, "y":4}, + {"label":"k4a", "x":11, "y":4}, + {"label":"k4b", "x":12, "y":4}, + {"label":"k4c", "x":13, "y":4}, + {"label":"k4d", "x":14, "y":4}, + {"label":"k4e", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/crazy_keyboard_68/keymaps/default/keymap.c b/keyboards/crazy_keyboard_68/keymaps/default/keymap.c new file mode 100644 index 000000000000..c41916fcd6f7 --- /dev/null +++ b/keyboards/crazy_keyboard_68/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Keymap _BASE: (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| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|Del | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Fn |Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BASE] = 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_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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _BASE: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Home| + * |----------------------------------------------------------------| + * | | | | | | | | | | |PSC|SLC|Pau| |End | + * |----------------------------------------------------------------| + * | |TOG|M_P|M_B|M_R|MSW|MSN|M_K|M_X|M_G|M_T| | |Ins | + * |----------------------------------------------------------------| + * | |MOD|HUI|HUD|SAI|SAD|VAI|VAD| | | | | | | + * |----------------------------------------------------------------| + * |Reset| | | | | | | | | | + * `----------------------------------------------------------------' + */ + [_FN] = LAYOUT_65_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_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, + _______, RGB_TOG, 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_INS, + _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/crazy_keyboard_68/keymaps/default/readme.md b/keyboards/crazy_keyboard_68/keymaps/default/readme.md new file mode 100644 index 000000000000..21c72142fdb0 --- /dev/null +++ b/keyboards/crazy_keyboard_68/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for crazy_keyboard_68 +``` +make crazy_keyboard_68:default +``` diff --git a/keyboards/crazy_keyboard_68/readme.md b/keyboards/crazy_keyboard_68/readme.md new file mode 100644 index 000000000000..3afa9cc604d0 --- /dev/null +++ b/keyboards/crazy_keyboard_68/readme.md @@ -0,0 +1,25 @@ +# Crazy Keyboard 68 + +![Front View of Crazy Keyboard 68 PCB](https://i.imgur.com/0nTjDbU.jpg)\ +![Back View of Crazy Keyboard 68 PCB](https://i.imgur.com/gTpdux3.jpeg) + +Obscure 68% hotswap PCB sold on taobao, powered by ATM32U4. RGB key lighting and underglow requires self-soldering. + +* Keyboard Maintainer: [chent7](https://github.com/chent7) +* Hardware Supported: crazy keyboard 68 Standard +* Hardware Availability: [taobao.com](https://item.taobao.com/item.htm?spm=a1z09.2.0.0.19422e8dJUzj8d&id=605218560507) + +Make example for this keyboard (after setting up your build environment): + + make crazy_keyboard_68:default + +Flashing example for this keyboard: + + make crazy_keyboard_68:default:flash + +## Layouts + +### ANSI +![Default ANSI Layout](https://i.imgur.com/y1ZApvU.png) + +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/keyboards/crazy_keyboard_68/rules.mk b/keyboards/crazy_keyboard_68/rules.mk new file mode 100644 index 000000000000..5a51c94e72e3 --- /dev/null +++ b/keyboards/crazy_keyboard_68/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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi diff --git a/keyboards/crkbd/keymaps/bcat/config.h b/keyboards/crkbd/keymaps/bcat/config.h deleted file mode 100644 index 65e7a8052383..000000000000 --- a/keyboards/crkbd/keymaps/bcat/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#define EE_HANDS - -/* Limit max RGB LED current to avoid tripping controller fuse. */ -#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 diff --git a/keyboards/crkbd/keymaps/bcat/rules.mk b/keyboards/crkbd/keymaps/bcat/rules.mk deleted file mode 100644 index cd3418dab8c7..000000000000 --- a/keyboards/crkbd/keymaps/bcat/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -BOOTLOADER = atmel-dfu # Elite-C - -RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h index 899fde008deb..937d67e25f3a 100644 --- a/keyboards/crkbd/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/default/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -44,3 +42,5 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 #endif + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index a3a9d9535102..27e3c8406117 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -18,218 +18,157 @@ along with this program. If not, see . #include QMK_KEYBOARD_H - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - -extern uint8_t is_master; - -// 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. -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x6_3( \ + [0] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT //`--------------------------' `--------------------------' ), - [_LOWER] = LAYOUT_split_3x6_3( \ + [1] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,\ + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, _______, KC_SPC, KC_ENT, MO(3), KC_RALT //`--------------------------' `--------------------------' - ), + ), - [_RAISE] = LAYOUT_split_3x6_3( \ + [2] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, MO(3), KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ), - [_ADJUST] = LAYOUT_split_3x6_3( \ + [3] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RESET, 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,\ + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ) }; -int RGB_current_mode; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -// Setting ADJUST layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - layer_on(layer3); - } else { - layer_off(layer3); +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_master) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand } + return rotation; } -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +void oled_render_layer_state(void) { + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_ln_P(PSTR("Default"), false); + break; + case L_LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case L_RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case L_ADJUST: + case L_ADJUST|L_LOWER: + case L_ADJUST|L_RAISE: + case L_ADJUST|L_LOWER|L_RAISE: + oled_write_ln_P(PSTR("Adjust"), false); + break; + } } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED -// When 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); +char keylog_str[24] = {}; -// const char *read_mode_icon(bool swap); -// const char *read_host_led_state(void); -// void set_timelog(void); -// const char *read_timelog(void); +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; -void matrix_scan_user(void) { - iota_gfx_task(); +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); } -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { - // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - //matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); - } else { - matrix_write(matrix, read_logo()); - } +void oled_render_keylog(void) { + oled_write(keylog_str, false); } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } } -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); +void oled_render_logo(void) { + static const char PROGMEM crkbd_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(crkbd_logo, false); +} + +void oled_task_user(void) { + if (is_master) { + oled_render_layer_state(); + oled_render_keylog(); + } else { + oled_render_logo(); + } } -#endif//SSD1306OLED bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED set_keylog(keycode, record); -#endif - // set_timelog(); - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - case RGB_MOD: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - #endif - return false; - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; } return true; } +#endif // OLED_DRIVER_ENABLE diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk index f84e5b2af86e..9444b88d51a0 100644 --- a/keyboards/crkbd/keymaps/default/rules.mk +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -1,10 +1 @@ - -# If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./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 \ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/foostan/keymap.c b/keyboards/crkbd/keymaps/foostan/keymap.c deleted file mode 100644 index 5235b783637b..000000000000 --- a/keyboards/crkbd/keymaps/foostan/keymap.c +++ /dev/null @@ -1,241 +0,0 @@ -#include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - -extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - -extern uint8_t is_master; - -// 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. -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -#define KC______ KC_TRNS -#define KC_XXXXX KC_NO -#define KC_LOWER LOWER -#define KC_RAISE RAISE -#define KC_RST RESET -#define KC_LRST RGBRST -#define KC_LTOG RGB_TOG -#define KC_LHUI RGB_HUI -#define KC_LHUD RGB_HUD -#define KC_LSAI RGB_SAI -#define KC_LSAD RGB_SAD -#define KC_LVAI RGB_VAI -#define KC_LVAD RGB_VAD -#define KC_LMOD RGB_MOD -#define KC_GUIEI GUI_T(KC_LANG2) -#define KC_ALTKN ALT_T(KC_LANG1) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ESC,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_LOWER] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTL, F1, F2, F3, F4, F5, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_RAISE] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTL, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_ADJUST] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ) -}; - -int RGB_current_mode; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -// Setting ADJUST layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - layer_on(layer3); - } else { - layer_off(layer3); - } -} - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -// When 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 matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { - // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); - } else { - matrix_write(matrix, read_logo()); - } -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { -#ifdef SSD1306OLED - set_keylog(keycode, record); -#endif - // set_timelog(); - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - case RGB_MOD: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - #endif - return false; - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; - } - return true; -} diff --git a/keyboards/crkbd/keymaps/foostan/rules.mk b/keyboards/crkbd/keymaps/foostan/rules.mk deleted file mode 100644 index f84e5b2af86e..000000000000 --- a/keyboards/crkbd/keymaps/foostan/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ - -# If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./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/keyboards/crkbd/rev1/common/common.c b/keyboards/crkbd/rev1/common/common.c index 5ea7347de884..ddc0b5fe91dd 100644 --- a/keyboards/crkbd/rev1/common/common.c +++ b/keyboards/crkbd/rev1/common/common.c @@ -17,5 +17,3 @@ along with this program. If not, see . */ #include "common.h" - -uint8_t is_master; diff --git a/keyboards/crkbd/rev1/common/common.h b/keyboards/crkbd/rev1/common/common.h index af1795f48086..71779e2e0f38 100644 --- a/keyboards/crkbd/rev1/common/common.h +++ b/keyboards/crkbd/rev1/common/common.h @@ -21,4 +21,4 @@ along with this program. If not, see . #include "rev1.h" #define has_usb() is_keyboard_master() -extern uint8_t is_master; +#define is_master is_keyboard_master() diff --git a/keyboards/crkbd/rev1/common/keymaps/via/keymap.c b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c index a3b2e52ce556..ecd1f17a5c7f 100644 --- a/keyboards/crkbd/rev1/common/keymaps/via/keymap.c +++ b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c @@ -19,7 +19,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( \ + [0] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [1] = LAYOUT_split_3x6_3( \ + [1] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ), - [2] = LAYOUT_split_3x6_3( \ + [2] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -56,15 +56,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [3] = LAYOUT_split_3x6_3( \ + [3] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RESET, 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,\ + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ) }; @@ -83,30 +83,28 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { #define L_ADJUST 8 void oled_render_layer_state(void) { - oled_write_P("Layer: ", false); + oled_write_P(PSTR("Layer: "), false); switch (layer_state) { case L_BASE: - oled_write_ln_P("Default", false); + oled_write_ln_P(PSTR("Default"), false); break; case L_LOWER: - oled_write_ln_P("Lower", false); + oled_write_ln_P(PSTR("Lower"), false); break; case L_RAISE: - oled_write_ln_P("Raise", false); + oled_write_ln_P(PSTR("Raise"), false); break; case L_ADJUST: case L_ADJUST|L_LOWER: case L_ADJUST|L_RAISE: case L_ADJUST|L_LOWER|L_RAISE: - oled_write_ln_P("Adjust", false); + oled_write_ln_P(PSTR("Adjust"), false); break; } } char keylog_str[24] = {}; -char keylogs_str[21] = {}; -int keylogs_str_idx = 0; const char code_to_name[60] = { ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', @@ -128,25 +126,11 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) { snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, keycode, name); - - // update keylogs - if (keylogs_str_idx == sizeof(keylogs_str) - 1) { - keylogs_str_idx = 0; - for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { - keylogs_str[i] = ' '; - } - } - - keylogs_str[keylogs_str_idx] = name; - keylogs_str_idx++; } void oled_render_keylog(void) { oled_write(keylog_str, false); } -void oled_render_keylogs(void) { - oled_write(keylogs_str, false); -} void render_bootmagic_status(bool status) { /* Show Ctrl-Gui Swap options */ @@ -176,8 +160,6 @@ void oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); - // oled_render_keylogs(); - // oled_renger_bootmagic_icon(keymap_config.swap_lalt_lgui); } else { oled_render_logo(); } @@ -186,7 +168,6 @@ void oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { set_keylog(keycode, record); - // set_timelog(); } return true; } diff --git a/keyboards/crkbd/rev1/common/ssd1306.c b/keyboards/crkbd/rev1/common/ssd1306.c deleted file mode 100644 index 4a889da6738f..000000000000 --- a/keyboards/crkbd/rev1/common/ssd1306.c +++ /dev/null @@ -1,360 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c_master.h" -#include -#include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -struct CharacterMatrix display; - -extern const unsigned char font[] PROGMEM; - -#ifndef OLED_BLANK_CHAR -#define OLED_BLANK_CHAR ' ' -#endif - -#ifndef OLED_BITS_FILTER -#define OLED_BITS_FILTER -#endif - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#ifndef ScreenOffInterval -#define ScreenOffInterval 60000 /* milliseconds */ -#endif - -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start(SSD1306_ADDRESS, 100)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_write(0x0 /* command byte follows */, 100)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_write(cmd, 100)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_stop(); - return res; -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmds(c) if (!_send_cmds(c,sizeof(c))) {goto done;} -#define cmd1(X) X -#define cmd2(X,Y) X,Y -#define cmd3(X,Y,Z) X,Y,Z - -static bool _send_cmds(const uint8_t* p,uint8_t sz) { - for(uint8_t i=sz;i;i--) { - send_cmd1( pgm_read_byte(p++) ); - } - return true; -done: - return false; -} - -#define SEND_CMDS(...) {static const uint8_t _cmds[] PROGMEM = { __VA_ARGS__,0 };send_cmds(_cmds);} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - SEND_CMDS( - cmd3(PageAddr, 0, (DisplayHeight / 8) - 1), - cmd3(ColumnAddr, 0, DisplayWidth - 1) - ); - - if (i2c_start(SSD1306_ADDRESS, 100)) { - goto done; - } - if (i2c_write(0x40, 100)) { - // Data mode - goto done; - } - for (uint8_t row = MatrixRows;row; row--) { - for (uint8_t col = DisplayWidth; col; col--) { - i2c_write(0, 100); - } - } - - display.dirty = false; - -done: - i2c_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_init(); - SEND_CMDS( - cmd1(DisplayOff), - cmd2(SetDisplayClockDiv, 0x80), - cmd2(SetMultiPlex, DisplayHeight - 1), - cmd2(SetDisplayOffset, 0), - cmd1(SetStartLine | 0x0), - cmd2(SetChargePump, 0x14 /* Enable */), - cmd2(SetMemoryMode, 0 /* horizontal addressing */) - ); - - if(rotate){ - // the following Flip the display orientation 180 degrees - SEND_CMDS( - cmd1(SegRemap), - cmd1(ComScanInc) - ); - }else{ - // Flips the display orientation 0 degrees - SEND_CMDS( - cmd1(SegRemap | 0x1), - cmd1(ComScanDec) - ); - } - - SEND_CMDS( -#ifdef SSD1306_128X64 - cmd2(SetComPins, 0x12), -#else - cmd2(SetComPins, 0x2), -#endif - cmd2(SetContrast, 0x8f), - cmd2(SetPreCharge, 0xf1), - cmd2(SetVComDetect, 0x40), - cmd1(DisplayAllOnResume), - cmd1(NormalDisplay), - cmd1(DeActivateScroll), - cmd1(DisplayOn), - - cmd2(SetContrast, 0) // Dim - ); - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, OLED_BLANK_CHAR, MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, OLED_BLANK_CHAR); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - while (*data) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - matrix_write(matrix, data); - matrix_write(matrix, "\n"); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, OLED_BLANK_CHAR, sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - SEND_CMDS( - cmd3(PageAddr, 0, MatrixRows - 1), - cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1) - ); - - if (i2c_write(SSD1306_ADDRESS, 100)) { - goto done; - } - if (i2c_write(0x40, 100)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_write(colBits OLED_BITS_FILTER, 100); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - if (ScreenOffInterval !=0 && timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/crkbd/rev1/legacy/legacy.h b/keyboards/crkbd/rev1/legacy/legacy.h index 6c6308e592c9..08dfcefbc101 100644 --- a/keyboards/crkbd/rev1/legacy/legacy.h +++ b/keyboards/crkbd/rev1/legacy/legacy.h @@ -19,3 +19,5 @@ along with this program. If not, see . #pragma once #include "rev1.h" + +extern uint8_t is_master; \ No newline at end of file diff --git a/keyboards/claw44/ssd1306.h b/keyboards/crkbd/rev1/legacy/ssd1306.h similarity index 100% rename from keyboards/claw44/ssd1306.h rename to keyboards/crkbd/rev1/legacy/ssd1306.h diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index 5e4e6560f00b..f2df8942abd1 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -87,10 +87,6 @@ led_config_t g_led_config = { { void matrix_init_kb(void) { -#ifdef KEYBOARD_crkbd_rev1_common - is_master = (uint8_t)is_keyboard_master(); -#endif - #ifdef RGB_MATRIX_ENABLE if (!isLeftHand) { g_led_config = (led_config_t){ { diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index ce88068e64af..c805efccceb2 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -18,8 +18,6 @@ along with this program. If not, see . #pragma once -extern uint8_t is_master; - #include "crkbd.h" #if defined(KEYBOARD_crkbd_rev1_legacy) # include "legacy.h" diff --git a/keyboards/crkbd/rev1/ssd1306.h b/keyboards/crkbd/rev1/ssd1306.h deleted file mode 100644 index 11a3cc67f449..000000000000 --- a/keyboards/crkbd/rev1/ssd1306.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#include -#include -#include "action.h" - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - -// Controls the SSD1306 128x32 OLED display via i2c - -#ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C -#endif - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -extern struct CharacterMatrix display; - -bool iota_gfx_init(bool rotate); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -void iota_gfx_task_user(void); - -void matrix_clear(struct CharacterMatrix *matrix); -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write(struct CharacterMatrix *matrix, const char *data); -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); -void matrix_write_P(struct CharacterMatrix *matrix, const char *data); -void matrix_render(struct CharacterMatrix *matrix); - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h index a5d3f0ebc6bf..e1d2d51d6edc 100644 --- a/keyboards/cutie_club/wraith/config.h +++ b/keyboards/cutie_club/wraith/config.h @@ -48,10 +48,8 @@ along with this program. If not, see . /* 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 D0 // or D1, D2, D3, E6 +#define LED_CAPS_LOCK_PIN B3 +#define LED_PIN_ON_STATE 0 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/cutie_club/wraith/wraith.c b/keyboards/cutie_club/wraith/wraith.c index 95265384ee4b..cb2d1911c75c 100644 --- a/keyboards/cutie_club/wraith/wraith.c +++ b/keyboards/cutie_club/wraith/wraith.c @@ -15,29 +15,8 @@ */ #include "wraith.h" -// 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) { - setPinOutput(B3); - setPinOutput(B0); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} + setPinOutput(B0); -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B3); - } else { - writePinHigh(B3); - } - led_set_user(usb_led); + matrix_init_user(); } diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 2bedf51970ba..d1cbd6500442 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -1,6 +1,17 @@ /** * 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 diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c index 3e4780246356..475084b0496f 100644 --- a/keyboards/dp60/dp60.c +++ b/keyboards/dp60/dp60.c @@ -1,5 +1,17 @@ /** * dp60.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 "dp60.h" diff --git a/keyboards/dp60/dp60.h b/keyboards/dp60/dp60.h index a197ac2fa3a0..9d8bffa64acd 100644 --- a/keyboards/dp60/dp60.h +++ b/keyboards/dp60/dp60.h @@ -1,6 +1,17 @@ /** * dp60.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 diff --git a/keyboards/dp60/keymaps/allleds/keymap.c b/keyboards/dp60/keymaps/allleds/keymap.c index f3862c38fb84..66cc628d4cc0 100644 --- a/keyboards/dp60/keymaps/allleds/keymap.c +++ b/keyboards/dp60/keymaps/allleds/keymap.c @@ -1,3 +1,18 @@ +/** + * 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] = { diff --git a/keyboards/dp60/keymaps/default/keymap.c b/keyboards/dp60/keymaps/default/keymap.c index f3862c38fb84..66cc628d4cc0 100644 --- a/keyboards/dp60/keymaps/default/keymap.c +++ b/keyboards/dp60/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/** + * 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] = { diff --git a/keyboards/dp60/keymaps/indicator/config.h b/keyboards/dp60/keymaps/indicator/config.h new file mode 100644 index 000000000000..0476faca9425 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/config.h @@ -0,0 +1,25 @@ +/** + * 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" + +#define RGB_INDICATOR_NUM 8 +#undef RGBLED_NUM +#define RGBLED_NUM (18+RGB_INDICATOR_NUM) + +#define RGB_INDICATOR_PIN B1 +#define RGBLIGHT_LAYERS diff --git a/keyboards/dp60/keymaps/indicator/indicator.c b/keyboards/dp60/keymaps/indicator/indicator.c new file mode 100644 index 000000000000..a3a826e8a01b --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/indicator.c @@ -0,0 +1,101 @@ +/** + * indicator.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 "dp60.h" + +#include "rgblight_list.h" +#include "rgblight.h" + + +// caps led +const rgblight_segment_t PROGMEM dp60_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {18, 1, HSV_RED} +); + +// scroll led +const rgblight_segment_t PROGMEM dp60_scrolllock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {19, 1, HSV_GREEN} +); + +// num led +const rgblight_segment_t PROGMEM dp60_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {20, 1, HSV_BLUE} +); + +// light 21 to 26 for layer 1-5 +const rgblight_segment_t PROGMEM dp60_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {21, 1, HSV_PURPLE} +); +const rgblight_segment_t PROGMEM dp60_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {22, 1, HSV_CYAN} +); +const rgblight_segment_t PROGMEM dp60_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {23, 1, HSV_YELLOW} +); +const rgblight_segment_t PROGMEM dp60_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {24, 1, HSV_PINK} +); +const rgblight_segment_t PROGMEM dp60_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {25, 1, HSV_ORANGE} +); + +// rgb light layers +const rgblight_segment_t* const PROGMEM dp60_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + dp60_capslock_layer, + dp60_scrolllock_layer, + dp60_numlock_layer, + dp60_layer1_layer, + dp60_layer2_layer, + dp60_layer3_layer, + dp60_layer4_layer, + dp60_layer5_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = dp60_rgb_layers; +} + +extern rgblight_config_t rgblight_config; +extern void rgblight_layers_write(void); +extern void indicator_write(LED_TYPE *start_led, uint8_t num_leds); + +void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) +{ + ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM); + + indicator_write(start_led + (RGBLED_NUM - RGB_INDICATOR_NUM), RGB_INDICATOR_NUM); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_set_layer_state(1, led_state.scroll_lock); + rgblight_set_layer_state(2, led_state.num_lock); + } + return res; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + rgblight_set_layer_state(3, layer_state_cmp(state, 1)); + rgblight_set_layer_state(4, layer_state_cmp(state, 2)); + rgblight_set_layer_state(5, layer_state_cmp(state, 3)); + rgblight_set_layer_state(6, layer_state_cmp(state, 4)); + rgblight_set_layer_state(7, layer_state_cmp(state, 5)); + return state; +} diff --git a/keyboards/dp60/keymaps/indicator/keymap.c b/keyboards/dp60/keymaps/indicator/keymap.c new file mode 100644 index 000000000000..170d4eb95493 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/keymap.c @@ -0,0 +1,32 @@ +/** + * 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_60_hhkb( + 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_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_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_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT,KC_RGUI ), + + [1] = LAYOUT_60_hhkb( + _______, 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, + RESET, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + KC_CAPS, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______, _______, _______,_______), +}; diff --git a/keyboards/dp60/keymaps/indicator/led_driver.c b/keyboards/dp60/keymaps/indicator/led_driver.c new file mode 100644 index 000000000000..2a1ac5a3852d --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/led_driver.c @@ -0,0 +1,26 @@ +/** + * led_driver.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 . +*/ + +#undef RGB_DI_PIN +#define RGB_DI_PIN RGB_INDICATOR_PIN +#define ws2812_setleds indicator_setleds +#define ws2812_setleds_pin indicator_setleds_pin +#include "ws2812.c" + +void indicator_write(LED_TYPE *start_led, uint8_t num_leds) +{ + indicator_setleds(start_led, num_leds); +} diff --git a/keyboards/dp60/keymaps/indicator/readme.md b/keyboards/dp60/keymaps/indicator/readme.md new file mode 100644 index 000000000000..bb3fbbbe0b66 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/readme.md @@ -0,0 +1,10 @@ + +Indicator RGB leds support for the open source viper/eagle fr4 [plate](https://github.com/yulei/viper_plate.git) + +Three wires need to be soldered: + +B1 pin (SCLK at the board) to the plate's D pin + +VCC to plate's V + +GND to plate's G diff --git a/keyboards/dp60/keymaps/indicator/rules.mk b/keyboards/dp60/keymaps/indicator/rules.mk new file mode 100644 index 000000000000..a8891659f72d --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/rules.mk @@ -0,0 +1,4 @@ + +RGBLIGHT_ENABLE = yes # Use RGB underglow light + +SRC += indicator.c led_driver.c diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c index 1742f17b50c5..5f2b007274cd 100644 --- a/keyboards/dp60/keymaps/via/keymap.c +++ b/keyboards/dp60/keymaps/via/keymap.c @@ -1,3 +1,18 @@ +/** + * 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] = { diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c index 3aa5925fe632..a9974757dde5 100644 --- a/keyboards/dp60/matrix.c +++ b/keyboards/dp60/matrix.c @@ -1,3 +1,18 @@ +/** + * matrix.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 "quantum.h" static uint8_t debouncing = DEBOUNCE; @@ -242,4 +257,4 @@ static void select_col(uint8_t col) { writePinHigh(D5); break; } -} \ No newline at end of file +} diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 3699ef755280..24fd63836d64 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -30,6 +30,9 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/dz60/dz60.c b/keyboards/dz60/dz60.c index 936d027a3182..23db2e4d7512 100644 --- a/keyboards/dz60/dz60.c +++ b/keyboards/dz60/dz60.c @@ -1,21 +1 @@ #include "dz60.h" - -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; - -void led_init_ports(void) { - setPinOutput(B2); - writePinHigh(B2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} diff --git a/keyboards/eco/keymaps/bcat/config.h b/keyboards/eco/keymaps/bcat/config.h new file mode 100644 index 000000000000..dffdc7b40a85 --- /dev/null +++ b/keyboards/eco/keymaps/bcat/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* WS2812B RGB LED strip hand wired to Elite-C. */ +#define RGB_DI_PIN B7 +#define RGBLED_NUM 15 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/eco/keymaps/bcat/keymap.c b/keyboards/eco/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..066acbe64906 --- /dev/null +++ b/keyboards/eco/keymaps/bcat/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "bcat.h" + +enum layer { + LAYER_DEFAULT, + LAYER_LOWER, + LAYER_RAISE, + LAYER_ADJUST, +}; + +#define LY_LWR MO(LAYER_LOWER) +#define LY_RSE MO(LAYER_RAISE) + +#define KY_CSPC LCTL(KC_SPC) +#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/2c11371c7a5f7cd08a0132631d3d3281 */ + [LAYER_DEFAULT] = LAYOUT( + 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, + KC_ESC, 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_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + XXXXXXX, XXXXXXX, KC_LALT, KC_LCTL, LY_LWR, KC_SPC, XXXXXXX, XXXXXXX, KC_ENT, LY_RSE, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX + ), + + /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/11256970dc0552886a82382ee02fa415 */ + [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_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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/308a8be75e0b85902dc18db1b2546862 */ + [LAYER_RAISE] = LAYOUT( + KC_CAPS, 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/b18aafa0327d7e83eaf485546c067a21 */ + [LAYER_ADJUST] = LAYOUT( + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); +} diff --git a/keyboards/eco/keymaps/bcat/readme.md b/keyboards/eco/keymaps/bcat/readme.md new file mode 100644 index 000000000000..85e2615512fe --- /dev/null +++ b/keyboards/eco/keymaps/bcat/readme.md @@ -0,0 +1,44 @@ +# bcat's Eco layout + +This is a cute little 4x14 ortholinear keyboard. I've set it up using an +unsplit, ortho version of my [split 3x6 + 3 thumb +keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat) +(Crkbd) layout, with the following changes: + +* The alpha keys are separated by an extra two columns in the middle to provide +a little more hand separation, similar to a split keyboard. + +* The top three rows of the extra middle columns feature navigation keys and +brackets/braces. I don't really use dedicated keys for these, but I had the +keycaps, so I figured I may as well put them there. + +* I have a Left Alt and Right Super key on the bottom row just like my +[Lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat). + +* The two keys in each bottom corner are unbound, as is the 2U spacebar in the +center of the bottom row. These keys are too inconvenient to reach, and there's +nothing really useful to bind them to anyway. + +## Default layer + +![Default layer layout](https://i.imgur.com/uRUT2cY.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/2c11371c7a5f7cd08a0132631d3d3281)) + +## Lower layer + +![Lower layer layout](https://i.imgur.com/8SR0M9x.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/11256970dc0552886a82382ee02fa415)) + +## Raise layer + +![Raise layer layout](https://i.imgur.com/U7KERR3.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/308a8be75e0b85902dc18db1b2546862)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/J2rOshm.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/b18aafa0327d7e83eaf485546c067a21)) diff --git a/keyboards/eco/keymaps/bcat/rules.mk b/keyboards/eco/keymaps/bcat/rules.mk new file mode 100644 index 000000000000..684d8e4e850e --- /dev/null +++ b/keyboards/eco/keymaps/bcat/rules.mk @@ -0,0 +1,3 @@ +BOOTLOADER = atmel-dfu # Elite-C + +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/nfriend/config.h b/keyboards/ergodox_ez/keymaps/nfriend/config.h new file mode 100644 index 000000000000..36d23c96b707 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/config.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can 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 NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#undef DEBOUNCE +#define DEBOUNCE 15 + +#undef ONESHOT_TIMEOUT +#define ONESHOT_TIMEOUT 1003 + +#define PERMISSIVE_HOLD + +#undef IGNORE_MOD_TAP_INTERRUPT + +#define RGBLIGHT_SLEEP diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c new file mode 100644 index 000000000000..ccea63c97ba1 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -0,0 +1,1096 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can 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 +#include "version.h" +#include "keymap_german.h" +#include "keymap_nordic.h" +#include "keymap_french.h" +#include "keymap_spanish.h" +#include "keymap_hungarian.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 ___ KC_TRNS + +/* Shortcut for Option+Ctrl */ +#define OC(keycode) LALT(LCTL(keycode)) + +enum layer_names { + + /* Base layers */ + _COLEMAK, + _QWERTY, + _DVORAK, + + /* Keys the base layers share */ + _COMMON, + + /* OS layers */ + _MAC, + _WINDOWS, + + /* Symbols */ + _NUMPAD, + _SYMBOLS, + + /* Window management */ + _WM_MAC, + _WM_WINDOWS, + + /* Navigation */ + _ARROWS_MAC, + _ARROWS_WINDOWS, + + _MISC +}; + +enum custom_keycodes { + RGB_SLD = SAFE_RANGE, /* Can always be here */ + HSV_0_255_255, + HSV_120_255_128, + HSV_240_255_255, + MAC_MODE, + WINDOWS_MODE, + DYNAMIC_MACRO_RANGE, /* This needs to be last! */ +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* clang-format off */ + + [_COLEMAK] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Q, /**/ KC_W, /**/ KC_F, /**/ KC_P, /**/ KC_G, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_R, /**/ KC_S, /**/ KC_T, /**/ KC_D, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Z, /**/ KC_X, /**/ KC_C, /**/ KC_V, /**/ KC_B, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_J, /**/ KC_L, /**/ KC_U, /**/ KC_Y, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_N, /**/ KC_E, /**/ KC_I, /**/ KC_O, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_K, /**/ KC_M, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_QWERTY] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Q, /**/ KC_W, /**/ KC_E, /**/ KC_R, /**/ KC_T, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_S, /**/ KC_D, /**/ KC_F, /**/ KC_G, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Z, /**/ KC_X, /**/ KC_C, /**/ KC_V, /**/ KC_B, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Y, /**/ KC_U, /**/ KC_I, /**/ KC_O, /**/ KC_P, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_J, /**/ KC_K, /**/ KC_L, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_N, /**/ KC_M, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_DVORAK] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_QUOTE, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_P, /**/ KC_Y, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_O, /**/ KC_E, /**/ KC_U, /**/ KC_I, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_SCOLON,/**/ KC_Q, /**/ KC_J, /**/ KC_K, /**/ KC_X, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F, /**/ KC_G, /**/ KC_C, /**/ KC_R, /**/ KC_L, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_D, /**/ KC_H, /**/ KC_T, /**/ KC_N, /**/ KC_S, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_B, /**/ KC_M, /**/ KC_W, /**/ KC_V, /**/ KC_Z, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_COMMON] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_ESCAPE,/**/ KC_1, /**/ KC_2, /**/ KC_3, /**/ KC_4, /**/ KC_5, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_TAB, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/MO(_SYMBOLS), _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/KC_LSHIFT, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LT(_NUMPAD,KC_TAB), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ KC_SPACE, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ KC_AUDIO_VOL_DOWN, + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ KC_BSPACE,/**/ _______, /**/ KC_ENTER, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_6, /**/ KC_7, /**/ KC_8, /**/ KC_9, /**/ KC_0, /**/ KC_F12, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_HYPR, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ KC_BSLASH,/**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/MO(_SYMBOLS),// + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_MEH, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/KC_RSHIFT, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/TT(_MISC), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ KC_CAPS, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + KC_AUDIO_VOL_UP,/**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ KC_ESCAPE,/**/ KC_ENTER, /**/ KC_SPACE /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LCTL(LGUI(LSFT(KC_4))), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______ ,/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LALT(KC_BSPACE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + KC_LCTRL,/**/ KC_LGUI, /**/ KC_LALT, /**/MO(_WM_MAC), MO(_ARROWS_MAC), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/LCTL(LGUI(KC_Q)), + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LGUI, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + RGUI(RSFT(KC_7)),/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + MO(_ARROWS_MAC), MO(_WM_MAC),/**/ KC_LALT, /**/ KC_LGUI, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + LCTL(LGUI(KC_Q)),/**/ KC_CAPS, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_WINDOWS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LGUI(LSFT(KC_S)), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LCTL(KC_BSPACE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + KC_LGUI, /**/ KC_LCTRL, /**/ KC_LALT, MO(_WM_WINDOWS), MO(_ARROWS_WINDOWS), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_L),/**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LCTRL, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + LALT(KC_PSCREEN),/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + MO(_ARROWS_WINDOWS), MO(_WM_WINDOWS), KC_RALT, /**/ KC_RCTRL, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/LGUI(KC_L),/**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_NUMPAD] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ XXXXXXX, /**/ KC_ESCAPE, LALT(KC_KP_MINUS), KC_PERC, /**/KC_KP_SLASH, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ XXXXXXX, /**/ KC_KP_7, /**/ KC_KP_8, /**/ KC_KP_9, /**/KC_KP_ASTERISK, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_COLN, /**/ KC_KP_4, /**/ KC_KP_5, /**/ KC_KP_6, /**/KC_KP_MINUS, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_COMMA, /**/ KC_KP_1, /**/ KC_KP_2, /**/ KC_KP_3, /**/KC_KP_PLUS,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_0, /**/ KC_0, /**/ KC_DOT, /**/KC_KP_ENTER, ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ KC_0 /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_SYMBOLS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F1, /**/ KC_F2, /**/ KC_F3, /**/ KC_F4, /**/ KC_F5, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_EXLM, /**/ KC_AT, /**/ KC_LCBR, /**/ KC_RCBR, /**/ KC_PERC, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + LGUI(KC_BSPACE),/**/ KC_HASH, /**/ KC_UNDS, /**/ KC_LPRN, /**/ KC_RPRN, /**/ KC_AMPR, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_BSLASH,/**/ KC_SLASH, /**/KC_LBRACKET, KC_RBRACKET,/**/ KC_TILD, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F6, /**/ KC_F7, /**/ KC_F8, /**/ KC_F9, /**/ KC_F10, /**/ KC_F11, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_CIRC, /**/KC_KP_PLUS,/**/KC_KP_MINUS, KC_GRAVE, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_PIPE, /**/ KC_EQUAL, /**/ KC_QUOTE, /**/ KC_COLN, /**/ KC_DQUO, /**/LGUI(KC_DELETE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_DLR, /**/ KC_ASTR, /**/ KC_LABK, /**/ KC_RABK, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_WM_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ OC(KC_C), /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_U), OC(LGUI(KC_LEFT)),OC(KC_ENTER),OC(LGUI(KC_RIGHT)), OC(KC_I),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_J), OC(KC_LEFT), OC(KC_BSPACE), OC(KC_RIGHT), OC(KC_K), /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_UP, /**/ OC(KC_E), /**/ OC(KC_F), /**/ OC(KC_T), /**/ OC(KC_G), /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/KC_LEFT, KC_DOWN, /**/ KC_RIGHT, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ OC(KC_C), /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_U), OC(LGUI(KC_LEFT)),OC(KC_ENTER),OC(LGUI(KC_RIGHT)), OC(KC_I),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ OC(KC_J), OC(KC_LEFT), OC(KC_BSPACE), OC(KC_RIGHT), OC(KC_K), /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_D), /**/ OC(KC_E), /**/ OC(KC_F), /**/ OC(KC_T), /**/ KC_UP, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ KC_LEFT, /**/ KC_DOWN, /**/KC_RIGHT,// + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_ARROWS_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_Q),/**/LGUI(KC_W),/**/LGUI(KC_F),/**/LGUI(KC_P),/**/LGUI(KC_G),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LCTRL, /**/ KC_LGUI, /**/ KC_LSHIFT,/**/ KC_LALT, /**/LGUI(KC_D),/*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_Z),/**/LGUI(KC_X),/**/LGUI(KC_C),/**/LGUI(KC_V),/**/LGUI(KC_B),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RGUI(KC_J),/**/ KC_BSPACE,/**/ KC_UP, /**/ KC_DELETE, RGUI(KC_SCOLON), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/RGUI(KC_H),/**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_ENTER, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RGUI(KC_K),/**/RGUI(KC_M), RGUI(KC_COMMA), RGUI(KC_DOT), RGUI(KC_SLASH), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_ARROWS_WINDOWS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LCTL(KC_Q),/**/LCTL(KC_W),/**/LCTL(KC_F),/**/LCTL(KC_P),/**/LCTL(KC_G),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LGUI, /**/ KC_HYPR, /**/ KC_LSHIFT,/**/ KC_LCTRL, /**/LCTL(KC_D),/*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LCTL(KC_Z),/**/LCTL(KC_X),/**/LCTL(KC_C),/**/LCTL(KC_V),/**/LCTL(KC_B),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RCTL(KC_J),/**/ KC_BSPACE,/**/ KC_UP, /**/ KC_DELETE, RCTL(KC_SCOLON), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/RCTL(KC_H),/**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_ENTER, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RCTL(KC_K),/**/RCTL(KC_M), RCTL(KC_COMMA), RCTL(KC_DOT), RCTL(KC_SLASH), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_MISC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F14, /**/ KC_F15, /**/ _______, /**/ _______, /**/ _______, /**/ RESET, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ KC_MS_UP, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/KC_MS_LEFT,/**/KC_MS_DOWN,/**/KC_MS_RIGHT, _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ RGB_MOD, /**/HSV_0_255_255, + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/HSV_120_255_128, + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/KC_MS_BTN1,/**/KC_MS_BTN2,/**/HSV_240_255_255, + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/KC_MEDIA_EJECT, + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/DF(_DVORAK), DF(_QWERTY), DF(_COLEMAK),// + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, WINDOWS_MODE, MAC_MODE, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ RGB_TOG, /**/ RGB_SLD, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ RGB_VAI, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ RGB_VAD, /**/ RGB_HUD, /**/ RGB_HUI /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + /* clang-format on */ +}; + +bool suspended = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EEP_RST: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + case HSV_0_255_255: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(0, 255, 255); +#endif + } + return false; + break; + case HSV_120_255_128: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(120, 255, 128); +#endif + } + return false; + break; + case HSV_240_255_255: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(240, 255, 255); +#endif + } + return false; + break; + case MAC_MODE: + if (record->event.pressed) { + layer_on(_MAC); + layer_off(_WINDOWS); + } + return false; + break; + case WINDOWS_MODE: + if (record->event.pressed) { + layer_on(_WINDOWS); + layer_off(_MAC); + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) { + uint8_t layer = biton32(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + if (layer == _ARROWS_MAC || layer == _ARROWS_WINDOWS) { + ergodox_right_led_1_on(); + } else if (layer == _SYMBOLS) { + ergodox_right_led_2_on(); + } else if (layer == _NUMPAD) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + } else if (layer == _WM_MAC || layer == _WM_WINDOWS) { + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == _MISC) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == _WINDOWS) { + ergodox_right_led_3_on(); + } else if (layer == _MAC) { + /* do nothing */ + } + + return state; +}; + +void keyboard_post_init_user(void) { + /* This layer is always on */ + layer_on(_COMMON); + + /* Default to Mac layout */ + layer_on(_MAC); +} diff --git a/keyboards/ergodox_ez/keymaps/nfriend/readme.md b/keyboards/ergodox_ez/keymaps/nfriend/readme.md new file mode 100644 index 000000000000..0a19e2d04296 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/readme.md @@ -0,0 +1,52 @@ +# [nfriend](https://gitlab.com/nfriend)'s ErgoDox EZ configuration + +![nfriend's ErgoDox EZ keymap](https://i.imgur.com/CMMmdBc.png) + +[View this keymap on +keyboard-layout-editor.com.](http://www.keyboard-layout-editor.com/#/gists/01283b322a647c96ef75955a9b0bac68) + +Color legend: + +- **Black:** Primary layer. +- **Blue:** Symbol layer. Accessed by holding either of the to sym + keys on either end of the keyboard. +- **Green:** Numpad layer. Accessed by holding the to numpad key. +- **Red:** Arrow layer. Accessed by holding either of the to arrows + thumb keys. +- **Teal:** Window management layer. Accessed by holding either of the to + WM thumb keys. + - Note: this layer is not pictured on this keymap since is tightly coupled + to [Magnet](https://magnet.crowdcafe.com/). +- **Yellow:** Miscellaneous layer. Includes LED control, layout toggling + (Colemak/Dvorak/QWERTY), platform toggling (Windows/Mac), and other + experimental features. + - Note: this layer is only partially pictured on this keymap + +## Caveats + +In its current state, this keymap is fairly Mac-centric. Some of the features +implemented in the Mac layers have not yet been ported to the corresponding +Windows layers. + +## Building + +To build this layout, open a command window in the root directory of this +repository and run: + +```bash +make ergodox_ez:nfriend +``` + +This will create a `.build/ergodox_ez_nfriend.hex` file which can be flashed +using the [Teensy loader](https://www.pjrc.com/teensy/loader.html). After the +`.hex` file has been loaded into Teensy, the keyboard can be reprogrammed by +pressing the bottom-right key of the right half of the keyboard and the +top-right key of the left half (the RESET key in the screenshot +above). + +## Developing + +Use the template in `./template.c` to help create new layers quickly. + +This layout was originally based on [this EZ Configurator +configuration](https://configure.ergodox-ez.com/ergodox-ez/layouts/x9MWL/latest/0). diff --git a/keyboards/ergodox_ez/keymaps/nfriend/rules.mk b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk new file mode 100644 index 000000000000..7e037f6414f2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/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 +DEBOUNCE_TYPE = eager_pk +LTO_ENABLE = yes +COMMAND_ENABLE = no +UNICODE_ENABLE = no +UNICODEMAP_ENABLE = no +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/nfriend/template.c b/keyboards/ergodox_ez/keymaps/nfriend/template.c new file mode 100644 index 000000000000..dc4294d595b6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/template.c @@ -0,0 +1,92 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can 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 . + */ + +/* clang-format off */ + +[LAYER_NAME] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ +), diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 6477d5364ab5..71bd66b1553a 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -37,6 +37,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c index f27bdc113b78..dd973feec565 100644 --- a/keyboards/exclusive/e6v2/le/le.c +++ b/keyboards/exclusive/e6v2/le/le.c @@ -1,33 +1 @@ #include "le.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } -} - diff --git a/keyboards/exclusive/e6v2/le_bmc/config.h b/keyboards/exclusive/e6v2/le_bmc/config.h index 198e73265d9b..36c1336f2c5d 100644 --- a/keyboards/exclusive/e6v2/le_bmc/config.h +++ b/keyboards/exclusive/e6v2/le_bmc/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4558 +#define PRODUCT_ID 0xE62D #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive / E-Team #define PRODUCT E6-V2 LE BMC diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c new file mode 100644 index 000000000000..33b8aae22833 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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_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, KC_RCTL, MO(1) + ), + +[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, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_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), + +[3] = LAYOUT_60_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), + +}; + diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/via/rules.mk b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/le_bmc/readme.md b/keyboards/exclusive/e6v2/le_bmc/readme.md index 561560a3e36e..d999982671b2 100644 --- a/keyboards/exclusive/e6v2/le_bmc/readme.md +++ b/keyboards/exclusive/e6v2/le_bmc/readme.md @@ -2,8 +2,10 @@ These docs are for the BMC version of the E6-V2 PCB sold during Round 2 which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2 or your E6V2 BMC from Round 1. +The Round 2 PCB will be labeled 2.32 on the back of the PCB on the bottom left and will feature the Exclusive logo (with crown) on the front side of the PCB + * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller rev 2.32 * Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/exclusive/e6v2/oe_bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h index c26006b6a964..17b701f58985 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/config.h +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4558 +#define PRODUCT_ID 0xE62B #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive / E-Team #define PRODUCT E6-V2 OE BMC diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c new file mode 100644 index 000000000000..9f8752e9b9fa --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/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_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, KC_RCTL, MO(1) + ), + +[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, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_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), + +[3] = LAYOUT_60_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), + + +}; + diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/oe_bmc/readme.md b/keyboards/exclusive/e6v2/oe_bmc/readme.md index cd6da0ff0b9f..c259728edf13 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/readme.md +++ b/keyboards/exclusive/e6v2/oe_bmc/readme.md @@ -3,7 +3,7 @@ These docs are for the BMC version of the E6-V2 PCB sold during Round 1 which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2 or your E6V2 BMC from Round 2. * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller rev 2.31 * Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index c8f150125088..11e47c3601ed 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h @@ -22,6 +22,8 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN F0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/exclusive/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c index 381585e6cfba..880121f4f01b 100644 --- a/keyboards/exclusive/e7v1/e7v1.c +++ b/keyboards/exclusive/e7v1/e7v1.c @@ -1,25 +1 @@ #include "e7v1.h" - -void matrix_init_kb(void) { - setPinOutput(F0); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - writePinHigh(F0); - } else { - writePinLow(F0); - } - - led_set_user(usb_led); -} - diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index 758cd8b78c28..844c9102561a 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -52,9 +52,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -// #define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 6 #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c index a5893e6bc50a..db14971daba4 100644 --- a/keyboards/exclusive/e85/hotswap/hotswap.c +++ b/keyboards/exclusive/e85/hotswap/hotswap.c @@ -15,3 +15,18 @@ */ #include "hotswap.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(C7); + setPinOutput(B5); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(C7, led_state.caps_lock); + writePin(B5, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk index 29a6f75191f0..45681e1b1ba5 100644 --- a/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk +++ b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk index 29a6f75191f0..45681e1b1ba5 100644 --- a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk +++ b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c index 0a7de55ce7fe..e97a543b5726 100644 --- a/keyboards/exclusive/e85/soldered/soldered.c +++ b/keyboards/exclusive/e85/soldered/soldered.c @@ -17,14 +17,16 @@ #include "soldered.h" void keyboard_pre_init_kb(void) { - setPinOutput(C7); - - keyboard_pre_init_user(); + setPinOutput(C7); + setPinOutput(B5); + + keyboard_pre_init_user(); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { writePin(C7, led_state.caps_lock); + writePin(B5, led_state.scroll_lock); } return true; } diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index f9d3e06d6e8d..7e79d8d1f8ed 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -49,7 +49,10 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 0 -#define TAPPING_TERM 175 + +#define LED_NUM_LOCK_PIN B4 +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/fc980c/fc980c.c b/keyboards/fc980c/fc980c.c index c09eacfa3322..744a3614a53e 100644 --- a/keyboards/fc980c/fc980c.c +++ b/keyboards/fc980c/fc980c.c @@ -22,46 +22,9 @@ along with this program. If not, see . #endif void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - #ifdef ACTUATION_DEPTH_ADJUSTMENT adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); #endif matrix_init_user(); } - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.c b/keyboards/foxlab/leaf60/hotswap/hotswap.c index 20778d927d20..e2de4a7e319c 100644 --- a/keyboards/foxlab/leaf60/hotswap/hotswap.c +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.c @@ -14,46 +14,3 @@ * along with this program. If not, see . */ #include "hotswap.h" - -// 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(E6); - matrix_init_user(); -} -/* - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -*/ - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - led_set_user(usb_led); -} diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 9f761f454d1c..f48bae497ac3 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/foxlab/leaf60/universal/universal.c b/keyboards/foxlab/leaf60/universal/universal.c index 5fe663a1bff5..197e411d7044 100644 --- a/keyboards/foxlab/leaf60/universal/universal.c +++ b/keyboards/foxlab/leaf60/universal/universal.c @@ -14,48 +14,3 @@ * along with this program. If not, see . */ #include "universal.h" - -// 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(E6); - matrix_init_user(); -} - -/* - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -*/ - - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - led_set_user(usb_led); -} diff --git a/keyboards/foxlab/time80/config.h b/keyboards/foxlab/time80/config.h new file mode 100644 index 000000000000..8fea3e7e6ee5 --- /dev/null +++ b/keyboards/foxlab/time80/config.h @@ -0,0 +1,129 @@ +/* +Copyright 2020 Lukas Alexander + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x464C // "FL" +#define PRODUCT_ID 0x0005 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Time80 + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B1, B2, B3, B5, B6, B7, B0 } +#define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7, A0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#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 + +/* 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/keyboards/foxlab/time80/info.json b/keyboards/foxlab/time80/info.json new file mode 100644 index 000000000000..0919bae5af5b --- /dev/null +++ b/keyboards/foxlab/time80/info.json @@ -0,0 +1,104 @@ +{ + "keyboard_name": "Fox Lab Time 80", + "url": "", + "maintainer": "lukelex", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"k00", "x":0, "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":"k07", "x":6.5, "y":0}, + {"label":"k08", "x":7.5, "y":0}, + {"label":"k09", "x":8.5, "y":0}, + {"label":"k0A", "x":9.5, "y":0}, + {"label":"k0B", "x":11, "y":0}, + {"label":"k0E", "x":12, "y":0}, + {"label":"k0C", "x":13, "y":0}, + {"label":"k01", "x":14, "y":0}, + {"label":"k61", "x":15.25, "y":0}, + {"label":"k62", "x":16.25, "y":0}, + {"label":"k6E", "x":17.25, "y":0}, + {"label":"k10", "x":0, "y":1.25}, + {"label":"k11", "x":1, "y":1.25}, + {"label":"k12", "x":2, "y":1.25}, + {"label":"k13", "x":3, "y":1.25}, + {"label":"k14", "x":4, "y":1.25}, + {"label":"k15", "x":5, "y":1.25}, + {"label":"k16", "x":6, "y":1.25}, + {"label":"k17", "x":7, "y":1.25}, + {"label":"k18", "x":8, "y":1.25}, + {"label":"k19", "x":9, "y":1.25}, + {"label":"k1A", "x":10, "y":1.25}, + {"label":"k1B", "x":11, "y":1.25}, + {"label":"k1E", "x":12, "y":1.25}, + {"label":"k1C", "x":13, "y":1.25}, + {"label":"k1D", "x":14, "y":1.25}, + {"label":"k66", "x":15.25, "y":1.25}, + {"label":"k65", "x":16.25, "y":1.25}, + {"label":"k64", "x":17.25, "y":1.25}, + {"label":"k20", "x":0, "y":2.25, "w":1.5}, + {"label":"k21", "x":1.5, "y":2.25}, + {"label":"k22", "x":2.5, "y":2.25}, + {"label":"k23", "x":3.5, "y":2.25}, + {"label":"k24", "x":4.5, "y":2.25}, + {"label":"k25", "x":5.5, "y":2.25}, + {"label":"k26", "x":6.5, "y":2.25}, + {"label":"k27", "x":7.5, "y":2.25}, + {"label":"k28", "x":8.5, "y":2.25}, + {"label":"k29", "x":9.5, "y":2.25}, + {"label":"k2A", "x":10.5, "y":2.25}, + {"label":"k2B", "x":11.5, "y":2.25}, + {"label":"k2E", "x":12.5, "y":2.25}, + {"label":"k2C", "x":13.5, "y":2.25, "w":1.5}, + {"label":"k6C", "x":15.25, "y":2.25}, + {"label":"k68", "x":16.25, "y":2.25}, + {"label":"k67", "x":17.25, "y":2.25}, + {"label":"k30", "x":0, "y":3.25, "w":1.75}, + {"label":"k31", "x":1.75, "y":3.25}, + {"label":"k32", "x":2.75, "y":3.25}, + {"label":"k33", "x":3.75, "y":3.25}, + {"label":"k34", "x":4.75, "y":3.25}, + {"label":"k35", "x":5.75, "y":3.25}, + {"label":"k36", "x":6.75, "y":3.25}, + {"label":"k37", "x":7.75, "y":3.25}, + {"label":"k38", "x":8.75, "y":3.25}, + {"label":"k39", "x":9.75, "y":3.25}, + {"label":"k3A", "x":10.75, "y":3.25}, + {"label":"k3B", "x":11.75, "y":3.25}, + {"label":"k3C", "x":12.75, "y":3.25}, + {"label":"k3E", "x":13.75, "y":3.25, "w":1.25}, + {"label":"k40", "x":0, "y":4.25, "w":1.25}, + {"label":"k4D", "x":1.25, "y":4.25}, + {"label":"k41", "x":2.25, "y":4.25}, + {"label":"k42", "x":3.25, "y":4.25}, + {"label":"k43", "x":4.25, "y":4.25}, + {"label":"k44", "x":5.25, "y":4.25}, + {"label":"k45", "x":6.25, "y":4.25}, + {"label":"k46", "x":7.25, "y":4.25}, + {"label":"k47", "x":8.25, "y":4.25}, + {"label":"k48", "x":9.25, "y":4.25}, + {"label":"k49", "x":10.25, "y":4.25}, + {"label":"k4A", "x":11.25, "y":4.25}, + {"label":"k4B", "x":12.25, "y":4.25, "w":1.75}, + {"label":"k4E", "x":14, "y":4.25}, + {"label":"k4C", "x":16.25, "y":4.25}, + {"label":"k50", "x":0, "y":5.25, "w":1.25}, + {"label":"k51", "x":1.25, "y":5.25, "w":1.25}, + {"label":"k52", "x":2.5, "y":5.25, "w":1.25}, + {"label":"k54", "x":3.75, "y":5.25, "w":6.25}, + {"label":"k58", "x":10, "y":5.25, "w":1.25}, + {"label":"k59", "x":11.25, "y":5.25, "w":1.25}, + {"label":"k5A", "x":12.5, "y":5.25, "w":1.25}, + {"label":"k5B", "x":13.75, "y":5.25, "w":1.25}, + {"label":"k5E", "x":15.25, "y":5.25}, + {"label":"k5C", "x":16.25, "y":5.25}, + {"label":"k57", "x":17.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/foxlab/time80/keymaps/default/keymap.c b/keyboards/foxlab/time80/keymaps/default/keymap.c new file mode 100644 index 000000000000..eb4facb50787 --- /dev/null +++ b/keyboards/foxlab/time80/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Lukas Alexander + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_MPRV, KC_MNXT, KC_MPLY, + 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_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_BSPC, KC_DEL, KC_END, KC_PGDN, + LCTL_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, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(4), KC_UP, + KC_LALT, KC_LALT, KC_LGUI, LT(2, KC_SPC), MO(3), MO(3), MO(4), MO(4), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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_MPRV, KC_MNXT, KC_MPLY, + 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_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_BSPC, KC_DEL, KC_END, 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, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(4), KC_UP, + KC_LALT, KC_LALT, KC_LGUI, KC_SPC, MO(3), MO(3), MO(4), MO(4), KC_LEFT, KC_DOWN, KC_RGHT + ), + [2] = LAYOUT_all( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_VOLD, KC_VOLU, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MNXT, KC_MPLY, XXXXXXX, MO(4), KC_UP, + KC_LALT, KC_LALT, KC_LGUI, _______, XXXXXXX, XXXXXXX, MO(4), MO(4), KC_LEFT, KC_DOWN, KC_RGHT + ), + [3] = LAYOUT_all( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RALT(KC_N), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_I), XXXXXXX, XXXXXXX, XXXXXXX, LGUI(KC_MINS), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, XXXXXXX, XXXXXXX, RALT(KC_SCLN), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_O), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, RALT(KC_A), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_E), XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_C), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, MO(4), XXXXXXX, + KC_LALT, KC_LALT, KC_LGUI, XXXXXXX, _______, _______, MO(4), MO(4), XXXXXXX, XXXXXXX, XXXXXXX + ), + [4] = LAYOUT_all( + 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, TG(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 + ) +}; diff --git a/keyboards/foxlab/time80/keymaps/default/readme.md b/keyboards/foxlab/time80/keymaps/default/readme.md new file mode 100644 index 000000000000..bf4136282f24 --- /dev/null +++ b/keyboards/foxlab/time80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for time80 diff --git a/keyboards/foxlab/time80/readme.md b/keyboards/foxlab/time80/readme.md new file mode 100644 index 000000000000..66fd66b4b6d4 --- /dev/null +++ b/keyboards/foxlab/time80/readme.md @@ -0,0 +1,27 @@ +# time80 + +![time80](https://i.imgur.com/8HpYStPl.jpg) + +Time is an intricate custom keyboard kit from Fox Lab, a group of +Chinese designers focused on making maximizing the potential for +design and detail in custom keyboards. Featuring an 18-piece design, +Time is the custom keyboard with the most number of parts in existence (so far). + +* Keyboard Maintainer: [Lukas Alexander](https://github.com/lukelex) +* Hardware Supported: Time 80 PCB +* Hardware Availability: [Group Buy](https://geekhack.org/index.php?topic=92349.0) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/time80:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make foxlab/time80:default:flash + +**Reset Key**: There are no reset switches or pads. Follow this +[guide](https://docs.qmk.fm/#/flashing_bootloadhid) +to have it flashed for the first time. Remember to add a `RESET` +key on your keymap for future endeavors. + +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/keyboards/foxlab/time80/rules.mk b/keyboards/foxlab/time80/rules.mk new file mode 100644 index 000000000000..1b61e9534da1 --- /dev/null +++ b/keyboards/foxlab/time80/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +BOOTLOADER = bootloadHID + +# 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +WS2812_DRIVER = i2c diff --git a/keyboards/reviung34/keymaps/default/config.h b/keyboards/foxlab/time80/time80.c old mode 100755 new mode 100644 similarity index 91% rename from keyboards/reviung34/keymaps/default/config.h rename to keyboards/foxlab/time80/time80.c index 1924c64a1ef4..d2cf8cef2cc4 --- a/keyboards/reviung34/keymaps/default/config.h +++ b/keyboards/foxlab/time80/time80.c @@ -1,4 +1,4 @@ -/* Copyright 2019 gtips +/* Copyright 2020 Lukas Alexander * * This 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,7 +14,4 @@ * along with this program. If not, see . */ -#pragma once - -// place overrides here - +#include "time80.h" diff --git a/keyboards/foxlab/time80/time80.h b/keyboards/foxlab/time80/time80.h new file mode 100644 index 000000000000..f451b32f01bb --- /dev/null +++ b/keyboards/foxlab/time80/time80.h @@ -0,0 +1,44 @@ +/* Copyright 2020 Lukas Alexander + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_all( \ + k00, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0E, k0C, k01, k61, k62, k6E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1E, k1C, k1D, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2C, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k4D, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4E, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5E, k5C, k57 \ +) { \ + { k00, KC_NO, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0A, k0B, k0C, KC_NO, 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, k3C, KC_NO, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, KC_NO, k54, KC_NO, KC_NO, k57, k58, k59, k5A, k5B, k5C, KC_NO, k5E }, \ + { KC_NO, k61, k62, KC_NO, k64, k65, k66, k67, k68, KC_NO, KC_NO, KC_NO, k6C, KC_NO, k6E } \ +} diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 2e3928e695d8..5f0817ba1b7f 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -48,10 +48,8 @@ along with this program. If not, see . /* 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 D0 // or D1, D2, D3, E6 +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/gray_studio/space65/space65.c b/keyboards/gray_studio/space65/space65.c index 74a86a202d05..d27a1f38c36d 100644 --- a/keyboards/gray_studio/space65/space65.c +++ b/keyboards/gray_studio/space65/space65.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "space65.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - setPinOutput(E6); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/gray_studio/think65/hotswap/config.h b/keyboards/gray_studio/think65/hotswap/config.h index 05a818a7310c..5fe35201ac39 100644 --- a/keyboards/gray_studio/think65/hotswap/config.h +++ b/keyboards/gray_studio/think65/hotswap/config.h @@ -46,6 +46,11 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN F7 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 22 diff --git a/keyboards/gray_studio/think65/hotswap/hotswap.c b/keyboards/gray_studio/think65/hotswap/hotswap.c index 07cdc8b1f73f..60808979c981 100644 --- a/keyboards/gray_studio/think65/hotswap/hotswap.c +++ b/keyboards/gray_studio/think65/hotswap/hotswap.c @@ -14,58 +14,3 @@ * along with this program. If not, see . */ #include "hotswap.h" - -// 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(C6); - setPinOutput(C7); - setPinOutput(F7); - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(C6); - } else { - writePinHigh(C6); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(F7); - } else { - writePinHigh(F7); - } - - led_set_user(usb_led); -} - diff --git a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c new file mode 100644 index 000000000000..956932329c30 --- /dev/null +++ b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c @@ -0,0 +1,23 @@ +/* Copyright 2020 Sergey Vlasov (sigprof) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +void board_init(void) { + // B9 is configured as I2C1_SDA in the board file; that function must be + // disabled before using B7 as I2C1_SDA. + setPinInputHigh(B9); +} diff --git a/keyboards/handwired/pill60/blackpill_f401/config.h b/keyboards/handwired/pill60/blackpill_f401/config.h new file mode 100644 index 000000000000..d56ba94ea4b3 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/config.h @@ -0,0 +1,24 @@ +/* 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 . + */ + +#pragma once + +#define MATRIX_COL_PINS \ + { A8, B2, B1, B15, A10, A0, A1, A2, A3, A4, A5, A6, A7, B0 } +#define MATRIX_ROW_PINS \ + { B4, B3, A15, B13, B5 } +#define UNUSED_PINS \ + { A9, A11, A12, C13, C14, C15, B10 } diff --git a/keyboards/handwired/pill60/blackpill_f401/halconf.h b/keyboards/handwired/pill60/blackpill_f401/halconf.h new file mode 100644 index 000000000000..f1230634b6c6 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can 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 HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE + +#include_next "halconf.h" \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f401/mcuconf.h b/keyboards/handwired/pill60/blackpill_f401/mcuconf.h new file mode 100644 index 000000000000..a8b0a56602c6 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can 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_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f401/rules.mk b/keyboards/handwired/pill60/blackpill_f401/rules.mk new file mode 100644 index 000000000000..8c514309df95 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/rules.mk @@ -0,0 +1,14 @@ +# MCU name +MCU = STM32F401 + +# Address of the bootloader 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 + +# Build Options +# change yes to no to disable +# +KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/pill60/blackpill_f411/config.h b/keyboards/handwired/pill60/blackpill_f411/config.h new file mode 100644 index 000000000000..b106c2d290c5 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/config.h @@ -0,0 +1,25 @@ +/* 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 . + */ + +#pragma once + +#define MATRIX_COL_PINS \ + { A8, B2, B1, B15, A10, A0, A1, A2, A3, A4, A5, A6, A7, B0 } +#define MATRIX_ROW_PINS \ + { B4, B3, A15, B13, B5 } +#define UNUSED_PINS \ + { A9, A11, A12, C13, C14, C15, B10 } + diff --git a/keyboards/handwired/pill60/blackpill_f411/halconf.h b/keyboards/handwired/pill60/blackpill_f411/halconf.h new file mode 100644 index 000000000000..f1230634b6c6 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can 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 HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE + +#include_next "halconf.h" \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f411/mcuconf.h b/keyboards/handwired/pill60/blackpill_f411/mcuconf.h new file mode 100644 index 000000000000..a8b0a56602c6 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can 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_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f411/rules.mk b/keyboards/handwired/pill60/blackpill_f411/rules.mk new file mode 100644 index 000000000000..84dd584e8562 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/rules.mk @@ -0,0 +1,14 @@ +# MCU name +MCU = STM32F411 + +# Address of the bootloader 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 + +# Build Options +# change yes to no to disable +# +KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/pill60/bluepill/chconf.h b/keyboards/handwired/pill60/bluepill/chconf.h new file mode 100644 index 000000000000..d8442f1b1aee --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/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 */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/handwired/pill60/bluepill/config.h b/keyboards/handwired/pill60/bluepill/config.h new file mode 100644 index 000000000000..f68f518b9725 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/config.h @@ -0,0 +1,24 @@ +/* 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 . + */ + +#pragma once + +#define MATRIX_COL_PINS \ + { A8, B11, B10, B15, A10, A1, A2, A3, A4, A5, A6, A7, B0, B1 } +#define MATRIX_ROW_PINS \ + { B4, B3, A15, B13, B5 } +#define UNUSED_PINS \ + { A0, A9, A11, A12, C13, C14, C15 } diff --git a/keyboards/handwired/pill60/bluepill/halconf.h b/keyboards/handwired/pill60/bluepill/halconf.h new file mode 100644 index 000000000000..a406166756c5 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/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 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/keyboards/handwired/pill60/bluepill/mcuconf.h b/keyboards/handwired/pill60/bluepill/mcuconf.h new file mode 100644 index 000000000000..841b689922d2 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/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 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 FALSE +#define STM32_PWM_USE_TIM2 TRUE +#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 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_ */ diff --git a/keyboards/handwired/pill60/bluepill/rules.mk b/keyboards/handwired/pill60/bluepill/rules.mk new file mode 100644 index 000000000000..019b1130d995 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = STM32F103 + +# 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/keyboards/handwired/pill60/config.h b/keyboards/handwired/pill60/config.h new file mode 100644 index 000000000000..d9940c77c26f --- /dev/null +++ b/keyboards/handwired/pill60/config.h @@ -0,0 +1,53 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#define PRODUCT_ID 0x5444 +#define DEVICE_VER 0x0001 + +#define MANUFACTURER "IktaS" +#define PRODUCT "Pill60" + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 1 + +/* Backlighting include */ +#define BACKLIGHT_PIN B14 +#define BACKLIGHT_PWM_DRIVER PWMD5 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_LEVELS 5 +#define BREATHING_PERIOD 6 + +/* Encoder */ +#define ENCODERS_PAD_A \ + { B9 } +#define ENCODERS_PAD_B \ + { B8 } +#define ENCODER_RESOLUTION 2 + +/* OLED */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_BANK GPIOB +#define I2C1_SDA_BANK GPIOB +#define I2C1_SCL 6 +#define I2C1_SDA 7 diff --git a/keyboards/handwired/pill60/info.json b/keyboards/handwired/pill60/info.json new file mode 100644 index 000000000000..bb44c9eb9415 --- /dev/null +++ b/keyboards/handwired/pill60/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Pill60", + "url": "https://github.com/IktaS/Pill60", + "maintainer": "IktaS ", + "width": 15, + "height": 5, + "layouts": { + "layout_default": { + "layout": [ + {"label": "Encoder", "x": 0, "y": 0}, + + {"label": "Esc", "x": 0, "y": 1}, + {"label": "1","x": 1, "y": 1}, + {"label": "2","x": 2, "y": 1}, + {"label": "3","x": 3, "y": 1}, + {"label": "4","x": 4, "y": 1}, + {"label": "5","x": 5, "y": 1}, + {"label": "6","x": 6, "y": 1}, + {"label": "7","x": 7, "y": 1}, + {"label": "8","x": 8, "y": 1}, + {"label": "9","x": 9, "y": 1}, + {"label": "0","x": 10, "y": 1}, + {"label": "-","x": 11, "y": 1}, + {"label": "=","x": 12, "y": 1}, + {"label": "Backspace","x": 13, "y": 1}, + {"label": "Delete","x": 14, "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": "Caps","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": "L 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": "R Shift","x": 12.25, "y": 4, "w": 1.75}, + {"label": "FN","x": 14, "y": 4}, + + {"label": "L CTRL","x": 0, "y": 5, "w": 1.25}, + {"label": "L GUI","x": 1.25, "y": 5, "w": 1.25}, + {"label": "L ALT","x": 2.5, "y": 5, "w": 1.25}, + {"label": "Space","x": 3.75, "y": 5, "w": 6.25}, + {"label": "R ALT","x": 10, "y": 5, "w": 1.25}, + {"label": "R GUI","x": 11.25, "y": 5, "w": 1.25}, + {"label": "R MENU","x": 12.5, "y": 5, "w": 1.25}, + {"label": "R CTRL","x": 13.75, "y": 5, "w": 1.25} + ] + } + } +} diff --git a/keyboards/handwired/pill60/keymaps/default/keymap.c b/keyboards/handwired/pill60/keymaps/default/keymap.c new file mode 100644 index 000000000000..6edcb0c2c899 --- /dev/null +++ b/keyboards/handwired/pill60/keymaps/default/keymap.c @@ -0,0 +1,87 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + [_BL] = LAYOUT( + KC_F1, + 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_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_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_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(_FL), + MO(_FL), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL + ), + [_FL] = LAYOUT( + KC_TRNS, + 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_PSCR, KC_INS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, KC_HOME, XXXXXXX, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, XXXXXXX, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef OLED_DRIVER_ENABLE + +static void render_oled(void) { + oled_write_P(PSTR("Ikta's Pill60"), 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_write_P(PSTR(" "), false); + switch (get_highest_layer(layer_state)) { + case _BL: + oled_write_P(PSTR("Base"), false); + break; + case _FL: + oled_write_P(PSTR("Function"), false); + break; + default: + oled_write_ln_P(PSTR("Base"), false); + } + oled_write_P(PSTR(" "), false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return rotation; +} + +void oled_task_user(void) { + render_oled(); +} + +#endif + +#ifdef ENCODER_ENABLE + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_A); + } else { + tap_code(KC_B); + } + } +} + +#endif diff --git a/keyboards/handwired/pill60/keymaps/default/readme.md b/keyboards/handwired/pill60/keymaps/default/readme.md new file mode 100644 index 000000000000..b1c3f1d79fd9 --- /dev/null +++ b/keyboards/handwired/pill60/keymaps/default/readme.md @@ -0,0 +1,6 @@ +![Pill60 Layout Image](https://i.imgur.com/LIW18XJ.png) + +# Default Pill 60 Layout + +This is the default layout that comes flashed on every 60% board. For the most +part it's a straightforward and easy to follow layout. Except the backspace is split, and right shift is split. \ No newline at end of file diff --git a/keyboards/handwired/pill60/pill60.c b/keyboards/handwired/pill60/pill60.c new file mode 100644 index 000000000000..928685a92c74 --- /dev/null +++ b/keyboards/handwired/pill60/pill60.c @@ -0,0 +1,16 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "pill60.h" \ No newline at end of file diff --git a/keyboards/handwired/pill60/pill60.h b/keyboards/handwired/pill60/pill60.h new file mode 100644 index 000000000000..e020f1eb75c5 --- /dev/null +++ b/keyboards/handwired/pill60/pill60.h @@ -0,0 +1,42 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +/* LAYOUT + ENCODER + ESC| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BCKS | DEL + TAB| Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ + CAP| A | S | D | F | G | H | J | K | L | ; | ' | ENTER + LSHFT| Z | X | C | V | B | N | M | , | . | / | RSHIF | FN + LCT| WIN| ALT| ESPACE | ALT| WIN | MN| RCT| +*/ + +#define LAYOUT( \ + e00, \ + 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, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k47, k4a, k4b, k4c, 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 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, k0e }, \ + { k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, KC_NO }, \ + { k40, k41, k42, e00, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4e }\ +} diff --git a/keyboards/handwired/pill60/readme.md b/keyboards/handwired/pill60/readme.md new file mode 100644 index 000000000000..3d1d142e797d --- /dev/null +++ b/keyboards/handwired/pill60/readme.md @@ -0,0 +1,25 @@ +# Pill60 + +![Pill60](https://i.imgur.com/7WmHa6ml.png) + +A 60% open source keyboard with rotary encoder, OLED screen, and Hotswap socket, using STM32F103 / Blue Pill. + +* Keyboard Maintainer: [Ikta](https://github.com/IktaS)#8871 (Discord) +* Hardware Supported: Pill60 PCB, STM32F103C8T6 +* Hardware Availability: [github](https://github.com/IktaS/Pill60) + +Step by step guide on how to install a bootloader if your bluepill don't have one : +1. Download [this bootloader]( https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/bootloader_only_binaries/generic_boot20_pc13_fastboot.bin) +2. Flash Using FTDI Serial to USB converter or an ST-Link, as in [this](https://www.youtube.com/watch?v=Myon8H111PQ) video, but replacing the bootloader file +3. Put Boot 1 to 1, then reset the board, if you're using the same bootloader, the LED should blink +4. Flash your .bin file using dfu-util +5. Put Boot 1 back to 0, then reset again + +Building Guide : +- Use `qmk compile -kb handwired/pill60 -km default` to compile default keymap and using STM32F103 as an MCU +- Use `qmk compile -kb handwired/pill60/blackpill_f401 -km default` to compile default keymap and using STM32F401 as an MCU +- Use `qmk compile -kb handwired/pill60/blackpill_f411 -km default` to compile default keymap and using STM32F411 as an MCU + +## Warning: currently tested MCU is STM32F103, I am still waiting for f401 and f411 to arrive + +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/keyboards/handwired/pill60/rules.mk b/keyboards/handwired/pill60/rules.mk new file mode 100644 index 000000000000..7658a814d6e8 --- /dev/null +++ b/keyboards/handwired/pill60/rules.mk @@ -0,0 +1,21 @@ +# 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 = 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 +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes + +DEFAULT_FOLDER = handwired/pill60/bluepill diff --git a/keyboards/handwired/symmetric70_proto/config.h b/keyboards/handwired/symmetric70_proto/config.h new file mode 100644 index 000000000000..2cdce5802c82 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/config.h @@ -0,0 +1,150 @@ +/* +Copyright 2020 mtei + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x2BE5 +#define DEVICE_VER 0x0001 +#define MANUFACTURER mtei +#define PRODUCT Symmetric70 prototype + +/* 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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4,F4,F5,F5, F6,F6,F7,F7, B6,B6,B2,B2, B3,B3,B1,B1 } +#define UNUSED_PINS + +#define MATRIX_MUL_SEL { 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 } +/* use 74HC157: quadruple 2-line to 1-line data selectors / multiplexers */ +#define MATRIX_MUL_SELECT B5 /* 74HC157 pin1:~A/B */ + +/* 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 D0 // or D1, D2, D3, E6 + +//#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/keyboards/handwired/symmetric70_proto/info.json b/keyboards/handwired/symmetric70_proto/info.json new file mode 100644 index 000000000000..abb0976a3ff1 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "symmetric70_proto", + "url": "", + "maintainer": "mtei", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0, "w":1.25}, + {"label":"L01", "x":1.25, "y":0}, + {"label":"L02", "x":2.25, "y":0}, + {"label":"L03", "x":3.25, "y":0}, + {"label":"L04", "x":4.25, "y":0}, + {"label":"L05", "x":5.25, "y":0}, + {"label":"L06", "x":6.25, "y":0}, + {"label":"R06", "x":8.75, "y":0}, + {"label":"R05", "x":9.75, "y":0}, + {"label":"R04", "x":10.75, "y":0}, + {"label":"R03", "x":11.75, "y":0}, + {"label":"R02", "x":12.75, "y":0}, + {"label":"R01", "x":13.75, "y":0}, + {"label":"R00", "x":14.75, "y":0, "w":1.25}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + {"label":"L16", "x":6.5, "y":1}, + {"label":"R16", "x":8.5, "y":1}, + {"label":"R15", "x":9.5, "y":1}, + {"label":"R14", "x":10.5, "y":1}, + {"label":"R13", "x":11.5, "y":1}, + {"label":"R12", "x":12.5, "y":1}, + {"label":"R11", "x":13.5, "y":1}, + {"label":"R10", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.25}, + {"label":"L21", "x":1.25, "y":2}, + {"label":"L22", "x":2.25, "y":2}, + {"label":"L23", "x":3.25, "y":2}, + {"label":"L24", "x":4.25, "y":2}, + {"label":"L25", "x":5.25, "y":2}, + {"label":"L26", "x":6.25, "y":2}, + {"label":"R26", "x":8.75, "y":2}, + {"label":"R25", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R23", "x":11.75, "y":2}, + {"label":"R22", "x":12.75, "y":2}, + {"label":"R21", "x":13.75, "y":2}, + {"label":"R20", "x":14.75, "y":2, "w":1.25}, + + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"L36", "x":6, "y":3}, + {"label":"L37", "x":7, "y":3}, + {"label":"R37", "x":8, "y":3}, + {"label":"R36", "x":9, "y":3}, + {"label":"R35", "x":10, "y":3}, + {"label":"R34", "x":11, "y":3}, + {"label":"R33", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R31", "x":14, "y":3}, + {"label":"R30", "x":15, "y":3}, + + {"label":"L40", "x":0, "y":4, "w":1.75}, + {"label":"L42", "x":1.75, "y":4, "w":1.25}, + {"label":"L43", "x":3, "y":4, "w":1.25}, + {"label":"L44", "x":4.25, "y":4}, + {"label":"L45", "x":5.25, "y":4, "w":1.25}, + {"label":"L47", "x":6.5, "y":4, "w":1.5}, + {"label":"R47", "x":8, "y":4, "w":1.5}, + {"label":"R45", "x":9.5, "y":4, "w":1.25}, + {"label":"R44", "x":10.75, "y":4}, + {"label":"R43", "x":11.75, "y":4, "w":1.25}, + {"label":"R42", "x":13, "y":4, "w":1.25}, + {"label":"R40", "x":14.25, "y":4, "w":1.75} + ] + } + } +} diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c b/keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c new file mode 100644 index 000000000000..d3969071460f --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +}; + +#define KC_FUNC MO(_FN) + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + //_ESC_1_2_3_4_5_NO _NO_6_7_8_9_0_BSPC + //_TAB_Q_W_E_R_T_MINS _EQL_Y_U_I_O_P_BSLS + //_LCTL_A_S_D_F_G_LBRC _RBRC_H_J_K_L_SCLN_RCTL + //_LSFT_Z_X_C_V_B_GRV_NO _NO_QUOT_N_M_COMM_DOT_SLSH_RSFT + //_FUNC_CAPS_LALT_LGUI_SPC_BSPC _ENT_SPC_RGUI_RALT_APP_FUNC + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, 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_MINS, KC_EQL, 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_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_NO, KC_NO, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_FUNC, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_FUNC + ), + [_FN] = LAYOUT( + //_NO_F1_F2_F3_F4_F5_NO _NO_F6_F7_F8_F9_F10_F11 + //_NO_NO_PAUS_SLCK_NO_NO_NO _NO_NO_NO_SLCK_PAUS_NO_F12 + //_TRNS_HOME_NO_UP_NO_PGUP_INS _INS_PGUP_NO_UP_NO_HOME_TRNS + //_TRNS_END_LEFT_DOWN_RGHT_PGDN_DEL_TRNS _TRNS_DEL_PGDN_LEFT_DOWN_RGHT_END_TRNS + //_TRNS_PSCR_TRNS_TRNS_NO_NO _NO_NO_TRNS_TRNS_PSCR_TRNS + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_NO, KC_NO, KC_PAUS, KC_SLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLCK, KC_PAUS, KC_NO, KC_F12, + _______, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_INS, KC_INS, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, _______, + _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DEL, KC_NO,KC_NO, KC_DEL, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, + _______, KC_PSCR, _______, _______, KC_NO, KC_NO,KC_NO, KC_NO, _______, _______, KC_PSCR, _______ + ) +}; diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default/readme.md b/keyboards/handwired/symmetric70_proto/keymaps/default/readme.md new file mode 100644 index 000000000000..f9bb5bf67588 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default/readme.md @@ -0,0 +1,9 @@ +# The default keymap for symmetric70_proto + +``` + ESC 1 2 3 4 5 6 7 8 9 0 BS + TAB Q W E R T - = Y U I O P \ + CTL A S D F G [ ] H J K L ; CTL + SFT Z X C V B ` ' N M , . / SFT + FUNC CAPS ALT GUI SPC BS ENT SPC GUI RALT APP FUNC +``` diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c new file mode 100644 index 000000000000..30f42e70abcd --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +}; + +#define KC_FUNC MO(_FN) + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + //_ESC_1_2_3_4_5_NO _NO_6_7_8_9_0_BSPC + //_TAB_Q_W_E_R_T_MINS _EQL_Y_U_I_O_P_BSLS + //_LCTL_A_S_D_F_G_LBRC _RBRC_H_J_K_L_SCLN_RCTL + //_LSFT_Z_X_C_V_B_GRV_NO _NO_QUOT_N_M_COMM_DOT_SLSH_RSFT + //_FUNC_CAPS_LALT_LGUI_SPC_BSPC _ENT_SPC_RGUI_RALT_APP_FUNC + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, 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_MINS, KC_EQL, 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_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_LANG2, KC_LANG1, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_FUNC, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_FUNC + ), + [_FN] = LAYOUT( + //_NO_F1_F2_F3_F4_F5_NO _NO_F6_F7_F8_F9_F10_F11 + //_NO_NO_PAUS_SLCK_NO_NO_NO _NO_NO_NO_SLCK_PAUS_NO_F12 + //_TRNS_HOME_NO_UP_NO_PGUP_INS _INS_PGUP_NO_UP_NO_HOME_TRNS + //_TRNS_END_LEFT_DOWN_RGHT_PGDN_DEL_TRNS _TRNS_DEL_PGDN_LEFT_DOWN_RGHT_END_TRNS + //_TRNS_PSCR_TRNS_TRNS_NO_NO _NO_NO_TRNS_TRNS_PSCR_TRNS + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_NO, KC_NO, KC_PAUS, KC_SLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLCK, KC_PAUS, KC_NO, KC_F12, + _______, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_INS, KC_INS, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, _______, + _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DEL, KC_NO,KC_NO, KC_DEL, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, + _______, KC_PSCR, _______, _______, KC_NO, KC_NO,KC_NO, KC_NO, _______, _______, KC_PSCR, _______ + ) +}; diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md new file mode 100644 index 000000000000..c533e328325c --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md @@ -0,0 +1,9 @@ +# The default_mac keymap for symmetric70_proto + +``` + ESC 1 2 3 4 5 6 7 8 9 0 BS + TAB Q W E R T - = Y U I O P \ + CTL A S D F G [ ] H J K L ; CTL + SFT Z X C V B ` LANG2 LANG1 ' N M , . / SFT + FUNC CAPS ALT GUI SPC BS ENT SPC GUI RALT APP FUNC +``` diff --git a/keyboards/handwired/symmetric70_proto/matrix.c b/keyboards/handwired/symmetric70_proto/matrix.c new file mode 100644 index 000000000000..c0161207373c --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/matrix.c @@ -0,0 +1,226 @@ +/* +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 "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +# ifdef MATRIX_MUL_SELECT +static const pin_t col_sel[MATRIX_COLS] = MATRIX_MUL_SEL; +# ifndef MATRIX_MUL_SELECT_DELAY +# define MATRIX_MUL_SELECT_DELAY 1 +# endif +# endif +#endif + +/* 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 + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Start with a clear matrix row + matrix_row_t current_row_value = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + } + + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; +} + +#elif defined(DIODE_DIRECTION) +# if (DIODE_DIRECTION == COL2ROW) + +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) { +#ifdef MATRIX_MUL_SELECT + setPinOutput(MATRIX_MUL_SELECT); + writePinLow(MATRIX_MUL_SELECT); +#endif + 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) { + // Start with a clear matrix row + matrix_row_t current_row_value = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) +#ifdef MATRIX_MUL_SELECT + writePin(MATRIX_MUL_SELECT,col_sel[col_index]); + __builtin_avr_delay_cycles(MATRIX_MUL_SELECT_DELAY); +#endif + 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 the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; +} + +# elif (DIODE_DIRECTION == ROW2COL) + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + matrix_io_delay(); + + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + matrix_row_t current_row_value = last_row_value; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_row_value |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_row_value)) { + matrix_changed |= true; + current_matrix[row_index] = current_row_value; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +#else +# error DIODE_DIRECTION is not defined! +#endif + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // 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); + } +#endif + + return changed; +} diff --git a/keyboards/handwired/symmetric70_proto/readme.md b/keyboards/handwired/symmetric70_proto/readme.md new file mode 100644 index 000000000000..01c2889c2705 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/readme.md @@ -0,0 +1,20 @@ +# symmetric70_proto + +![symmetric70_proto](https://i.imgur.com/Br4pH9ol.jpg) +![74HC157_schematic](https://i.imgur.com/8IU8Jgcl.jpg) + +A compact 70keys keyboard (prototype) designed by mtei + +* Keyboard Maintainer: [mtei](https://github.com/mtei) +* Hardware Supported: Pro Micro (ATmega32U4) & 74HC157 +* Hardware Availability: This is just prototype + +Make example for this keyboard (after setting up your build environment): + + make symmetric70_proto:default + +Flashing example for this keyboard: + + make symmetric70_proto: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/keyboards/handwired/symmetric70_proto/rules.mk b/keyboards/handwired/symmetric70_proto/rules.mk new file mode 100644 index 000000000000..494dc6fbaf55 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/rules.mk @@ -0,0 +1,27 @@ +# 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 = 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 + +CUSTOM_MATRIX = lite +SRC += matrix.c + +## CONSOLE_ENABLE = yes # matrix dump diff --git a/keyboards/handwired/symmetric70_proto/symmetric70_proto.c b/keyboards/handwired/symmetric70_proto/symmetric70_proto.c new file mode 100644 index 000000000000..daab4f09937c --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/symmetric70_proto.c @@ -0,0 +1,25 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "symmetric70_proto.h" + +__attribute__((weak)) 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/keyboards/handwired/symmetric70_proto/symmetric70_proto.h b/keyboards/handwired/symmetric70_proto/symmetric70_proto.h new file mode 100644 index 000000000000..4a8539b50c54 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/symmetric70_proto.h @@ -0,0 +1,41 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, L37, R37, R36, R35, R34, R33, R32, R31, R30, \ + L40, L42, L43, L44, L45, L47, R47, R45, R44, R43, R42, R40 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, R06, R05, R04, R03, R02, R01, R00 }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, R16, R15, R14, R13, R12, R11, R10 }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, R26, R25, R24, R23, R22, R21, R20 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, R37, R36, R35, R34, R33, R32, R31, R30 }, \ + { L40, KC_NO, L42, L43, L44, L45, KC_NO, L47, R47, KC_NO, R45, R44, R43, R42, KC_NO, R40 } \ +} diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c index fcc5c4bbefa0..a2ec1086242d 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -1,199 +1,234 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "util.h" #include "bootloader.h" #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" #endif -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif #ifdef CONSOLE_ENABLE #include #endif +#include "layer_number.h" extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; -// 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, - _COLEMAK, - _DVORAK, - _EUCALYN, - _KEYPAD, - _AUX, - _KAUX, - _LOWER, - _RAISE, - _PADFUNC, - _ADJUST, -}; - enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, EUCALYN, KEYPAD, - KC_xEISU, - KC_xKANA, - KC_ZERO2, + xEISU, + xKANA, + ZERO2, RGBRST }; +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + //Macros #define KC_LOWER MO(_LOWER) -#define KC_RABS LT(_RAISE,KC_BSPC) -#define KC_RAEN LT(_RAISE,KC_ENT) -#define KC_FF12 LT(_PADFUNC,KC_F12) -#define KC_____ _______ -#define KC_XXXX XXXXXXX +#define XXXX XXXXXXX +#define ____ _______ #define KC_ADJ MO(_ADJUST) #define KC_LSMI LSFT(KC_MINS) #define KC_LSEQ LSFT(KC_EQL) #define KC_LSRB LSFT(KC_RBRC) #define KC_LSLB LSFT(KC_LBRC) -#define ___ _______ + +#define _1_2_3_4_5 KC_1, KC_2, KC_3, KC_4, KC_5 +#define _6_7_8_9_0 KC_6, KC_7, KC_8, KC_9, KC_0 +#define L_LOWER2_CAPS_LALT_LGUI_SPC_RABS \ + KC_LOWER, KC_LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC) +#define R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_LOWER, KC_LOWER + #if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | S | D | F | G | | H | J | K | L | ; |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, BSLS, \ - LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCTL, \ - LSFT, Z, X, C, V, B, GRV, QUOT, N, M, COMM, DOT, SLSH, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _Q_W_E_R_T KC_Q, KC_W, KC_E, KC_R, KC_T +#define _Y_U_I_O_P KC_Y, KC_U, KC_I, KC_O, KC_P +#define _A_S_D_F_G KC_A, KC_S, KC_D, KC_F, KC_G +#define _H_J_K_L_SCLN KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _N_M_COMM_DOT_SLSH KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_QWERTY] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_E_R_T, _Y_U_I_O_P, KC_BSLS, \ + KC_LCTL, _A_S_D_F_G, _H_J_K_L_SCLN, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _N_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Colemak - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | R | S | T | D | | H | N | E | I | O |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_COLEMAK] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \ - LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \ - LSFT, Z, X, C, V, B, GRV, QUOT, K, M, COMM, DOT, SLSH, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _Q_W_F_P_G KC_Q, KC_W, KC_F, KC_P, KC_G +#define _J_L_U_Y_SCLN KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _A_R_S_T_D KC_A, KC_R, KC_S, KC_T, KC_D +#define _H_N_E_I_O KC_H, KC_N, KC_E, KC_I, KC_O +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _K_M_COMM_DOT_SLSH KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_COLEMAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_F_P_G, _J_L_U_Y_SCLN, KC_BSLS, \ + KC_LCTL, _A_R_S_T_D, _H_N_E_I_O, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _K_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Dvorak - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | U | I | | D | H | T | N | S |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \ - LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \ - LSFT, SCLN, Q, J, K, X, GRV, SLSH, B, M, W, V, Z, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _QUOT_COMM_DOT_P_Y KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _F_G_C_R_L KC_F, KC_G, KC_C, KC_R, KC_L +#define _A_O_E_U_I KC_A, KC_O, KC_E, KC_U, KC_I +#define _D_H_T_N_S KC_D, KC_H, KC_T, KC_N, KC_S +#define _SCLN_Q_J_K_X KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _B_M_W_V_Z KC_B, KC_M, KC_W, KC_V, KC_Z + + [_DVORAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _QUOT_COMM_DOT_P_Y, _F_G_C_R_L, KC_BSLS, \ + KC_LCTL, _A_O_E_U_I, _D_H_T_N_S, KC_RCTL, \ + KC_LSFT, _SCLN_Q_J_K_X, KC_GRV, KC_SLSH, _B_M_W_V_Z, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | I | U | | G | T | K | S | N |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_EUCALYN] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \ - LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \ - LSFT, Z, X, C, V, F, GRV, QUOT, B, H, J, L, SLSH, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _Q_W_COMM_DOT_SCLN KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN +#define _M_R_D_Y_P KC_M, KC_R, KC_D, KC_Y, KC_P +#define _A_O_E_I_U KC_A, KC_O, KC_E, KC_I, KC_U +#define _G_T_K_S_N KC_G, KC_T, KC_K, KC_S, KC_N +#define _Z_X_C_V_F KC_Z, KC_X, KC_C, KC_V, KC_F +#define _B_H_J_L_SLSH KC_B, KC_H, KC_J, KC_L, KC_SLSH + + [_EUCALYN] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_COMM_DOT_SCLN, _M_R_D_Y_P, KC_BSLS, \ + KC_LCTL, _A_O_E_I_U, _G_T_K_S_N, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_F, KC_GRV, KC_QUOT, _B_H_J_L_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Keypad - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | 0 | , | . | Enter| F5 | F10 | F12 | F12 | F5 | F10 | Enter| 0 | , | . | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 0 | , | . |Enter| F5 | F10| F12 | F12 | F5 | F10|Enter| 0 | , | . | + * `-----------------------------------------------------------------------------------' */ - [_KEYPAD] = LAYOUT_kc( \ - TAB, PSLS, PAST, DEL, F1, F6, F1, F6, DEL, TAB, PSLS, PAST, \ - KP_7, KP_8, KP_9, BSPC, F2, F7, F2, F7, BSPC, KP_7, KP_8, KP_9, \ - KP_4, KP_5, KP_6, PMNS, F3, F8, F3, F8, PMNS, KP_4, KP_5, KP_6, \ - KP_1, KP_2, KP_3, PPLS, F4, F9, F11, F11, F4, F9, PPLS, KP_1, KP_2, KP_3, \ - KP_0, COMM, PDOT, PENT, F5, F10, FF12, FF12, F5, F10, PENT, KP_0, COMM, PDOT \ - ), +#define KP_TOP KC_TAB, KC_PSLS, KC_PAST +#define KP_789 KC_KP_7, KC_KP_8, KC_KP_9 +#define KP_456 KC_KP_4, KC_KP_5, KC_KP_6 +#define KP_123 KC_KP_1, KC_KP_2, KC_KP_3 +#define KP_BTM KC_KP_0, KC_COMM, KC_PDOT +#define F_1_6 KC_F1, KC_F6 +#define F_2_7 KC_F2, KC_F7 +#define F_3_8 KC_F3, KC_F8 +#define F_4_9 KC_F4, KC_F9 +#define F_510 KC_F5, KC_F10 +#define FF12 LT(_PADFUNC,KC_F12) + + [_KEYPAD] = LAYOUT_wrapper( \ + KP_TOP, KC_DEL, F_1_6, F_1_6, KC_DEL, KP_TOP, \ + KP_789, KC_BSPC, F_2_7, F_2_7, KC_BSPC, KP_789, \ + KP_456, KC_PMNS, F_3_8, F_3_8, KC_PMNS, KP_456, \ + KP_123, KC_PPLS, F_4_9, KC_F11, KC_F11, F_4_9, KC_PPLS, KP_123, \ + KP_BTM, KC_PENT, F_510, FF12, FF12, F_510, KC_PENT, KP_BTM \ + ), /* AUX modifier key layer - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | 00 | | | | | | | | | | | 00 | | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | 00 | | | | | | | | | | | 00 | | + * `-----------------------------------------------------------------------------------' */ - [_KAUX] = LAYOUT_kc( \ + [_KAUX] = LAYOUT( \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ZERO2,____ \ + ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,ZERO2, ____ \ ), /* Keypad function layer @@ -209,12 +244,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_PADFUNC] = LAYOUT_kc( \ - XXXX, XXXX, XXXX, PAUS, SLCK, PSCR, PSCR, SLCK, PAUS, XXXX, XXXX, XXXX, \ - XXXX, XXXX, XXXX, HOME, UP, PGUP, PGUP, UP, HOME, XXXX, XXXX, XXXX, \ - XXXX, DEL, INS, LEFT, DOWN, RGHT, LEFT, DOWN, RGHT, INS, DEL, XXXX, \ - XXXX, XXXX, XXXX, END, XXXX, PGDN, ADJ, ADJ, PGDN, XXXX, END, XXXX, XXXX, XXXX, \ - XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ +#define _PAUS_SLCK_PSCR KC_PAUS, KC_SLCK, KC_PSCR +#define _PSCR_SLCK_PAUS KC_PSCR, KC_SLCK, KC_PAUS +#define _HOME_UP_PGUP KC_HOME, KC_UP, KC_PGUP +#define _PGUP_UP_HOME KC_PGUP, KC_UP, KC_HOME +#define _DEL_INS_LEFT_DOWN_RGHT KC_DEL, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT +#define _LEFT_DOWN_RGHT_INS_DEL KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL +#define _PGDN_ADJ_ADJ_PGDN KC_PGDN, KC_ADJ, KC_ADJ, KC_PGDN + + [_PADFUNC] = LAYOUT_wrapper( \ + XXXX, XXXX, XXXX, _PAUS_SLCK_PSCR, _PSCR_SLCK_PAUS, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, _HOME_UP_PGUP, _PGUP_UP_HOME, XXXX, XXXX, XXXX, \ + XXXX, _DEL_INS_LEFT_DOWN_RGHT, _LEFT_DOWN_RGHT_INS_DEL, XXXX, \ + XXXX, XXXX, XXXX, KC_END, XXXX, _PGDN_ADJ_ADJ_PGDN, XXXX, KC_END, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ ), /* Lower @@ -230,12 +273,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | PrtSc| | | | | | | | | PrtSc| | | * `-------------------------------------------------------------------------------------------------' */ - [_LOWER] = LAYOUT_kc( \ - XXXX, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \ - XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, F12, \ - ____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \ - ____, END, LEFT, DOWN, RGHT, PGDN, XXXX, XXXX, PGDN, LEFT, DOWN, RGHT, END, ____, \ - ____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \ +#define _F1_F2_F3_F4_F5 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _F6_F7_F8_F9_F10_F11 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 +#define _PAUS_SLCK_INS KC_PAUS, KC_SLCK, KC_INS +#define _INS_SLCK_PAUS KC_INS, KC_SLCK, KC_PAUS +#define _ADJ_ADJ KC_ADJ, KC_ADJ +#define _UP_DEL_PGUP KC_UP, KC_DEL, KC_PGUP +#define _PGUP_DEL_UP KC_PGUP, KC_DEL, KC_UP +#define _END_LEFT_DOWN_RGHT_PGDN KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN +#define _PGDN_LEFT_DOWN_RGHT_END KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END + + [_LOWER] = LAYOUT_wrapper( \ + XXXX, _F1_F2_F3_F4_F5, _F6_F7_F8_F9_F10_F11, \ + XXXX, XXXX, _PAUS_SLCK_INS, XXXX, XXXX, _INS_SLCK_PAUS, XXXX, KC_F12, \ + ____, KC_HOME, XXXX, _UP_DEL_PGUP, _PGUP_DEL_UP, XXXX, KC_HOME, ____, \ + ____, _END_LEFT_DOWN_RGHT_PGDN, XXXX, XXXX, _PGDN_LEFT_DOWN_RGHT_END, ____, \ + ____, ____, KC_PSCR, ____, ____, ____, _ADJ_ADJ, ____, ____, ____, KC_PSCR, ____, ____ \ ), /* Raise @@ -251,12 +304,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_RAISE] = LAYOUT_kc( \ +#define _LSMI_MINS KC_LSMI, KC_MINS +#define _EQL_LSEQ KC_EQL, KC_LSEQ +#define _LSLB_LBRC KC_LSLB, KC_LBRC +#define _RBRC_LSRB KC_RBRC, KC_LSRB +#define _MNXT_VOLD_VOLU_MPLY KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + + [_RAISE] = LAYOUT_wrapper( \ XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \ - XXXX, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \ - ____, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, ____, \ - ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA,MNXT, VOLD, VOLU, MPLY, ____, \ - ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \ + XXXX, XXXX, XXXX, XXXX, _LSMI_MINS, _EQL_LSEQ, XXXX, XXXX, XXXX, XXXX, \ + ____, XXXX, XXXX, XXXX, _LSLB_LBRC, _RBRC_LSRB, XXXX, XXXX, XXXX, ____, \ + ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA, _MNXT_VOLD_VOLU_MPLY, ____, \ + _ADJ_ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, _ADJ_ADJ \ ), /* Adjust (Lower + Raise) @@ -276,8 +335,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KEYPAD, DVORAK, COLEMAK, EUCALYN, QWERTY, QWERTY, EUCALYN, COLEMAK, DVORAK, KEYPAD, XXXXXXX, \ XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \ RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, \ - RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ + RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ ), /* AUX modifier key layer @@ -293,12 +352,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | BS | Enter| | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_AUX] = LAYOUT_kc( \ +#define _BSPC_RAEN KC_BSPC, LT(_RAISE,KC_ENT) + [_AUX] = LAYOUT_wrapper( \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, BSPC, RAEN, ____, ____, ____, ____, ____, ____, ____ \ + ____, ____, ____, ____, ____, _BSPC_RAEN, ____, ____, ____, ____, ____, ____, ____ \ ) }; @@ -307,28 +367,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif -#ifdef AUDIO_ENABLE - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif +int current_default_layer; -static int current_default_layer; - -uint32_t default_layer_state_set_kb(uint32_t state) { - // 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0) - // 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1) - current_default_layer = state - 1; - // 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2) - if ( current_default_layer == 3 ) current_default_layer -= 1; - // 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3) - if ( current_default_layer == 7 ) current_default_layer -= 4; - // 1<<_KEYPAD - 12 == 16 - 12 == _KEYPAD (=4) - if ( current_default_layer == 15 ) current_default_layer -= 11; +uint32_t default_layer_state_set_user(uint32_t state) { + current_default_layer = biton32(state); return state; } @@ -351,56 +393,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif update_base_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif update_base_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif update_base_layer(_DVORAK); } return false; break; case EUCALYN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif update_base_layer(_EUCALYN); } return false; break; case KEYPAD: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif update_base_layer(_KEYPAD); } return false; break; - case KC_ZERO2: + case ZERO2: if (record->event.pressed) { SEND_STRING("00"); } return false; break; - case KC_xEISU: + case xEISU: if (record->event.pressed) { if(keymap_config.swap_lalt_lgui==false){ register_code(KC_LANG2); @@ -412,7 +439,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_xKANA: + case xKANA: if (record->event.pressed) { if(keymap_config.swap_lalt_lgui==false){ register_code(KC_LANG1); @@ -437,161 +464,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick -} - -void shutdown_user() -{ - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif - - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously + INIT_HELIX_OLED(); /* define in layer_number.h */ } - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -static void render_logo(struct CharacterMatrix *matrix) { - - static char 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}; - matrix_write(matrix, logo); -#ifdef RGBLIGHT_ENABLE - char buf[30]; - if (RGBLIGHT_MODES > 1 && rgblight_config.enable) { - snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", - rgblight_config.mode, - rgblight_config.hue/RGBLIGHT_HUE_STEP, - rgblight_config.sat/RGBLIGHT_SAT_STEP, - rgblight_config.val/RGBLIGHT_VAL_STEP); - matrix_write(matrix, buf); - } -#endif - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); -} - -static const char Qwerty_name[] PROGMEM = " Qwerty"; -static const char Colemak_name[] PROGMEM = " Colemak"; -static const char Dvorak_name[] PROGMEM = " Dvorak"; -static const char Eucalyn_name[] PROGMEM = " Eucalyn"; -static const char Keypad_name[] PROGMEM = " Keypad"; - -static const char AUX_name[] PROGMEM = ":AUX"; -static const char KAUX_name[] PROGMEM = ":00"; -static const char Padfunc_name[] PROGMEM = ":PadFunc"; -static const char Lower_name[] PROGMEM = ":Func"; -static const char Raise_name[] PROGMEM = ":Extra"; -static const char Adjust_name[] PROGMEM = ":Adjust"; - -static const char *layer_names[] = { - [_QWERTY] = Qwerty_name, - [_COLEMAK] = Colemak_name, - [_DVORAK] = Dvorak_name, - [_EUCALYN]= Eucalyn_name, - [_KEYPAD] = Keypad_name, - [_AUX] = AUX_name, - [_KAUX] = KAUX_name, - [_LOWER] = Lower_name, - [_RAISE] = Raise_name, - [_PADFUNC]= Padfunc_name, - [_ADJUST] = Adjust_name -}; - -void render_status(struct CharacterMatrix *matrix) { - - // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); - } - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - int name_num; - uint32_t lstate; - matrix_write_P(matrix, layer_names[current_default_layer]); - matrix_write_P(matrix, PSTR("\n")); - for( lstate = layer_state, name_num = 0; - lstate && name_num < sizeof(layer_names)/sizeof(char *); - lstate >>=1, name_num++ ) { - if( (lstate & 1) != 0 ) { - if( layer_names[name_num] ) { - matrix_write_P(matrix, layer_names[name_num]); - } - } - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<. + */ + +#include QMK_KEYBOARD_H +#include +#ifdef CONSOLE_ENABLE + #include +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif +#include "string.h" +#include "layer_number.h" + +extern int current_default_layer; + +void init_helix_oled(void) { +#ifdef SSD1306OLED + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + iota_gfx_init(!has_usb()); // turns on the display +#endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) + +# if defined(OLED_DRIVER_ENABLE) +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_0; + } else { + return OLED_ROTATION_180; + } +} +# else +# define oled_write(data,flag) matrix_write(matrix, data) +# define oled_write_P(data,flag) matrix_write_P(matrix, data) +# endif + +# ifdef SSD1306OLED +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} +# endif + +# ifdef SSD1306OLED +static void render_logo(struct CharacterMatrix *matrix) { +# else +static void render_logo(void) { +# endif + + static const char helix_logo[] PROGMEM = { + 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(helix_logo, false); +# ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) { + 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); + oled_write(buf, false); +# ifndef SSD1306OLED + } else { + oled_write_P( PSTR("\n"), false); +# endif + } +# endif +} + +static const char Qwerty_name[] PROGMEM = " Qwerty"; +static const char Colemak_name[] PROGMEM = " Colemak"; +static const char Dvorak_name[] PROGMEM = " Dvorak"; +static const char Eucalyn_name[] PROGMEM = " Eucalyn"; +static const char Keypad_name[] PROGMEM = " Keypad"; + +static const char AUX_name[] PROGMEM = ":AUX"; +static const char KAUX_name[] PROGMEM = ":00"; +static const char Padfunc_name[] PROGMEM = ":PadFunc"; +static const char Lower_name[] PROGMEM = ":Func"; +static const char Raise_name[] PROGMEM = ":Extra"; +static const char Adjust_name[] PROGMEM = ":Adjust"; + +static const char *layer_names[] = { + [_QWERTY] = Qwerty_name, + [_COLEMAK] = Colemak_name, + [_DVORAK] = Dvorak_name, + [_EUCALYN]= Eucalyn_name, + [_KEYPAD] = Keypad_name, + [_AUX] = AUX_name, + [_KAUX] = KAUX_name, + [_LOWER] = Lower_name, + [_RAISE] = Raise_name, + [_PADFUNC]= Padfunc_name, + [_ADJUST] = Adjust_name +}; + +# ifdef SSD1306OLED +void render_status(struct CharacterMatrix *matrix) { +# else +void render_status(void) { +# endif + + // 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(keymap_config.swap_lalt_lgui==false){ + 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); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + int name_num; + uint32_t lstate; + oled_write_P(layer_names[current_default_layer], false); + oled_write_P(PSTR("\n"), false); + for (lstate = layer_state, name_num = 0; + lstate && name_num < sizeof(layer_names)/sizeof(char *); + lstate >>=1, name_num++) { + if ((lstate & 1) != 0) { + if (layer_names[name_num]) { + oled_write_P(layer_names[name_num], false); + } + } + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< + else + OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" + endif +endif +ifeq ($(strip $(OLED_ENABLE)), yes) + SRC += oled_display.c endif # convert Helix-specific options (that represent combinations of standard options) diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h b/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h new file mode 100644 index 000000000000..416e8fd7c414 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h @@ -0,0 +1,48 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2020 mtei + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 + +#undef TAPPING_TERM +#define TAPPING_TERM 300 +#define PERMISSIVE_HOLD +/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. + see tmk_core/common/action_tapping.c */ + +// place overrides here + +// If you need more program area, try select and reduce rgblight modes to use. + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_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 + +#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c new file mode 100644 index 000000000000..7c84e1ed8d02 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c @@ -0,0 +1,7 @@ +#include QMK_KEYBOARD_H + +void keyboard_post_init_user(void) { +#if defined(DEBUG_MATRIX_SCAN_RATE) + debug_enable = true; +#endif +} diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c new file mode 100644 index 000000000000..a2ec1086242d --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c @@ -0,0 +1,468 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "util.h" +#include "bootloader.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef CONSOLE_ENABLE + #include +#endif +#include "layer_number.h" + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + EUCALYN, + KEYPAD, + xEISU, + xKANA, + ZERO2, + RGBRST +}; + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + +//Macros +#define KC_LOWER MO(_LOWER) +#define XXXX XXXXXXX +#define ____ _______ +#define KC_ADJ MO(_ADJUST) +#define KC_LSMI LSFT(KC_MINS) +#define KC_LSEQ LSFT(KC_EQL) +#define KC_LSRB LSFT(KC_RBRC) +#define KC_LSLB LSFT(KC_LBRC) + +#define _1_2_3_4_5 KC_1, KC_2, KC_3, KC_4, KC_5 +#define _6_7_8_9_0 KC_6, KC_7, KC_8, KC_9, KC_0 +#define L_LOWER2_CAPS_LALT_LGUI_SPC_RABS \ + KC_LOWER, KC_LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC) +#define R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_LOWER, KC_LOWER + + +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | S | D | F | G | | H | J | K | L | ; |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _Q_W_E_R_T KC_Q, KC_W, KC_E, KC_R, KC_T +#define _Y_U_I_O_P KC_Y, KC_U, KC_I, KC_O, KC_P +#define _A_S_D_F_G KC_A, KC_S, KC_D, KC_F, KC_G +#define _H_J_K_L_SCLN KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _N_M_COMM_DOT_SLSH KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_QWERTY] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_E_R_T, _Y_U_I_O_P, KC_BSLS, \ + KC_LCTL, _A_S_D_F_G, _H_J_K_L_SCLN, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _N_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Colemak + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | R | S | T | D | | H | N | E | I | O |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _Q_W_F_P_G KC_Q, KC_W, KC_F, KC_P, KC_G +#define _J_L_U_Y_SCLN KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _A_R_S_T_D KC_A, KC_R, KC_S, KC_T, KC_D +#define _H_N_E_I_O KC_H, KC_N, KC_E, KC_I, KC_O +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _K_M_COMM_DOT_SLSH KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_COLEMAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_F_P_G, _J_L_U_Y_SCLN, KC_BSLS, \ + KC_LCTL, _A_R_S_T_D, _H_N_E_I_O, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _K_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Dvorak + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | U | I | | D | H | T | N | S |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _QUOT_COMM_DOT_P_Y KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _F_G_C_R_L KC_F, KC_G, KC_C, KC_R, KC_L +#define _A_O_E_U_I KC_A, KC_O, KC_E, KC_U, KC_I +#define _D_H_T_N_S KC_D, KC_H, KC_T, KC_N, KC_S +#define _SCLN_Q_J_K_X KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _B_M_W_V_Z KC_B, KC_M, KC_W, KC_V, KC_Z + + [_DVORAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _QUOT_COMM_DOT_P_Y, _F_G_C_R_L, KC_BSLS, \ + KC_LCTL, _A_O_E_U_I, _D_H_T_N_S, KC_RCTL, \ + KC_LSFT, _SCLN_Q_J_K_X, KC_GRV, KC_SLSH, _B_M_W_V_Z, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | I | U | | G | T | K | S | N |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _Q_W_COMM_DOT_SCLN KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN +#define _M_R_D_Y_P KC_M, KC_R, KC_D, KC_Y, KC_P +#define _A_O_E_I_U KC_A, KC_O, KC_E, KC_I, KC_U +#define _G_T_K_S_N KC_G, KC_T, KC_K, KC_S, KC_N +#define _Z_X_C_V_F KC_Z, KC_X, KC_C, KC_V, KC_F +#define _B_H_J_L_SLSH KC_B, KC_H, KC_J, KC_L, KC_SLSH + + [_EUCALYN] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_COMM_DOT_SCLN, _M_R_D_Y_P, KC_BSLS, \ + KC_LCTL, _A_O_E_I_U, _G_T_K_S_N, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_F, KC_GRV, KC_QUOT, _B_H_J_L_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Keypad + * ,-----------------------------------. ,-----------------------------------. + * | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 0 | , | . |Enter| F5 | F10| F12 | F12 | F5 | F10|Enter| 0 | , | . | + * `-----------------------------------------------------------------------------------' + */ +#define KP_TOP KC_TAB, KC_PSLS, KC_PAST +#define KP_789 KC_KP_7, KC_KP_8, KC_KP_9 +#define KP_456 KC_KP_4, KC_KP_5, KC_KP_6 +#define KP_123 KC_KP_1, KC_KP_2, KC_KP_3 +#define KP_BTM KC_KP_0, KC_COMM, KC_PDOT +#define F_1_6 KC_F1, KC_F6 +#define F_2_7 KC_F2, KC_F7 +#define F_3_8 KC_F3, KC_F8 +#define F_4_9 KC_F4, KC_F9 +#define F_510 KC_F5, KC_F10 +#define FF12 LT(_PADFUNC,KC_F12) + + [_KEYPAD] = LAYOUT_wrapper( \ + KP_TOP, KC_DEL, F_1_6, F_1_6, KC_DEL, KP_TOP, \ + KP_789, KC_BSPC, F_2_7, F_2_7, KC_BSPC, KP_789, \ + KP_456, KC_PMNS, F_3_8, F_3_8, KC_PMNS, KP_456, \ + KP_123, KC_PPLS, F_4_9, KC_F11, KC_F11, F_4_9, KC_PPLS, KP_123, \ + KP_BTM, KC_PENT, F_510, FF12, FF12, F_510, KC_PENT, KP_BTM \ + ), + + /* AUX modifier key layer + * ,-----------------------------------. ,-----------------------------------. + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | 00 | | | | | | | | | | | 00 | | + * `-----------------------------------------------------------------------------------' + */ + [_KAUX] = LAYOUT( \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,ZERO2, ____ \ + ), + + /* Keypad function layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | Pause| ScrLk| PtrSc| | PtrSc| ScrLk| Pause| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | Home | Up | PgUp | | PgUp | Up | Home | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |Delete|Insert| Left | Down | Right| | Left | Down | Right|Insert|Delete| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | End | | PgDn |Adjust|Adjust| PgDn | | End | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _PAUS_SLCK_PSCR KC_PAUS, KC_SLCK, KC_PSCR +#define _PSCR_SLCK_PAUS KC_PSCR, KC_SLCK, KC_PAUS +#define _HOME_UP_PGUP KC_HOME, KC_UP, KC_PGUP +#define _PGUP_UP_HOME KC_PGUP, KC_UP, KC_HOME +#define _DEL_INS_LEFT_DOWN_RGHT KC_DEL, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT +#define _LEFT_DOWN_RGHT_INS_DEL KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL +#define _PGDN_ADJ_ADJ_PGDN KC_PGDN, KC_ADJ, KC_ADJ, KC_PGDN + + [_PADFUNC] = LAYOUT_wrapper( \ + XXXX, XXXX, XXXX, _PAUS_SLCK_PSCR, _PSCR_SLCK_PAUS, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, _HOME_UP_PGUP, _PGUP_UP_HOME, XXXX, XXXX, XXXX, \ + XXXX, _DEL_INS_LEFT_DOWN_RGHT, _LEFT_DOWN_RGHT_INS_DEL, XXXX, \ + XXXX, XXXX, XXXX, KC_END, XXXX, _PGDN_ADJ_ADJ_PGDN, XXXX, KC_END, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | PgDn | Left | Down | Right| End |Adjust|Adjust| End | Left | Down | Right| PgDn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | PrtSc| | | | | | | | | PrtSc| | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _F1_F2_F3_F4_F5 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _F6_F7_F8_F9_F10_F11 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 +#define _PAUS_SLCK_INS KC_PAUS, KC_SLCK, KC_INS +#define _INS_SLCK_PAUS KC_INS, KC_SLCK, KC_PAUS +#define _ADJ_ADJ KC_ADJ, KC_ADJ +#define _UP_DEL_PGUP KC_UP, KC_DEL, KC_PGUP +#define _PGUP_DEL_UP KC_PGUP, KC_DEL, KC_UP +#define _END_LEFT_DOWN_RGHT_PGDN KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN +#define _PGDN_LEFT_DOWN_RGHT_END KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END + + [_LOWER] = LAYOUT_wrapper( \ + XXXX, _F1_F2_F3_F4_F5, _F6_F7_F8_F9_F10_F11, \ + XXXX, XXXX, _PAUS_SLCK_INS, XXXX, XXXX, _INS_SLCK_PAUS, XXXX, KC_F12, \ + ____, KC_HOME, XXXX, _UP_DEL_PGUP, _PGUP_DEL_UP, XXXX, KC_HOME, ____, \ + ____, _END_LEFT_DOWN_RGHT_PGDN, XXXX, XXXX, _PGDN_LEFT_DOWN_RGHT_END, ____, \ + ____, ____, KC_PSCR, ____, ____, ____, _ADJ_ADJ, ____, ____, ____, KC_PSCR, ____, ____ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | _ | - | | = | + | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | { | [ | | ] | } | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | EISU | EISU | KANA | KANA | Next | Vol- | Vol+ | Play | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _LSMI_MINS KC_LSMI, KC_MINS +#define _EQL_LSEQ KC_EQL, KC_LSEQ +#define _LSLB_LBRC KC_LSLB, KC_LBRC +#define _RBRC_LSRB KC_RBRC, KC_LSRB +#define _MNXT_VOLD_VOLU_MPLY KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + + [_RAISE] = LAYOUT_wrapper( \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, _LSMI_MINS, _EQL_LSEQ, XXXX, XXXX, XXXX, XXXX, \ + ____, XXXX, XXXX, XXXX, _LSLB_LBRC, _RBRC_LSRB, XXXX, XXXX, XXXX, ____, \ + ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA, _MNXT_VOLD_VOLU_MPLY, ____, \ + _ADJ_ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, _ADJ_ADJ \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | |Keypad|Dvorak|Colemk|Euclyn|Qwerty| |Qwerty|Euclyn|Colemk|Dvorak|Keypad| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST|RGB ON|Aud on| Win | | Win |Aud on|RGB ON|RGBRST| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | HUE+ | SAT+ | VAL+ |RGB md|Audoff| Mac | | Mac |Audoff|RGB md| VAL+ | SAT+ | HUE+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | HUE- | SAT- | VAL- | | | | | | | | | VAL- | SAT- | HUE- | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + XXXXXXX, KEYPAD, DVORAK, COLEMAK, EUCALYN, QWERTY, QWERTY, EUCALYN, COLEMAK, DVORAK, KEYPAD, XXXXXXX, \ + XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \ + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, \ + RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ + ), + + /* AUX modifier key layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BS | Enter| | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _BSPC_RAEN KC_BSPC, LT(_RAISE,KC_ENT) + [_AUX] = LAYOUT_wrapper( \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, _BSPC_RAEN, ____, ____, ____, ____, ____, ____, ____ \ + ) +}; + +#else +#error "undefined keymaps" +#endif + + +int current_default_layer; + +uint32_t default_layer_state_set_user(uint32_t state) { + current_default_layer = biton32(state); + return state; +} + +void update_base_layer(int base) +{ + if( current_default_layer != base ) { + eeconfig_update_default_layer(1UL<event.pressed) { + update_base_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + update_base_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + update_base_layer(_DVORAK); + } + return false; + break; + case EUCALYN: + if (record->event.pressed) { + update_base_layer(_EUCALYN); + } + return false; + break; + case KEYPAD: + if (record->event.pressed) { + update_base_layer(_KEYPAD); + } + return false; + break; + case ZERO2: + if (record->event.pressed) { + SEND_STRING("00"); + } + return false; + break; + case xEISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case xKANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } 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) { + INIT_HELIX_OLED(); /* define in layer_number.h */ +} diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h b/keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h new file mode 100644 index 000000000000..1272feba4f39 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h @@ -0,0 +1,26 @@ +#pragma once + +// 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, + _COLEMAK, + _DVORAK, + _EUCALYN, + _KEYPAD, + _AUX, + _KAUX, + _LOWER, + _RAISE, + _PADFUNC, + _ADJUST, +}; + +#if defined(SSD1306OLED) +extern void init_helix_oled(void); +# define INIT_HELIX_OLED() init_helix_oled(); +#else +# define INIT_HELIX_OLED() +#endif diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c new file mode 100644 index 000000000000..c1f039e5b1e0 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c @@ -0,0 +1,200 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +#ifdef CONSOLE_ENABLE + #include +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif +#include "string.h" +#include "layer_number.h" + +extern int current_default_layer; + +void init_helix_oled(void) { +#ifdef SSD1306OLED + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + iota_gfx_init(!has_usb()); // turns on the display +#endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) + +# if defined(OLED_DRIVER_ENABLE) +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_0; + } else { + return OLED_ROTATION_180; + } +} +# else +# define oled_write(data,flag) matrix_write(matrix, data) +# define oled_write_P(data,flag) matrix_write_P(matrix, data) +# endif + +# ifdef SSD1306OLED +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} +# endif + +# ifdef SSD1306OLED +static void render_logo(struct CharacterMatrix *matrix) { +# else +static void render_logo(void) { +# endif + + static const char helix_logo[] PROGMEM = { + 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(helix_logo, false); +# ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) { + 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); + oled_write(buf, false); +# ifndef SSD1306OLED + } else { + oled_write_P( PSTR("\n"), false); +# endif + } +# endif +} + +static const char Qwerty_name[] PROGMEM = " Qwerty"; +static const char Colemak_name[] PROGMEM = " Colemak"; +static const char Dvorak_name[] PROGMEM = " Dvorak"; +static const char Eucalyn_name[] PROGMEM = " Eucalyn"; +static const char Keypad_name[] PROGMEM = " Keypad"; + +static const char AUX_name[] PROGMEM = ":AUX"; +static const char KAUX_name[] PROGMEM = ":00"; +static const char Padfunc_name[] PROGMEM = ":PadFunc"; +static const char Lower_name[] PROGMEM = ":Func"; +static const char Raise_name[] PROGMEM = ":Extra"; +static const char Adjust_name[] PROGMEM = ":Adjust"; + +static const char *layer_names[] = { + [_QWERTY] = Qwerty_name, + [_COLEMAK] = Colemak_name, + [_DVORAK] = Dvorak_name, + [_EUCALYN]= Eucalyn_name, + [_KEYPAD] = Keypad_name, + [_AUX] = AUX_name, + [_KAUX] = KAUX_name, + [_LOWER] = Lower_name, + [_RAISE] = Raise_name, + [_PADFUNC]= Padfunc_name, + [_ADJUST] = Adjust_name +}; + +# ifdef SSD1306OLED +void render_status(struct CharacterMatrix *matrix) { +# else +void render_status(void) { +# endif + + // 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(keymap_config.swap_lalt_lgui==false){ + 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); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + int name_num; + uint32_t lstate; + oled_write_P(layer_names[current_default_layer], false); + oled_write_P(PSTR("\n"), false); + for (lstate = layer_state, name_num = 0; + lstate && name_num < sizeof(layer_names)/sizeof(char *); + lstate >>=1, name_num++) { + if ((lstate & 1) != 0) { + if (layer_names[name_num]) { + oled_write_P(layer_names[name_num], false); + } + } + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1<. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB1B +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT h660s + +/* 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 { B1, E6, B3, D3, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN B0 +#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/keyboards/hineybush/h660s/h660s.c b/keyboards/hineybush/h660s/h660s.c new file mode 100644 index 000000000000..e8e50048b17f --- /dev/null +++ b/keyboards/hineybush/h660s/h660s.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "h660s.h" + +void eeconfig_init_kb(void) { // EEPROM is getting reset! + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default + + eeconfig_update_kb(0); + eeconfig_init_user(); +} + diff --git a/keyboards/hineybush/h660s/h660s.h b/keyboards/hineybush/h660s/h660s.h new file mode 100644 index 000000000000..ec776ba7a4ce --- /dev/null +++ b/keyboards/hineybush/h660s/h660s.h @@ -0,0 +1,136 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_66_ansi_split_bs( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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,KC_NO, k213,KC_NO}, \ + {k300,KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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, KC_NO,k114}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211,KC_NO, k213,KC_NO}, \ + {k300,KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_ansi_rwkl_split_bs(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, K113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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,KC_NO, k213,KC_NO}, \ + {k300,KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} +#define LAYOUT_66_ansi_rwkl( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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,KC_NO, k114}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211,KC_NO, k213,KC_NO}, \ + {k300,KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} + +// ISO + +// also technically LAYOUT_66_iso +#define LAYOUT_all( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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, k212, k213,KC_NO}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_iso( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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,KC_NO, k114}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213,KC_NO}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_iso_rwkl_split_bs( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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,KC_NO}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} +#define LAYOUT_66_iso_rwkl( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, 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,KC_NO, k114}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213,KC_NO}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} diff --git a/keyboards/hineybush/h660s/info.json b/keyboards/hineybush/h660s/info.json new file mode 100644 index 000000000000..552aed2c7bc8 --- /dev/null +++ b/keyboards/hineybush/h660s/info.json @@ -0,0 +1,637 @@ +{ + "keyboard_name": "h660-s", + "url": "", + "maintainer": "Josh Hinnebusch", + "width": 17.25, + "height": 5.25, + "layouts": { + "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": 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": 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.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.5, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_ansi_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": 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": 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.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.5, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_ansi_rwkl": { + "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": 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": 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.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": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_ansi_rwkl_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": 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": 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.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": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.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": 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": 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}, + {"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": 15.25, "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.5, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_iso_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": 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": 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}, + {"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": 15.25, "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.5, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_iso_rwkl": { + "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": 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": 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}, + {"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": 15.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": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_iso_rwkl_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": 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": 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}, + {"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": 15.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": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + } + } +} diff --git a/keyboards/hineybush/h660s/keymaps/default/keymap.c b/keyboards/hineybush/h660s/keymaps/default/keymap.c new file mode 100644 index 000000000000..b87ac711f71c --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k404, k409, k410, k412, k413, k414 \ + */ + + [_BASE] = LAYOUT_66_ansi_rwkl( + 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_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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_66_ansi_rwkl( + KC_TRNS, RGB_TOG, RGB_MOD, 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, 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) +}; diff --git a/keyboards/hineybush/h660s/keymaps/default/readme.md b/keyboards/hineybush/h660s/keymaps/default/readme.md new file mode 100644 index 000000000000..0487cfb1a69b --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h660-s diff --git a/keyboards/hineybush/h660s/keymaps/via/keymap.c b/keyboards/hineybush/h660s/keymaps/via/keymap.c new file mode 100644 index 000000000000..c4376600346b --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k409, k410, k411, k412, k413, k414 \ + */ + + [_BASE] = 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_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_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_all( + KC_TRNS, RGB_TOG, RGB_MOD, 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, 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), + [_FN2] = 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), + [_FN3] = 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/keyboards/hineybush/h660s/keymaps/via/readme.md b/keyboards/hineybush/h660s/keymaps/via/readme.md new file mode 100644 index 000000000000..fd91fc8e96bb --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for h660-s diff --git a/keyboards/hineybush/h660s/keymaps/via/rules.mk b/keyboards/hineybush/h660s/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h660s/readme.md b/keyboards/hineybush/h660s/readme.md new file mode 100644 index 000000000000..5b1129b755b7 --- /dev/null +++ b/keyboards/hineybush/h660s/readme.md @@ -0,0 +1,19 @@ +# h660s + +![h660s](https://i.imgur.com/U7s0xJL.png) + +A 65% layout for the Sakura660. + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: Sakura660 by Fropsie and Proto[Typist] +* Hardware Availability: Prototypes, upcoming group buy + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h660s:default + +Flashing example for this keyboard: + + make hineybush/h660s: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/keyboards/hineybush/h660s/rules.mk b/keyboards/hineybush/h660s/rules.mk new file mode 100644 index 000000000000..bfa9a933fd6d --- /dev/null +++ b/keyboards/hineybush/h660s/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 = 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 = 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 diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index 4072def2fbc1..81bf62272291 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B5 + /* number of backlight levels */ #ifdef BACKLIGHT_PIN diff --git a/keyboards/hineybush/hineyg80/hineyg80.c b/keyboards/hineybush/hineyg80/hineyg80.c index 236c646be759..a56e46e9de2f 100644 --- a/keyboards/hineybush/hineyg80/hineyg80.c +++ b/keyboards/hineybush/hineyg80/hineyg80.c @@ -14,50 +14,3 @@ * along with this program. If not, see . */ #include "hineyg80.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - // Turn numlock on - writePinHigh(C6); - } else { - // Turn numlock off - writePinLow(C6); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn capslock on - writePinHigh(B6); - } else { - // Turn capslock off - writePinLow(B6); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - // Turn scrolllock on - writePinHigh(B5); - } else { - // Turn scrolllock off - writePinLow(B5); - } - led_set_user(usb_led); -} diff --git a/keyboards/idobo/keymaps/egstad/config.h b/keyboards/idobo/keymaps/egstad/config.h new file mode 100644 index 000000000000..45dbd3df828b --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/config.h @@ -0,0 +1,68 @@ +/* Copyright 2020 Jordan Egstad + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#define IGNORE_MOD_TAP_INTERRUPT +#define RGBLIGHT_SLEEP + + + +/* Leader Key + ========================================================================== */ + +// Activates the leader key +// #define LEADER_PER_KEY_TIMING +// resets the timeout after each key is tapped +// #define LEADER_TIMEOUT 240 + + + + + + +/* Autoshifting + ========================================================================== */ + +// This controls how long you have to hold a key before you get the shifted state. +#define AUTO_SHIFT_TIMEOUT 150 + +// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /? +// #define NO_AUTO_SHIFT_SPECIAL + +// Do not Auto Shift numeric keys, zero through nine. +#define NO_AUTO_SHIFT_NUMERIC + +// Do not Auto Shift alpha characters, which include A through Z. +// #define NO_AUTO_SHIFT_ALPHA + +// Lower the Auto Shift timeout variable (down) +// KC_ASDN + +// Raise the Auto Shift timeout variable (up) +// KC_ASUP + +// Report your current Auto Shift timeout value +// KC_ASRP + +// Turns on the Auto Shift Function +// KC_ASON + +// Turns off the Auto Shift Function +// KC_ASOFF + +// Toggles the state of the Auto Shift feature +// KC_ASTG diff --git a/keyboards/idobo/keymaps/egstad/keymap.c b/keyboards/idobo/keymaps/egstad/keymap.c new file mode 100644 index 000000000000..febbad7c6ecd --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/keymap.c @@ -0,0 +1,267 @@ +/* Copyright 2020 Jordan Egstad + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + ========================================================================== */ + +// qwerty +#define _QW 0 +// functions +#define _FN 1 + + + + + + +/* ========================================================================== + CUSTOM KEYS + ========================================================================== */ + +// Tap dances +#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape +#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal +#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close + +// Layers +#define FN_SPC LT(_FN, KC_SPC) // Tap for space, hold for _FN + +// Modifiers +#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in) +#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out) +#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift + +// Tap Dances +enum { + TD_BRC = 0, + TD_MIN, + TD_GV_ESC, + TD_BS +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Left Brace, twice for Right Brace + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + //Tap once for Minus, twice for Equal + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL), + // Tap once for Grave, tap twice for Escape + [TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE) +}; + + + + + + +/* ========================================================================== + KEYMAPS + ========================================================================== */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY (_QW) + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | \| | 6 | 7 | 8 | 9 | 0 | - + | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | [ ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | | | | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | ZOOM- | ZOOM+ | LALT | FN | CMD | BSPC | | | FN | SPACE | ENTER | LEFT | UP | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_PIPE, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC, \ + _______, 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, MT_SHFT, \ + LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, _______, RESET, _______, FN_SPC, KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ + ), + + +/* FUNCTION (_FN) + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | P | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | RGB HD | RGB HI | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | A-SFT | | | | | | RGB SD | RGB SI | | | LEFT | UP | DOWN | RIGHT | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RGB | | | | | | RGB VD | RGB VI | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RESET | | | | | | RGB RMD| RGB MD | | | PLAY | PREV | VOL UP | VOL DN | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + 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_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, \ + KC_ASTG, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, \ + RGB_TOG, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, \ + RESET, _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD \ + ), +}; + + + + + + +/* ========================================================================== + LEDs + ========================================================================== */ + +// RGB MODES +// 1 = Static +// 2-5 = Breathing +// 6-8 = Rainbow +// 9-14 = Swirl +// 15-20 = Snake +// 21-24 = Nightrider +// 25 = Christmas +// 26-30 = Static Gradient + +// Default LED colors +uint8_t h = 170; +uint8_t s = 255; +uint8_t v; + +// default animation +uint8_t rgbMode = RGBLIGHT_MODE_STATIC_LIGHT; +// boot animation +uint8_t rgbBootMode = RGBLIGHT_MODE_SNAKE; +// boot timeout vars +uint8_t bootComplete = 0; +int bootTimeoutDuration = 2000; +int bootTimeout; + + +void init_hsv(void) { + // fetch what the brightness was last sesion + v = rgblight_get_val(); + rgblight_sethsv(h,s,v); +} + +// fetch current HSV vals +void get_hsv(void) { + h = rgblight_get_hue(); + s = rgblight_get_sat(); + v = rgblight_get_val(); +} + +// reset HSV vals +void reset_hsv(void) { + int currentV = rgblight_get_val(); + rgblight_sethsv(h,s,currentV); +} + +// deterimes when to stop bootup animation +void bootupAnimation(void) { + bootComplete = (timer_elapsed(bootTimeout) > bootTimeoutDuration) ? 1 : 0; + + if (bootComplete) { + rgblight_mode(rgbMode); + } +} + + + + + + +/* ========================================================================== + INITIALIZATION FUNCTION + ========================================================================== */ + +void keyboard_post_init_user(void) { + // start a timeout + bootTimeout = timer_read(); + // set rgb color + init_hsv(); + // init rgb + rgblight_enable(); + // animate in snake ledGreende + rgblight_mode(rgbBootMode); +}; + + + + + + +/* ========================================================================== + ALWAYS RUNNING + ========================================================================== */ +void matrix_scan_user(void) { + // keep an eye on these layers + uint8_t layer = get_highest_layer(layer_state); + // handle boot-up sequence + bootupAnimation(); + // watch the brightness for changes + v = rgblight_get_val(); + + switch (layer) { + case _FN: + // set leds to white + rgblight_sethsv_noeeprom(h,0,v); + break; + default: + break; + } +}; + + + + + + +/* ========================================================================== + KEYPRESS CALLBACKS + ========================================================================== */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // keep an eye on these layers + uint8_t layer = get_highest_layer(layer_state); + + switch (keycode) { + case FN_SPC: + // stash and pop color on key down and key up + (record->event.pressed) ? get_hsv() : reset_hsv(); + return true; + default: + switch (layer) { + case _QW: + // tick the hue up with each keypress + rgblight_increase_hue(); + break; + default: + break; + } + return true; // Process all other keycodes normally + } +} diff --git a/keyboards/idobo/keymaps/egstad/readme.md b/keyboards/idobo/keymaps/egstad/readme.md new file mode 100644 index 000000000000..2de44ad9cc5d --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/readme.md @@ -0,0 +1,17 @@ +# Egstad's Idobo + +## LEDs +By default, LEDs are enabled. There is a short bootup animation (`bootupAnimation()`) to indicate that the keyboard has powered up correctly. + +On each keypress, the LEDs hue increases. This increase is determined the the `RGBLIGHT_HUE_STEP` value, which is assigned in `../config.h` (parent idobo directory). My local copy has this value set to `1`, so the incremental color shift is rather slow. + + +## Keeping up to date +To update your fork’s master, run the following, hitting the Enter key after each line: + +```bash +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` diff --git a/keyboards/idobo/keymaps/egstad/rules.mk b/keyboards/idobo/keymaps/egstad/rules.mk new file mode 100644 index 000000000000..ca3becc38359 --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 8233dd1e8c47..a00f64a1f55a 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -37,6 +37,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/jc65/v32u4/v32u4.c b/keyboards/jc65/v32u4/v32u4.c index c69c5d531662..a6837268e11e 100644 --- a/keyboards/jc65/v32u4/v32u4.c +++ b/keyboards/jc65/v32u4/v32u4.c @@ -1,36 +1 @@ #include "v32u4.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (usb_led & (1<. + */ +#pragma once #define PREVENT_STUCK_MODIFIERS #define SPACE_COUNT 2 @@ -14,9 +26,7 @@ K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ ) { \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K0D, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO }, \ { K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ - { K40, K00, K41, K42, K44, KC_NO, K45, KC_NO, K48, K49, K3D, K4C, KC_NO } \ + { K40, K00, K41, K42, K44, KC_NO, K46, KC_NO, K48, K49, K3D, K4C, KC_NO } \ } - -#endif diff --git a/keyboards/jisplit89/keymaps/default/keymap.c b/keyboards/jisplit89/keymaps/default/keymap.c index bfbb09898e05..e782a4b451b3 100644 --- a/keyboards/jisplit89/keymaps/default/keymap.c +++ b/keyboards/jisplit89/keymaps/default/keymap.c @@ -35,11 +35,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |--------------------------------------------------------------------------------. 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(_ADJUST,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, +LT(_ADJUST,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_CIRC, 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_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_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, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/jisplit89/keymaps/salicylic/keymap.c b/keyboards/jisplit89/keymaps/salicylic/keymap.c index e41027961c2f..a4c7c99f1d8e 100644 --- a/keyboards/jisplit89/keymaps/salicylic/keymap.c +++ b/keyboards/jisplit89/keymaps/salicylic/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |--------------------------------------------------------------------------------. 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_INS, KC_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - 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_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, 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, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/jisplit89/keymaps/via/keymap.c b/keyboards/jisplit89/keymaps/via/keymap.c index 61bcadbc7dc7..b2ceacb0e6f5 100644 --- a/keyboards/jisplit89/keymaps/via/keymap.c +++ b/keyboards/jisplit89/keymaps/via/keymap.c @@ -27,11 +27,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |--------------------------------------------------------------------------------. 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, +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_CIRC, 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_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_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, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/kb_elmo/sesame/info.json b/keyboards/kb_elmo/sesame/info.json index b371b3d58969..2dedbfb8063d 100644 --- a/keyboards/kb_elmo/sesame/info.json +++ b/keyboards/kb_elmo/sesame/info.json @@ -73,6 +73,213 @@ {"x":12.25, "y":4, "w":1.5}, {"x":16.75, "y":4, "w":1.5} ] + }, + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.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":0, "y":1}, + {"x":1.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.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, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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, "w":2.25}, + {"x":1.25, "y":3, "w":2.25}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.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, "w":1.75}, + {"x":17.25, "y":3}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] + }, + "LAYOUT_long_rshift": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.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, "w":2}, + {"x":0, "y":1}, + {"x":1.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.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, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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, "w":2.25}, + {"x":1.25, "y":3, "w":2.25}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.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, "w":2.75}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.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":0, "y":1}, + {"x":1.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.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, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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, "w":2.25}, + {"x":1.25, "y":3, "w":2.25}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.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, "w":2.75}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] } } } diff --git a/keyboards/kb_elmo/sesame/keymaps/via/keymap.c b/keyboards/kb_elmo/sesame/keymaps/via/keymap.c new file mode 100644 index 000000000000..e0dcde864f77 --- /dev/null +++ b/keyboards/kb_elmo/sesame/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_all( + 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_BSPC, KC_BSPC, + KC_PSCR, 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_F5, 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, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_all( + KC_TRNS, 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_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, 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_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, 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_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kb_elmo/sesame/keymaps/via/rules.mk b/keyboards/kb_elmo/sesame/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kb_elmo/sesame/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kb_elmo/sesame/sesame.h b/keyboards/kb_elmo/sesame/sesame.h index 512bce6e2fc8..a51023be4165 100644 --- a/keyboards/kb_elmo/sesame/sesame.h +++ b/keyboards/kb_elmo/sesame/sesame.h @@ -39,3 +39,45 @@ { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ } + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k43, 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, k44, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} + +#define LAYOUT_long_rshift( \ + 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, k44, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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, KC_NO, k44 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, KC_NO }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} + +#define LAYOUT_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k43, 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, k44, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, KC_NO }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 1146afa628be..c0cea36ffbae 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -47,6 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN B2 +#define LED_CAPS_LOCK_PIN B0 +#define LED_SCROLL_LOCK_PIN B1 + #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/kbdfans/kbd19x/kbd19x.c b/keyboards/kbdfans/kbd19x/kbd19x.c index e6cd77d656bf..bdaf1a507a2c 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.c +++ b/keyboards/kbdfans/kbd19x/kbd19x.c @@ -16,57 +16,3 @@ along with this program. If not, see . */ #include "kbd19x.h" - -extern inline void kbd19x_caps_led_on(void); -extern inline void kbd19x_caps_led_off(void); - -extern inline void kbd19x_sclk_led_on(void); -extern inline void kbd19x_sclk_led_off(void); - -extern inline void kbd19x_nmlk_led_on(void); -extern inline void kbd19x_nmlk_led_off(void); - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (usb_led & (1<. #include "quantum.h" #include "led.h" -inline void kbd19x_caps_led_on(void) { DDRB |= (1<<0); PORTB &= ~(1<<0); } -inline void kbd19x_caps_led_off(void) { DDRB &= ~(1<<0); PORTB &= ~(1<<0); } +inline void kbd19x_caps_led_on(void) { writePinHigh(LED_CAPS_LOCK_PIN); } +inline void kbd19x_caps_led_off(void) { writePinLow(LED_CAPS_LOCK_PIN); } -inline void kbd19x_sclk_led_on(void) { DDRB |= (1<<1); PORTB &= ~(1<<1); } -inline void kbd19x_sclk_led_off(void) { DDRB &= ~(1<<1); PORTB &= ~(1<<1); } +inline void kbd19x_sclk_led_on(void) { writePinHigh(LED_SCROLL_LOCK_PIN); } +inline void kbd19x_sclk_led_off(void) { writePinLow(LED_SCROLL_LOCK_PIN); } -inline void kbd19x_nmlk_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } +inline void kbd19x_nmlk_led_on(void) { writePinHigh(LED_NUM_LOCK_PIN); } +inline void kbd19x_nmlk_led_off(void) { writePinLow(LED_NUM_LOCK_PIN); } // readability #define XXX KC_NO diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index 86ef3b813956..a713143a4e26 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -48,6 +48,8 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 + #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd67/rev1/rev1.c b/keyboards/kbdfans/kbd67/rev1/rev1.c index 94cb9e553b0a..489e856837ee 100644 --- a/keyboards/kbdfans/kbd67/rev1/rev1.c +++ b/keyboards/kbdfans/kbd67/rev1/rev1.c @@ -14,38 +14,3 @@ * along with this program. If not, see . */ #include "rev1.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); - PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); - PORTB &= ~(1 << 2); - } - - led_set_user(usb_led); -} diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 32a625f71e49..03c4aaaea43e 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -47,6 +47,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +#define LED_CAPS_LOCK_PIN B6 + #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd6x/kbd6x.c b/keyboards/kbdfans/kbd6x/kbd6x.c index f558af0304b7..3797822d4a79 100644 --- a/keyboards/kbdfans/kbd6x/kbd6x.c +++ b/keyboards/kbdfans/kbd6x/kbd6x.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "kbd6x.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - led_set_user(usb_led); -} \ No newline at end of file diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index d46ca753517f..1d30d7abf1ef 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -20,6 +20,9 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c index 151e395e3c4b..520a869e57ba 100644 --- a/keyboards/kbdfans/kbd75/rev1/rev1.c +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -1,17 +1 @@ #include "rev1.h" - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} - -void matrix_init_kb(void) { - setPinOutput(B2); - matrix_init_user(); -} diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c index bf91d4009218..b1af81707d29 100644 --- a/keyboards/kbdfans/kbd75/rev2/rev2.c +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -1,17 +1 @@ #include "rev2.h" - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} - -void matrix_init_kb(void) { - setPinOutput(B2); - matrix_init_user(); -} diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index 5c162749425d..71daac15f261 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -47,6 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN B1 +#define LED_CAPS_LOCK_PIN B3 +#define LED_SCROLL_LOCK_PIN B2 + #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd8x/kbd8x.c b/keyboards/kbdfans/kbd8x/kbd8x.c index 97c2e74e3a69..c19981dbc448 100644 --- a/keyboards/kbdfans/kbd8x/kbd8x.c +++ b/keyboards/kbdfans/kbd8x/kbd8x.c @@ -15,58 +15,3 @@ */ #include "kbd8x.h" - -extern inline void caps_led_off(void); -extern inline void caps_led_on(void); -extern inline void num_led_off(void); -extern inline void num_led_on(void); -extern inline void scroll_led_off(void); -extern inline void scroll_led_on(void); - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if(usb_led & (1<. /* 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 D0 // or D1, D2, D3, E6 +#define LED_CAPS_LOCK_PIN E6 +#define LED_SCROLL_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c index 1472707234e9..0a36e3109dfb 100644 --- a/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c +++ b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c @@ -14,58 +14,3 @@ * along with this program. If not, see . */ #include "kbd8x_mk2.h" - -void matrix_init_kb(void) { - - // Indicator pins - // B2 - Scroll Lock - // E6 - Caps Lock - // Sinking setup - 5V -> LED/Resistor -> Pin - - setPinOutput(B2); - setPinOutput(E6); - - matrix_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - - // Toggle indicator LEDs - // Since they are a sinking setup, write HIGH to DISABLE, LOW to ENABLE - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} - -// 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_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -*/ diff --git a/keyboards/kbdfans/kbdpad_mk2/config.h b/keyboards/kbdfans/kbdpad_mk2/config.h index a7dae0a70394..991475c10882 100644 --- a/keyboards/kbdfans/kbdpad_mk2/config.h +++ b/keyboards/kbdfans/kbdpad_mk2/config.h @@ -48,10 +48,8 @@ along with this program. If not, see . /* 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 D0 // or D1, D2, D3, E6 +#define LED_CAPS_LOCK_PIN B4 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c index 3ca8e0c73552..1d6e1642b99c 100644 --- a/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c +++ b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c @@ -14,48 +14,3 @@ * along with this program. If not, see . */ #include "kbdpad_mk2.h" - -void matrix_init_kb(void) { - - // Num Lock LED = B4 - // Sinking setup (5V -> LED/Res -> Pin) - - setPinOutput(B4); - - matrix_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - - // Sinking setup. Write HIGH to turn OFF, LOW to turn ON. - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(B4); - } else { - writePinHigh(B4); - } - - led_set_user(usb_led); -} - -// 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_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -*/ diff --git a/keyboards/keebio/bdn9/rev1/config.h b/keyboards/keebio/bdn9/rev1/config.h index 678be9fe81cb..e4814d663db2 100644 --- a/keyboards/keebio/bdn9/rev1/config.h +++ b/keyboards/keebio/bdn9/rev1/config.h @@ -38,8 +38,8 @@ along with this program. If not, see . { E6, B4, B2 } \ } -#define ENCODERS_PAD_A { D1, F5 } -#define ENCODERS_PAD_B { D0, F6 } +#define ENCODERS_PAD_A { D0, F6, B6 } +#define ENCODERS_PAD_B { D1, F5, F7 } #define BACKLIGHT_PIN B5 // #define BACKLIGHT_BREATHING diff --git a/keyboards/keebwerk/mega/ansi/ansi.c b/keyboards/keebwerk/mega/ansi/ansi.c new file mode 100755 index 000000000000..b5eb0bbad26a --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/ansi.c @@ -0,0 +1,59 @@ +/* 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_KW_MEGA +#error RGB_BACKLIGHT_KW_MEGA not defined, recheck config.h +#endif + +#include "ansi.h" +#include "drivers/issi/is31fl3733.h" + +uint8_t R = 0; +uint8_t G = 0; +uint8_t B = 0; + +/* Indicator LEDs are part of the LED driver + * Here the LEDs are used to indicate layers 1, 2 and 3. + * Below there is a commented out example of how to use the indicators for capslock. + */ +// bool led_update_kb(led_t led_state) { +// bool res = led_update_user(led_state); +// if(res) { +// if (led_state.caps_lock) { +// G = 255; +// } else { +// G = 0; +// } +// IS31FL3733_set_color( 6+64-1, R, G, B ); +// } +// return res; +// } + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + R = 0; + G = 0; + B = 0; + if (IS_LAYER_ON_STATE(layer_state, 1)) { + G = 255; + } + if (IS_LAYER_ON_STATE(layer_state, 2)) { + R = 255; + } + if (IS_LAYER_ON_STATE(layer_state, 3)) { + B = 255; + } + IS31FL3733_set_color( 6+64-1, R, G, B ); + return state; +} diff --git a/keyboards/keebwerk/mega/ansi/ansi.h b/keyboards/keebwerk/mega/ansi/ansi.h new file mode 100755 index 000000000000..daba362731a9 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/ansi.h @@ -0,0 +1,38 @@ +/* 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" +#include "via.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_65_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, 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, 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/keyboards/keebwerk/mega/ansi/config.h b/keyboards/keebwerk/mega/ansi/config.h new file mode 100755 index 000000000000..9f9a225ef15e --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/config.h @@ -0,0 +1,145 @@ +/* +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 0x4B41 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Keebwerk Mega ANSI + +/* 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. + * + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_KW_MEGA + +// they aren't really used if RGB_BACKLIGHT_HS60 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 diff --git a/keyboards/keebwerk/mega/ansi/info.json b/keyboards/keebwerk/mega/ansi/info.json new file mode 100755 index 000000000000..a9bbf797ab11 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Keebwerk Mega", + "url": "", + "maintainer": "Yiancar", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_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}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "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}, {"label":"Page Down", "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}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "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":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c b/keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c new file mode 100755 index 000000000000..1d95e13c4056 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* 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_65_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_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), + +[1] = LAYOUT_65_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_TRNS, + KC_TRNS, 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, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, 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_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/keebwerk/mega/ansi/keymaps/default/readme.md b/keyboards/keebwerk/mega/ansi/keymaps/default/readme.md new file mode 100755 index 000000000000..ec43a9e10f98 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for ANSI Keebwerk Mega. VIA support disabled. + +![Layer 0](https://i.imgur.com/RcuLofrl.png) + +![Layer 1](https://i.imgur.com/NJOORcdl.png) + +Default layer is normal ANSI 65% diff --git a/keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c b/keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c new file mode 100755 index 000000000000..59ccdf685d80 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/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_65_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_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), + +[1] = LAYOUT_65_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_TRNS, + KC_TRNS, 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, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, 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_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_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_65_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/keyboards/keebwerk/mega/ansi/keymaps/via/readme.md b/keyboards/keebwerk/mega/ansi/keymaps/via/readme.md new file mode 100755 index 000000000000..e78684fa3ddb --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# The default keymap for ANSI Keebwerk Mega. VIA support enabled. + +![Layer 0](https://i.imgur.com/RcuLofrl.png) + +![Layer 1](https://i.imgur.com/NJOORcdl.png) + +Default layer is normal ANSI 65% diff --git a/keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk b/keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebwerk/mega/ansi/rules.mk b/keyboards/keebwerk/mega/ansi/rules.mk new file mode 100755 index 000000000000..5e664cb814cd --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/rules.mk @@ -0,0 +1,36 @@ +# 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 +# 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 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +CIE1931_CURVE = yes + +LAYOUTS = 65_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/keyboards/keebwerk/mega/chconf.h b/keyboards/keebwerk/mega/chconf.h new file mode 100644 index 000000000000..aac33037058e --- /dev/null +++ b/keyboards/keebwerk/mega/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/keyboards/keebwerk/mega/halconf.h b/keyboards/keebwerk/mega/halconf.h new file mode 100644 index 000000000000..9306b2cfd8e9 --- /dev/null +++ b/keyboards/keebwerk/mega/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 TRUE +#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 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 TRUE +#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/keyboards/keebwerk/mega/keebwork_mega.c b/keyboards/keebwerk/mega/keebwork_mega.c new file mode 100644 index 000000000000..dc800b634461 --- /dev/null +++ b/keyboards/keebwerk/mega/keebwork_mega.c @@ -0,0 +1,19 @@ +/* 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_KW_MEGA +#error RGB_BACKLIGHT_KW_MEGA not defined, recheck config.h +#endif diff --git a/keyboards/keebwerk/mega/mcuconf.h b/keyboards/keebwerk/mega/mcuconf.h new file mode 100644 index 000000000000..ed227b79679f --- /dev/null +++ b/keyboards/keebwerk/mega/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 FALSE +#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/keyboards/keebwerk/mega/readme.md b/keyboards/keebwerk/mega/readme.md new file mode 100755 index 000000000000..6f1798299bea --- /dev/null +++ b/keyboards/keebwerk/mega/readme.md @@ -0,0 +1,32 @@ +# Keebwerk Mega + +This is a standard fixed layout 65% PCB in ANSI and soon in ISO. It supports VIA and full per-key RGB. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* Hardware Supported: A 65% keyboard with STM32F303CC +* Hardware Availability: https://candykeys.com/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make keebwerk/mega/ansi: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 keebwerk/mega/ansi::flash`) diff --git a/keyboards/kingly_keys/ave/config.h b/keyboards/kingly_keys/ave/config.h new file mode 100644 index 000000000000..06fda4c26d6a --- /dev/null +++ b/keyboards/kingly_keys/ave/config.h @@ -0,0 +1,50 @@ + /* + 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 0x4B4B // "KK" +#define PRODUCT_ID 0x1225 +#define DEVICE_VER 0x0011 +#define MANUFACTURER Kingly-Keys +#define PRODUCT The Ave. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + + +#define ENCODERS_PAD_A { B2 } +#define ENCODERS_PAD_B { B1 } + +#define MATRIX_ROW_PINS { B3, F4, F7, F6, F5 } +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0} +#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/keyboards/kingly_keys/ave/ortho/info.json b/keyboards/kingly_keys/ave/ortho/info.json new file mode 100644 index 000000000000..9853fcd775e4 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/info.json @@ -0,0 +1,183 @@ +{ + "keyboard_name": "The Ave. (Ortholinear Ed. PCB)", + "url": "", + "maintainer": "the-royal", + "width": 13.5, + "height": 5.5, + "layouts": { + "LAYOUT_ortho_all": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50}, + {"label":"k203", "x":2.50, "y":2.50}, + {"label":"k204", "x":3.50, "y":2.50}, + {"label":"k205", "x":4.50, "y":2.50}, + {"label":"k206", "x":5.50, "y":2.50}, + {"label":"k207", "x":6.50, "y":2.50}, + {"label":"k208", "x":7.50, "y":2.50}, + {"label":"k209", "x":8.50, "y":2.50}, + {"label":"k210", "x":9.50, "y":2.50}, + {"label":"k211", "x":10.5, "y":2.50}, + {"label":"k212", "x":11.5, "y":2.50}, + {"label":"k213", "x":12.5, "y":2.50}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50}, + {"label":"k303", "x":2.50, "y":3.50}, + {"label":"k304", "x":3.50, "y":3.50}, + {"label":"k305", "x":4.50, "y":3.50}, + {"label":"k306", "x":5.50, "y":3.50}, + {"label":"k307", "x":6.50, "y":3.50}, + {"label":"k308", "x":7.50, "y":3.50}, + {"label":"k309", "x":8.50, "y":3.50}, + {"label":"k310", "x":9.50, "y":3.50}, + {"label":"k311", "x":10.5, "y":3.50}, + {"label":"k312", "x":11.5, "y":3.50}, + {"label":"k313", "x":12.5, "y":3.50}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50}, + {"label":"k403", "x":2.50, "y":4.50}, + {"label":"k404", "x":3.50, "y":4.50}, + {"label":"k405", "x":4.50, "y":4.50}, + {"label":"k406", "x":5.50, "y":4.50}, + {"label":"k407", "x":6.50, "y":4.50}, + {"label":"k408", "x":7.50, "y":4.50}, + {"label":"k409", "x":8.50, "y":4.50}, + {"label":"k410", "x":9.50, "y":4.50}, + {"label":"k411", "x":10.5, "y":4.50}, + {"label":"k412", "x":11.5, "y":4.50}, + {"label":"k413", "x":12.5, "y":4.50} + ] + }, + "LAYOUT_ortho_2x2u": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50}, + {"label":"k203", "x":2.50, "y":2.50}, + {"label":"k204", "x":3.50, "y":2.50}, + {"label":"k205", "x":4.50, "y":2.50}, + {"label":"k206", "x":5.50, "y":2.50}, + {"label":"k207", "x":6.50, "y":2.50}, + {"label":"k208", "x":7.50, "y":2.50}, + {"label":"k209", "x":8.50, "y":2.50}, + {"label":"k210", "x":9.50, "y":2.50}, + {"label":"k211", "x":10.5, "y":2.50}, + {"label":"k212", "x":11.5, "y":2.50}, + {"label":"k213", "x":12.5, "y":2.50}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50}, + {"label":"k303", "x":2.50, "y":3.50}, + {"label":"k304", "x":3.50, "y":3.50}, + {"label":"k305", "x":4.50, "y":3.50}, + {"label":"k306", "x":5.50, "y":3.50}, + {"label":"k307", "x":6.50, "y":3.50}, + {"label":"k308", "x":7.50, "y":3.50}, + {"label":"k309", "x":8.50, "y":3.50}, + {"label":"k310", "x":9.50, "y":3.50}, + {"label":"k311", "x":10.5, "y":3.50}, + {"label":"k312", "x":11.5, "y":3.50}, + {"label":"k313", "x":12.5, "y":3.50}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50}, + {"label":"k403", "x":2.50, "y":4.50}, + {"label":"k404", "x":3.50, "y":4.50}, + {"label":"k405", "x":4.50, "y":4.50}, + {"label":"k406", "x":5.50, "y":4.50, "w":2.00}, + {"label":"k409", "x":7.50, "y":4.50, "w":2.00}, + {"label":"k410", "x":9.50, "y":4.50}, + {"label":"k411", "x":10.5, "y":4.50}, + {"label":"k412", "x":11.5, "y":4.50}, + {"label":"k413", "x":12.5, "y":4.50} + ] + }, + "LAYOUT_ortho_big_boy": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50}, + {"label":"k203", "x":2.50, "y":2.50}, + {"label":"k204", "x":3.50, "y":2.50}, + {"label":"k205", "x":4.50, "y":2.50}, + {"label":"k206", "x":5.50, "y":2.50}, + {"label":"k207", "x":6.50, "y":2.50}, + {"label":"k208", "x":7.50, "y":2.50}, + {"label":"k209", "x":8.50, "y":2.50}, + {"label":"k210", "x":9.50, "y":2.50}, + {"label":"k211", "x":10.5, "y":2.50}, + {"label":"k212", "x":11.5, "y":2.50}, + {"label":"k213", "x":12.5, "y":2.50}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50}, + {"label":"k303", "x":2.50, "y":3.50}, + {"label":"k304", "x":3.50, "y":3.50}, + {"label":"k305", "x":4.50, "y":3.50}, + {"label":"k306", "x":5.50, "y":3.50}, + {"label":"k307", "x":6.50, "y":3.50}, + {"label":"k308", "x":7.50, "y":3.50}, + {"label":"k309", "x":8.50, "y":3.50}, + {"label":"k310", "x":9.50, "y":3.50}, + {"label":"k311", "x":10.5, "y":3.50}, + {"label":"k312", "x":11.5, "y":3.50}, + {"label":"k313", "x":12.5, "y":3.50}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50}, + {"label":"k403", "x":2.50, "y":4.50, "w":1.50}, + {"label":"k404", "x":4.00, "y":4.50, "w":7.00}, + {"label":"k405", "x":11.0, "y":4.50, "w":1.50}, + {"label":"k413", "x":12.5, "y":4.50} + ] + } + } +} diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/config.h b/keyboards/kingly_keys/ave/ortho/keymaps/default/config.h new file mode 100644 index 000000000000..6fba9d2b9c27 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/config.h @@ -0,0 +1,32 @@ + /* + 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_PER_KEY + +#ifdef RGBLIGHT_ENABLE + /* ws2812 RGB LED */ + #define RGB_DI_PIN B7 + #define RGBLED_NUM 2 // Number of LEDs + + #define RGBLIGHT_EFFECT_BREATHING +/* #define RGBLIGHT_HUE_STEP 6 +* #define RGBLIGHT_SAT_STEP 4 +* #define RGBLIGHT_VAL_STEP 4 +*/ +#endif diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c new file mode 100644 index 000000000000..4e195d43bbc9 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c @@ -0,0 +1,239 @@ + /* + 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 + +enum avenue_layers { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION +}; + + + +//Tap Dance Declarations: +enum avenue_tapcodes { + TD_RST, + TD_DBQT, +}; + +void dance_rst_reset (qk_tap_dance_state_t *state, void *user_data) { // *Line_Note.001 + if (state->count >= 2) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +//Tap Dance Functions: +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RST] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, NULL, dance_rst_reset), // References "dance_rst_reset" (*Line_Note.001) + [TD_DBQT] = ACTION_TAP_DANCE_DOUBLE (KC_QUOTE, KC_DQT) +}; + + + +// Keymap Customization: +#define LOWR MO(_LOWER) +#define RISE MO(_RAISE) +#define FN MO(_FUNCTION) +#define GUI KC_LGUI +#define ALT KC_LALT +#define SPACE KC_SPACE + + /* + * ┌────┐ + * │ │ = "TRANSPARENT" KEY LOCATION + * └────┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* _QWERTY (Base) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │MUTE│ │Esc │ │ \ │ - │ = │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │Home│ │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BkSp│ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │PgUp│ │CAPS│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │PgDn│ │Shft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Entr│ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │End │ │CTL │GUI │ALT │FUNC│LOWR│ │ │RISE│Left│Down│ Up │Rght│ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_QWERTY] = LAYOUT_ortho_all( + KC_MUTE, KC_ESC, KC_BSLS, KC_MINUS, KC_EQUAL, + 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_BSPC, + 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_PGDN, 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_END, KC_DEL, GUI, ALT, FN, LOWR, SPACE, SPACE, RISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* _LOWER (Media / Symbols / Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │ // │ │PRNT│ │ [ │ ] │ ` │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │PLAY│ │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │NEXT│ │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ " │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │PREV│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │STOP│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_LOWER] = LAYOUT_ortho_all( + _______, _______, KC_LBRC, KC_RBRC, KC_GRAVE, + KC_MPLY, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_MNXT, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DQT, + KC_MPRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_MSTP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* _RAISE (Misc Modifiers / Extended Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │PRNT│ │ │ │ { │ } │ ~ │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │CAPS│ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_RAISE] = LAYOUT_ortho_all( + KC_PSCR, _______, KC_LCBR, KC_RCBR, KC_TILD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* _FUNCTION (F-Row / DFU Reset / RGB Toggle) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │RSET│ │RGB │ │F11 │F12 │F13 │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │F10 │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_FUNCTION] = LAYOUT_ortho_all( + TD(TD_RST), RGB_TOG, KC_F11, KC_F12, KC_F13, + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + +// KEYMAP TEMPLATE: +// +// /* <_LAYER>: +// * +// * ┌────┐ ┌────┐ ┌────┬────┬────┐ +// * │ │ │ │ │ │ │ │ +// * └────┘ └────┘ └────┴────┴────┘ +// * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ +// */ +// [] = LAYOUT_ortho_all( +// _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ) + + +// Per-Key Tapping Term Definitions: +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case TD(TD_DBQT): + return 235; + default: + return TAPPING_TERM; + } +} + + +// Encoder Customization: (*Order-of-Keycode Specific) +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + + + +// RGB Indicator Customization: (100% stolen from Jetpacktuxedo) +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE +// Set up RGB effects on _only_ the first LED (index 0): + rgblight_set_effect_range(0, 1); +// Set LED effects to breathing mode in a "terminal-green" type color: + rgblight_sethsv_noeeprom(50, 255, 100); + rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2); +// Init the second LED to a static color: + setrgb(225, 185, 0, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif // RGBLIGHT_ENABLE +} + +// RGB Indicator Customization: (cont.) +layer_state_t layer_state_set_user(layer_state_t state){ + #ifdef RGBLIGHT_ENABLE + uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; + if (layer_state_cmp(state, 1)) { + led1b = 255; + } + if (layer_state_cmp(state, 3)) { + led1r = 200; + } + setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE + return state; +} diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk b/keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk new file mode 100644 index 000000000000..a6be46d742e4 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +# Keymap-Specific Functions +TAP_DANCE_ENABLE = yes diff --git a/keyboards/kingly_keys/ave/ortho/ortho.c b/keyboards/kingly_keys/ave/ortho/ortho.c new file mode 100644 index 000000000000..4fb95e768495 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/ortho.c @@ -0,0 +1,18 @@ + /* + 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 "ortho.h" diff --git a/keyboards/kingly_keys/ave/ortho/ortho.h b/keyboards/kingly_keys/ave/ortho/ortho.h new file mode 100644 index 000000000000..12cdede53662 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/ortho.h @@ -0,0 +1,67 @@ + /* + 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 XXXX KC_NO + +#define LAYOUT_ortho_all( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313 }, \ + { k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413 } \ +} + +#define LAYOUT_ortho_2x2u( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k409, k410, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313 }, \ + { k401, k402, k403, k404, k405, k406, XXXX, XXXX, k409, k410, k411, k412, k413 } \ +} + +#define LAYOUT_ortho_big_boy( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k407, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313 }, \ + { k401, k402, k403, XXXX, XXXX, XXXX, k407, XXXX, XXXX, XXXX, XXXX, k412, k413 } \ +} diff --git a/keyboards/kingly_keys/ave/ortho/rules.mk b/keyboards/kingly_keys/ave/ortho/rules.mk new file mode 100644 index 000000000000..611eb0ce1a69 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/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 = 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/keyboards/kingly_keys/ave/readme.md b/keyboards/kingly_keys/ave/readme.md new file mode 100644 index 000000000000..080edf496629 --- /dev/null +++ b/keyboards/kingly_keys/ave/readme.md @@ -0,0 +1,21 @@ +# The Ave. (Avenue) + +![ave-img-1](https://i.imgur.com/l5ah6uMl.png) + +A Compact Battlestation. + +- Keyboard Maintainer: [The-Royal](https://github.com/the-royal) +- Hardware Supported: Rev10.0 Avenue PCBs *(Ortholinear & Staggered)* +- Hardware Availability: Through group-buy or self procurement via open-source files. + +Make examples for this keyboard (after setting up your build environment): + +**Ortholinear:** + + make kingly_keys/ave/ortho:default + +**Staggered:** + + make kingly_keys/ave/staggered: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/keyboards/kingly_keys/ave/staggered/info.json b/keyboards/kingly_keys/ave/staggered/info.json new file mode 100644 index 000000000000..9a64cdeb360f --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/info.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "The Ave. (Staggered Ed. PCB)", + "url": "", + "maintainer": "the-royal", + "width": 13.5, + "height": 5.5, + "layouts": { + "LAYOUT_staggered": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50, "w":1.25}, + {"label":"k203", "x":2.75, "y":2.50}, + {"label":"k204", "x":3.75, "y":2.50}, + {"label":"k205", "x":4.75, "y":2.50}, + {"label":"k206", "x":5.75, "y":2.50}, + {"label":"k207", "x":6.75, "y":2.50}, + {"label":"k208", "x":7.75, "y":2.50}, + {"label":"k209", "x":8.75, "y":2.50}, + {"label":"k210", "x":9.75, "y":2.50}, + {"label":"k211", "x":10.75, "y":2.5}, + {"label":"k213", "x":11.75, "y":2.5, "w":1.75}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50, "w":1.75}, + {"label":"k303", "x":3.25, "y":3.50}, + {"label":"k304", "x":4.25, "y":3.50}, + {"label":"k305", "x":5.25, "y":3.50}, + {"label":"k306", "x":6.25, "y":3.50}, + {"label":"k307", "x":7.25, "y":3.50}, + {"label":"k308", "x":8.25, "y":3.50}, + {"label":"k309", "x":9.25, "y":3.50}, + {"label":"k310", "x":10.25, "y":3.50}, + {"label":"k312", "x":11.25, "y":3.50}, + {"label":"k313", "x":12.25, "y":3.50, "w":1.25}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50, "w":1.25}, + {"label":"k403", "x":2.75, "y":4.50}, + {"label":"k404", "x":3.75, "y":4.50, "w":1.25}, + {"label":"k406", "x":5.00, "y":4.50, "w":2.75}, + {"label":"k408", "x":7.75, "y":4.50, "w":2.25}, + {"label":"k411", "x":10.0, "y":4.50, "w":1.25}, + {"label":"k412", "x":11.25, "y":4.50}, + {"label":"k413", "x":12.25, "y":4.50, "w":1.25} + ] + }, + "LAYOUT_staggered_big_boy": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50, "w":1.25}, + {"label":"k203", "x":2.75, "y":2.50}, + {"label":"k204", "x":3.75, "y":2.50}, + {"label":"k205", "x":4.75, "y":2.50}, + {"label":"k206", "x":5.75, "y":2.50}, + {"label":"k207", "x":6.75, "y":2.50}, + {"label":"k208", "x":7.75, "y":2.50}, + {"label":"k209", "x":8.75, "y":2.50}, + {"label":"k210", "x":9.75, "y":2.50}, + {"label":"k211", "x":10.75, "y":2.5}, + {"label":"k213", "x":11.75, "y":2.5, "w":1.75}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50, "w":1.75}, + {"label":"k303", "x":3.25, "y":3.50}, + {"label":"k304", "x":4.25, "y":3.50}, + {"label":"k305", "x":5.25, "y":3.50}, + {"label":"k306", "x":6.25, "y":3.50}, + {"label":"k307", "x":7.25, "y":3.50}, + {"label":"k308", "x":8.25, "y":3.50}, + {"label":"k309", "x":9.25, "y":3.50}, + {"label":"k310", "x":10.25, "y":3.50}, + {"label":"k312", "x":11.25, "y":3.50}, + {"label":"k313", "x":12.25, "y":3.50, "w":1.25}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50, "w":1.25}, + {"label":"k403", "x":2.75, "y":4.50}, + {"label":"k406", "x":3.75, "y":4.50, "w":6.25}, + {"label":"k411", "x":10.0, "y":4.50, "w":1.25}, + {"label":"k412", "x":11.25, "y":4.50}, + {"label":"k413", "x":12.25, "y":4.50, "w":1.25} + ] + } + } +} diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/config.h b/keyboards/kingly_keys/ave/staggered/keymaps/default/config.h new file mode 100644 index 000000000000..6fba9d2b9c27 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/config.h @@ -0,0 +1,32 @@ + /* + 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_PER_KEY + +#ifdef RGBLIGHT_ENABLE + /* ws2812 RGB LED */ + #define RGB_DI_PIN B7 + #define RGBLED_NUM 2 // Number of LEDs + + #define RGBLIGHT_EFFECT_BREATHING +/* #define RGBLIGHT_HUE_STEP 6 +* #define RGBLIGHT_SAT_STEP 4 +* #define RGBLIGHT_VAL_STEP 4 +*/ +#endif diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c new file mode 100644 index 000000000000..16f469b53ab5 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c @@ -0,0 +1,241 @@ + /* + 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 + +enum avenue_layers { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION +}; + + + +//Tap Dance Declarations: +enum avenue_tapcodes { + TD_RST, + TD_DBQT, +}; + +void dance_rst_reset (qk_tap_dance_state_t *state, void *user_data) { // *Line_Note.001 + if (state->count >= 2) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +//Tap Dance Functions: +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RST] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, NULL, dance_rst_reset), // References "dance_rst_reset" (*Line_Note.001) + [TD_DBQT] = ACTION_TAP_DANCE_DOUBLE (KC_QUOTE, KC_DQT) +}; + + + +// Keymap Customization: +#define LOWR MO(_LOWER) +#define RISE MO(_RAISE) +#define FN MO(_FUNCTION) +#define GUI KC_LGUI +#define ALT KC_LALT +#define SPACE KC_SPACE + + /* + * ┌────┐ + * │ │ = "TRANSPARENT" KEY LOCATION + * └────┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* _QWERTY (Base) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │MUTE│ │Esc │ │ ( │ ) │ ; │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │Home│ │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BkSp│ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │PgUp│ │CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │PgDn│ │LShft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │RISE │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │End │ │LCtrl│GUI │ALT │ LOWR │ │RAlt │RCTL│FUNC │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_QWERTY] = LAYOUT_staggered( + KC_MUTE, KC_ESC, KC_LPRN, KC_RPRN, KC_SCLN, + 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_BSPC, + KC_PGUP, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RISE, + KC_END, KC_LCTL, GUI, ALT, LOWR, SPACE, KC_RALT, KC_RCTL, FN + ), + + /* _LOWER (Symbols / Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │ │ │ │ │ [ │ ] │ : │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ - │ │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │ \ │ │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ │ '/" │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │ _ │ │ │ │ │ │ │ │ │ │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_LOWER] = LAYOUT_staggered( + _______, _______, KC_LBRC, KC_RBRC, KC_COLON, + KC_MINUS, KC_GRAVE, 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, TD(TD_DBQT), + KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* _RAISE (Misc Modifiers / Extended Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │PRNT│ │ │ │ { │ } │ + │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ Up │ │ │ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │ │ │CAPS │ │ │ │ │ │ │ │Left│Rght│ │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │Down│ / │ │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │ │ │ │ │ │ │ │ │ ? │ │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_RAISE] = LAYOUT_staggered( + KC_PSCR, _______, KC_LCBR, KC_RCBR, KC_PLUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______ + ), + + /* _FUNCTION (F-Row / DFU Reset / RGB Toggle) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │RSET│ │RGB │ │F11 │F12 │F13 │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │F10 │ │ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ = │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_FUNCTION] = LAYOUT_staggered( + TD(TD_RST), RGB_TOG, KC_F11, KC_F12, KC_F13, + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + +// KEYMAP TEMPLATE: +// +// /* <_LAYER>: +// * +// * ┌────┐ ┌────┐ ┌────┬────┬────┐ +// * │ │ │ │ │ │ │ │ +// * └────┘ └────┘ └────┴────┴────┘ +// * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ +// * │ │ │ │ │ │ │ │ │ │ │ +// * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ +// */ +// [<_LAYER>] = LAYOUT_staggered( +// _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ) + + + +// Per-Key Tapping Term Definitions: +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case TD(TD_DBQT): + return 235; + default: + return TAPPING_TERM; + } +} + + + +// Encoder Customization: (*Order-of-Keycode Specific) +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + + + +// RGB Indicator Customization: (100% stolen from Jetpacktuxedo) +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE +// Set up RGB effects on _only_ the first LED (index 0): + rgblight_set_effect_range(0, 1); +// Set LED effects to breathing mode in a "terminal-green" type color: + rgblight_sethsv_noeeprom(50, 255, 100); + rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2); +// Init the second LED to a static color: + setrgb(225, 185, 0, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif // RGBLIGHT_ENABLE +} + +// RGB Indicator Customization: (cont.) +layer_state_t layer_state_set_user(layer_state_t state){ + #ifdef RGBLIGHT_ENABLE + uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; + if (layer_state_cmp(state, 1)) { + led1b = 255; + } + if (layer_state_cmp(state, 3)) { + led1r = 200; + } + setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE + return state; +} diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk b/keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk new file mode 100644 index 000000000000..a6be46d742e4 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +# Keymap-Specific Functions +TAP_DANCE_ENABLE = yes diff --git a/keyboards/kingly_keys/ave/staggered/rules.mk b/keyboards/kingly_keys/ave/staggered/rules.mk new file mode 100644 index 000000000000..611eb0ce1a69 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/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 = 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/keyboards/kingly_keys/ave/staggered/staggered.c b/keyboards/kingly_keys/ave/staggered/staggered.c new file mode 100644 index 000000000000..4aa0d45ea366 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/staggered.c @@ -0,0 +1,18 @@ + /* + 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 "staggered.h" diff --git a/keyboards/kingly_keys/ave/staggered/staggered.h b/keyboards/kingly_keys/ave/staggered/staggered.h new file mode 100644 index 000000000000..674122bc0caf --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/staggered.h @@ -0,0 +1,52 @@ + /* + 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 XXXX KC_NO + +#define LAYOUT_staggered( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k312, k313, \ + k401, k402, k403, k404, k406, k408, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, XXXX, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, XXXX, k312, k313 }, \ + { k401, k402, k403, k404, XXXX, k406, XXXX, k408, XXXX, XXXX, k411, k412, k413 } \ +} + +#define LAYOUT_staggered_big_boy( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k312, k313, \ + k401, k402, k403, k406, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, XXXX, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, XXXX, k312, k313 }, \ + { k401, k402, k403, XXXX, XXXX, k406, XXXX, XXXX, XXXX, XXXX, k411, k412, k413 } \ +} diff --git a/keyboards/kingly_keys/little_foot/config.h b/keyboards/kingly_keys/little_foot/config.h index e0bd0daf99c6..a872579c9784 100644 --- a/keyboards/kingly_keys/little_foot/config.h +++ b/keyboards/kingly_keys/little_foot/config.h @@ -11,7 +11,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see .#pragma once + * along with this program. If not, see . */ #pragma once @@ -24,7 +24,6 @@ #define DEVICE_VER 0x0001 #define MANUFACTURER Kingly-Keys #define PRODUCT The Little Foot -#define DESCRIPTION A Mighty Small, 45-Percent, Ortholinear Keyboard. /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h b/keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h new file mode 100644 index 000000000000..72892851e069 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h @@ -0,0 +1,10 @@ +#pragma once + +#define TAPPING_TERM 150 +#define RETRO_TAPPING + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NOCTURNE_OP_9_NO_1) + #define AUDIO_CLICKY + #define AUDIO_CLICKY_FREQ_RANDOMNESS 0.8f +#endif diff --git a/keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c b/keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c new file mode 100644 index 000000000000..2ce2babf69c5 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c @@ -0,0 +1,40 @@ + +#include QMK_KEYBOARD_H + +// Layer names +enum{ + // - Base layer: + _BASE, + // - Symbols, numbers, and functions: + _FN, + // - Alternate Function layer: + _LN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_split_space_base( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + LCTL_T(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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + LSFT_T(KC_ESC), LGUI_T(KC_SPACE), LT(_LN, KC_BSPC), LT(_FN, KC_ENT) + ), + + [_FN] = LAYOUT_split_space_base( + LT(_LN, KC_ESC), _______, _______, _______, _______, _______, _______, _______, KC_MINS, RESET, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, LSFT(KC_MINS), KC_BSLS, + KC_LSFT, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_QUOT, + AU_TOG, CK_TOGG , _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, RGB_MOD, _______ + ), + + [_LN] = LAYOUT_split_space_base( + _______, KC_F1, KC_F2, KC_F3, _______, _______, _______, KC_7, KC_8, KC_9, + _______, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_4, KC_5, KC_6, + _______, KC_F7, KC_F8, KC_F9, _______, _______, _______, KC_1, KC_2, KC_3, + _______, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_0, _______, + _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk b/keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk new file mode 100644 index 000000000000..a61cff275046 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk @@ -0,0 +1,4 @@ +CTPC=yes +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +AUDIO_ENABLE = yes diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index b2c7f4d441d4..e924a4b14155 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -45,6 +45,10 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ //#define DIODE_DIRECTION +#define LED_CAPS_LOCK_PIN B0 +#define LED_SCROLL_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ //#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_PIN B7 diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c index dcbbc2f17968..78334cb7547c 100644 --- a/keyboards/kmac/kmac.c +++ b/keyboards/kmac/kmac.c @@ -15,62 +15,9 @@ */ #include "kmac.h" -#define CAPS_PIN B0 -#define SCROLL_PIN E6 #define F_ROW_MASK 0b01 #define WASD_MASK 0b10 -// 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(); -} - -/* - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -*/ - -/* LED pin configuration - * Scroll Lock: Low PE6 - * Caps Lock: Low PB0 - */ -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(CAPS_PIN); - } else { - writePinHigh(CAPS_PIN); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(SCROLL_PIN); - } else { - writePinHigh(SCROLL_PIN); - } - - led_set_user(usb_led); -} - void backlight_init_ports(void) { setPinOutput(B1); setPinOutput(B2); diff --git a/keyboards/lazydesigners/dimpleplus/config.h b/keyboards/lazydesigners/dimpleplus/config.h new file mode 100644 index 000000000000..d85d72412d40 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/config.h @@ -0,0 +1,51 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4C44 // "LD" +#define PRODUCT_ID 0x0061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LAZYDESIGNERS +#define PRODUCT Dimpleplus + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { B3, F0, E6, F4, F5 } +#define MATRIX_COL_PINS { F1, D5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* RBG underglow */ +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLED_NUM 8 + /* #define RGBLIGHT_HUE_STEP 8 */ + /* #define RGBLIGHT_SAT_STEP 8 */ + /* #define RGBLIGHT_VAL_STEP 8 */ +#endif diff --git a/keyboards/lazydesigners/dimpleplus/dimpleplus.c b/keyboards/lazydesigners/dimpleplus/dimpleplus.c new file mode 100644 index 000000000000..36eed8cc1345 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/dimpleplus.c @@ -0,0 +1 @@ +#include "dimpleplus.h" diff --git a/keyboards/lazydesigners/dimpleplus/dimpleplus.h b/keyboards/lazydesigners/dimpleplus/dimpleplus.h new file mode 100644 index 000000000000..7664b87605e3 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/dimpleplus.h @@ -0,0 +1,33 @@ +/* +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + 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, \ + K400, K402, K403, K404, K406, K407, K408, K409 \ +) { \ + { 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, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, KC_NO, K406, K407, K408, K409, KC_NO, KC_NO } \ +} diff --git a/keyboards/lazydesigners/dimpleplus/info.json b/keyboards/lazydesigners/dimpleplus/info.json new file mode 100644 index 000000000000..4ad13f3746a0 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/info.json @@ -0,0 +1,68 @@ +{ + "keyboard_name": "Dimpleplus", + "url": "http://lazydesigners.cn", + "maintainer": "LAZYDESIGNERS", + "width": 12.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K000 (B3,F1)", "x":0, "y":0}, + {"label":"K001 (B3,D5)", "x":1.5, "y":0}, + {"label":"K002 (B3,F6)", "x":2.5, "y":0}, + {"label":"K003 (B3,F7)", "x":3.5, "y":0}, + {"label":"K004 (B3,C7)", "x":4.5, "y":0}, + {"label":"K005 (B3,C6)", "x":5.5, "y":0}, + {"label":"K006 (B3,B6)", "x":6.5, "y":0}, + {"label":"K007 (B3,B5)", "x":7.5, "y":0}, + {"label":"K008 (B3,B4)", "x":8.5, "y":0}, + {"label":"K009 (B3,D7)", "x":9.5, "y":0}, + {"label":"K010 (B3,D6)", "x":10.5, "y":0}, + {"label":"K011 (B3,D4)", "x":11.5, "y":0}, + {"label":"K100 (F0,F1)", "x":0, "y":1.25}, + {"label":"K101 (F0,D5)", "x":1, "y":1.25}, + {"label":"K102 (F0,F6)", "x":2, "y":1.25}, + {"label":"K103 (F0,F7)", "x":3, "y":1.25}, + {"label":"K104 (F0,C7)", "x":4, "y":1.25}, + {"label":"K105 (F0,C6)", "x":5, "y":1.25}, + {"label":"K106 (F0,B6)", "x":6, "y":1.25}, + {"label":"K107 (F0,B5)", "x":7, "y":1.25}, + {"label":"K108 (F0,B4)", "x":8, "y":1.25}, + {"label":"K109 (F0,D7)", "x":9, "y":1.25}, + {"label":"K110 (F0,D6)", "x":10, "y":1.25}, + {"label":"K111 (F0,D4)", "x":11, "y":1.25, "w":1.5}, + {"label":"K200 (E6,F1)", "x":0, "y":2.25, "w":1.25}, + {"label":"K201 (E6,D5)", "x":1.25, "y":2.25}, + {"label":"K202 (E6,F6)", "x":2.25, "y":2.25}, + {"label":"K203 (E6,F7)", "x":3.25, "y":2.25}, + {"label":"K204 (E6,C7)", "x":4.25, "y":2.25}, + {"label":"K205 (E6,C6)", "x":5.25, "y":2.25}, + {"label":"K206 (E6,B6)", "x":6.25, "y":2.25}, + {"label":"K207 (E6,B5)", "x":7.25, "y":2.25}, + {"label":"K208 (E6,B4)", "x":8.25, "y":2.25}, + {"label":"K209 (E6,D7)", "x":9.25, "y":2.25}, + {"label":"K210 (E6,D6)", "x":10.25, "y":2.25}, + {"label":"K211 (E6,D4)", "x":11.25, "y":2.25, "w":1.25}, + {"label":"K300 (F4,F1)", "x":0, "y":3.25, "w":1.75}, + {"label":"K301 (F4,D5)", "x":1.75, "y":3.25}, + {"label":"K302 (F4,F6)", "x":2.75, "y":3.25}, + {"label":"K303 (F4,F7)", "x":3.75, "y":3.25}, + {"label":"K304 (F4,C7)", "x":4.75, "y":3.25}, + {"label":"K305 (F4,C6)", "x":5.75, "y":3.25}, + {"label":"K306 (F4,B6)", "x":6.75, "y":3.25}, + {"label":"K307 (F4,B5)", "x":7.75, "y":3.25}, + {"label":"K308 (F4,B4)", "x":8.75, "y":3.25}, + {"label":"K309 (F4,D7)", "x":9.75, "y":3.25}, + {"label":"K310 (F4,D6)", "x":10.75, "y":3.25, "w":1.75}, + {"label":"K400 (F5,F1)", "x":0.75, "y":4.25}, + {"label":"K402 (F5,F6)", "x":1.75, "y":4.25}, + {"label":"K403 (F5,F7)", "x":2.75, "y":4.25}, + {"label":"K404 (F5,C7)", "x":3.75, "y":4.25, "w":2.25}, + {"label":"K406 (F5,B6)", "x":6, "y":4.25, "w":2.75}, + {"label":"K407 (F5,B5)", "x":8.75, "y":4.25}, + {"label":"K408 (F5,B4)", "x":9.75, "y":4.25}, + {"label":"K409 (F5,D7)", "x":10.75, "y":4.25} + ] + } + } +} diff --git a/keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c b/keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c new file mode 100644 index 000000000000..17b9aec47268 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* 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 + +#define LT2_TAB LT(2, KC_TAB) +#define LT1_SPC LT(1, KC_SPC) + +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_DEL, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT2_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_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, LT1_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_SCLN, KC_SLSH, + KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, KC_NO, KC_NO, KC_DOT, KC_NO, + RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_QUOT + ), + [2] = 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_LCBR, KC_RCBR, KC_UNDS, KC_PLUS, KC_COLN, KC_QUES, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LABK, KC_RABK, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DQUO + ), +}; diff --git a/keyboards/lazydesigners/dimpleplus/readme.md b/keyboards/lazydesigners/dimpleplus/readme.md new file mode 100644 index 000000000000..fc5881cdc1c8 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/readme.md @@ -0,0 +1,19 @@ +# Dimpleplus + +![dimpleplus](https://i.loli.net/2020/08/15/GgfvXZ5dzDLqurh.jpg) + +* Keyboard Maintainer: [LAZYDESIGNERS](https://github.com/jackytrabbit) +* Hardware Supported: Dimple Plus +* Hardware Availability: Check [LAZYDESIGNERS's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/dimpleplus:default + +Flashing example for this keyboard: + + make lazydesigners/dimpleplus:default:flash + +**Reset Key:** To enter the bootloader, either push the RESET button on the PCB or the RESET button on the FN layer. + +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/keyboards/lazydesigners/dimpleplus/rules.mk b/keyboards/lazydesigners/dimpleplus/rules.mk new file mode 100644 index 000000000000..3fd7208dbbd5 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/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 = 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 + diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 69864cd08550..549363d03a12 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "bcat.h" @@ -24,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LGUI, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_APP + KC_LALT, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_RGUI ), /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 84c2fc335fa0..de03526a8bf9 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -1,8 +1,8 @@ # bcat's Lily58 layout -This split ergo layout follows my preferred [Crkbd -layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/bcat) -with the following changes: +This split ergo layout follows my preferred [split 3x6 + 3 thumb +keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat) +(Crkbd) layout with a few changes: * There's an optional number row at the top of the keyboard. I am quite used to using layers for numbers and symbols, so in practice this goes unused. @@ -11,12 +11,15 @@ using layers for numbers and symbols, so in practice this goes unused. placed in the same positions as on the ErgoDox EZ. (There's no real reason for this; I just had to do _something_ with those keys.) -* The extra thumb keys are used for dedicated Super/Menu keys, as well as -browser back/forward navigation keys. +* The extra thumb keys on the bottom row are used for a Left Alt key (for easier +Alt+Tab, Alt+F4, etc.) and a dedicated Super key. + +* The harder-to-reach thumb keys below the controllers are bound to browser +back/forward navigation keys. ## Default layer -![Default layer layout](https://i.imgur.com/FNITWJ0.png) +![Default layer layout](https://i.imgur.com/0stG2GT.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) diff --git a/keyboards/crkbd/keymaps/foostan/config.h b/keyboards/lily58/keymaps/via/config.h similarity index 86% rename from keyboards/crkbd/keymaps/foostan/config.h rename to keyboards/lily58/keymaps/via/config.h index 644e8136509b..a3f0fb0a19c5 100644 --- a/keyboards/crkbd/keymaps/foostan/config.h +++ b/keyboards/lily58/keymaps/via/config.h @@ -28,17 +28,15 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 +// Underglow +/* #undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs #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 +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/via/keymap.c b/keyboards/lily58/keymaps/via/keymap.c new file mode 100644 index 000000000000..bf46fb8e1864 --- /dev/null +++ b/keyboards/lily58/keymaps/via/keymap.c @@ -0,0 +1,229 @@ + /* Copyright 2020 Naoki Katahira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//extern uint8_t is_master; + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ~ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + + [_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_GRV, + 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_LCTRL, 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_RSFT, + LOWER, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, RAISE +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | ` | + | { | } | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_GRAVE, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| + | = | [ | ] | \ | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + +[_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, + _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#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; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + +static void render_logo(void) { + static const char PROGMEM 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(logo, false); +} +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} +//new + +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_ln_P(PSTR("Default"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjust"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + + } else { + render_logo(); + } +} +#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(); + } + return true; +} diff --git a/keyboards/lily58/keymaps/via/rules.mk b/keyboards/lily58/keymaps/via/rules.mk new file mode 100644 index 000000000000..1df2dc4b7ce0 --- /dev/null +++ b/keyboards/lily58/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index 42d4d1474bba..dfd35a8491bd 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c @@ -37,11 +37,11 @@ led_config_t g_led_config = { { { 224, 13 }, { 224, 25 }, { 224, 38 }, { 224, 50 }, { 222, 62 }, { 191, 64 }, { 179, 64 }, { 167, 64 }, { 153, 64 }, { 139, 64 }, { 125, 64 }, { 112, 64 }, { 98, 64 }, { 84, 64 }, { 70, 64 }, { 56, 64 }, { 42, 64 }, { 28, 64 }, { 1, 62 }, { 0, 50 }, { 0, 38 }, { 0, 25 }, { 0, 13 } }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, // Underglow LEDs 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 0d3e7ccb7a37..df8d406988fe 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -87,11 +87,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); rgb_matrix_set_color_all(0, 0, 0); } break; - case LED_FLAG_KEYLIGHT: { + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_color_all(0, 0, 0); } diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h new file mode 100644 index 000000000000..acd041ce1455 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -0,0 +1,156 @@ +/* Copyright 2020 elijahblake81 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 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 TAPPING_TERM_PER_KEY // Enabling to allow to tweak individual keys +// #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 3000 // 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) + + + +//Teal and Blue +//#define RGB_MATRIX_STARTUP_HUE 127 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 47 // Used to determine the color for the modifiers + +//Teal and Blue +//#define RGB_MATRIX_STARTUP_HUE 120 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 50 //Used to determine the color for the modifiers + + +//QMK HSV is based on 255 value wheel rather than 360 + +//Cyan and Yellow +//#define RGB_MATRIX_STARTUP_HUE 127 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 177 + +//Cyan and Green +//#define RGB_MATRIX_STARTUP_HUE 127 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 215 + +// #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS + +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE // Sets the default mode, if none has been set +#define RGB_MATRIX_STARTUP_HUE 180 //purple alphas with green background when pressed. +// #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 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 + +// 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/keyboards/massdrop/alt/keymaps/pregame/keymap.c b/keyboards/massdrop/alt/keymaps/pregame/keymap.c new file mode 100644 index 000000000000..6c1d93b03010 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/keymap.c @@ -0,0 +1,209 @@ +/* Copyright 2020 elijahblake81 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "keymap.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + [DEFAULT] = 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_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_HOME, + 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 + ), + */ + [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, + 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_HOME, + 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( + 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_CALC, + RGB_M_P, RGB_SPD, RGB_HUI, RGB_SPI, RGB_SAI, RGB_VAI, _______, U_T_AUTO, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_MYCM, + RGB_TOG, RGB_RMOD, RGB_HUD, RGB_MOD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, _______, _______, _______, KC_VOLU, KC_VOLD, + _______, _______, _______, KC_MPLY, _______, _______, KC_HOME, KC_VOLD, KC_END + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [RGB] = LAYOUT( + ESC: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 0: 10, MINS: 11, EQL: 12, BSPC: 13, DEL: 14, + TAB: 15, Q: 16, W: 17, E: 18, R: 19, T: 20, Y: 21, U: 22, I: 23, O: 24, P: 25, LBRC: 26, RBRC: 27, BSLS: 28, HOME: 29, + CAPS: 30, A: 31, S: 32, D: 33, F: 34, G: 35, H: 36, J: 37, K: 38, L: 39, SCLN: 40, QUOT: 41, ENT: 42, PGUP: 43, + LSFT: 44, Z: 45, X: 46, C: 47, V: 48, B: 49, N: 50, M: 51, COMM: 52, DOT: 53, SLSH: 54, RSFT: 55, UP: 56, PGDN: 57, + LCTL: 58, LGUI: 59, LALT: 60, SPC: 61, RALT: 62, FN: 63, LEFT: 64, DOWN: 65, RGHT: 66 + //UnderGlow + :67, :68, :69, :70, :71, :72, :73, :74, :75, :76, :77, :78, :79, :80, :81, + :82, :83, :84, :85, + :86, :87, :88, :89, + :90, :91, :92, :93, :94, :95, :96, :97, :98, :99, :100, :101, :102, :103, :104, :105, + ), + [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, + //UnderGlow + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 88, 89, + 86, 87, + 84, 85, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 + ), + */ +}; + +#ifdef _______ +#undef _______ +#define _______ {0, 0, 0} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [0] = { + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, CHART, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, CHART, CHART, CHART, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CHART, _______, + _______, _______, _______, _______, _______, _______, CHART, CHART, CHART, + //UnderGlow + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART + }, + [1] = { + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, BLUE, + GOLD, PINK, AZURE, PINK, TURQ, TEAL, _______, RED, _______, _______, GREEN, BLUE, GOLD, _______, BLUE, + TEAL, MAGENT, AZURE, MAGENT, TURQ, TEAL, _______, _______, _______, _______, _______, _______, GOLD, BLUE, + _______, _______, _______, _______, _______, RED, RED, RED, _______, _______, _______, _______, GOLD, BLUE, + _______, _______, _______, GOLD, _______, _______, PURPLE, GOLD, PURPLE, + //UnderGlow + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART + }, +}; + +#undef _______ +#define _______ KC_TRNS +#endif + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + // Enable or disable debugging + debug_enable=false; + debug_matrix=false; + debug_keyboard=false; + //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(); +} + +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; + case RGB_TOG: + if (record->event.pressed) { + 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: { + 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; + } + } + return true; +} +void set_layer_color(int layer) { + 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 == 1) { + // Only deactivate non-defined key LEDs at layers other than FN. Because at FN we have RGB adjustments and need to see them live. + // If the values are all false then it's a transparent key and deactivate LED at this layer + rgb_matrix_set_color(i, 0, 0, 0); + } + } +} +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/keyboards/massdrop/alt/keymaps/pregame/keymap.h b/keyboards/massdrop/alt/keymaps/pregame/keymap.h new file mode 100644 index 000000000000..1980800336de --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/keymap.h @@ -0,0 +1,58 @@ +/* Copyright 2020 elijahblake81 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +#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} + + + +//========================================================== CONFIGURABLE DEFAULTS ========================================================== +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; +bool disable_layer_color; + +enum alt_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 +}; diff --git a/keyboards/massdrop/alt/keymaps/pregame/readme.md b/keyboards/massdrop/alt/keymaps/pregame/readme.md new file mode 100644 index 000000000000..e18727056073 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/readme.md @@ -0,0 +1,35 @@ +# Massdrop Alt Pregame + +This keymap is here to show some love to the MD Alt. This is a stripped down version of the Drop Ctrl Endgame; hence the name Pregame. + +## IRL +![In Real Life](https://i.imgur.com/Xp6Mb6P.jpg) + + + +## Layers + +### Typing Layer + +![Typing Layer](https://i.imgur.com/F7iU53K.png) + +### Function Layer + +![SHORTCUT_LAYER](https://i.imgur.com/Gub1xyC.png) + +## Features + +These are the features currently supported by this keymap: + +### RGB Can be customized by "NAME OF COLOR" in the Keymap.c file. + 1. Look at keymap for example. My base layer the W,A,S,D and Arrow Keys are CHART short for CHARTREUSE (Close to NVIDIA GREEN). The values to pick from are located on keymap.h file. + 2. I have applied static colors to the Function layer that let you know which keys are available to that layer only. The not lit up keys are still accessible if set to Transparent Keycap!!! + +## Credits + +This was all converted originally from the Drop Ctrl Endgame. I took nblyumberg's version of code and converted it to fit into the alt. +RGB timeout functionality was originally inspired by the code in this [gist](https://gist.github.com/algernon/9182469e21894192017f2bb5d478c7df). +LED config code was mostly transferred from [matthewrobo keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop/ctrl/keymaps/matthewrobo). + + +**Rest of the information about RGB matrix, scan matrix, and whatever information I have used was made publicly available by many other awesome members of the community.** diff --git a/keyboards/massdrop/alt/keymaps/pregame/rules.mk b/keyboards/massdrop/alt/keymaps/pregame/rules.mk new file mode 100644 index 000000000000..c6977c23cbf9 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/rules.mk @@ -0,0 +1,15 @@ +# RGBLIGHT_ENABLE = no # Not for MD boards. This is here in case you forget. +COMMAND_ENABLE = no # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no +# 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. +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 diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index 448793cf5d90..0cfe4ee216c4 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -46,7 +46,7 @@ led_config_t g_led_config = { { }, { // 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 1, 4, 4, 4, 4, 1, 1, 1, - 1, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 1, 9, 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_INS, KC_HOME, KC_PGUP 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, @@ -56,7 +56,7 @@ led_config_t g_led_config = { { 4, 4, 4, 4, 4, 4, 1, 1, 1, // 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 - 1, 4, 4, 4, 4, 4, 4, 4, + 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // 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 1, 4, 4, 4, 4, 4, 4, 4, diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 51b7f3931bc0..48fec5ae6fc7 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -100,11 +100,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); rgb_matrix_set_color_all(0, 0, 0); } break; - case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_color_all(0, 0, 0); } diff --git a/keyboards/mechkeys/mk60/config.h b/keyboards/mechkeys/mk60/config.h index 9fccd8a8b0e2..b408625f250f 100644 --- a/keyboards/mechkeys/mk60/config.h +++ b/keyboards/mechkeys/mk60/config.h @@ -53,6 +53,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 6 diff --git a/keyboards/mechkeys/mk60/mk60.c b/keyboards/mechkeys/mk60/mk60.c index 4c6a059f4cfa..7ec8bff22bd1 100644 --- a/keyboards/mechkeys/mk60/mk60.c +++ b/keyboards/mechkeys/mk60/mk60.c @@ -14,37 +14,3 @@ * along with this program. If not, see . */ #include "mk60.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(B7); - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){ - writePinLow(B7); - }else { - writePinHigh(B7); - } - - led_set_user(usb_led); -} diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index 2533bfa35353..038d974604b0 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c index bedb77a4b790..d396de683946 100644 --- a/keyboards/melody96/keymaps/zunger/keymap.c +++ b/keyboards/melody96/keymaps/zunger/keymap.c @@ -55,70 +55,57 @@ enum layers_keymap { // TODO: It would also be nice to be able to put the actual code points in here, rather than // numbers. +// Accent marks +#define CMB_GRV H(0300) +#define CMB_AGU H(0301) +#define CMB_DIA H(0308) +#define CMB_CIR H(0302) +#define CMB_MAC H(0304) +#define CMB_CED H(0327) +#define CMB_TIL H(0303) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* The diagram below shows five rows for each key: from top to bottom, the QWERTY layer, the - * GREEK layer, the SHIFTGREEK layer, the CADET layer, and the SHIFTCADET layer. (The single - * diagram is to make it easier to see what goes where with this many layers!) - * + // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the + // switch on the KC_GRV key; change back to KC_ESC once this is fixed. + [_QWERTY] = LAYOUT_hotswap( + 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_HOME, KC_END, KC_PGUP, KC_PGDN, KC_MPLY, KC_BRK, + 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_LLCK, 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_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_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, KC_LALT, KC_LGUI, KC_SPC, MO_FN, KC_GREEK,KC_CADET,KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* The Greek layers. Shown here are the QWERTY layer (for visual reference) and the two Greek + * layers. * ,---------------------------------------------------------------------------- * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY - * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK * | ` | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ₍ | ₎ | | | | | SHIFTGREEK - * | ¬ | | | | | | | | | | | | | | | | | | | CADET - * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET + * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK * |---------------------------------------------------------------------------| * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | - * | ` | ¡ | | £ | | | | | ° | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | * | ` | ¿ | | € | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | - * | | ̀ | ́ | ̂ | ̃ | ̈ | ̄ | | | | | | ± | BKSPC |LCK| | × | | [3] - * | | | | | | | | | | | | | ∓ | BKSPC |LCK| | | | + * | | | | | | | | | | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | * |---------------------------------------------------------------------------| * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | - * | | θ | ω | ε | ρ | τ | ψ | υ | ι | ο | π | | | | | | | | * | | Θ | Ω | Ε | Ρ | Τ | Ψ | Υ | Ι | Ο | Π | | | | | | | | - * | | ∧ | ∨ | ∩ | ∪ | ⊂ | ⊃ | ∀ | ∞ | ∃ | ∂ | ∈ | | | * | * | * | | [1] - * | | ℚ | | | ℝ | ⊆ | ⊇ | | ℵ | ∄ | | ∉ | | | * | * | * | | + * | | θ | ω | ε | ρ | τ | ψ | υ | ι | ο | π | | | | | | | | * |-----------------------------------------------------------------------| + | * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | - * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | * | CTRL | Α | Σ | Δ | Φ | Γ | Η | | Κ | Λ | … | ∴ | RET | | | | | - * | CTRL | ⟘ | ⊤ | ⊢ | ⊣ | ↑ | ↓ | ← | → | ↔ | | | RET | * | * | * | | [1] - * | CTRL | Å | | ∇ | | ⇑ | ⇓ | ⇐ | ⇒ | ⇔ | | | RET | * | * | * | | + * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | * |-----------------------------------------------------------------------|---| * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | - * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | * | SHIFT | Ζ | Ξ | Χ | ✔ | Β | Ν | Μ | ≲ | ≳ | |SHFT | | | | | | - * | SHIFT | | | ≠ | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] - * | SHIFT | ℤ | | ℂ | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | + * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | * |-----------------------------------------------------------------------|ENT| - * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | [2] - * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | - * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | * `---------------------------------------------------------------------------' - * - * [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5 - * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. - * [2] The Greek letters in this row are the three modifier keys (GREEK, CADET, FN), - * not the Unicode Greek letters. - * [3] The accent marks in this row are combining accent marks, which may be put after - * a character to combine it. In order, they are grave, acute, circumflex, tilde, - * diaresis (umlaut), and macron. - */ - // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the - // switch on the KC_GRV key; change back to KC_ESC once this is fixed. - [_QWERTY] = LAYOUT_hotswap( - 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_HOME, KC_END, KC_PGUP, KC_PGDN, KC_MPLY, KC_BRK, - 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_LLCK, 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_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_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, KC_LALT, KC_LGUI, KC_SPC, KC_GREEK,KC_CADET,MO_FN, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + */ [_GREEK] = LAYOUT_hotswap( KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(207d), H(207e), XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, H(00a1), _______, H(00a3), _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), + KC_GRV, _______, _______, _______, _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), _______, H(03b8), H(03c9), H(03b5), H(03c1), H(03c4), H(03c8), H(03c5), H(03b9), H(03bf), H(03c0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, _______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(03d1), H(03ba), H(03bb), H(22ef), H(22c5), _______, KC_P4, KC_P5, KC_P6, H(2295), _______, H(03b6), H(03be), H(03c7), H(03c2), H(03b2), H(03bd), H(03bc), H(226a), H(226b), H(222b), _______, _______, KC_P1, KC_P2, KC_P3, @@ -130,30 +117,58 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, H(0391), H(03a3), H(0394), H(03a6), H(0393), H(0397), XXXXXXX, H(039a), H(039b), H(2026), H(2234), _______, KC_P4, KC_P5, KC_P6, H(2295), _______, H(0396), H(039e), H(03a7), H(2714), H(0392), H(039d), H(039c), H(2272), H(2273), XXXXXXX, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), - // TODO: Add mouse keys to keypad. + /* The Cadet layers. Again, we show the QWERTY layer and the two cadet layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET + * | ¬ | | | | | | | | | | | | | | | | | | | CADET + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | ¡ | | £ | | | | | ° | | | * | ∓ | BKSPC |LCK| | | | + * | | | | | | | | | | | | | ± | BKSPC |LCK| | × | | + * |---------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * | | ℚ | | | ℝ | ⊆ | ⊇ | | ℵ | ∄ | | ∉ | | | * | * | * | | + * | | ∧ | ∨ | ∩ | ∪ | ⊂ | ⊃ | ∀ | ∞ | ∃ | ∂ | ∈ | | | * | * | * | | [1] + * |-----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | + * | CTRL | Å | | ∇ | | ⇑ | ⇓ | ⇐ | ⇒ | ⇔ | | | RET | * | * | * | | + * | CTRL | ⟘ | ⊤ | ⊢ | ⊣ | ↑ | ↓ | ← | → | ↔ | | | RET | * | * | * | | [1] + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | ℤ | ℂ | | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | + * | SHIFT | | ≠ | | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + * [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5 + * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. + */ [_CADET] = LAYOUT_hotswap( H(00AC), 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, H(0300), H(0301), H(0302), H(0303), H(0308), H(0304), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, _______, H(2227), H(2228), H(2229), H(222a), H(2282), H(2283), H(2200), H(221e), H(2203), H(2202), H(2208), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, _______, H(22a5), H(22a4), H(22a2), H(22a3), H(2191), H(2193), H(2190), H(2192), H(2194), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, - _______, XXXXXXX, XXXXXXX, H(2260), H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, XXXXXXX, H(2260), XXXXXXX, H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), [_SHIFTCADET] = LAYOUT_hotswap( H(2205), 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GRV, H(00a1), XXXXXXX, H(00a3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, H(211a), XXXXXXX, XXXXXXX, H(211d), H(2286), H(2287), XXXXXXX, H(2135), H(2204), XXXXXXX, H(2209), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, _______, H(212b), XXXXXXX, H(2207), XXXXXXX, H(21d1), H(21d3), H(21d0), H(21d2), H(21d4), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, - _______, H(2124), XXXXXXX, H(2102), H(2249), H(2262), H(2115), XXXXXXX, XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, H(2124), H(2102), XXXXXXX, H(2249), H(2262), H(2115), XXXXXXX, XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), - // Function layer is mostly for keyboard meta-control operations. Lots of this is just from the - // default layout; TODO make it nicer. + // Function layer is mostly for keyboard meta-control operations, but also contains the combining + // accent marks. These are deliberately placed to match where the analogous controls go on Mac OS. [_FUNCTION] = LAYOUT_hotswap( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, - BL_TOGG, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RESET, + CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CMB_AGU, _______, _______, _______, CMB_DIA, CMB_CIR, CMB_MAC, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CMB_CED, _______, _______, CMB_TIL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c index 2fe274ee471b..44e813586bff 100644 --- a/keyboards/melody96/melody96.c +++ b/keyboards/melody96/melody96.c @@ -1,23 +1 @@ #include "melody96.h" - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRC |= (1 << 6); PORTC &= ~(1 << 6); - } else { - DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRC |= (1 << 7); PORTC &= ~(1 << 7); - } else { - DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } - - led_set_user(usb_led); -} diff --git a/keyboards/moon/config.h b/keyboards/moon/config.h index a02cfdba166d..12a949a07618 100644 --- a/keyboards/moon/config.h +++ b/keyboards/moon/config.h @@ -31,6 +31,9 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 11 +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/moon/moon.c b/keyboards/moon/moon.c index c218bf5ef157..95ce007e2b80 100644 --- a/keyboards/moon/moon.c +++ b/keyboards/moon/moon.c @@ -14,56 +14,3 @@ * along with this program. If not, see . */ #include "moon.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(); -} - -/* - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -*/ - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(CAPS_PIN); - } else { - writePinLow(CAPS_PIN); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(SCROLL_PIN); - } else { - writePinLow(SCROLL_PIN); - } - - led_set_user(usb_led); -} diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c index 5756a95170bc..c1180612ad06 100644 --- a/keyboards/mschwingen/modelm/modelm.c +++ b/keyboards/mschwingen/modelm/modelm.c @@ -47,19 +47,19 @@ static cRGB led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255} static const cRGB black = {.r = 0, .g = 0, .b = 0}; -static const cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; -static const cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; +static const __attribute__((unused)) cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; +static const __attribute__((unused)) cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; -static const cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; -static const cRGB lred = {.r = DIM, .g = 0, .b = 0}; +static const __attribute__((unused)) cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; +static const __attribute__((unused)) cRGB lred = {.r = DIM, .g = 0, .b = 0}; -static const cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; -static const cRGB lblue = {.r = 0, .g = 0, .b = DIM}; +static const __attribute__((unused)) cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; +static const __attribute__((unused)) cRGB lblue = {.r = 0, .g = 0, .b = DIM}; -static const cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; -static const cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; +static const __attribute__((unused)) cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; +static const __attribute__((unused)) cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; -static const cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; +static const __attribute__((unused)) cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; static led_t led_state; static uint8_t layer; diff --git a/keyboards/mt980/config.h b/keyboards/mt980/config.h index 6b8b95295279..56927be70509 100644 --- a/keyboards/mt980/config.h +++ b/keyboards/mt980/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN diff --git a/keyboards/mt980/mt980.c b/keyboards/mt980/mt980.c index 5461a3b21ff0..69f7cc491a89 100644 --- a/keyboards/mt980/mt980.c +++ b/keyboards/mt980/mt980.c @@ -1,65 +1 @@ #include "mt980.h" - -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void matrix_init_user(void) { - matrix_init_keymap(); -} - -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - -void keyboard_pre_init_user(void) { - /* Set NUMLOCK indicator pin as output */ - setPinOutput(C6); - /* Set CAPSLOCK indicator pin as output */ - setPinOutput(C7); - /* Set SCROLLOCK indicator pin as output */ - setPinOutput(B5); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return process_record_keymap(keycode, record); -} - -void led_set_user(uint8_t usb_led) { - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(C6); - } - else { - writePinHigh(C6); - } - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C7); - } - else { - writePinHigh(C7); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B5); - } - else { - writePinHigh(B5); - } - - led_set_keymap(usb_led); -} diff --git a/keyboards/nack/config.h b/keyboards/nack/config.h new file mode 100644 index 000000000000..9f0880e38fee --- /dev/null +++ b/keyboards/nack/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2020 pastapojken + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xDA12 +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER pastapojken +#define PRODUCT nack keyboard + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +#define MATRIX_ROW_PINS { A0, A1, A2, A3 } +#define MATRIX_COL_PINS { A6, A7, A8, A9, A10, B0, B1, B2, B6, B7, C13, C14, C15 } + +#define DIODE_DIRECTION ROW2COL +#define DEBOUNCE 5 +#define TAPPING_TOGGLE 2 + +#ifdef RGB_MATRIX_ENABLE + #define WS2812_SPI SPID1 + #define WS2812_SPI_MOSI_PAL_MODE 5 + #define RGB_DI_PIN B5 + #define RGBLED_NUM 52 + #define DRIVER_LED_TOTAL RGBLED_NUM + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 // Max brightness of LEDs + #define RGB_MATRIX_STARTUP_VAL 64 + #define RGB_MATRIX_HUE_STEP 10 + #define RGB_MATRIX_SAT_STEP 10 + #define RGB_MATRIX_VAL_STEP 10 +#endif + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) + #define AUDIO_PIN A4 // Pin of the left speaker + #define AUDIO_PIN_ALT A5 // Pin of the right speaker + /* + * Basically, change this section once pull request 6165 has been merged + * https://github.com/qmk/qmk_firmware/pull/6165 + */ +#endif + diff --git a/keyboards/nack/info.json b/keyboards/nack/info.json new file mode 100644 index 000000000000..780017f6cc54 --- /dev/null +++ b/keyboards/nack/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "nack", + "url": "https://github.com/pastapojken/nack", + "maintainer": "pastapojken", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"\u00c5", "x":11, "y":0}, {"label":"\u00a8", "x":12, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":"\u00d6", "x":10, "y":1}, {"label":"\u00c4", "x":11, "y":1}, {"label":"'", "x":12, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"", "x":10, "y":2}, {"label":"↑", "x":11, "y":2}, {"label":"backsp", "x":12, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Super", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Fn", "x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"label":"Fn", "x":6, "y":3}, {"label":"", "x":7, "y":3}, {"label":"Alt Gr", "x":8, "y":3}, {"label":"Enter", "x":9, "y":3}, {"label":"←", "x":10, "y":3}, {"label":"↓", "x":11, "y":3}, {"label":"→", "x":12, "y":3}] + } + } +} diff --git a/keyboards/nack/keymaps/default/keymap.c b/keyboards/nack/keymaps/default/keymap.c new file mode 100644 index 000000000000..4c3e3dacbdd4 --- /dev/null +++ b/keyboards/nack/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + NUM, + FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |----TAB-----|---Q--------|-----W------|-----E------|-----R------|----T-------|-----Y------|-----U------|----I-------|------O-----|----P-------|----Å-------|--( ¨^~ )---| + 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, +// | |----ESC-----|---A--------|---S--------|----D-------|-----F------|-----G------|-----H------|-----J------|-----K------|-----L------|-----Ö------|-----Ä------|--( '* )----| + 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_NUHS, +// | |---SHIFT----|---Z--------|---X--------|----C-------|-----V------|-----B------|-----N------|------M-----|---( ,; )---|---( .: )---|---( -_ )---|----UP------|-BACKSPACE--| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_BSPC, +// | |---CTRL-----|---ALT------|---META-----|----FN_1----|----------SPACE----------|----FN_2----|----AltGr---|--( <>| )---|---ENETER---|-LEFT-------|---DOWN-----|--RIGHT-----| + KC_LCTL, KC_LALT, KC_LGUI, TT(NUM), KC_SPC, KC_NO, TT(FN), KC_RALT, KC_NUBS, KC_ENT, KC_LEFT, KC_DOWN, KC_RIGHT +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [NUM] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |---TAB------|---( 1! )---|--( 2"@ )---|--( 3#£ )---|---( 4¤$ )--|--( 5%€ )---|---( 6& )---|--( 7/{ )---|--( 8([ )---|--( 9)] )---|--( 0=} )---|---( +?\ )--|---( ´` )---| + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, +// | |----ESC-----|-----F1-----|-----F2-----|----F3------|----F4------|----F5------|-----F6-----|-----F7------|----F8-----|-----F9-----|-----F10----|----F11-----|----F12-----| + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, +// | |---SHIFT----|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +// | |---CTRL-----|---ALT------|---META-----|---FN_1-----|------------|------------|----FN_2----|--AltGr-----|---( §½ )---|------------|------------|------------|------------| + _______, _______, _______, TT(FN), KC_NO, KC_NO, TO(BASE), _______, KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [FN] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |-RGB TOGGLE-|-CHANGE RGB-|-RGB HUE UP-|-RGB SAT UP-|------------|------------|------------|------------|------------|------------|------------|------------|-RESET KBD--| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +// | |------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + MU_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, +// | |------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|-RGB LIGHT +|------------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_NO, +// | |------------|------------|------------|---FN_1-----|------------|------------|----FN_2----|------------|------------|------------|------------|-RGB LIGHT -|------------| + KC_NO, KC_NO, KC_NO, TT(NUM), KC_NO, KC_NO, TO(BASE), KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ) +}; diff --git a/keyboards/nack/keymaps/default/readme.md b/keyboards/nack/keymaps/default/readme.md new file mode 100644 index 000000000000..9cbf5c6e6f34 --- /dev/null +++ b/keyboards/nack/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for nack, simple and minimal. diff --git a/keyboards/nack/keymaps/pastapojken/keymap.c b/keyboards/nack/keymaps/pastapojken/keymap.c new file mode 100644 index 000000000000..3bbcc4b368da --- /dev/null +++ b/keyboards/nack/keymaps/pastapojken/keymap.c @@ -0,0 +1,199 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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.h" + +#define ____ _______ + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + BASE, + NUM, + FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + CK_LSFT = SAFE_RANGE, // Shift + CK_RALT, // AltGr + CK_BSPC_DEL, // Backspace or Del (if pressed with CK_LSFT or CK_RALT) + CK_UP_PGUP, // Up or PgUp (if pressed with CK_LSFT or CK_RALT) + CK_DOWN_PGDOWN, // Down or PgDown (if pressed with CK_LSFT or CK_RALT) + CK_LEFT_HOME, // Left or Home (if pressed with CK_LSFT or CK_RALT) + CK_RIGHT_END, // Right or End (if pressed with CK_LSFT or CK_RALT) + KK_RESET +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |----TAB-----|---Q--------|-----W------|-----E------|-----R------|----T-------|-----Y------|-----U------|----I-------|------O-----|----P-------|----Å-------|--( ¨^~ )---| + 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, +// | |----ESC-----|---A--------|---S--------|----D-------|-----F------|-----G------|-----H------|-----J------|-----K------|-----L------|-----Ö------|-----Ä------|--( '* )----| + 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_NUHS, +// | |---SHIFT----|---Z--------|---X--------|----C-------|-----V------|-----B------|-----N------|------M-----|---( ,; )---|---( .: )---|---( -_ )---|----UP------|-BACKSPACE--| + CK_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CK_UP_PGUP, CK_BSPC_DEL, +// | |---CTRL-----|---ALT------|---META-----|----FN_1----|----------SPACE----------|----FN_2----|----AltGr---|--( <>| )---|---ENETER---|-LEFT-------|---DOWN-----|--RIGHT-----| + KC_LCTL, KC_LALT, KC_LGUI, TT(NUM), KC_SPC, KC_NO, TT(FN), CK_RALT, KC_NUBS, KC_ENT, CK_LEFT_HOME,CK_DOWN_PGDOWN,CK_RIGHT_END +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [NUM] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |---TAB------|---( 1! )---|--( 2"@ )---|--( 3#£ )---|---( 4¤$ )--|--( 5%€ )---|---( 6& )---|--( 7/{ )---|--( 8([ )---|--( 9)] )---|--( 0=} )---|---( +?\ )--|---( ´` )---| + ____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, +// | |----ESC-----|-----F1-----|-----F2-----|----F3------|----F4------|----F5------|-----F6-----|-----F7------|----F8-----|-----F9-----|-----F10----|----F11-----|----F12-----| + ____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, +// | |---SHIFT----|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + ____, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +// | |---CTRL-----|---ALT------|---META-----|---FN_1-----|------------|------------|----FN_2----|--AltGr-----|---( §½ )---|------------|------------|------------|------------| + ____, ____, ____, TT(FN), KC_NO, KC_NO, TO(BASE), ____, KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [FN] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |-RGB TOGGLE-|-CHANGE RGB-|-RGB HUE UP-|-RGB SAT UP-|------------|------------|------------|------------|------------|------------|------------|------------|-RESET KBD--| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KK_RESET, +// | |------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + MU_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, +// | |------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|-RGB LIGHT +|------------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_NO, +// | |------------|------------|------------|---FN_1-----|------------|------------|----FN_2----|------------|------------|------------|------------|-RGB LIGHT -|------------| + KC_NO, KC_NO, KC_NO, TT(NUM), KC_NO, KC_NO, TO(BASE), KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ) +}; + +// Interrupt bools +bool lshift = false, ralt = false; + +// Number of items that are saved in prev_kcs +uint8_t prev_indx = 0; +// Used to save the last 6 actual keycodes +uint16_t prev_kcs[6] = {0, 0, 0, 0, 0, 0}; + +/* +Used to add a keycode to a prev_kcs to remember it. +When full the last code gets discarded and replaced by +the new one. +*/ +void add_to_prev(uint16_t kc){ + for (int i=0; i0; i--){ + prev_kcs[i] = prev_kcs[i-1]; + } + prev_kcs[0] = kc; + } else { + prev_kcs[prev_indx] = kc; + prev_indx++; + } +} + +/* +Unregisters all codes saved in prev_kcs and resets prev_indx. +gets called on multiple occasions mainly when shift is released +and when frankenkeycodes are pressed. Prevents output of +wrong characters when really specific key combinations +that would never occur during normal usage are pressed. +*/ +void unreg_prev(void){ + if (prev_indx == 0) + return; + for (int i=0; ievent.pressed) { + unregister_code(KC_LSFT); + register_code(KC_LSFT); + lshift = true; + } else { + unreg_prev(); + unregister_code(KC_LSFT); + lshift = false; + } + return false; + case CK_RALT: + if(record->event.pressed) { + unregister_code(KC_RALT); + register_code(KC_RALT); + ralt = true; + } else { + unreg_prev(); + unregister_code(KC_RALT); + ralt = false; + } + return false; + case CK_BSPC_DEL: + RALT_NO(KC_BSPC,KC_DEL); + break; + case CK_UP_PGUP: + RALT_NO(KC_UP,KC_PGUP); + break; + case CK_DOWN_PGDOWN: + RALT_NO(KC_DOWN,KC_PGDOWN); + break; + case CK_LEFT_HOME: + RALT_NO(KC_LEFT,KC_HOME); + break; + case CK_RIGHT_END: + RALT_NO(KC_RIGHT,KC_END); + break; + case KK_RESET: // Basically, turn off RGB before resetting + if (record->event.pressed) { + key_timer = timer_read32(); + #ifdef RGB_MATRIX_ENABLE + rgb_matrix_disable_noeeprom(); + #endif + } else { + if (timer_elapsed32(key_timer) >= 20) { + reset_keyboard(); + } + } + break; + default: + if(record->event.pressed) { + timer_timeout_keymap(); + if (lshift) + register_code(KC_LSFT); + else + unregister_code(KC_LSFT); + + if (ralt) + register_code(KC_ALGR); + else + unregister_code(KC_ALGR); + } + break; + } + return true; +} + +__attribute__((weak)) +void timer_timeout_keymap(void){ +} diff --git a/keyboards/nack/keymaps/pastapojken/keymap.h b/keyboards/nack/keymaps/pastapojken/keymap.h new file mode 100644 index 000000000000..aaeed707069f --- /dev/null +++ b/keyboards/nack/keymaps/pastapojken/keymap.h @@ -0,0 +1,122 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 TAPPING_TOGGLE 2 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) +#endif + +void add_to_prev(uint16_t kc); +void unreg_prev(void); +void timer_timeout_keymap(void); +bool process_record_user(uint16_t keycode, keyrecord_t *record); + +// Normal shift status +#define SHIFT_NORM(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + if (lshift) { \ + register_code(KC_LSFT); \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(KC_LSFT); \ + unregister_code(kc1); \ + register_code(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ +} \ +return false; + +// Always shifted +#define SHIFT_ALL(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + register_code(KC_LSFT); \ + if (lshift) { \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(kc1); \ + register_code(kc1); \ + add_to_prev(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ + unreg_prev(); \ + if (lshift) \ + register_code(KC_LSFT); \ + else \ + unregister_code(KC_LSFT); \ +} \ +return false; + +// Never shifted +#define SHIFT_NO(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + unregister_code(KC_LSFT); \ + if (lshift) { \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(kc1); \ + register_code(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ + unreg_prev(); \ + if (lshift) \ + register_code(KC_LSFT); \ + else \ + unregister_code(KC_LSFT); \ +} \ +return false; + +//Never RALT +#define RALT_NO(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + unregister_code(KC_RALT); \ + if (ralt) { \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(kc1); \ + register_code(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ + unreg_prev(); \ + if (ralt) \ + register_code(KC_RALT); \ + else \ + unregister_code(KC_RALT); \ +} \ +return false; diff --git a/keyboards/nack/keymaps/pastapojken/readme.md b/keyboards/nack/keymaps/pastapojken/readme.md new file mode 100644 index 000000000000..73e1e2add9d9 --- /dev/null +++ b/keyboards/nack/keymaps/pastapojken/readme.md @@ -0,0 +1 @@ +# pastapojken's keymap for nack diff --git a/keyboards/nack/mcuconf.h b/keyboards/nack/mcuconf.h new file mode 100644 index 000000000000..0853242dad9a --- /dev/null +++ b/keyboards/nack/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 FALSE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 TRUE +#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 TRUE +#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 TRUE +#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 TRUE +#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/keyboards/nack/nack.c b/keyboards/nack/nack.c new file mode 100644 index 000000000000..185a96fdad7d --- /dev/null +++ b/keyboards/nack/nack.c @@ -0,0 +1,40 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + 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, 32, 33, 34, 35, 36, 37, 38 }, + { 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 } + }, { + // LED Index to Physical Position + { 0, 0 }, { 19, 0 }, { 38, 0 }, { 57, 0 }, { 76, 0 }, { 95, 0 }, { 114, 0 }, { 133, 0 }, { 152, 0 }, { 171, 0 }, { 190, 0 }, { 209, 0 }, { 223, 0 }, + { 0, 21 }, { 19, 21 }, { 38, 21 }, { 57, 21 }, { 76, 21 }, { 95, 21 }, { 114, 21 }, { 133, 21 }, { 152, 21 }, { 171, 21 }, { 190, 21 }, { 209, 21 }, { 223, 21 }, + { 0, 42 }, { 19, 42 }, { 38, 42 }, { 57, 42 }, { 76, 42 }, { 95, 42 }, { 114, 42 }, { 133, 42 }, { 152, 42 }, { 171, 42 }, { 190, 42 }, { 209, 42 }, { 223, 42 }, + { 0, 63 }, { 19, 63 }, { 38, 63 }, { 57, 63 }, { 76, 63 }, { 95, 63 }, { 114, 63 }, { 133, 63 }, { 152, 63 }, { 171, 63 }, { 190, 63 }, { 209, 63 }, { 223, 63 } + }, { + // 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, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + } }; +#endif + diff --git a/keyboards/nack/nack.h b/keyboards/nack/nack.h new file mode 100644 index 000000000000..30e310a486c6 --- /dev/null +++ b/keyboards/nack/nack.h @@ -0,0 +1,31 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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\ +) \ +{ \ + { 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, k46, k47, k48, k49, k50, k51 },\ +} diff --git a/keyboards/nack/readme.md b/keyboards/nack/readme.md new file mode 100644 index 000000000000..6a1adeaf7be0 --- /dev/null +++ b/keyboards/nack/readme.md @@ -0,0 +1,21 @@ +# nack + + +A ISO-friendly ortholinear keyboard, 13x4 keys. +See [screenshots](https://imgur.com/a/PPO18Lc). + +* Keyboard Maintainer: [pastapojken](https://github.com/pastapojken) +* Hardware Supported: nack PCB +* Hardware Availability: [github repo](https://github.com/pastapojken/nack) + +Make example for this keyboard (after setting up your build environment): + + make nack:default + +Flashing example for this keyboard: + + make nack:default:flash + +To reset the board into bootloader mode, press the reset button on top of the keyboard. It's the tiny button to the upper left of the board. If you are using the official case/plate you might need to use something thin to reach & press it. + +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/keyboards/nack/rules.mk b/keyboards/nack/rules.mk new file mode 100644 index 000000000000..a3374bf21881 --- /dev/null +++ b/keyboards/nack/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F303 + +# 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 = yes # Audio output +RGB_MATRIX_ENABLE = WS2812 +WS2812_DRIVER = spi +AUDIO_DRIVER = dac_additive # How to drive the 2 speakers +UNICODE_ENABLE = yes # Unicode support diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c new file mode 100644 index 000000000000..0b6a974426cd --- /dev/null +++ b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c @@ -0,0 +1,139 @@ +/* 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +static void render_logo(void) { + static const char PROGMEM nibble_logo[] = { + 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, + 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, + 0x1f, 0x1f, 0x1f, 0x3f, 0x3e, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0xfe, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x3f, 0x3e, 0xfe, 0xfe, + 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xff, 0xff, 0xff, + 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1e, 0x0c, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x0f, 0x1f, 0x7f, 0xff, 0xfe, 0xf8, 0xf0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xfc, 0xff, 0xff, 0xbf, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xff, 0xff, + 0xff, 0xbf, 0x1f, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1f, 0x7f, 0xff, + 0xfe, 0xfc, 0xf0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xe0, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, + 0xff, 0xff, 0xff, 0xfe, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0x7c, 0x7c, 0x7e, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x7f, + 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x7c, 0x7c, 0x7e, + 0x3f, 0x3f, 0x1f, 0x0f, 0x07, 0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x30, 0x3f, 0x7f, 0xff, 0xff, 0xff, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x30, 0x00 + }; + // Host Keyboard Layer Status + oled_write_raw_P(nibble_logo, sizeof(nibble_logo)); +} + +void oled_task_user(void) { + render_logo(); +} +#endif + +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; +} + + +void encoder_update_kb(uint8_t index, bool clockwise) { + 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/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk b/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk new file mode 100644 index 000000000000..cf4068471fc1 --- /dev/null +++ b/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk @@ -0,0 +1 @@ +ENABLE_OLED_DRIVER = yes \ No newline at end of file diff --git a/keyboards/omnikeyish/config.h b/keyboards/omnikeyish/config.h index d510c64c9b9f..1bce90526f97 100644 --- a/keyboards/omnikeyish/config.h +++ b/keyboards/omnikeyish/config.h @@ -24,9 +24,9 @@ #endif #define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, C7, C6, C5, C4, C3, C2, C1, C0, B0, B1, B2, B3, B4, B5, B6 } -#define NUMLOCKLEDPIN E0 -#define CAPSLOCKLEDPIN E1 -#define SCROLLLOCKLEDPIN B7 +#define LED_NUM_LOCK_PIN E0 +#define LED_CAPS_LOCK_PIN E1 +#define LED_SCROLL_LOCK_PIN B7 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c index d7b68d41abab..9b8ce7b972e9 100644 --- a/keyboards/omnikeyish/omnikeyish.c +++ b/keyboards/omnikeyish/omnikeyish.c @@ -1,11 +1,6 @@ #include "omnikeyish.h" void keyboard_pre_init_user(void) { - /* Configure LED driving pins as output pins */ - setPinOutput(NUMLOCKLEDPIN); - setPinOutput(CAPSLOCKLEDPIN); - setPinOutput(SCROLLLOCKLEDPIN); - dynamic_macro_init(); } @@ -33,23 +28,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } - -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(NUMLOCKLEDPIN); - } else { - writePinLow(NUMLOCKLEDPIN); - } - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(CAPSLOCKLEDPIN); - } else { - writePinLow(CAPSLOCKLEDPIN); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(SCROLLLOCKLEDPIN); - } else { - writePinLow(SCROLLLOCKLEDPIN); - } -} \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h index 77ba89c292e4..4b52d18f3f70 100644 --- a/keyboards/peiorisboards/ixora/config.h +++ b/keyboards/peiorisboards/ixora/config.h @@ -22,3 +22,7 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 0 + +#define LED_NUM_LOCK_PIN A9 +#define LED_CAPS_LOCK_PIN A10 +#define LED_SCROLL_LOCK_PIN A8 diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/peiorisboards/ixora/ixora.c index 7996db629f25..f2dcd864aadd 100644 --- a/keyboards/peiorisboards/ixora/ixora.c +++ b/keyboards/peiorisboards/ixora/ixora.c @@ -1,43 +1 @@ #include "ixora.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(A8); - setPinOutput(A9); - setPinOutput(A10); - writePinLow(A8); - writePinLow(A9); - writePinLow(A10); - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(A10); - } else { - writePinLow(A10); - } - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(A9); - } else { - writePinLow(A9); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(A8); - } else { - writePinLow(A8); - } - led_set_user(usb_led); -} diff --git a/keyboards/planck/keymaps/bghull/keymap.c b/keyboards/planck/keymaps/bghull/keymap.c new file mode 100644 index 000000000000..3539ac7bf767 --- /dev/null +++ b/keyboards/planck/keymaps/bghull/keymap.c @@ -0,0 +1,101 @@ +/* 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 "keymap_steno.h" + +enum planck_layers { + _QWERTY, + _STENO, + _NUMPAD, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |NUMPAD| A | S | D | F | G | H | J | K | L | ; : | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , < | . > | up | / ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Es/Ctl|MACROS|STENO | Alt | Bspc | Space | Ctrl | ' " | lt | dn | rt | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + LGUI_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + MO(_NUMPAD), 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, + LCTL_T(KC_ESC),MO(_FUNC),DF(_STENO), KC_LALT, KC_BSPC, KC_SPC ,_______ , KC_LCTL, KC_QUOT, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |QWERTY| A | O | | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ +[_STENO] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + XXXXXXX, XXXXXXX, DF(_QWERTY),STN_A,STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), + +/* + * ,-----------------------------------------------------------------------------------. + * | |RClick| MsU |LClick|WheelU| ( | ) | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MsL | MsD | MsR |WheelD| [{ | ]} | 4 | 5 | 6 | + | -_ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Mute | VolD | VolU | `~ | _ | = | 1 | 2 | 3 | PgUp | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |RESET | | | | | . | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_grid( + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_MINS, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRAVE, KC_UNDS, KC_EQL, KC_1, KC_2, KC_3, KC_PGUP, KC_BSLS, + _______, XXXXXXX, RESET, _______, _______, _______, _______, _______, KC_PDOT, KC_HOME, KC_PGDN, KC_END +), + +/* Dynamic macros + Winkey combos + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | W2 | | | | | | | | | | | RESET| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | W3 | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | W4 | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT_planck_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, + LGUI(KC_2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + LGUI(KC_3), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + LGUI(KC_4), _______, DM_REC1, DM_PLY1, DM_RSTP, _______, _______, _______, _______, _______, _______, _______ +), + +}; diff --git a/keyboards/planck/keymaps/bghull/rules.mk b/keyboards/planck/keymaps/bghull/rules.mk new file mode 100644 index 000000000000..9711c485d7af --- /dev/null +++ b/keyboards/planck/keymaps/bghull/rules.mk @@ -0,0 +1,5 @@ +SRC += muse.c +AUTO_SHIFT_ENABLE = yes +MOUSEKEY_ENABLE = yes +STENO_ENABLE = yes +AUDIO_ENABLE = no \ No newline at end of file diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c index 7e44feaf7462..788a0a1f08e8 100644 --- a/keyboards/ploopyco/mouse/mouse.c +++ b/keyboards/ploopyco/mouse/mouse.c @@ -140,7 +140,7 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { 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); + process_mouse_user(mouse_report, data.dx, data.dy); } } @@ -171,31 +171,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { 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; + currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); } 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; + currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); } pointing_device_set_report(currentReport); pointing_device_send(); } + #endif return true; diff --git a/keyboards/ploopyco/mouse/readme.md b/keyboards/ploopyco/mouse/readme.md index fd0f932c62ab..5532a199865a 100644 --- a/keyboards/ploopyco/mouse/readme.md +++ b/keyboards/ploopyco/mouse/readme.md @@ -17,7 +17,7 @@ To jump to the bootloader, hold down "Button 4" (the "forward" button on the lef 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 +# Customzing your PloopyCo Mouse 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. diff --git a/keyboards/ploopyco/pmw3360.c b/keyboards/ploopyco/pmw3360.c index 1bd03e8b92ae..8007fecef661 100644 --- a/keyboards/ploopyco/pmw3360.c +++ b/keyboards/ploopyco/pmw3360.c @@ -213,7 +213,7 @@ report_pmw_t pmw_read_burst(void) { data.dx |= (data.mdx << 8); data.dx = data.dx * -1; data.dy |= (data.mdy << 8); - // data.dy = data.dy * -1; + data.dy = data.dy * -1; spi_stop(); diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index bd88d5c5aa4a..714f610346df 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -58,26 +58,3 @@ To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIO 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/keyboards/ploopyco/trackball/rev1/readme.md b/keyboards/ploopyco/trackball/rev1/readme.md new file mode 100644 index 000000000000..c0b02237237e --- /dev/null +++ b/keyboards/ploopyco/trackball/rev1/readme.md @@ -0,0 +1,30 @@ +See the [main readme](../readme.md) for more details. + +This is just the rev 1.001-1.004 trackball + +# Programming QMK-DFU onto the PloopyCo Trackball (Advanced) + +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 "production" 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` | + +If you're using QMK DFU, you'll also need to add `BOOTLOADER=qmk-dfu` to your keymap's rules.mk file, to ensure that the reboot/reset works correctly. Otherwise, it will jump right back into the firmware, like nothing happened. + +Additionally, once you've flashed the qmk-dfu bootloader onto your device, you will no longer be able to use the Arduino IDE to flash the board. You'll need to use the command line or QMK Toolbox to flash it. diff --git a/keyboards/ploopyco/trackball/rev1/rules.mk b/keyboards/ploopyco/trackball/rev1/rules.mk index e69de29bb2d1..6ded83e74b11 100644 --- a/keyboards/ploopyco/trackball/rev1/rules.mk +++ b/keyboards/ploopyco/trackball/rev1/rules.mk @@ -0,0 +1,2 @@ +# Bootloader selection +BOOTLOADER = caterina diff --git a/keyboards/ploopyco/trackball/rev1_005/readme.md b/keyboards/ploopyco/trackball/rev1_005/readme.md new file mode 100644 index 000000000000..a923d165911b --- /dev/null +++ b/keyboards/ploopyco/trackball/rev1_005/readme.md @@ -0,0 +1,3 @@ +See the [main readme](../readme.md) for more details. + +This is just the rev 1.005+ trackball diff --git a/keyboards/ploopyco/trackball/rev1_005/rules.mk b/keyboards/ploopyco/trackball/rev1_005/rules.mk index e69de29bb2d1..bddd4e389e44 100644 --- a/keyboards/ploopyco/trackball/rev1_005/rules.mk +++ b/keyboards/ploopyco/trackball/rev1_005/rules.mk @@ -0,0 +1,2 @@ +# Bootloader selection +BOOTLOADER = atmel-dfu diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk index 9e252fbddb03..4ec870e659b9 100644 --- a/keyboards/ploopyco/trackball/rules.mk +++ b/keyboards/ploopyco/trackball/rules.mk @@ -4,9 +4,6 @@ MCU = atmega32u4 # Processor frequency F_CPU = 8000000 -# Bootloader selection -BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c index 7b7b680271b9..94f28434609f 100644 --- a/keyboards/ploopyco/trackball/trackball.c +++ b/keyboards/ploopyco/trackball/trackball.c @@ -140,7 +140,7 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { 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); + process_mouse_user(mouse_report, data.dx, -data.dy); } } @@ -172,27 +172,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { 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; + currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); } 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; + currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); } pointing_device_set_report(currentReport); pointing_device_send(); diff --git a/keyboards/preonic/keymaps/bghull/keymap.c b/keyboards/preonic/keymaps/bghull/keymap.c new file mode 100644 index 000000000000..9a3ca0af4fab --- /dev/null +++ b/keyboards/preonic/keymaps/bghull/keymap.c @@ -0,0 +1,88 @@ +/* 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 "keymap_steno.h" + +enum preonic_layers { + _QWERTY, + _STENO, + _NUMPAD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ' " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |NUMPAD| A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up | / ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Es/Ctl| FUNC | STENO| Alt | Bspc | Space | Ctrl | Left | Down | Right| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + _______ , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_QUOT, + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + MO(_NUMPAD), 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, + LCTL_T(KC_ESC),KC_LGUI, DF(_STENO), KC_LALT, _______, KC_BSPC, _______, KC_SPC, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Steno + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |QWERTY| A | O | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ +[_STENO] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + XXXXXXX, XXXXXXX, DF(_QWERTY),STN_A,XXXXXXX, STN_O, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), + +/* + * ,-----------------------------------------------------------------------------------. + * | |RClick| MsU |LClick|WheelU| ( | ) | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MsL | MsD | MsR |WheelD| [{ | ]} | 4 | 5 | 6 | + | -_ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Mute | VolD | VolU | `~ | _ | = | 1 | 2 | 3 | PgUp | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | RESET| | | | | . | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( + _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_MINS, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRAVE, KC_UNDS, KC_EQL, KC_1, KC_2, KC_3, KC_PGUP, KC_BSLS, + _______, XXXXXXX, RESET, _______, _______, _______, _______, _______, KC_PDOT, KC_HOME, KC_PGDN, KC_END +) + +}; diff --git a/keyboards/preonic/keymaps/bghull/rules.mk b/keyboards/preonic/keymaps/bghull/rules.mk new file mode 100644 index 000000000000..9711c485d7af --- /dev/null +++ b/keyboards/preonic/keymaps/bghull/rules.mk @@ -0,0 +1,5 @@ +SRC += muse.c +AUTO_SHIFT_ENABLE = yes +MOUSEKEY_ENABLE = yes +STENO_ENABLE = yes +AUDIO_ENABLE = no \ No newline at end of file diff --git a/keyboards/primekb/prime_e/keymaps/talljoe/config.h b/keyboards/primekb/prime_e/keymaps/talljoe/config.h new file mode 100644 index 000000000000..7ecea9c151a5 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/talljoe/config.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 SPACE_COUNT 2 + +#define TEMPLATE( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + 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, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ +) \ +LAYOUT( \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, K2D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ + K30, K32, K33, K34, K35, K36, K2B, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K44, K46, K48, K49, K3D \ +) diff --git a/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c b/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c new file mode 100644 index 000000000000..7812add812b3 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/keyboards/punk75/keymaps/dsanchezseco/keymap.c b/keyboards/punk75/keymaps/dsanchezseco/keymap.c index 3c224b162817..e3fb62f036db 100644 --- a/keyboards/punk75/keymaps/dsanchezseco/keymap.c +++ b/keyboards/punk75/keymaps/dsanchezseco/keymap.c @@ -20,6 +20,7 @@ // Defines names for use in layer keycodes and the keymap enum layer_names { _DVORAK, + _DVORAK_NUM, _QWERTY, _FN }; @@ -33,6 +34,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_END, KC_MPLY, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, KC_LCTL, KC_LGUI, KC_LALT, _______, MO(_FN), KC_SPC, KC_SPC, KC_MPRV, KC_BSPC, KC_BSPC, MO(_FN), _______, KC_RALT, KC_RGUI, KC_RCTL ), + [_DVORAK_NUM] = LAYOUT_ortho_5x15( /* DVORAK with center NUMPAD*/ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MUTE, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_P7, KC_P8, KC_P9, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_P4, KC_P5, KC_P6, 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_P1, KC_P2, KC_P3, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, _______, MO(_FN), KC_SPC, KC_SPC, KC_P0, KC_BSPC, KC_BSPC, MO(_FN), _______, KC_RALT, KC_RGUI, KC_RCTL + ), [_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY */ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MUTE, @@ -43,11 +51,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DF(_QWERTY), _______, DF(_DVORAK), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DF(_QWERTY), DF(_DVORAK_NUM), DF(_DVORAK), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, MO(_FN), _______, _______, _______, KC_DEL, KC_DEL, MO(_FN), _______, _______, _______, _______ + _______, _______, _______, _______, MO(_FN), _______, _______, KC_NLCK, KC_DEL, KC_DEL, MO(_FN), _______, _______, _______, _______ ) }; diff --git a/keyboards/qvex/lynepad/config.h b/keyboards/qvex/lynepad/config.h new file mode 100644 index 000000000000..d1a5c2eb0bf0 --- /dev/null +++ b/keyboards/qvex/lynepad/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2020 KemoNine + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x5156 +#define PRODUCT_ID 0x4C50 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QVEX +#define PRODUCT Lynepad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* Basic matrix config */ +#define MATRIX_ROW_PINS { C7, F7, F6} +#define MATRIX_COL_PINS { F0, F1, F4, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Encoders */ +#define ENCODERS_PAD_A { D0, B5 } +#define ENCODERS_PAD_B { D1, D6 } + +/* LEDs */ +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#undef RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 +#endif + +/* Definitions for encoder tilt/press support */ +#define ENC_TILT_THRESHOLD 1 +#define PIN_TW_SW D2 // Center +#define PIN_RJ_SW C6 // Center +#define PIN_RJ_DIR_A D4 // Up +#define PIN_RJ_DIR_B D7 // Left +#define PIN_RJ_DIR_C B6 // Down +#define PIN_RJ_DIR_D B4 // Right diff --git a/keyboards/qvex/lynepad/info.json b/keyboards/qvex/lynepad/info.json new file mode 100644 index 000000000000..405614e9f022 --- /dev/null +++ b/keyboards/qvex/lynepad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "QVEX Lynepad", + "url": "https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/", + "maintainer": "KemoNine", + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "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":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}] + } + } + } \ No newline at end of file diff --git a/keyboards/qvex/lynepad/keymaps/default/keymap.c b/keyboards/qvex/lynepad/keymaps/default/keymap.c new file mode 100644 index 000000000000..37e015e62468 --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +/* Copyright 2020 KemoNine + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 (Base Layer) Default Layer + * |----------------------------| + * | 1 | 2 | 3 | 4 | | + * | 5 | 6 | 7 | 8 | | + * | 9 | 10 | 11 | | + * |----------------------------| + */ +[0] = LAYOUT( + KC_MS_BTN4, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, + KC_MS_BTN5, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, + KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2 + ) +}; + +// Standard encoder functionality +void encoder_update_user(uint8_t index, bool clockwise) { + // Process encoder rotational movements + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_AUDIO_VOL_DOWN); + } else { + tap_code(KC_AUDIO_VOL_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } +} + +// Encoder press / tilt event handling +// the core lynepad implementation will update the below variables on each matrix scan +// Update the various codes below for customizing the tilt / push config + +extern int16_t enc1Center; +extern int16_t enc1CenterPrev; +extern int16_t enc2Center; +extern int16_t enc2CenterPrev; +extern int16_t enc2Up; +extern int16_t enc2UpPrev; +extern int16_t enc2Down; +extern int16_t enc2DownPrev; +extern int16_t enc2Left; +extern int16_t enc2LeftPrev; +extern int16_t enc2Right; +extern int16_t enc2RightPrev; + +void matrix_scan_user(void) { + if (enc1Center != enc1CenterPrev) { + if (enc1Center < ENC_TILT_THRESHOLD) { + } + else { + reset_keyboard(); + } + } + if (enc2Center != enc2CenterPrev) { + if (enc2Center < ENC_TILT_THRESHOLD) { + register_code16(KC_MS_BTN3); + } + else { + unregister_code16(KC_MS_BTN3); + } + /* + * Encoder sets ALL values when center is pressed so bail out at this point\ + * to avoid the rest of the encoder buttons registering events + */ + return; + } + if (enc2Up != enc2UpPrev) { + if (enc2Up < ENC_TILT_THRESHOLD) { + } + else { + rgblight_increase_val_noeeprom(); + } + } + if (enc2Down != enc2DownPrev) { + if (enc2Down < ENC_TILT_THRESHOLD) { + } + else { + rgblight_decrease_val_noeeprom(); + } + } + if (enc2Left != enc2LeftPrev) { + if (enc2Left < ENC_TILT_THRESHOLD) { + } + else { + rgblight_toggle_noeeprom(); + } + } + if (enc2Right != enc2RightPrev) { + if (enc2Right < ENC_TILT_THRESHOLD) { + } + else { + rgblight_step_noeeprom(); + } + } +} diff --git a/keyboards/qvex/lynepad/keymaps/default/readme.md b/keyboards/qvex/lynepad/keymaps/default/readme.md new file mode 100644 index 000000000000..8884d1a91a2f --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for lynepad diff --git a/keyboards/qvex/lynepad/lynepad.c b/keyboards/qvex/lynepad/lynepad.c new file mode 100644 index 000000000000..33620d9da323 --- /dev/null +++ b/keyboards/qvex/lynepad/lynepad.c @@ -0,0 +1,58 @@ +/* +Copyright 2020 KemoNine +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "lynepad.h" + +void keyboard_pre_init_kb(void) { + // Encoder pins + setPinInput(PIN_TW_SW); + setPinInput(PIN_RJ_SW); + setPinInput(PIN_RJ_DIR_A); + setPinInput(PIN_RJ_DIR_C); + setPinInput(PIN_RJ_DIR_B); + setPinInput(PIN_RJ_DIR_D); + + keyboard_pre_init_user(); +} + +int16_t enc1Center = 1; +int16_t enc1CenterPrev = 1; +int16_t enc2Center = 1; +int16_t enc2CenterPrev = 1; +int16_t enc2Up = 1; +int16_t enc2UpPrev = 1; +int16_t enc2Down = 1; +int16_t enc2DownPrev = 1; +int16_t enc2Left = 1; +int16_t enc2LeftPrev = 1; +int16_t enc2Right = 1; +int16_t enc2RightPrev = 1; + +void matrix_scan_kb(void) { + enc1CenterPrev = enc1Center; + enc1Center = readPin(PIN_TW_SW); + + enc2CenterPrev = enc2Center; + enc2Center = readPin(PIN_RJ_SW); + enc2UpPrev = enc2Up; + enc2Up = readPin(PIN_RJ_DIR_A); + enc2DownPrev = enc2Down; + enc2Down = readPin(PIN_RJ_DIR_C); + enc2LeftPrev = enc2Left; + enc2Left = readPin(PIN_RJ_DIR_B); + enc2RightPrev = enc2Right; + enc2Right = readPin(PIN_RJ_DIR_D); + + // Ensure any user customizations are called (for some reason this wasn't happening by default) + matrix_scan_user(); +} diff --git a/keyboards/qvex/lynepad/lynepad.h b/keyboards/qvex/lynepad/lynepad.h new file mode 100644 index 000000000000..2a3015ceea0d --- /dev/null +++ b/keyboards/qvex/lynepad/lynepad.h @@ -0,0 +1,37 @@ +/* Copyright 2020 KemoNine + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + k10, k11, k12, k13, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO } \ +} diff --git a/keyboards/qvex/lynepad/readme.md b/keyboards/qvex/lynepad/readme.md new file mode 100644 index 000000000000..68dd85a673d3 --- /dev/null +++ b/keyboards/qvex/lynepad/readme.md @@ -0,0 +1,13 @@ +# QVEX Lynepad + +Macro pad with 11 keys and 2 rotary encoders. + +* Keyboard Maintainer: [KemoNine](https://git.kemonine.info/kemonine/keyboard) +* Hardware Supported: QVEX Lynepad: macro keypad +* Hardware Availability: Tindie [Keyboard Kit](https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/) + +Make example for this macro pad (after setting up your build environment): + + make qvex/lynepad: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/keyboards/qvex/lynepad/rules.mk b/keyboards/qvex/lynepad/rules.mk new file mode 100644 index 000000000000..7b05cfb9b828 --- /dev/null +++ b/keyboards/qvex/lynepad/rules.mk @@ -0,0 +1,21 @@ +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable the encoders diff --git a/keyboards/qvex/readme.md b/keyboards/qvex/readme.md new file mode 100644 index 000000000000..854fd4d767b1 --- /dev/null +++ b/keyboards/qvex/readme.md @@ -0,0 +1,7 @@ +# QVEX + +QVEX is a keyboard vendor based in Czechia + +## Online Stores + +**Website:** https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/ diff --git a/keyboards/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h index 3fecdcac3bc4..d920596ec93a 100755 --- a/keyboards/redscarf_iiplus/verb/config.h +++ b/keyboards/redscarf_iiplus/verb/config.h @@ -49,10 +49,9 @@ along with this program. If not, see . /* 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 D0 // or D1, D2, D3, E6 +#define LED_NUM_LOCK_PIN E6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/redscarf_iiplus/verb/verb.c b/keyboards/redscarf_iiplus/verb/verb.c index 62ea1859d355..27a3d8153315 100755 --- a/keyboards/redscarf_iiplus/verb/verb.c +++ b/keyboards/redscarf_iiplus/verb/verb.c @@ -14,38 +14,3 @@ * along with this program. If not, see . */ #include "verb.h" - -// 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 - - matrix_init_user(); - led_init_ports(); -} - -void led_init_ports(void) { - setPinOutput(C7); - setPinOutput(E6); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/reviung34/keymaps/default/keymap.c b/keyboards/reviung34/keymaps/default/keymap.c index fe373f53b737..66939d24697f 100755 --- a/keyboards/reviung34/keymaps/default/keymap.c +++ b/keyboards/reviung34/keymaps/default/keymap.c @@ -16,48 +16,51 @@ #include QMK_KEYBOARD_H enum layer_names { - _BASE, - _LOWER, - _RAISE, - _ADJUST + _BASE, + _LOWER, + _RAISE, + _ADJUST }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define CT_TB LCTL_T(KC_TAB) #define CT_Q LCTL_T(KC_Q) +#define CT_CM RCTL_T(KC_COMM) #define SF_Z LSFT_T(KC_Z) #define SF_SS RSFT_T(KC_SLSH) #define AL_X LALT_T(KC_X) +#define AL_DT RALT_T(KC_DOT) +#define RA_SP LT(RAISE, KC_SPC) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_reviung34( - CT_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, - SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SF_SS, - CT_TB, LOWER, RAISE, KC_SPC + CT_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, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, + KC_TAB, KC_BSPC, LOWER, RA_SP ), - + [_LOWER] = LAYOUT_reviung34( - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, - KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, - _______, _______, _______, KC_BSPC + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, + _______, _______, _______, _______ ), - - [_RAISE] = LAYOUT_reviung34( - 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_DQUO, - KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_CAPS, KC_TAB, KC_RALT, KC_RCTL, KC_RSFT, KC_BSPC, - _______, _______, _______, KC_ENT + + [_RAISE] = LAYOUT_reviung34( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, + _______, _______, _______, _______ ), [_ADJUST] = LAYOUT_reviung34( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F7, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, XXXXXXX + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______ ), }; diff --git a/keyboards/reviung34/keymaps/default_2uL/keymap.c b/keyboards/reviung34/keymaps/default_2uL/keymap.c new file mode 100755 index 000000000000..767c0ff4c6f2 --- /dev/null +++ b/keyboards/reviung34/keymaps/default_2uL/keymap.c @@ -0,0 +1,69 @@ +/* Copyright 2019 gtips + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(KC_Q) +#define CT_CM RCTL_T(KC_COMM) +#define SF_Z LSFT_T(KC_Z) +#define SF_SS RSFT_T(KC_SLSH) +#define AL_X LALT_T(KC_X) +#define AL_DT RALT_T(KC_DOT) +#define RA_SP LT(RAISE, KC_SPC) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung34_2uL( + CT_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, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, + KC_TAB, LOWER, RA_SP + ), + + [_LOWER] = LAYOUT_reviung34_2uL( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, + _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung34_2uL( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, + _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_reviung34_2uL( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung34/keymaps/default_2uL/readme.md b/keyboards/reviung34/keymaps/default_2uL/readme.md new file mode 100755 index 000000000000..2e4619fae837 --- /dev/null +++ b/keyboards/reviung34/keymaps/default_2uL/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung34 diff --git a/keyboards/reviung34/keymaps/default_jp/keymap.c b/keyboards/reviung34/keymaps/default_jp/keymap.c new file mode 100755 index 000000000000..c37d87662c9c --- /dev/null +++ b/keyboards/reviung34/keymaps/default_jp/keymap.c @@ -0,0 +1,70 @@ +/* Copyright 2019 gtips + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(JP_Q) +#define CT_CM RCTL_T(JP_COMM) +#define SF_Z LSFT_T(JP_Z) +#define SF_SS RSFT_T(JP_SLSH) +#define AL_X LALT_T(JP_X) +#define AL_DT RALT_T(JP_DOT) +#define RA_SP LT(RAISE, KC_SPC) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung34( + CT_Q, JP_W, JP_E, JP_R, JP_T, JP_Y, JP_U, JP_I, JP_O, JP_P, + JP_A, JP_S, JP_D, JP_F, JP_G, JP_H, JP_J, JP_K, JP_L, KC_ENT, + SF_Z, AL_X, JP_C, JP_V, JP_B, JP_N, JP_M, CT_CM, AL_DT, SF_SS, + KC_TAB, KC_BSPC, LOWER, RA_SP + ), + + [_LOWER] = LAYOUT_reviung34( + JP_EXLM, JP_AT, JP_HASH, JP_DLR, JP_PERC, JP_CIRC, JP_AMPR, JP_ASTR, JP_LPRN, JP_RPRN, + JP_UNDS, JP_PLUS, JP_LCBR, JP_RCBR, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, JP_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, JP_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, + _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung34( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, + JP_MINS, JP_EQL, JP_LBRC, JP_RBRC, JP_YEN, KC_RO, XXXXXXX, JP_GRV, JP_TILD, JP_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, JP_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, + _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_reviung34( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung34/keymaps/default_jp/readme.md b/keyboards/reviung34/keymaps/default_jp/readme.md new file mode 100755 index 000000000000..2e4619fae837 --- /dev/null +++ b/keyboards/reviung34/keymaps/default_jp/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung34 diff --git a/keyboards/reviung34/reviung34.h b/keyboards/reviung34/reviung34.h index ccf9762f7b54..8385e5c8c29e 100755 --- a/keyboards/reviung34/reviung34.h +++ b/keyboards/reviung34/reviung34.h @@ -29,11 +29,24 @@ K00, K01, K02, K03, K04, K05, K06, K07, K08, K35, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K36, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K37, \ - K32, K33, K34, K38 \ + K32, K33, K34, K38 \ ) \ { \ - { 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 }, \ - { KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, K38 } \ + { 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 }, \ + { KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, K38 } \ +} + +#define LAYOUT_reviung34_2uL( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K35, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K36, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K37, \ + K32, K34, K38 \ +) \ +{ \ + { 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 }, \ + { KC_NO, KC_NO, K32, KC_NO, K34, K35, K36, K37, K38 } \ } diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h new file mode 100644 index 000000000000..a1a2aae9fc8b --- /dev/null +++ b/keyboards/rgbkb/pan/config.h @@ -0,0 +1,43 @@ +/*Copyright 2020 RGBKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x5247 // "RG" - RGBKB +#define PRODUCT_ID 0x8C9C // Pan +#define DEVICE_VER 0x0002 +#define MANUFACTURER RGBKB +#define PRODUCT Pan + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +#define ENCODER_RESOLUTION 4 +#define RGBLED_NUM 64 +#define RGBLIGHT_ANIMATIONS +#define DRIVER_LED_TOTAL RGBLED_NUM + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGBLIGHT_LIMIT_VAL 120 +#define USB_MAX_POWER_CONSUMPTION 500 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c new file mode 100644 index 000000000000..c041c0b57b8e --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c @@ -0,0 +1,117 @@ + /* Copyright 2020 RGBKB + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +// 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. +#include QMK_KEYBOARD_H + +enum layer_number { + _QWERTY, + _COLEMAK, + _FN, + _ADJ +}; + +#define FN_ESC LT(_FN, KC_ESC) +#define FN_CAPS LT(_FN, KC_CAPS) +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + KC_NO, KC_NO, + GRAVE_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_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_RSPC, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_COLEMAK] = LAYOUT_all( + KC_NO, KC_NO, + GRAVE_ESC, 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_FN] = LAYOUT_all( + KC_NO, 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_PSCR, + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, + _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, _______, + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJ] = LAYOUT_all( + KC_NO, 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_PSCR, + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, + _______, _______, _______, RGB_MOD, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, _QWERTY, _COLEMAK + ) +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("RGBKB Pan\n"), false); + oled_write_P(PSTR("Layer: "), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _COLEMAK: + oled_write_P(PSTR("Colemak\n"), false); + break; + case _FN: + oled_write_P(PSTR("Function\n"), false); + break; + case _ADJ: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + // Or use the write_ln shortcut over adding '\n' to the end of your string + //oled_write_ln_P(PSTR("Undefined"), false); + } + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); + oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); +} +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // First encoder - right + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { // Second encoder - left + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/rgbkb/pan/keymaps/default/rules.mk b/keyboards/rgbkb/pan/keymaps/default/rules.mk new file mode 100644 index 000000000000..9ad29c645c0f --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/rules.mk @@ -0,0 +1,6 @@ +# RGB layout selection +RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips +STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. + +# Do not edit past here +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c new file mode 100644 index 000000000000..bc438f2d08d0 --- /dev/null +++ b/keyboards/rgbkb/pan/pan.c @@ -0,0 +1,88 @@ + /* Copyright 2020 RGBKB + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "pan.h" +#include "quantum.h" +#include "rgb_matrix_types.h" + + +#if defined RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 0, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40 }, + { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED } + }, { +#ifdef STAGGERED_RGB_ENCODERS + {0, -19},{228, -19}, + {0, 0}, {14, 0}, {33, 0}, {52, 0}, {71, 0}, {90, 0}, {109, 0}, {128, 0}, {147, 0}, {166, 0}, {185, 0}, {204, 0}, {223, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {223, 57}, {204, 57}, {185, 57}, {171, 57}, {147, 57}, {128, 57}, {109, 57}, {90, 57}, {71, 57}, {52, 57}, {33, 57}, {14, 57}, {0, 57}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, +#elif defined RGB_ENCODERS + {0, -19},{228, -19}, + {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, + {0, 95},{19, 95}, //not used +#elif defined STAGGERED_LAYOUT + {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, {0, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, {0, 0}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, + {0, 95},{19, 95},//not used +#else + {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, + {0, 0},{0, 0}, {0, 0},{0, 0},//not used +#endif + }, { +#ifdef STAGGERED_RGB_ENCODERS + 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#elif defined RGB_ENCODERS + 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#elif defined STAGGERED_LAYOUT + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#else + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#endif + } }; +#endif diff --git a/keyboards/rgbkb/pan/pan.h b/keyboards/rgbkb/pan/pan.h new file mode 100644 index 000000000000..c1b9f77f6df0 --- /dev/null +++ b/keyboards/rgbkb/pan/pan.h @@ -0,0 +1,37 @@ +/* Copyright 2020 RGBKB + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 _x_ KC_NO + +#include "quantum.h" + +#define LAYOUT_all( \ + E01, E02, \ +/* 0 1 2 3 4 5 6 7 8 9 10 11 12 */\ +/* 0 */ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ +/* 1 */ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \ +/* 2 */ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \ +/* 3 */ K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50, \ +/* 4 */ K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62 \ + ) { \ +/* 0 */{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ +/* 1 */{ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, KC_NO }, \ +/* 2 */{ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ +/* 3 */{ K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50 }, \ +/* 4 */{ K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, KC_NO, K62 } \ + } diff --git a/keyboards/rgbkb/pan/post_rules.mk b/keyboards/rgbkb/pan/post_rules.mk new file mode 100644 index 000000000000..7947d1d9bfe7 --- /dev/null +++ b/keyboards/rgbkb/pan/post_rules.mk @@ -0,0 +1,22 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_LAYOUT +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + OPT_DEFS += -DRGB_ENCODERS +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) + endif +endif diff --git a/keyboards/rgbkb/pan/readme.md b/keyboards/rgbkb/pan/readme.md new file mode 100644 index 000000000000..f7041605c635 --- /dev/null +++ b/keyboards/rgbkb/pan/readme.md @@ -0,0 +1,19 @@ +# Pan + +![pan](https://i.imgur.com/Q6pqCFFl.jpg) + +Ortho or Staggered DIY kit with RGB + +* Keyboard Maintainer: [RGBKB](https://github.com/RGBKB) +* Hardware Supported: Pan, atmega32a or Proton-C +* Hardware Availability: [rgbkb.net](https://www.rgbkb.net/), [GitHub](https://github.com/RGBKB/Keyboard-files/tree/master/Pan) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/pan/rev1/32a:default + +If you are using the Proton-C: + + make rgbkb/pan/rev1/proton_c: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/keyboards/rgbkb/pan/rev1/32a/config.h b/keyboards/rgbkb/pan/rev1/32a/config.h new file mode 100644 index 000000000000..ed5d3457c7b9 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/config.h @@ -0,0 +1,24 @@ +/*Copyright 2020 RGBKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 MATRIX_ROW_PINS { D7, D1, D5, D6, C2 } +#define MATRIX_COL_PINS { C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 } +#define ENCODERS_PAD_A { B0, D0 } +#define ENCODERS_PAD_B { B1, B2} +#define RGB_DI_PIN B3 diff --git a/keyboards/rgbkb/pan/rev1/32a/post_rules.mk b/keyboards/rgbkb/pan/rev1/32a/post_rules.mk new file mode 100644 index 000000000000..7947d1d9bfe7 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/post_rules.mk @@ -0,0 +1,22 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_LAYOUT +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + OPT_DEFS += -DRGB_ENCODERS +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) + endif +endif diff --git a/keyboards/rgbkb/pan/rev1/32a/rules.mk b/keyboards/rgbkb/pan/rev1/32a/rules.mk new file mode 100644 index 000000000000..321ecc5c1af7 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp diff --git a/keyboards/rgbkb/pan/rev1/proton_c/config.h b/keyboards/rgbkb/pan/rev1/proton_c/config.h new file mode 100644 index 000000000000..7a909a9a1340 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/config.h @@ -0,0 +1,24 @@ +/*Copyright 2020 RGBKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 MATRIX_ROW_PINS { A15, B10, A14, A13, A7 } +#define MATRIX_COL_PINS { A8, A6, B0, B1, B2, B4, B5, A1, A2, B3, B9, A10, A9 } +#define ENCODERS_PAD_A { B14, B11 } +#define ENCODERS_PAD_B { B15, B12 } +#define RGB_DI_PIN A3 diff --git a/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk new file mode 100644 index 000000000000..7947d1d9bfe7 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk @@ -0,0 +1,22 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_LAYOUT +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + OPT_DEFS += -DRGB_ENCODERS +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) + endif +endif diff --git a/keyboards/rgbkb/pan/rev1/proton_c/rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk new file mode 100644 index 000000000000..b17a3d0316b5 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk @@ -0,0 +1,2 @@ +# MCU name +MCU = STM32F303 diff --git a/keyboards/rgbkb/pan/rev1/rules.mk b/keyboards/rgbkb/pan/rev1/rules.mk new file mode 100644 index 000000000000..4d3c0f6679a0 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/rules.mk @@ -0,0 +1,2 @@ +# The default configuration is a atmega32a +DEFAULT_FOLDER = rgbkb/pan/rev1/32a diff --git a/keyboards/rgbkb/pan/rules.mk b/keyboards/rgbkb/pan/rules.mk new file mode 100644 index 000000000000..1960304505e3 --- /dev/null +++ b/keyboards/rgbkb/pan/rules.mk @@ -0,0 +1,25 @@ +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 +WS2812_DRIVER = bitbang +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes + +# RGB layout selection +RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips +STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. + +# Default to revision 1 +DEFAULT_FOLDER = rgbkb/pan/rev1 diff --git a/keyboards/rpiguy9907/southpaw66/config.h b/keyboards/rpiguy9907/southpaw66/config.h new file mode 100644 index 000000000000..242b4a7c449b --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/config.h @@ -0,0 +1,53 @@ + /* 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 "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6077 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rpiguy9907 +#define PRODUCT Southpaw66 + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 10 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D7, C6, D4, D0, D1, D2, D3 } +#define MATRIX_COL_PINS { E6, B4, B5, F4, F5, F6, F7, B1, B3, B2 } +#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 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/rpiguy9907/southpaw66/info.json b/keyboards/rpiguy9907/southpaw66/info.json new file mode 100644 index 000000000000..80d78a5d98e0 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "Southpaw66", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + + "layout": [ + {"label":"Insert", "x":0, "y":0}, + {"label":"Esc", "x":1.5, "y":0}, + {"label":"1", "x":2.5, "y":0}, + {"label":"2", "x":3.5, "y":0}, + {"label":"3", "x":4.5, "y":0}, + {"label":"4", "x":5.5, "y":0}, + {"label":"5", "x":6.5, "y":0}, + {"label":"6", "x":7.5, "y":0}, + {"label":"7", "x":8.5, "y":0}, + {"label":"8", "x":9.5, "y":0}, + {"label":"9", "x":10.5, "y":0}, + {"label":"0", "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":"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":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":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":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":"Up", "x":1, "y":3}, + {"label":"Shift", "x":2, "y":3, "w":1.75}, + {"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":"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":"Left", "x":0, "y":4}, + {"label":"Down", "x":1, "y":4}, + {"label":"Right", "x":2, "y":4}, + {"label":"Ctrl", "x":3, "y":4, "w":1.5}, + {"label":"Alt", "x":4.5, "y":4}, + {"label":"Space", "x":5.5, "y":4, "w":7}, + {"label":"Win", "x":12.5, "y":4}, + {"label":"Alt", "x":13.5, "y":4, "w":1.5}, + {"label":"Ctrl", "x":15, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/rpiguy9907/southpaw66/keymaps/default/keymap.c b/keyboards/rpiguy9907/southpaw66/keymaps/default/keymap.c new file mode 100644 index 000000000000..712a34c9be45 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/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( + KC_DEL, 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_END, 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_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, + KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_RCTL + ), + [1] = LAYOUT( + 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_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_MPRV, KC_VOLD, KC_MNXT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/rpiguy9907/southpaw66/keymaps/via/keymap.c b/keyboards/rpiguy9907/southpaw66/keymaps/via/keymap.c new file mode 100644 index 000000000000..87eccd222d09 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/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( + KC_DEL, 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_END, 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_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, + KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_SPC, MO(1), KC_RALT, KC_RCTL + ), + [1] = LAYOUT( + 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_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_MPRV, KC_VOLD, KC_MNXT, KC_TRNS, KC_TRNS, KC_MPLY, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/rpiguy9907/southpaw66/keymaps/via/rules.mk b/keyboards/rpiguy9907/southpaw66/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rpiguy9907/southpaw66/readme.md b/keyboards/rpiguy9907/southpaw66/readme.md new file mode 100644 index 000000000000..c7a289b73369 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/readme.md @@ -0,0 +1,24 @@ +# Southpaw66 + +![](https://i.imgur.com/Mzmhsedl.jpg) + +### Pro Micro Pinout +| rows | 0 | 1 | 2 | 3 | 4 | 5 | 6 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | +| Pro Micro pin | D3 | D2 | D1 | D0 | D4 | C6 | D7 | + +| columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Pro Micro pin | E6 | B4 | B5 | F4 | F5 | F6 | F7 | B1 | B3 | B2 | + + +Make example for this keyboard (after setting up your build environment): + + make rpiguy9907/southpaw66:default + +**Reset Key:** Hold down the key located at `k10`, commonly programmed as Escape while plugging in the keyboard. + +* Keyboard Maintainer: [gooberpsycho](https://github.com/gooberpsycho) +* Hardware Availability: [Casefile](https://github.com/rpiguy9907/Keyboards/tree/master/Southpaw66) + +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/keyboards/rpiguy9907/southpaw66/rules.mk b/keyboards/rpiguy9907/southpaw66/rules.mk new file mode 100644 index 000000000000..9ea17f062d9b --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/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 = 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/keyboards/rpiguy9907/southpaw66/southpaw66.c b/keyboards/rpiguy9907/southpaw66/southpaw66.c new file mode 100644 index 000000000000..ef61984b9d5b --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/southpaw66.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 "southpaw66.h" diff --git a/keyboards/rpiguy9907/southpaw66/southpaw66.h b/keyboards/rpiguy9907/southpaw66/southpaw66.h new file mode 100644 index 000000000000..11f1fc7e8f09 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/southpaw66.h @@ -0,0 +1,37 @@ + /* 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( \ + k00, k10, k20, k30, k40, k50, k60, k01, k11, k21, k31, k41, k51, k61, k02, \ + k12, k22, k32, k42, k52, k62, k03, k13, k23, k33, k43, k53, k63, k04, k14, \ + k24, k34, k44, k54, k64, k05, k15, k25, k35, k45, k55, k65, k06, \ + k16, k26, k36, k46, k56, k66, k07, k17, k27, k37, k47, k57, k67, \ + k08, k18, k28, k38, k48, k58, k68, k09, k19 \ +) \ +{ \ + {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, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, KC_NO}, \ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO} \ +} diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 67101344000a..9d041d0f0c81 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h @@ -91,6 +91,10 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST +#define LED_NUM_LOCK_PIN C7 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN B6 + /* number of backlight levels */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/sck/osa/osa.c b/keyboards/sck/osa/osa.c index 138a28893b89..7f144035e5db 100644 --- a/keyboards/sck/osa/osa.c +++ b/keyboards/sck/osa/osa.c @@ -14,60 +14,3 @@ * along with this program. If not, see . */ #include "osa.h" - - -// 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 - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} -*/ - -void matrix_init_board(void){ - setPinOutput(C7); - setPinOutput(C6); - setPinOutput(B6); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(C7); - } else { - writePinLow(C7); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(C6); - } else { - writePinLow(C6); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(B6); - } else { - writePinLow(B6); - } - led_set_user(usb_led); -} - diff --git a/keyboards/sneakbox/aliceclone/aliceclone.h b/keyboards/sneakbox/aliceclone/aliceclone.h index 67ae7ce784b0..1976a555cc5b 100644 --- a/keyboards/sneakbox/aliceclone/aliceclone.h +++ b/keyboards/sneakbox/aliceclone/aliceclone.h @@ -19,7 +19,9 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT_all( \ +#define LAYOUT_all LAYOUT_alice + +#define LAYOUT_alice( \ K020, K000, K001, K002, K003, K004, K005, K006, K010, K011, K012, K013, K014, K015, K016, K017, \ K040, K021, K022, K023, K024, K025, K026, K030, K031, K032, K033, K034, K035, K036, K037, \ K060, K041, K042, K043, K044, K045, K046, K050, K051, K052, K053, K054, K055, K056, \ diff --git a/keyboards/sneakbox/aliceclone/info.json b/keyboards/sneakbox/aliceclone/info.json index 332404b56dd2..461542509fb6 100644 --- a/keyboards/sneakbox/aliceclone/info.json +++ b/keyboards/sneakbox/aliceclone/info.json @@ -5,7 +5,7 @@ "width": 18.25, "height": 5, "layouts": { - "LAYOUT_all": { + "LAYOUT_alice": { "layout": [ {"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.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":0, "y":1}, {"x":1.25, "y":1, "w":1.5}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.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, "w":1.5}, diff --git a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c index 39eb44bc9a7d..6a6f7fecc0f6 100644 --- a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c +++ b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c @@ -24,13 +24,13 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_all( + [_BASE] = 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_LGUI, KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), - [_FN] = LAYOUT_all( + [_FN] = LAYOUT_alice( 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c index 333b8a21620a..6a08a15f2b20 100644 --- a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c +++ b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c @@ -27,25 +27,25 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_all( + [_BASE] = 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_LGUI, KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), - [_FN] = LAYOUT_all( + [_FN] = LAYOUT_alice( 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, 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_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), - [_L3] = LAYOUT_all( + [_L3] = 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), - [_L4] = LAYOUT_all( + [_L4] = 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/keyboards/sneakbox/aliceclone/rules.mk b/keyboards/sneakbox/aliceclone/rules.mk index fb12719ce81e..f477956021b6 100644 --- a/keyboards/sneakbox/aliceclone/rules.mk +++ b/keyboards/sneakbox/aliceclone/rules.mk @@ -21,3 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes +LAYOUTS = alice diff --git a/keyboards/tada68/keymaps/rupa/config.h b/keyboards/tada68/keymaps/rupa/config.h index ddbf0ab667a5..e1a6eb1a2b0c 100644 --- a/keyboards/tada68/keymaps/rupa/config.h +++ b/keyboards/tada68/keymaps/rupa/config.h @@ -1,10 +1,3 @@ #pragma once #define GRAVE_ESC_ALT_OVERRIDE - -/* disable features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/tada68/keymaps/rupa/keymap.c b/keyboards/tada68/keymaps/rupa/keymap.c index 3a8a55056107..ce95673af49f 100755 --- a/keyboards/tada68/keymaps/rupa/keymap.c +++ b/keyboards/tada68/keymaps/rupa/keymap.c @@ -1,45 +1,38 @@ #include "rupa.h" +#define LAYOUT_65_ansi_wrapper(...) LAYOUT_65_ansi(__VA_ARGS__) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _QWERTY: (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 │ ; │ ' │ Enter │PgU│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PgD│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctrl│Alt │Gui │ Space │Fn │Alt│Ctl│ ← │ ↓ │ → │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ - */ - [_QWERTY] = 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_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, - RAISE, 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, RAISE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [_QWERTY] = LAYOUT_65_ansi_wrapper( + ____65_QWERTY______________ROW1, + ____65_QWERTY______________ROW2, + ____65_QWERTY______________ROW3, + ____65_QWERTY______________ROW4, + ____65_QWERTY______________ROW5 ), - - /* Keymap _RAISE: Function Layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ - * │LOD│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del │Hme│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ - * │ │VSN│U_s│U_f│U_m│ │ │uni│ │ ॐ │ │♩ ♪│♫ ♬│★ ☆ │Ins│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ✓ │End│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ RShift │ ⸮ │Rup│Brt│Bls│Blt│ │Mut│V- │V+ │‽ ☭│ McL│M↑ │McR│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │RCtl│RAlt│RGui│ │ │ │CAP│M← │M↓ │M→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ - */ - [_RAISE] = LAYOUT_65_ansi( - LOD, 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, - _______, VRSN, U_SCRPT, U_FRACT, U_MONOS, _______, _______, UC_MOD, _______, X(OM), _______, XP(M4,M8), XP(M8B,M16), XP(STB, STW), KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, X(CHEK), KC_END, - OS_RSFT, X(IRNY), RUPA, BL_BRTG, BL_STEP, BL_TOGG, _______, KC_MUTE, KC_VOLD, KC_VOLU, XP(IBNG,HAS), KC_BTN1, KC_MS_U, KC_BTN2, - OS_RCTL, OS_RALT, OS_RGUI, _______, _______, _______, KC_CAPS, KC_MS_L, KC_MS_D, KC_MS_R + [_RAISE] = LAYOUT_65_ansi_wrapper( + ____65_RAISE_______________ROW1, + ____65_RAISE_______________ROW2, + ____65_RAISE_______________ROW3, + ____65_RAISE_______________ROW4, + ____65_RAISE_______________ROW5 + ), + [_LOWER] = LAYOUT_65_ansi_wrapper( + ____65_LOWER_______________ROW1, + ____65_LOWER_______________ROW2, + ____65_LOWER_______________ROW3, + ____65_LOWER_______________ROW4, + ____65_LOWER_______________ROW5 + ), + [_ADJUST] = LAYOUT_65_ansi_wrapper( + ____65_ADJUST______________ROW1, + ____65_ADJUST___________BL_ROW2, + ____65_ADJUST______________ROW3, + ____65_ADJUST______________ROW4, + ____65_ADJUST______________ROW5 ), }; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/tada68/keymaps/rupa/readme.md b/keyboards/tada68/keymaps/rupa/readme.md index 77629131a02c..eea966fdb96f 100755 --- a/keyboards/tada68/keymaps/rupa/readme.md +++ b/keyboards/tada68/keymaps/rupa/readme.md @@ -2,9 +2,7 @@ i've swapped the lufa-ms bootloader for caterina -most everything is in my userspace dir - -console mode is on, and there's barely any room left! +most everything is in my [userspace](../../../../users/rupa/) * win/alt -> alt/cmd * alt/fn -> fn/alt @@ -16,6 +14,6 @@ fn layer: * rotate mute/vol * backlight -> breathing, step, toggle * swap home and ins - * unicode chars sprinkled around - * script mode! + * unicode chars and strings sprinkled around + * script modes! * (one-shot) right versions of shift/ctl/alt/gui (not working quite right yet) diff --git a/keyboards/tada68/keymaps/rupa/rules.mk b/keyboards/tada68/keymaps/rupa/rules.mk index df6f5674b542..1777fc10a212 100644 --- a/keyboards/tada68/keymaps/rupa/rules.mk +++ b/keyboards/tada68/keymaps/rupa/rules.mk @@ -1,4 +1,3 @@ BOOTLOADER = caterina -UNICODEMAP_ENABLE = yes CONSOLE_ENABLE = yes diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h b/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h index fc9bd3d61652..40b3fd3ecc64 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h +++ b/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h @@ -1,7 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_CONFIG_H +#pragma once #define SPACE_COUNT 3 @@ -18,5 +31,3 @@ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\ } - -#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h b/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h index 26d5e207e809..89980614e106 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h @@ -1,7 +1,21 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_CONFIG_H #define SPACE_COUNT 2 @@ -15,7 +29,7 @@ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K0D, \ - K41, K49, K42, K44, K45, K3C, K0B, K00, K3D \ + K41, K49, K42, K44, K46, K3C, K0B, K00, K3D \ ) #define TEMPLATE_ALT( \ @@ -28,7 +42,7 @@ K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K41, K49, K42, K44, K45, K48, K49, K4B, K4C \ + K41, K49, K42, K44, K46, K48, K49, K4B, K4C \ ) #define TEMPLATE_ADJUST( \ @@ -41,7 +55,7 @@ K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K2D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K44, K45, K48, K0B, K0C, K4C \ + K40, K41, K42, K44, K46, K48, K0B, K0C, K4C \ ) #define TEMPLATE_RESET LAYOUT_arrow( \ @@ -49,5 +63,3 @@ 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, RESET) - -#endif diff --git a/keyboards/tkc/m0lly/config.h b/keyboards/tkc/m0lly/config.h index 29bd8411e371..77480995c832 100644 --- a/keyboards/tkc/m0lly/config.h +++ b/keyboards/tkc/m0lly/config.h @@ -43,6 +43,10 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN D2 +#define LED_CAPS_LOCK_PIN D3 +#define LED_SCROLL_LOCK_PIN D4 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/tkc/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c index e47f9531e190..e04407a35b32 100644 --- a/keyboards/tkc/m0lly/m0lly.c +++ b/keyboards/tkc/m0lly/m0lly.c @@ -14,63 +14,13 @@ * along with this program. If not, see . */ #include "m0lly.h" -#include "led.h" void keyboard_pre_init_kb(void) { - setPinInputHigh(D0); - setPinInputHigh(D1); + setPinInputHigh(D0); + setPinInputHigh(D1); - keyboard_pre_init_user(); -} - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware + setPinOutput(B7); + writePinHigh(B7); - return process_record_user(keycode, record); + keyboard_pre_init_user(); } - -void led_init_ports(void) { - DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT - DDRB |= (1<<7); // OUT - PORTB |= (1<<7); -} - -void led_set_kb(uint8_t usb_led) { -// led_set_user(usb_led); - if (usb_led & (1<. /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN D2 +#define LED_CAPS_LOCK_PIN D3 +#define LED_SCROLL_LOCK_PIN D4 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/tkc/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c index 4232c97d54dc..08e4e0bb3bb2 100644 --- a/keyboards/tkc/tkc1800/tkc1800.c +++ b/keyboards/tkc/tkc1800/tkc1800.c @@ -14,63 +14,13 @@ * along with this program. If not, see . */ #include "tkc1800.h" -#include "led.h" void keyboard_pre_init_kb(void) { - setPinInputHigh(D0); - setPinInputHigh(D1); + setPinInputHigh(D0); + setPinInputHigh(D1); - keyboard_pre_init_user(); -} - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware + setPinOutput(B7); + writePinHigh(B7); - return process_record_user(keycode, record); + keyboard_pre_init_user(); } - -void led_init_ports(void) { - DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT - DDRB |= (1<<7); // OUT - PORTB |= (1<<7); -} - -void led_set_kb(uint8_t usb_led) { -// led_set_user(usb_led); - if (usb_led & (1<. + */ + +#pragma once + +#define SPACE_COUNT 2 + +#define TEMPLATE_TKL(\ + KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBLS, KINS, KHOM, KPUP, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, KDEL, KEND, LPDN, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ + KLCT, KLOS, KLAL, KSP2, KSP3, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ +) LAYOUT_all( \ + KF01, KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ + KF02, KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KF03, KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ + KF04, KLOS, KLAL, KSP2, KSP1, KRAL, KESC \ +) diff --git a/keyboards/tmo50/keymaps/talljoe/keymap.c b/keyboards/tmo50/keymaps/talljoe/keymap.c new file mode 100644 index 000000000000..fa6523992e85 --- /dev/null +++ b/keyboards/tmo50/keymaps/talljoe/keymap.c @@ -0,0 +1,44 @@ +#include "quantum.h" +#include "talljoe.h" + +bool process_indicator_led_user(uint32_t state){ + return false; +} + +#define LED_MASK (_BV(PB0) | _BV(PB1) | _BV(PB2) | _BV(PB3)) +#define WHITE (_BV(PB0)) +#define YELLOW (_BV(PB1)) +#define MAGENTA (_BV(PB2)) +#define RED (_BV(PB3)) + +void matrix_scan_keymap(void) { + uint32_t lights = WHITE; + + switch(get_highest_layer(layer_state)) + { + case _NAV: + lights |= YELLOW; + break; + case _NUM: + lights |= MAGENTA; + break; + case _ADJUST: + lights |= RED; + break; + default: { + uint8_t default_layer = get_highest_layer(default_layer_state); + lights = 0; // no white LED by default. + if(default_layer & 1) + lights |= YELLOW; + if(default_layer & 2) + lights |= MAGENTA; + if(default_layer & 4) + lights |= RED; + } + } + + uint32_t port = PORTB; + port |= LED_MASK; + port &= ~lights; + PORTB = port; +} diff --git a/keyboards/underscore33/rev1/keymaps/default/config.h b/keyboards/underscore33/rev1/keymaps/default/config.h index 5708a439acde..82cbcc42cbae 100644 --- a/keyboards/underscore33/rev1/keymaps/default/config.h +++ b/keyboards/underscore33/rev1/keymaps/default/config.h @@ -1,3 +1,18 @@ +/* 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 . + */ #pragma once /* Combos */ diff --git a/keyboards/underscore33/rev1/keymaps/default/keymap.c b/keyboards/underscore33/rev1/keymaps/default/keymap.c index 148e840fa527..beaa8d92f213 100644 --- a/keyboards/underscore33/rev1/keymaps/default/keymap.c +++ b/keyboards/underscore33/rev1/keymaps/default/keymap.c @@ -21,10 +21,6 @@ enum layers{ _NAV }; -enum custom_keycodes{ - RGBRST = SAFE_RANGE, -}; - #define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) #define KC_NAV_ENT LT(_NAV, KC_ENT) #define KC_GA LGUI_T(KC_A) @@ -60,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAV] = LAYOUT_33_split_space( - RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/config.h b/keyboards/underscore33/rev1/keymaps/default_big_space/config.h new file mode 100644 index 000000000000..82cbcc42cbae --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/config.h @@ -0,0 +1,20 @@ +/* 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 . + */ +#pragma once + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c b/keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c new file mode 100644 index 000000000000..09547fa06f3c --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c @@ -0,0 +1,82 @@ +/* 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{ + _BASE, + _NUM_SYM, + _NAV +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_33_big_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_NUM_SPC, KC_NAV_ENT + ), + + [_NUM_SYM] = LAYOUT_33_big_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_NAV] = LAYOUT_33_big_space( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/readme.md b/keyboards/underscore33/rev1/keymaps/default_big_space/readme.md new file mode 100644 index 000000000000..3f22df7c2210 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev1 Layout (with big spacebar) + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk b/keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/underscore33/rev2/keymaps/default/config.h b/keyboards/underscore33/rev2/keymaps/default/config.h index 5708a439acde..82cbcc42cbae 100644 --- a/keyboards/underscore33/rev2/keymaps/default/config.h +++ b/keyboards/underscore33/rev2/keymaps/default/config.h @@ -1,3 +1,18 @@ +/* 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 . + */ #pragma once /* Combos */ diff --git a/keyboards/underscore33/rev2/keymaps/default/keymap.c b/keyboards/underscore33/rev2/keymaps/default/keymap.c index 32a6f4863940..ebacea413266 100644 --- a/keyboards/underscore33/rev2/keymaps/default/keymap.c +++ b/keyboards/underscore33/rev2/keymaps/default/keymap.c @@ -21,10 +21,6 @@ enum layers{ _NAV }; -enum custom_keycodes{ - RGBRST = SAFE_RANGE, -}; - #define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) #define KC_NAV_ENT LT(_NAV, KC_ENT) #define KC_GA LGUI_T(KC_A) @@ -60,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAV] = LAYOUT_33_split_space( - RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/config.h b/keyboards/underscore33/rev2/keymaps/default_big_space/config.h new file mode 100644 index 000000000000..82cbcc42cbae --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/config.h @@ -0,0 +1,20 @@ +/* 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 . + */ +#pragma once + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c b/keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c new file mode 100644 index 000000000000..09547fa06f3c --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c @@ -0,0 +1,82 @@ +/* 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{ + _BASE, + _NUM_SYM, + _NAV +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_33_big_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_NUM_SPC, KC_NAV_ENT + ), + + [_NUM_SYM] = LAYOUT_33_big_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_NAV] = LAYOUT_33_big_space( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/readme.md b/keyboards/underscore33/rev2/keymaps/default_big_space/readme.md new file mode 100644 index 000000000000..f11d18ece96a --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev2 Layout (with big spacebar) + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk b/keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/uno/config.h b/keyboards/uno/config.h new file mode 100644 index 000000000000..1cae17f50acf --- /dev/null +++ b/keyboards/uno/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xACC8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Broekhuijsen +#define PRODUCT Uno + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* Uno default pinout */ +#define DIRECT_PINS { \ + { B6 } \ +} +#define UNUSED_PINS + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 1 +// #define RGBLIGHT_HUE_STEP 32 +// #define RGBLIGHT_SAT_STEP 32 +// #define RGBLIGHT_VAL_STEP 32 +// #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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/uno/info.json b/keyboards/uno/info.json new file mode 100644 index 000000000000..3460c25d5dd5 --- /dev/null +++ b/keyboards/uno/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Uno", + "keyboard_folder": "uno", + "url": "https://www.reddit.com/r/mechmarket/comments/gyijm7/gb_uno/", + "maintainer": "Snipeye", + "width": 1, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [ {"x": 0, "y": 0 }] + } + } + } diff --git a/keyboards/uno/keymaps/default/keymap.c b/keyboards/uno/keymaps/default/keymap.c new file mode 100644 index 000000000000..bb19ea7ddb9d --- /dev/null +++ b/keyboards/uno/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 uno_keycode +{ + UNO = SAFE_RANGE +}; + +static uint16_t pressTimer = 0xFFFF; +#define CUSTOM_LONGPRESS 150 +#define CUSTOM_LONGERPRESS 750 +#define CUSTOM_STRING "I can put a whole buncha text in here and type it all with a single keypress." +#define RESET_LENGTH 3000 +const uint8_t PROGMEM RGBLED_RAINBOW_MOOD_INTERVALS[] = { 10, 25, 50 }; + +char stringToSend[2] = "a"; +char maxLetter = 'z'; + +uint8_t presetCounter = 0; + +#define COUNTER X_A + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + UNO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case UNO: + if (record->event.pressed) { + pressTimer = timer_read(); + } else { + uint16_t timeElapsed = timer_elapsed(pressTimer); + switch (presetCounter) { + case 0: + SEND_STRING(SS_LCMD("n")); + break; + case 1: + SEND_STRING("Hello!"); + break; + case 2: + SEND_STRING(SS_TAP(X_ENTER)SS_TAP(X_ENTER)"I am uno!"); + break; + case 3: + SEND_STRING(SS_TAP(X_ENTER)SS_TAP(X_ENTER)"I can do all sorts of useless things!"); + break; + case 4: + SEND_STRING(SS_TAP(X_ENTER)SS_TAP(X_ENTER)"And I have a built-in RGB LED!"SS_TAP(X_ENTER)SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + rgblight_sethsv_noeeprom(255, 255, 255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); + break; + default: + if (timeElapsed < CUSTOM_LONGPRESS) { + // Normal press. We're going to send the current letter and increment the counter. + SEND_STRING(SS_TAP(X_BSPACE)); + send_string(stringToSend); + stringToSend[0]++; + if (stringToSend[0] > maxLetter) { + stringToSend[0] = 'a'; + } + } else if (timeElapsed < CUSTOM_LONGERPRESS) { + // Long press, confirm the current letter, reset counter + stringToSend[0] = 'a'; + send_string(stringToSend); + } else if (timeElapsed < RESET_LENGTH) { + // Longer press, display macro. + SEND_STRING(CUSTOM_STRING); + } else { + reset_keyboard(); + } + presetCounter--; + break; + } + presetCounter++; + } + break; + } + return false; +} + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} diff --git a/keyboards/uno/keymaps/default/readme.md b/keyboards/uno/keymaps/default/readme.md new file mode 100644 index 000000000000..53b762f878fd --- /dev/null +++ b/keyboards/uno/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for uno +![Keymap](https://i.imgur.com/lCPZZpO.png) + +The 'Macro' key does a few things: If you open up textedit (was made for a mac), it sends "Command+n" for the first press to make a new document. It then types a few different messages, activates the RGB LED, and finally ends in a "scroll through the alphabet with a long press to confirm a certain character" keyboard mode. diff --git a/keyboards/uno/readme.md b/keyboards/uno/readme.md new file mode 100644 index 000000000000..ce4cccd196f2 --- /dev/null +++ b/keyboards/uno/readme.md @@ -0,0 +1,19 @@ +# uno + + ![uno](https://i.imgur.com/OqPyWbbl.jpg) + +A 1-key, in-USB "board" for the lulz + + * Keyboard Maintainer: [Snipeye](https://github.com/Snipeye) + * Hardware Supported: uno pcb + * Hardware Availability: [GB](https://www.reddit.com/r/mechmarket/comments/gyijm7/gb_uno/) + + Make example for this keyboard (after setting up your build environment): + + make uno:default + + Flashing example for this keyboard: + + make uno: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/keyboards/uno/rules.mk b/keyboards/uno/rules.mk new file mode 100644 index 000000000000..d23e95512672 --- /dev/null +++ b/keyboards/uno/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/keyboards/uno/uno.c b/keyboards/uno/uno.c new file mode 100644 index 000000000000..5ffb28865b8b --- /dev/null +++ b/keyboards/uno/uno.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "uno.h" diff --git a/keyboards/uno/uno.h b/keyboards/uno/uno.h new file mode 100644 index 000000000000..91d48d2ad50b --- /dev/null +++ b/keyboards/uno/uno.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/keyboards/wilba_tech/wt65_g/config.h b/keyboards/wilba_tech/wt65_g/config.h new file mode 100644 index 000000000000..8529d89990d6 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x6582 // wilba.tech +#define PRODUCT_ID 0x0022 // PCB #34 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT65-G + +/* 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 { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 +#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/keyboards/wilba_tech/wt65_g/info.json b/keyboards/wilba_tech/wt65_g/info.json new file mode 100644 index 000000000000..c88ac4da1b2f --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT65-G", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "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}, {"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":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/keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c b/keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c new file mode 100644 index 000000000000..9670dd4c1f18 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +// Default layout for WT65-G +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [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_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_NO, 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), + + // Fn1 Layer + [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_DEL, 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_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [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), + + // Fn3 Layer + [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), +}; \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c new file mode 100644 index 000000000000..1f9d213f05db --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c @@ -0,0 +1 @@ +#include "../default/keymap.c" \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_g/readme.md b/keyboards/wilba_tech/wt65_g/readme.md new file mode 100644 index 000000000000..09c8c56e2b62 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT65-G + +WT65-G is a keyboard PCB supporting 65% layout and daughterboard USB-C. [More info at wilba.tech](https://wilba.tech/) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT65-G +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt65_g:default + +Flashing example for this keyboard: + + make wilba_tech/wt65_g: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/keyboards/wilba_tech/wt65_g/rules.mk b/keyboards/wilba_tech/wt65_g/rules.mk new file mode 100644 index 000000000000..04e644cbc92e --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/wt65_g.c b/keyboards/wilba_tech/wt65_g/wt65_g.c new file mode 100644 index 000000000000..54e823cb7e10 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/wt65_g.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "wt65_g.h" diff --git a/keyboards/wilba_tech/wt65_g/wt65_g.h b/keyboards/wilba_tech/wt65_g/wt65_g.h new file mode 100644 index 000000000000..bd7381236fa8 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/wt65_g.h @@ -0,0 +1,36 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K213, 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, K313, K314, \ + K400, K401, K402, K406, 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 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, K412, K413, K414 } \ +} + diff --git a/keyboards/wilba_tech/wt80_g/config.h b/keyboards/wilba_tech/wt80_g/config.h new file mode 100644 index 000000000000..4c636c200a91 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x6582 // wilba.tech +#define PRODUCT_ID 0x0023 // PCB #35 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT80-G + +/* 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 { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } +#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/keyboards/wilba_tech/wt80_g/info.json b/keyboards/wilba_tech/wt80_g/info.json new file mode 100644 index 000000000000..1d407c24f773 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT80-G", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "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, "w":2.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, "w":1.75}, {"x":14, "y":4.25}, {"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}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c b/keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c new file mode 100644 index 000000000000..08fa11b38531 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +// Default layout for WT80-G +#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_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_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, 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, 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), + + [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), + +}; + diff --git a/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c new file mode 100644 index 000000000000..1f9d213f05db --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c @@ -0,0 +1 @@ +#include "../default/keymap.c" \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt80_g/readme.md b/keyboards/wilba_tech/wt80_g/readme.md new file mode 100644 index 000000000000..b016b7ac8d15 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT80-G + +WT80-G is a keyboard PCB supporting TKL layout and daughterboard USB-C. [More info at wilba.tech](https://wilba.tech/) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT80-G +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt80_g:default + +Flashing example for this keyboard: + + make wilba_tech/wt80_g: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/keyboards/wilba_tech/wt80_g/rules.mk b/keyboards/wilba_tech/wt80_g/rules.mk new file mode 100644 index 000000000000..04e644cbc92e --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_g/wt80_g.c b/keyboards/wilba_tech/wt80_g/wt80_g.c new file mode 100644 index 000000000000..821cffc7d37f --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/wt80_g.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "wt80_g.h" diff --git a/keyboards/wilba_tech/wt80_g/wt80_g.h b/keyboards/wilba_tech/wt80_g/wt80_g.h new file mode 100644 index 000000000000..df0bfe57c161 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/wt80_g.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K313, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K506, K510, K511, K512, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { 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, ____, K415, ____ }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, K514, K515, K516 } \ +} diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index cd3fdd200fec..0a75dd4a6034 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -25,6 +25,7 @@ defined(RGB_BACKLIGHT_HS60) || \ defined(RGB_BACKLIGHT_NK65) || \ defined(RGB_BACKLIGHT_NK87) || \ + defined(RGB_BACKLIGHT_KW_MEGA) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ defined(RGB_BACKLIGHT_NEBULA68) || \ defined(RGB_BACKLIGHT_U80_A) || \ @@ -50,7 +51,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_NEBULA68) && !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) && !defined (RGB_BACKLIGHT_KW_MEGA) #include #include "drivers/avr/i2c_master.h" #else @@ -81,7 +82,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_NEBULA68) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #elif defined(RGB_BACKLIGHT_NK87) @@ -227,7 +228,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_NEBULA68) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_KW_MEGA) // 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) @@ -1001,7 +1002,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {255,255},// LA61 does not exit, dummy {209,255}, {215,255}, {220,255} }; -#elif defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_KW_MEGA) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA60 {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, @@ -1197,7 +1198,8 @@ 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_NEBULA68) || 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) || defined(RGB_BACKLIGHT_KW_MEGA) return; #endif @@ -1400,7 +1402,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_NEBULA68) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) // // 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 +1506,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_NEBULA68) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_KW_MEGA) 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 +1544,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_NEBULA68) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) IS31FL3733_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_NK87) // This is done to avoid indicator LEDs being set @@ -1567,7 +1569,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_NEBULA68) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) // 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 +1603,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_NEBULA68) && !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) && !defined(RGB_BACKLIGHT_KW_MEGA) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1681,7 +1683,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !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) && !defined(RGB_BACKLIGHT_KW_MEGA) void backlight_set_suspend_state(bool state) { @@ -1927,7 +1929,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i 6+64-1 ) ); //LB7-LB64 + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else // Init the #1 driver IS31FL3731_init( ISSI_ADDR_1 ); diff --git a/keyboards/wsk/gothic70/config.h b/keyboards/wsk/gothic70/config.h index 98e70e615c9b..bef22e82ff9f 100644 --- a/keyboards/wsk/gothic70/config.h +++ b/keyboards/wsk/gothic70/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x5753 // "WS" #define PRODUCT_ID 0x63CC #define DEVICE_VER 0x0001 #define MANUFACTURER Worldspawn00 diff --git a/keyboards/wsk/gothic70/keymaps/via/keymap.c b/keyboards/wsk/gothic70/keymaps/via/keymap.c new file mode 100644 index 000000000000..f386f0b3fd95 --- /dev/null +++ b/keyboards/wsk/gothic70/keymaps/via/keymap.c @@ -0,0 +1,76 @@ +/* +Copyright 2020 worldspawn00 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_GRV, KC_BSPC, KC_PSCR, + 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_INS, + 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_DEL, + 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, MO(_FN), KC_BSPC, KC_RALT, KC_RCTL, 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, _______, _______, KC_PAUS, + _______, _______, _______, _______, 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 + ), + + [_MEDIA] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and off (active high) + setPinOutput(F5); + // set NumLock LED to output and off (active high) + setPinOutput(F6); + // set ScrollLock LED to output and off (active high) + setPinOutput(F7); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) +{ + writePin(F5, (state & 0x1)); + writePin(F6, (state & 0x2)); + writePin(F7, (state & 0x4)); + return state; +} diff --git a/keyboards/wsk/gothic70/keymaps/via/rules.mk b/keyboards/wsk/gothic70/keymaps/via/rules.mk new file mode 100644 index 000000000000..0638fd5d90d7 --- /dev/null +++ b/keyboards/wsk/gothic70/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no \ No newline at end of file diff --git a/keyboards/xd68/info.json b/keyboards/xd68/info.json index 01b5bb201ef2..a2ee19d7db2b 100644 --- a/keyboards/xd68/info.json +++ b/keyboards/xd68/info.json @@ -78,6 +78,79 @@ {"label":"Right", "x":15, "y":4} ] }, + "LAYOUT_65_ansi_split_bs": { + "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":"Grave.", "x":13, "y":0}, + {"label":"Backspace", "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":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Page Up", "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}, + {"label":"Page Down", "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}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "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":"Menu", "x":10, "y":4}, + {"label":"Ctrl", "x":11, "y":4}, + {"label":"Fn", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, "LAYOUT_65_iso": { "key_count": 69, "layout": [ diff --git a/keyboards/xd68/rules.mk b/keyboards/xd68/rules.mk index 8d52ba327df0..e47967395986 100644 --- a/keyboards/xd68/rules.mk +++ b/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 +LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso diff --git a/keyboards/xd68/xd68.h b/keyboards/xd68/xd68.h index f4347928f6cd..c4cd20db5cd8 100755 --- a/keyboards/xd68/xd68.h +++ b/keyboards/xd68/xd68.h @@ -69,6 +69,37 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, k4b, XXX, k48, k4a, k4c, k4d, k4e} \ } +/* XD68 ANSI layout with split backspace + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49| 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| 2d | 2e | + * |----------------------------------------------------------------| + * | 30 | 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_65_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, 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, 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, XXX, k2d, k2e}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, k4b, k49, k48, k4a, k4c, k4d, k4e} \ +} + /* XD68 ISO layout * ,----------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h index 2a77db68a417..503cba318714 100644 --- a/keyboards/xd84/config.h +++ b/keyboards/xd84/config.h @@ -47,6 +47,9 @@ /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 10 // #define BACKLIGHT_BREATHING diff --git a/keyboards/xd84/xd84.c b/keyboards/xd84/xd84.c index eaf531421b64..dec4ef95e202 100644 --- a/keyboards/xd84/xd84.c +++ b/keyboards/xd84/xd84.c @@ -14,19 +14,3 @@ * along with this program. If not, see . */ #include "xd84.h" - -void keyboard_pre_init_kb(void) { - setPinOutput(B6); - - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B6); - } else { - writePinHigh(B6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/xd84pro/config.h b/keyboards/xd84pro/config.h index 7fd4496fe3fe..01f410ea6b5c 100644 --- a/keyboards/xd84pro/config.h +++ b/keyboards/xd84pro/config.h @@ -35,6 +35,9 @@ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN #define RGBLED_NUM 12 diff --git a/keyboards/xd84pro/xd84pro.c b/keyboards/xd84pro/xd84pro.c index cba8a57f2684..0eb52fda0f8c 100644 --- a/keyboards/xd84pro/xd84pro.c +++ b/keyboards/xd84pro/xd84pro.c @@ -14,17 +14,3 @@ * along with this program. If not, see . */ #include "xd84pro.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} -void led_init_ports(void) { - setPinOutput(B2); -} -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(B2, !led_state.caps_lock); - } - return false; -} \ No newline at end of file diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h index 799b835df037..cf6fec1b96f4 100644 --- a/keyboards/xd96/config.h +++ b/keyboards/xd96/config.h @@ -47,6 +47,10 @@ /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 10 // #define BACKLIGHT_BREATHING diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c index e2af9f100433..2c67ee3d7cbe 100644 --- a/keyboards/xd96/xd96.c +++ b/keyboards/xd96/xd96.c @@ -14,29 +14,3 @@ * along with this program. If not, see . */ #include "xd96.h" - -#define CAPS_PIN B6 -#define NUMLOCK_PIN C6 - -void keyboard_pre_init_kb(void) { - setPinOutput(CAPS_PIN); - setPinOutput(NUMLOCK_PIN); - - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(CAPS_PIN); - } else { - writePinHigh(CAPS_PIN); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(NUMLOCK_PIN); - } else { - writePinHigh(NUMLOCK_PIN); - } - - led_set_user(usb_led); -} diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 17461c5dc31c..7b4a43bfde8f 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN D4 +#define LED_PIN_ON_STATE 0 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/yd68/yd68.c b/keyboards/yd68/yd68.c index f34661dd37cc..22f75f7f8116 100644 --- a/keyboards/yd68/yd68.c +++ b/keyboards/yd68/yd68.c @@ -15,59 +15,22 @@ */ #include "yd68.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - //Capslock LED Output Low - DDRD |= (1<<4); - PORTD &= ~(1<<4); - +void keyboard_pre_init_kb(void) { //Backlight LEDs Output Low - DDRD |= (1<<6); - PORTD &= ~(1<<6); + setPinOutput(D6); + writePinLow(D6); //RGB power output low - DDRE |= (1<<2); - PORTE &= ~(1<<2); + setPinOutput(E2); + writePinLow(E2); //Bluetooth power output high - DDRB |= (1<<2); - PORTB |= (1<<2); + setPinOutput(B2); + writePinLow(B2); //RGB data output low - DDRB |= (1<<3); - PORTB &= ~(1<<3); - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + setPinOutput(B3); + writePinLow(B3); - if (usb_led & (1<. #define LAYOUT_numpad_6x4( \ k00, k10, k20, k30, \ k01, k11, k21, k31, \ - k02, k12, k22,\ - k03, k13, k23, k33, \ + k02, k12, k22, \ + k03, k13, k23, k32, \ k04, k14, k24, \ - k05, k25, k35 \ + k05, k25, k34 \ ) { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, XXX }, \ { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, XXX, k33, XXX, k35 } \ + { k30, k31, k32, XXX, k34, XXX } \ } #define LAYOUT LAYOUT_ortho_4x6 diff --git a/keyboards/z150_bh/config.h b/keyboards/z150_bh/config.h index fc33021ffcd6..9fa1f0c527b9 100644 --- a/keyboards/z150_bh/config.h +++ b/keyboards/z150_bh/config.h @@ -22,6 +22,10 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN E7 +#define LED_CAPS_LOCK_PIN B0 +#define LED_SCROLL_LOCK_PIN E6 + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/z150_bh/z150_bh.c b/keyboards/z150_bh/z150_bh.c index 6db784b56efe..b75a1ff198e1 100644 --- a/keyboards/z150_bh/z150_bh.c +++ b/keyboards/z150_bh/z150_bh.c @@ -1,32 +1 @@ #include "z150_bh.h" - -void matrix_init_kb(void) { - setPinOutput(B0); - setPinOutput(E6); - setPinOutput(E7); - - matrix_init_user(); -}; - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(E7); - } else { - writePinLow(E7); - } - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B0); - } else { - writePinLow(B0); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(E6); - } else { - writePinLow(E6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/ztboards/after/info.json b/keyboards/ztboards/after/info.json index f702ea035989..ddd0d5231921 100644 --- a/keyboards/ztboards/after/info.json +++ b/keyboards/ztboards/after/info.json @@ -1,12 +1,12 @@ { "keyboard_name": "ZTBoards After", - "url": "ztboards.myshopify.com", + "url": "ztb.mx", "maintainer": "phlopsuh", "width": 16, "height": 5, "layouts": { "LAYOUT_all": { - "layout": [{"label":"Rotary", "x":15.5, "y":0.5}, {"label":"Esc", "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":"~", "x":13, "y":1}, {"label":"|", "x":14, "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":"Del", "x":15.5, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.25}, {"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":"Pg Up", "x":15.5, "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":"Pg Dn", "x":15.5, "y":4}, {"label":"Up", "x":14.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"Left", "x":13.25, "y":5.25}, {"label":"Down", "x":14.25, "y":5.25}, {"label":"Right", "x":15.25, "y":5.25}] + "layout": [{"label":"Esc", "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":"|", "x":13, "y":1}, {"label":"`", "x":14, "y":1}, {"label":"Rotary", "x":15.5, "y":0.5}, {"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":"Del", "x":15.5, "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":"Pg Up", "x":15.5, "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":"Up", "x":14.25, "y":4.25}, {"label":"Pg Dn", "x":15.5, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"Left", "x":13.25, "y":5.25}, {"label":"Down", "x":14.25, "y":5.25}, {"label":"Right", "x":15.25, "y":5.25}] } } } diff --git a/keyboards/ztboards/after/keymaps/default/keymap.c b/keyboards/ztboards/after/keymaps/default/keymap.c index e014b3a98585..7dfb9e126136 100644 --- a/keyboards/ztboards/after/keymaps/default/keymap.c +++ b/keyboards/ztboards/after/keymaps/default/keymap.c @@ -21,33 +21,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void encoder_update_user(uint8_t index, bool clockwise) { - /* Custom encoder control - handles CW/CCW turning of encoder - * Default behavior: - * main layer: - * CW: move mouse right - * CCW: move mouse left - * other layers: - * CW: = (equals/plus - increase slider in Adobe products) - * CCW: - (minus/underscore - decrease slider in adobe products) - * Thank you to imchipwood/dumbpad for defining this. - */ if (index == 0) { switch (get_highest_layer(layer_state)) { case 1: // main layer - move mouse right (CW) and left (CCW) if (clockwise) { - tap_code(KC_MS_R); + tap_code(KC_BRIGHTNESS_UP); } else { - tap_code(KC_MS_L); + tap_code(KC_BRIGHTNESS_DOWN); } break; default: // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW) if (clockwise) { - tap_code(KC_EQL); + tap_code(KC_AUDIO_VOL_UP); } else { - tap_code(KC_MINS); + tap_code(KC_AUDIO_VOL_DOWN); } break; } diff --git a/keyboards/ztboards/noon/info.json b/keyboards/ztboards/noon/info.json index cbc561f8d1b7..fed68d166223 100644 --- a/keyboards/ztboards/noon/info.json +++ b/keyboards/ztboards/noon/info.json @@ -1,12 +1,12 @@ { "keyboard_name": "ZTBoards Noon", - "url": "ztboards.myshopify.com", + "url": "ztb.mx", "maintainer": "phlopsuh", "width": 16, "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}, {"label":"~", "x":13, "y":0}, {"label":"|", "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":"Pg Up", "x":15, "y":1}, {"label":"Caps Lock", "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}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Pg Dn", "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}, {"label":"Up", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.25, "y":4, "w":1.5}, {"x":3.75, "y":4, "w":7}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + "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, "y":0}, {"label":"|", "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":"Pg Up", "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}, {"label":"Pg Dn", "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}, {"label":"Up", "x":14, "y":3}, {"label":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.25, "y":4, "w":1.5}, {"x":3.75, "y":4, "w":7}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] } } } diff --git a/layouts/community/60_ansi/talljoe-ansi/config.h b/layouts/community/60_ansi/talljoe-ansi/config.h index 4326a2fd1039..79cc1900142b 100644 --- a/layouts/community/60_ansi/talljoe-ansi/config.h +++ b/layouts/community/60_ansi/talljoe-ansi/config.h @@ -1,5 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_CONFIG_H @@ -16,7 +31,5 @@ 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, K42, K45, K48, K49, K4B, K4C \ + K40, K41, K42, K46, K48, K49, K4B, K4C \ ) - -#endif //CONFIG_USER_H diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h index 65568d3abf3f..2a2ead227333 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h @@ -1,7 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 ENABLE_GAME_LAYER @@ -16,7 +29,7 @@ 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, K3D, \ - K40, K41, K42, K45, K48, K49, K4B, K4C \ + K40, K41, K42, K46, K48, K49, K4B, K4C \ ) /* Color Map */ @@ -68,5 +81,3 @@ #define BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 #endif //KEYBOARD_zeal60 - -#endif //CONFIG_USER_H diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c index 3e9e726b9535..617132d4efe7 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "solarized.h" #define MAKE_COLOR(_H, _S, _V) \ diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h index 3b00caea7037..15e3d588b185 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h @@ -1,5 +1,20 @@ -#ifndef SOLARIZED_H -#define SOLARIZED_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/color.h" @@ -23,5 +38,3 @@ typedef struct { } solarized_t; extern solarized_t solarized; - -#endif diff --git a/layouts/community/60_hhkb/talljoe-hhkb/config.h b/layouts/community/60_hhkb/talljoe-hhkb/config.h index 54756a940b63..0424fee1f31e 100644 --- a/layouts/community/60_hhkb/talljoe-hhkb/config.h +++ b/layouts/community/60_hhkb/talljoe-hhkb/config.h @@ -1,5 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_CONFIG_H @@ -16,10 +31,9 @@ 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, K3D, \ - K41, K42, K45, K48, K4C \ + K41, K42, K46, K48, K4C \ ) #ifdef RGB_BACKLIGHT_M60_A #define ZEAL_RGB #endif -#endif //CONFIG_USER_H diff --git a/layouts/community/ortho_4x12/talljoe/config.h b/layouts/community/ortho_4x12/talljoe/config.h index 61229e7f6c9a..34c24b86240f 100644 --- a/layouts/community/ortho_4x12/talljoe/config.h +++ b/layouts/community/ortho_4x12/talljoe/config.h @@ -1,7 +1,21 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_CONFIG_H #define SPACE_COUNT 3 #define TEMPLATE( \ @@ -17,6 +31,3 @@ LAYOUT_ortho_4x12( \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ K40, K41, K0D, K42, K44, K45, K45, K46, K48, K49, K4B, K4C \ ) - - -#endif //CONFIG_USER_H diff --git a/layouts/community/split_3x6_3/bcat/config.h b/layouts/community/split_3x6_3/bcat/config.h new file mode 100644 index 000000000000..e177f0ffcb80 --- /dev/null +++ b/layouts/community/split_3x6_3/bcat/config.h @@ -0,0 +1,34 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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(KEYBOARD_crkbd_rev1_common) || defined(KEYBOARD_crkbd_rev1_legacy) +# define EE_HANDS + +# if defined(RGBLIGHT_ENABLE) +/* Configure RGB for underglow only (first six LEDs on each side). */ +# undef RGBLED_SPLIT +# define RGBLED_SPLIT \ + { 6, 6 } +# endif + +# if defined(RGB_MATRIX_ENABLE) +/* Limit max RGB LED current to avoid tripping controller fuse. */ +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +# endif +#endif diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/layouts/community/split_3x6_3/bcat/keymap.c similarity index 78% rename from keyboards/crkbd/keymaps/bcat/keymap.c rename to layouts/community/split_3x6_3/bcat/keymap.c index 7b8329fea923..934a8e31f2d7 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/layouts/community/split_3x6_3/bcat/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "bcat.h" @@ -19,7 +35,7 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ - [LAYER_DEFAULT] = LAYOUT( + [LAYER_DEFAULT] = LAYOUT_split_3x6_3( 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_RSFT, @@ -27,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ - [LAYER_LOWER] = LAYOUT( + [LAYER_LOWER] = LAYOUT_split_3x6_3( 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_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, @@ -35,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ - [LAYER_RAISE] = LAYOUT( + [LAYER_RAISE] = LAYOUT_split_3x6_3( KC_CAPS, 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, @@ -43,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ - [LAYER_ADJUST] = LAYOUT( + [LAYER_ADJUST] = LAYOUT_split_3x6_3( _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, _______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/layouts/community/split_3x6_3/bcat/readme.md similarity index 96% rename from keyboards/crkbd/keymaps/bcat/readme.md rename to layouts/community/split_3x6_3/bcat/readme.md index 4ffb1562bfcf..ed17b84186a1 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/layouts/community/split_3x6_3/bcat/readme.md @@ -1,4 +1,4 @@ -# bcat's Corne layout +# bcat's split 3x6 + 3 thumb keys layout This is my favorite split ergo layout for typing, featuring the traditional four ortho/ergo layers (Default, Lower, Raise, Adjust). It is loosely inspired @@ -33,9 +33,6 @@ layer-switch keys to correct mistakes. * The Esc key is next to the home row for convenience in Vim. -* Likewise, the Ctrl key is in the same place as on my row-staggered boards -(where I've been remapping Caps Lock as Ctrl since before even using QMK). - * There are two Shift keys, although I generally use Left Shift. (I've considered replacing Right Shift with another key, but haven't chosen one.) @@ -46,7 +43,8 @@ right thumbs, respectively. * Ctrl is on the left for ease of chording, especially one-handed use of common shortcuts like Ctrl+T and Ctrl+W. This puts Alt on the right by the process of -elimination. +elimination. (I would really like one more 1U thumb key on each half to allow +for a redundant Alt key on the left and a dedicated Super key on the right.) ## Lower layer diff --git a/layouts/community/split_3x6_3/bcat/rules.mk b/layouts/community/split_3x6_3/bcat/rules.mk new file mode 100644 index 000000000000..3a9796673eae --- /dev/null +++ b/layouts/community/split_3x6_3/bcat/rules.mk @@ -0,0 +1,10 @@ +ifeq ($(strip $(KEYBOARD)), crkbd/rev1/common) + BOOTLOADER = atmel-dfu # Elite-C + + # Enable underglow only. (Split Common doesn't support RGB matrix on slave.) + RGBLIGHT_ENABLE = yes +else ifeq ($(strip $(KEYBOARD)), crkbd/rev1/legacy) + BOOTLOADER = atmel-dfu # Elite-C + + RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow +endif diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c index 30e3958febc2..e53d0539738a 100644 --- a/layouts/community/split_3x6_3/drashna/keymap.c +++ b/layouts/community/split_3x6_3/drashna/keymap.c @@ -16,8 +16,6 @@ #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; diff --git a/layouts/community/tkl_ansi/talljoe-tkl/config.h b/layouts/community/tkl_ansi/talljoe-tkl/config.h index 02f8a94e3997..15869ed0b635 100644 --- a/layouts/community/tkl_ansi/talljoe-tkl/config.h +++ b/layouts/community/tkl_ansi/talljoe-tkl/config.h @@ -1,5 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_CONFIG_H @@ -18,7 +33,5 @@ KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + KA4, KP2, KC6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ ) - -#endif //CONFIG_USER_H diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 3868f94bb25f..77724a244800 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -19,6 +19,7 @@ from . import info from . import json from . import json2c +from . import lint from . import list from . import kle2json from . import new diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index caa98a71c218..a5eda555f0cc 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -7,6 +7,7 @@ import shutil import subprocess from pathlib import Path +from enum import Enum from milc import cli from qmk import submodules @@ -14,6 +15,13 @@ from qmk.questions import yesno from qmk.commands import run + +class CheckStatus(Enum): + OK = 1 + WARNING = 2 + ERROR = 3 + + ESSENTIAL_BINARIES = { 'dfu-programmer': {}, 'avrdude': {}, @@ -33,9 +41,12 @@ def _udev_rule(vid, pid=None, *args): """ rule = "" if pid: - rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess", RUN{builtin}+="uaccess"' % (vid, pid) + rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess"' % ( + vid, + pid, + ) else: - rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", TAG+="uaccess", RUN{builtin}+="uaccess"' % vid + rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", TAG+="uaccess"' % vid if args: rule = ', '.join([rule, *args]) return rule @@ -69,24 +80,25 @@ def check_arm_gcc_version(): version_number = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].strip() cli.log.info('Found arm-none-eabi-gcc version %s', version_number) - return True # Right now all known arm versions are ok + return CheckStatus.OK # Right now all known arm versions are ok def check_avr_gcc_version(): """Returns True if the avr-gcc version is not known to cause problems. """ + rc = CheckStatus.ERROR if 'output' in ESSENTIAL_BINARIES['avr-gcc']: version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip() + cli.log.info('Found avr-gcc version %s', version_number) + rc = CheckStatus.OK + parsed_version = parse_gcc_version(version_number) if parsed_version['major'] > 8: - cli.log.error('We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') - return False + cli.log.warning('{fg_yellow}We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') + rc = CheckStatus.WARNING - cli.log.info('Found avr-gcc version %s', version_number) - return True - - return False + return rc def check_avrdude_version(): @@ -95,7 +107,7 @@ def check_avrdude_version(): version_number = last_line.split()[2][:-1] cli.log.info('Found avrdude version %s', version_number) - return True + return CheckStatus.OK def check_dfu_util_version(): @@ -104,7 +116,7 @@ def check_dfu_util_version(): version_number = first_line.split()[1] cli.log.info('Found dfu-util version %s', version_number) - return True + return CheckStatus.OK def check_dfu_programmer_version(): @@ -113,7 +125,7 @@ def check_dfu_programmer_version(): version_number = first_line.split()[1] cli.log.info('Found dfu-programmer version %s', version_number) - return True + return CheckStatus.OK def check_binaries(): @@ -131,58 +143,56 @@ def check_binaries(): def check_submodules(): """Iterates through all submodules to make sure they're cloned and up to date. """ - ok = True - for submodule in submodules.status().values(): if submodule['status'] is None: cli.log.error('Submodule %s has not yet been cloned!', submodule['name']) - ok = False + return CheckStatus.ERROR elif not submodule['status']: - cli.log.error('Submodule %s is not up to date!', submodule['name']) - ok = False + cli.log.warning('Submodule %s is not up to date!', submodule['name']) + return CheckStatus.WARNING - return ok + return CheckStatus.OK def check_udev_rules(): """Make sure the udev rules look good. """ - ok = True + rc = CheckStatus.OK udev_dir = Path("/etc/udev/rules.d/") desired_rules = { '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 + _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")}, + 'kiibohd': {_udev_rule("1c11", "b007")}, 'stm32': { - _udev_rule("1EAF", "0003"), # STM32duino - _udev_rule("0483", "DF11") # STM32 DFU + _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"')}, + 'bootloadhid': {_udev_rule("16c0", "05df")}, + 'usbasploader': {_udev_rule("16c0", "05dc")}, + 'massdrop': {_udev_rule("03eb", "6124", 'ENV{ID_MM_DEVICE_IGNORE}="1"')}, 'caterina': { # 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 + _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 + # 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 } } @@ -209,31 +219,43 @@ def check_udev_rules(): # Check if the desired rules are among the currently present rules for bootloader, rules in desired_rules.items(): - # For caterina, check if ModemManager is running - if bootloader == "caterina": - if check_modem_manager(): - ok = False - cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") if not rules.issubset(current_rules): deprecated_rule = deprecated_rules.get(bootloader) 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) + cli.log.warning("{fg_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. See https://docs.qmk.fm/#/faq_build?id=linux-udev-rules for more details.", bootloader) + # For caterina, check if ModemManager is running + if bootloader == "caterina": + if check_modem_manager(): + rc = CheckStatus.WARNING + cli.log.warning("{fg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") + rc = CheckStatus.WARNING + cli.log.warning("{fg_yellow}Missing or outdated udev rules for '%s' boards. Run 'sudo cp %s/util/udev/50-qmk.rules /etc/udev/rules.d/'.", bootloader, QMK_FIRMWARE) - return ok + else: + cli.log.warning("{fg_yellow}'%s' does not exist. Skipping udev rule checking...", udev_dir) + + return rc + + +def check_systemd(): + """Check if it's a systemd system + """ + return bool(shutil.which("systemctl")) def check_modem_manager(): """Returns True if ModemManager is running. + """ - if shutil.which("systemctl"): + if check_systemd(): mm_check = run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10) if mm_check.returncode == 0: return True - else: - cli.log.warn("Can't find systemctl to check for ModemManager.") + """(TODO): Add check for non-systemd systems + """ + return False def is_executable(command): @@ -263,12 +285,8 @@ def os_test_linux(): """Run the Linux specific tests. """ cli.log.info("Detected {fg_cyan}Linux.") - ok = True - if not check_udev_rules(): - ok = False - - return ok + return check_udev_rules() def os_test_macos(): @@ -276,7 +294,7 @@ def os_test_macos(): """ cli.log.info("Detected {fg_cyan}macOS.") - return True + return CheckStatus.OK def os_test_windows(): @@ -284,7 +302,7 @@ def os_test_windows(): """ cli.log.info("Detected {fg_cyan}Windows.") - return True + return CheckStatus.OK @cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') @@ -299,23 +317,20 @@ def doctor(cli): * [ ] Compile a trivial program with each compiler """ cli.log.info('QMK Doctor is checking your environment.') - ok = True + status = CheckStatus.OK # Determine our OS and run platform specific tests platform_id = platform.platform().lower() if 'darwin' in platform_id or 'macos' in platform_id: - if not os_test_macos(): - ok = False + status = os_test_macos() elif 'linux' in platform_id: - if not os_test_linux(): - ok = False + status = os_test_linux() elif 'windows' in platform_id: - if not os_test_windows(): - ok = False + status = os_test_windows() else: - cli.log.error('Unsupported OS detected: %s', platform_id) - ok = False + cli.log.warning('Unsupported OS detected: %s', platform_id) + status = CheckStatus.WARNING cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) @@ -330,31 +345,41 @@ def doctor(cli): if bin_ok: cli.log.info('All dependencies are installed.') else: - ok = False + status = CheckStatus.ERROR # Make sure the tools are at the correct version + ver_ok = [] for check in (check_arm_gcc_version, check_avr_gcc_version, check_avrdude_version, check_dfu_util_version, check_dfu_programmer_version): - if not check(): - ok = False + ver_ok.append(check()) + + if CheckStatus.ERROR in ver_ok: + status = CheckStatus.ERROR + elif CheckStatus.WARNING in ver_ok and status == CheckStatus.OK: + status = CheckStatus.WARNING # Check out the QMK submodules sub_ok = check_submodules() - if sub_ok: + if sub_ok == CheckStatus.OK: cli.log.info('Submodules are up to date.') else: if yesno('Would you like to clone the submodules?', default=True): submodules.update() sub_ok = check_submodules() - if not sub_ok: - ok = False + if CheckStatus.ERROR in sub_ok: + status = CheckStatus.ERROR + elif CheckStatus.WARNING in sub_ok and status == CheckStatus.OK: + status = CheckStatus.WARNING # Report a summary of our findings to the user - if ok: + if status == CheckStatus.OK: cli.log.info('{fg_green}QMK is ready to go') + return 0 + elif status == CheckStatus.WARNING: + cli.log.info('{fg_yellow}QMK is ready to go, but minor problems were found') + return 1 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 + cli.log.info('{fg_red}Major problems detected, please fix these problems before proceeding.') + cli.log.info('{fg_blue}Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.') + return 2 diff --git a/lib/python/qmk/cli/generate/__init__.py b/lib/python/qmk/cli/generate/__init__.py index 4dc7607ef22e..13bd1f091410 100644 --- a/lib/python/qmk/cli/generate/__init__.py +++ b/lib/python/qmk/cli/generate/__init__.py @@ -1 +1,2 @@ from . import api +from . import docs diff --git a/lib/python/qmk/cli/generate/docs.py b/lib/python/qmk/cli/generate/docs.py new file mode 100644 index 000000000000..a59a24db5043 --- /dev/null +++ b/lib/python/qmk/cli/generate/docs.py @@ -0,0 +1,37 @@ +"""Build QMK documentation locally +""" +import shutil +import subprocess +from pathlib import Path + +from milc import cli + +DOCS_PATH = Path('docs/') +BUILD_PATH = Path('.build/docs/') + + +@cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True) +def generate_docs(cli): + """Invoke the docs generation process + + TODO(unclaimed): + * [ ] Add a real build step... something static docs + """ + + if BUILD_PATH.exists(): + shutil.rmtree(BUILD_PATH) + + shutil.copytree(DOCS_PATH, BUILD_PATH) + + # When not verbose we want to hide all output + args = {'check': True} + if not cli.args.verbose: + args.update({'stdout': subprocess.DEVNULL, 'stderr': subprocess.STDOUT}) + + cli.log.info('Generating internal docs...') + + # Generate internal docs + subprocess.run(['doxygen', 'Doxyfile'], **args) + subprocess.run(['moxygen', '-q', '-a', '-g', '-o', BUILD_PATH / 'internals_%s.md', 'doxygen/xml'], **args) + + cli.log.info('Successfully generated internal docs to %s.', BUILD_PATH) diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py new file mode 100644 index 000000000000..74467021e075 --- /dev/null +++ b/lib/python/qmk/cli/lint.py @@ -0,0 +1,70 @@ +"""Command to look over a keyboard/keymap and check for common mistakes. +""" +from milc import cli + +from qmk.decorators import automagic_keyboard, automagic_keymap +from qmk.info import info_json +from qmk.keymap import locate_keymap +from qmk.path import is_keyboard, keyboard + + +@cli.argument('--strict', action='store_true', help='Treat warnings as errors.') +@cli.argument('-kb', '--keyboard', help='The keyboard to check.') +@cli.argument('-km', '--keymap', help='The keymap to check.') +@cli.subcommand('Check keyboard and keymap for common mistakes.') +@automagic_keyboard +@automagic_keymap +def lint(cli): + """Check keyboard and keymap for common mistakes. + """ + if not cli.config.lint.keyboard: + cli.log.error('Missing required argument: --keyboard') + cli.print_help() + return False + + if not is_keyboard(cli.config.lint.keyboard): + cli.log.error('No such keyboard: %s', cli.config.lint.keyboard) + return False + + # Gather data about the keyboard. + ok = True + keyboard_path = keyboard(cli.config.lint.keyboard) + keyboard_info = info_json(cli.config.lint.keyboard) + readme_path = keyboard_path / 'readme.md' + + # Check for errors in the info.json + if keyboard_info['parse_errors']: + ok = False + cli.log.error('Errors found when generating info.json.') + + if cli.config.lint.strict and keyboard_info['parse_warnings']: + ok = False + cli.log.error('Warnings found when generating info.json (Strict mode enabled.)') + + # Check for a readme.md and warn if it doesn't exist + if not readme_path.exists(): + ok = False + cli.log.error('Missing %s', readme_path) + + # Keymap specific checks + if cli.config.lint.keymap: + keymap_path = locate_keymap(cli.config.lint.keyboard, cli.config.lint.keymap) + + if not keymap_path: + ok = False + cli.log.error("Can't find %s keymap for %s keyboard.", cli.config.lint.keymap, cli.config.lint.keyboard) + else: + keymap_readme = keymap_path.parent / 'readme.md' + if not keymap_readme.exists(): + cli.log.warning('Missing %s', keymap_readme) + + if cli.config.lint.strict: + ok = False + + # Check and report the overall status + if ok: + cli.log.info('Lint check passed!') + return True + + cli.log.error('Lint check failed!') + return False diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e92c3335b98b..d73ba8cfb61a 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -28,6 +28,8 @@ def info_json(keyboard): 'keyboard_folder': str(keyboard), 'keymaps': {}, 'layouts': {}, + 'parse_errors': [], + 'parse_warnings': [], 'maintainer': 'qmk', } @@ -36,7 +38,7 @@ def info_json(keyboard): 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(): + for layout_name, layout_json in _find_all_layouts(info_data, keyboard, rules).items(): if not layout_name.startswith('LAYOUT_kc'): info_data['layouts'][layout_name] = layout_json @@ -104,14 +106,16 @@ def _extract_rules_mk(info_data): mcu = rules.get('MCU') if mcu in CHIBIOS_PROCESSORS: - arm_processor_rules(info_data, rules) + return arm_processor_rules(info_data, rules) + 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)) - unknown_processor_rules(info_data, rules) + return avr_processor_rules(info_data, rules) - return info_data + msg = "Unknown MCU: " + str(mcu) + + _log_warning(info_data, msg) + + return unknown_processor_rules(info_data, rules) def _search_keyboard_h(path): @@ -127,7 +131,7 @@ def _search_keyboard_h(path): return layouts -def _find_all_layouts(keyboard, rules): +def _find_all_layouts(info_data, keyboard, rules): """Looks for layout macros associated with this keyboard. """ layouts = _search_keyboard_h(Path(keyboard)) @@ -135,7 +139,7 @@ def _find_all_layouts(keyboard, rules): 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. - cli.log.warning('%s: Falling back to searching for KEYMAP/LAYOUT macros.' % (keyboard)) + _log_warning(info_data, 'Falling back to searching for KEYMAP/LAYOUT macros.') for file in glob('keyboards/%s/*.h' % keyboard): if file.endswith('.h'): these_layouts = find_layouts(file) @@ -153,11 +157,25 @@ def _find_all_layouts(keyboard, rules): supported_layouts.remove(layout_name) if supported_layouts: - cli.log.error('%s: Missing LAYOUT() macro for %s' % (keyboard, ', '.join(supported_layouts))) + _log_error(info_data, 'Missing LAYOUT() macro for %s' % (', '.join(supported_layouts))) return layouts +def _log_error(info_data, message): + """Send an error message to both JSON and the log. + """ + info_data['parse_errors'].append(message) + cli.log.error('%s: %s', info_data.get('keyboard_folder', 'Unknown Keyboard!'), message) + + +def _log_warning(info_data, message): + """Send a warning message to both JSON and the log. + """ + info_data['parse_warnings'].append(message) + cli.log.warning('%s: %s', info_data.get('keyboard_folder', 'Unknown Keyboard!'), message) + + def arm_processor_rules(info_data, rules): """Setup the default info for an ARM board. """ @@ -216,7 +234,7 @@ def merge_info_jsons(keyboard, info_data): new_info_data = json.load(info_fd) if not isinstance(new_info_data, dict): - cli.log.error("Invalid file %s, root object should be a dictionary.", str(info_file)) + _log_error(info_data, "Invalid file %s, root object should be a dictionary.", str(info_file)) continue # Copy whitelisted keys into `info_data` @@ -230,7 +248,8 @@ def merge_info_jsons(keyboard, info_data): # Only pull in layouts we have a macro for if layout_name in info_data['layouts']: if info_data['layouts'][layout_name]['key_count'] != len(json_layout['layout']): - cli.log.error('%s: %s: Number of elements in info.json does not match! info.json:%s != %s:%s', info_data['keyboard_folder'], layout_name, len(json_layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout'])) + msg = '%s: Number of elements in info.json does not match! info.json:%s != %s:%s' + _log_error(info_data, msg % (layout_name, len(json_layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout']))) else: for i, key in enumerate(info_data['layouts'][layout_name]['layout']): key.update(json_layout['layout'][i]) diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 591fad034b21..54def1d5d6cc 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -28,15 +28,21 @@ def under_qmk_firmware(): return None -def keymap(keyboard): +def keyboard(keyboard_name): + """Returns the path to a keyboard's directory relative to the qmk root. + """ + return Path('keyboards') / keyboard_name + + +def keymap(keyboard_name): """Locate the correct directory for storing a keymap. Args: - keyboard + keyboard_name The name of the keyboard. Example: clueboard/66/rev3 """ - keyboard_folder = Path('keyboards') / keyboard + keyboard_folder = keyboard(keyboard_name) for i in range(MAX_KEYBOARD_SUBFOLDERS): if (keyboard_folder / 'keymaps').exists(): @@ -45,7 +51,7 @@ def keymap(keyboard): keyboard_folder = keyboard_folder.parent logging.error('Could not find the keymaps directory!') - raise NoSuchKeyboardError('Could not find keymaps directory for: %s' % keyboard) + raise NoSuchKeyboardError('Could not find keymaps directory for: %s' % keyboard_name) def normpath(path): diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index df5f047da78e..dd0c572a7d01 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -13,14 +13,14 @@ def check_subcommand(command, *args): return result -def check_returncode(result, expected=0): +def check_returncode(result, expected=[0]): """Print stdout if `result.returncode` does not match `expected`. """ - if result.returncode != expected: + if result.returncode not in expected: print('`%s` stdout:' % ' '.join(result.args)) print(result.stdout) print('returncode:', result.returncode) - assert result.returncode == expected + assert result.returncode in expected def test_cformat(): @@ -45,7 +45,7 @@ def test_flash(): def test_flash_bootloaders(): result = check_subcommand('flash', '-b') - check_returncode(result, 1) + check_returncode(result, [1]) def test_config(): @@ -62,7 +62,7 @@ def test_kle2json(): def test_doctor(): result = check_subcommand('doctor', '-n') - check_returncode(result) + check_returncode(result, [0, 1]) assert 'QMK Doctor is checking your environment.' in result.stdout assert 'QMK is ready to go' in result.stdout @@ -89,43 +89,43 @@ def test_list_keyboards(): def test_list_keymaps(): result = check_subcommand('list-keymaps', '-kb', 'handwired/onekey/pytest') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'test' in result.stdout def test_list_keymaps_long(): result = check_subcommand('list-keymaps', '--keyboard', 'handwired/onekey/pytest') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'test' in result.stdout def test_list_keymaps_kb_only(): result = check_subcommand('list-keymaps', '-kb', 'niu_mini') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'via' in result.stdout def test_list_keymaps_vendor_kb(): result = check_subcommand('list-keymaps', '-kb', 'ai03/lunar') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'via' in result.stdout def test_list_keymaps_vendor_kb_rev(): result = check_subcommand('list-keymaps', '-kb', 'kbdfans/kbd67/mkiirgb/v2') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'via' in result.stdout def test_list_keymaps_no_keyboard_found(): result = check_subcommand('list-keymaps', '-kb', 'asdfghjkl') - check_returncode(result, 1) + check_returncode(result, [1]) assert 'does not exist' in result.stdout def test_json2c(): result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json') - check_returncode(result, 0) + check_returncode(result) assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n' diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h index d0132a2d855c..de8dd756a1fb 100644 --- a/quantum/keymap_extras/keymap_french_osx.h +++ b/quantum/keymap_extras/keymap_french_osx.h @@ -237,7 +237,7 @@ #define FR_PERM S(A(FR_LUGR)) // ‰ // Row 4 #define FR_GTEQ S(A(FR_LABK)) // ≥ -#define FR_LSAQ S(A(FR_W)) // › +#define FR_RSAQ S(A(FR_W)) // › #define FR_FRSL S(A(FR_X)) // ⁄ #define FR_CENT S(A(FR_C)) // ¢ #define FR_SQRT S(A(FR_V)) // √ diff --git a/quantum/led.c b/quantum/led.c new file mode 100644 index 000000000000..3e30b1a5ad8a --- /dev/null +++ b/quantum/led.c @@ -0,0 +1,137 @@ +/* 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 "quantum.h" + +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +extern backlight_config_t backlight_config; +#else +// Cannot use BACKLIGHT_CAPS_LOCK without backlight being enabled +# undef BACKLIGHT_CAPS_LOCK +#endif + +#ifndef LED_PIN_ON_STATE +# define LED_PIN_ON_STATE 1 +#endif + +#if defined(BACKLIGHT_CAPS_LOCK) +/** \brief Caps Lock indicator using backlight (for keyboards without dedicated LED) + */ +static void handle_backlight_caps_lock(led_t led_state) { + // Use backlight as Caps Lock indicator + uint8_t bl_toggle_lvl = 0; + + if (led_state.caps_lock && !backlight_config.enable) { + // Turning Caps Lock ON and backlight is disabled in config + // Toggling backlight to the brightest level + bl_toggle_lvl = BACKLIGHT_LEVELS; + } else if (!led_state.caps_lock && backlight_config.enable) { + // Turning Caps Lock OFF and backlight is enabled in config + // Toggling backlight and restoring config level + bl_toggle_lvl = backlight_config.level; + } + + // Set level without modify backlight_config to keep ability to restore state + backlight_set(bl_toggle_lvl); +} +#endif + +/** \brief Lock LED set callback - keymap/user level + * + * \deprecated Use led_update_user() instead. + */ +__attribute__((weak)) void led_set_user(uint8_t usb_led) {} + +/** \brief Lock LED set callback - keyboard level + * + * \deprecated Use led_update_kb() instead. + */ +__attribute__((weak)) void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +/** \brief Lock LED update callback - keymap/user level + * + * \return True if led_update_kb() should run its own code, false otherwise. + */ +__attribute__((weak)) bool led_update_user(led_t led_state) { return true; } + +/** \brief Lock LED update callback - keyboard level + * + * \return Ignored for now. + */ +__attribute__((weak)) bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { +#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) +# if LED_PIN_ON_STATE == 0 + // invert the whole thing to avoid having to conditionally !led_state.x later + led_state.raw = ~led_state.raw; +# endif + +# ifdef LED_NUM_LOCK_PIN + writePin(LED_NUM_LOCK_PIN, led_state.num_lock); +# endif +# ifdef LED_CAPS_LOCK_PIN + writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); +# endif +# ifdef LED_SCROLL_LOCK_PIN + writePin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); +# endif +# ifdef LED_COMPOSE_PIN + writePin(LED_COMPOSE_PIN, led_state.compose); +# endif +# ifdef LED_KANA_PIN + writePin(LED_KANA_PIN, led_state.kana); +# endif +#endif + } + return res; +} + +/** \brief Initialise any LED related hardware and/or state + */ +__attribute__((weak)) void led_init_ports(void) { +#ifdef LED_NUM_LOCK_PIN + setPinOutput(LED_NUM_LOCK_PIN); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_CAPS_LOCK_PIN + setPinOutput(LED_CAPS_LOCK_PIN); + writePin(LED_CAPS_LOCK_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + setPinOutput(LED_SCROLL_LOCK_PIN); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_COMPOSE_PIN + setPinOutput(LED_COMPOSE_PIN); + writePin(LED_COMPOSE_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_KANA_PIN + setPinOutput(LED_KANA_PIN); + writePin(LED_KANA_PIN, !LED_PIN_ON_STATE); +#endif +} + +/** \brief Entrypoint for protocol to LED binding + */ +__attribute__((weak)) void led_set(uint8_t usb_led) { +#ifdef BACKLIGHT_CAPS_LOCK + handle_backlight_caps_lock((led_t)usb_led); +#endif + + led_set_kb(usb_led); + led_update_kb((led_t)usb_led); +} \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index dab6c9172fc0..0b2f98762dd8 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -23,7 +23,6 @@ #ifdef BACKLIGHT_ENABLE # include "backlight.h" -extern backlight_config_t backlight_config; #endif #ifdef FAUXCLICKY_ENABLE @@ -602,6 +601,10 @@ void matrix_init_quantum() { if (!eeconfig_is_enabled()) { eeconfig_init(); } +#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) + // TODO: remove calls to led_init_ports from keyboards and remove ifdef + led_init_ports(); +#endif #ifdef BACKLIGHT_ENABLE # ifdef LED_MATRIX_ENABLE led_matrix_init(); @@ -725,55 +728,6 @@ void api_send_unicode(uint32_t unicode) { #endif } -/** \brief Lock LED set callback - keymap/user level - * - * \deprecated Use led_update_user() instead. - */ -__attribute__((weak)) void led_set_user(uint8_t usb_led) {} - -/** \brief Lock LED set callback - keyboard level - * - * \deprecated Use led_update_kb() instead. - */ -__attribute__((weak)) void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } - -/** \brief Lock LED update callback - keymap/user level - * - * \return True if led_update_kb() should run its own code, false otherwise. - */ -__attribute__((weak)) bool led_update_user(led_t led_state) { return true; } - -/** \brief Lock LED update callback - keyboard level - * - * \return Ignored for now. - */ -__attribute__((weak)) bool led_update_kb(led_t led_state) { return led_update_user(led_state); } - -__attribute__((weak)) void led_init_ports(void) {} - -__attribute__((weak)) void led_set(uint8_t usb_led) { -#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) - // Use backlight as Caps Lock indicator - uint8_t bl_toggle_lvl = 0; - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) && !backlight_config.enable) { - // Turning Caps Lock ON and backlight is disabled in config - // Toggling backlight to the brightest level - bl_toggle_lvl = BACKLIGHT_LEVELS; - } else if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK) && backlight_config.enable) { - // Turning Caps Lock OFF and backlight is enabled in config - // Toggling backlight and restoring config level - bl_toggle_lvl = backlight_config.level; - } - - // Set level without modify backlight_config to keep ability to restore state - backlight_set(bl_toggle_lvl); -#endif - - led_set_kb(usb_led); - led_update_kb((led_t)usb_led); -} - //------------------------------------------------------------------------------ // Override these functions in your keymap file to play different tunes on // different events such as startup and bootloader jump @@ -781,5 +735,3 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { __attribute__((weak)) void startup_user() {} __attribute__((weak)) void shutdown_user() {} - -//------------------------------------------------------------------------------ diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 0685a34753e0..2978e7bed9ca 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -34,6 +34,12 @@ static void init(void) { # ifdef DRIVER_ADDR_2 IS31FL3731_init(DRIVER_ADDR_2); # endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_init(DRIVER_ADDR_3); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_init(DRIVER_ADDR_4); +# endif # elif defined(IS31FL3733) IS31FL3733_init(DRIVER_ADDR_1, 0); # elif defined(IS31FL3737) @@ -60,6 +66,12 @@ static void init(void) { # ifdef DRIVER_ADDR_2 IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); # endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); @@ -76,6 +88,12 @@ static void flush(void) { # ifdef DRIVER_ADDR_2 IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); # endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif } const rgb_matrix_driver_t rgb_matrix_driver = { diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 5f0bc7363347..4192bbcfa230 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -52,6 +52,12 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +//#define LED_NUM_LOCK_PIN B0 +//#define LED_CAPS_LOCK_PIN B1 +//#define LED_SCROLL_LOCK_PIN B2 +//#define LED_COMPOSE_PIN B3 +//#define LED_KANA_PIN B4 + //#define BACKLIGHT_PIN B7 //#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_BREATHING diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index ef065c0f100a..6150bcce6d10 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -47,8 +47,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW +//#define LED_NUM_LOCK_PIN D0 +//#define LED_CAPS_LOCK_PIN D1 +//#define LED_SCROLL_LOCK_PIN D6 + #define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_BREATHING #define RGBLED_NUM 16 diff --git a/tmk_core/common/bootmagic_lite.c b/tmk_core/common/bootmagic_lite.c index 38275cdd3079..cbf756a1756b 100644 --- a/tmk_core/common/bootmagic_lite.c +++ b/tmk_core/common/bootmagic_lite.c @@ -1,7 +1,5 @@ #include "quantum.h" -bool is_keyboard_left(void); - /** \brief Reset eeprom * * ...just incase someone wants to only change the eeprom behaviour @@ -48,4 +46,4 @@ __attribute__((weak)) void bootmagic_lite(void) { // Jump to bootloader. bootloader_jump(); } -} \ No newline at end of file +} diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index a45af56dfdbb..b0394af0035a 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -222,6 +222,12 @@ void keyboard_setup(void) { */ __attribute__((weak)) bool is_keyboard_master(void) { return true; } +/** \brief is_keyboard_left + * + * FIXME: needs doc + */ +__attribute__((weak)) bool is_keyboard_left(void) { return true; } + /** \brief should_process_keypress * * Override this function if you have a condition where keypresses processing should change: diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index 98ceca49b1a6..79d9490898fa 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h @@ -63,6 +63,8 @@ void keyboard_task(void); void keyboard_set_leds(uint8_t leds); /* it runs whenever code has to behave differently on a slave */ bool is_keyboard_master(void); +/* it runs whenever code has to behave differently on left vs right split */ +bool is_keyboard_left(void); void keyboard_pre_init_kb(void); void keyboard_pre_init_user(void); diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index 990282862b5a..81c664d606e0 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef LED_H -#define LED_H +#pragma once + #include "stdint.h" #include "stdbool.h" @@ -52,5 +52,3 @@ void led_init_ports(void); #ifdef __cplusplus } #endif - -#endif diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index 4b8cc7c5e16f..69cb03a9f78b 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -311,9 +311,11 @@ void led_matrix_indicators(void) { (led_map[i].scan == USB_LED_KANA_SCANCODE && (kbled & (1 << USB_LED_KANA))) || #endif // KANA (0)) { - led_buffer[i].r = 255 - led_buffer[i].r; - led_buffer[i].g = 255 - led_buffer[i].g; - led_buffer[i].b = 255 - led_buffer[i].b; + if (rgb_matrix_get_flags() & LED_FLAG_INDICATOR) { + led_buffer[i].r = 255 - led_buffer[i].r; + led_buffer[i].g = 255 - led_buffer[i].g; + led_buffer[i].b = 255 - led_buffer[i].b; + } } } } diff --git a/users/bcat/config.h b/users/bcat/config.h index b0d556186a2a..16188950e297 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -1,26 +1,32 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + /* Wait between tap_code register and unregister to fix flaky media keys. */ #undef TAP_CODE_DELAY #define TAP_CODE_DELAY 20 -/* - * Force the default tapping term since some keyboards make it way too short - * (*cough*Lily58*cough*). - */ -#undef TAPPING_TERM - -#define TAPPING_TERM 200 - -/* - * Treat mod-tap keys as holds even if the mod-tap key and the key being - * modified are both relased within TAPPING_TERM. This assumes the mod-tap key +/* Treat mod-tap keys as holds even if the mod-tap key and the key being + * modified are both released within TAPPING_TERM. This assumes the mod-tap key * isn't usually pressed in quick succession with other tapped keys, which is * good when the tap keycode is something like KC_ESC rather than a letter. */ #define PERMISSIVE_HOLD -/* - * Turn off key repeat support of the tap keycode for tap-hold keys, enabling +/* Turn off key repeat support of the tap keycode for tap-hold keys, enabling * holds to work correctly in quick succession after taps. */ #define TAPPING_FORCE_HOLD @@ -57,6 +63,9 @@ # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 17 # define RGBLIGHT_VAL_STEP 17 + +/* Turn on additional RGB animations. */ +# define RGBLIGHT_ANIMATIONS #endif #if defined(BACKLIGHT_ENABLE) diff --git a/users/bcat/readme.md b/users/bcat/readme.md index 49fbea1acfbd..6d097d663df6 100644 --- a/users/bcat/readme.md +++ b/users/bcat/readme.md @@ -1,13 +1,48 @@ # bcat's userspace This is some code and config shared by all of [my](https://github.com/bcat) -keyboards. I have a few different keymaps spread throughout the repo; however, -they are all derived from two "canonical" keymaps for my preferred layouts: +keyboards. I use community layouts wherever possible, only writing +keyboard-specific keymaps for boards without standard layout support. I derive +my keymaps from two canonical ones (preferred for typing and gaming, +respectively). -* For typing, my canonical layout is my -[Crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/bcat) -(split ergo, columnar-staggered) layout. +## Canonical keymaps -* For gaming, my canonical layout is my -[Tsangan](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsangan_hhkb/bcat) -(row-staggered) layout. +* [Split 3x6 + 3 thumb +keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat): +Columnar-staggered split ergo layout, preferred for typing. Used on Crkbd. + +* [60% Tsangan +HHKB](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsangan_hhkb/bcat): +Row-staggered layout, preferred for gaming. Used on ai03 Polaris, CannonKeys +AN-C, CannonKeys Instant60. + +## Other keymaps + +### Ergo + +* [Lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) + +### Ortho + +* [Eco](https://github.com/qmk/qmk_firmware/tree/master/keyboards/eco/keymaps/bcat) + +### Traditional + +* [60% ANSI split +backspace/right-shift](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_ansi_split_bs_rshift/bcat). +Used on DZ60. + +* [65% ANSI blocker split +backspace](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/65_ansi_blocker_split_bs/bcat). +Used on KBDfans KBD67 hotswap. + +* [Keebio +Quefrency](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/quefrency/keymaps/bcat) + +### Macropads + +* [9-Key](https://github.com/qmk/qmk_firmware/tree/master/keyboards/9key/keymaps/bcat) + +* [Keebio +BDN9](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/bdn9/keymaps/bcat) diff --git a/users/rupa/config.h b/users/rupa/config.h index 902405204242..723d9b3b5f42 100644 --- a/users/rupa/config.h +++ b/users/rupa/config.h @@ -5,4 +5,7 @@ #define ONESHOT_TAP_TOGGLE 5 #define ONESHOT_TIMEOUT 5000 +#undef TAP_CODE_DELAY #define TAP_CODE_DELAY 5 //DEFAULT: 100 + +//#define UNICODE_SCRIPT_MODE_ENABLE diff --git a/users/rupa/process_records.c b/users/rupa/process_records.c old mode 100755 new mode 100644 index 2d723101004e..2d23e3401766 --- a/users/rupa/process_records.c +++ b/users/rupa/process_records.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "rupa.h" -font_t *translator = NULL; +uint16_t processed_keycode; __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -25,47 +25,93 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool is_shifted = get_mods()&MOD_MASK_SHIFT; - bool is_pressed = record->event.pressed; + if (record->event.pressed) { - switch(keycode) { - case VRSN: - if (is_pressed) { + processed_keycode = keycode; + // mask out mod taps + if ( + (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) + ) { + processed_keycode &= 0xFF; + } + + bool is_shifted = (get_mods() | get_oneshot_mods() | get_weak_mods()) & MOD_MASK_SHIFT; + switch(processed_keycode) { + case VRSN: send_string_with_delay_P(PSTR( - "# " QMK_KEYBOARD "/" QMK_KEYMAP ":" QMK_VERSION " " QMK_BUILDDATE "\n" + "# " QMK_KEYBOARD "/" QMK_KEYMAP ":" QMK_VERSION " " QMK_BUILDDATE "\n" ), TAP_CODE_DELAY); - } - return false; + return false; - case LOD: - case RUPA: - if (is_pressed) { - if (keycode == LOD) { - send_unicode_string((is_shifted ? "¯\\_(ツ)_/¯" : "ಠ_ಠ")); - } else if (keycode == RUPA) { - send_unicode_string((is_shifted ? "Śrīrūpa" : "rūpa")); - } - } - return false; + case BUGS: + return u_xp(is_shifted, "ᙙᙖ", "ଳ"); + case CATS: + return u_xp(is_shifted, "ⓛ ᆽ ⓛ ", "ㅇㅅㅇ"); + case DANCE: + return u_x(dance(is_shifted)); + case DICE: + return u_x(d6()); + case DOMO: + return u_xp(is_shifted, "(シ_ _)シ", "m(_ _)m"); + case FART: + return u_x("⊥ʶ∀Ⅎ"); + case FLIP: + return u_x(flip(is_shifted)); + case HUGS: + return u_xp(is_shifted, "(づ ̄ ³ ̄)づ", "(っಠ‿ಠ)っ"); + case JOY: + return u_x(joy(is_shifted)); + case RNDM: + return false; + case KISS: + return u_xp(is_shifted, "꒒ ০ ⌵ ୧ ♡", "( ˘ ³˘)♥"); + case LOD: + return u_xp(is_shifted, "( ͡ಠ ʖ̯ ͡ಠ)", "ಠ_ಠ"); + case MUSIC: + return u_xp(is_shifted, "(˳˘ ɜ˘)˳ ♬ ♪♫", "(´▽`)ノ♫"); + case RUPA: + return u_xp(is_shifted, "Śrīrūpa", "rūpa"); + case SHRUG: + return u_xp(is_shifted, "⋌ ༼ •̀ ⌂ •́ ༽⋋", "¯\\_(ツ)_/¯"); + case TADA: + return u_xp(is_shifted, "☆ *・゜゚・*(^O^)/*・゜゚・*☆", "\\(゜ロ\\)Ξ(//ロ゜)//"); + case WAT: + return u_xp(is_shifted, "༼ ຶཽཀ ຶཽ༽", "ヽ༼⊙_⊙༽ノ"); + case YUNO: + return u_xp(is_shifted, "o(^^o)", "щ(゜ロ゜щ)"); + case ZALGO: + set_combined_mode(CM_ZALGO); + break; + case ZZZZZ: + cycle_combined_mode(); + break; - // script modes - case U_FRACT: - case U_MONOS: - case U_SCRPT: - if (is_pressed) { - if (keycode == U_SCRPT) { - translator = (translator == &script_bold ? NULL : &script_bold); - } else if (keycode == U_FRACT) { - translator = (translator == &fraktu_bold ? NULL : &fraktu_bold); - } else if (keycode == U_MONOS) { - translator = (translator == &monosp_bold ? NULL : &monosp_bold); - } - } - return true; +#if defined(UNICODE_SCRIPT_MODE_ENABLE) + // script modes + case U_FRACT: + return set_script_mode(F_FRACT); + case U_ITALI: + return set_script_mode(F_ITALI); + case U_MONOS: + return set_script_mode(F_MONOS); + case U_NORML: + return set_script_mode(F_NORML); + case U_SANSI: + return set_script_mode(F_SANSI); + case U_SANSN: + return set_script_mode(F_SANSN); + case U_SCRPT: + return set_script_mode(F_SCRPT); - default: - if (is_pressed && translator != NULL) { - return script_mode_translate(translator, is_shifted, keycode); + default: + if (get_script_mode() != NULL) { + return script_mode_translate(is_shifted, processed_keycode); + } + if (combined_mode != CM_NULL && combined_text(processed_keycode)) { + return false; + } +#endif } } return process_record_keymap(keycode, record); diff --git a/users/rupa/process_records.h b/users/rupa/process_records.h old mode 100755 new mode 100644 diff --git a/users/rupa/readme.md b/users/rupa/readme.md new file mode 100644 index 000000000000..b6c2dd1f7f15 --- /dev/null +++ b/users/rupa/readme.md @@ -0,0 +1,7 @@ +# rupa's userspace + +* rupa.c has some unicode script mode stuff +* unicode.c has my unicode map +* process_record.c has my keycode handler + +my keymap is in [keyboards/tada68](../../keyboards/tada68/keymaps/rupa/) diff --git a/users/rupa/rules.mk b/users/rupa/rules.mk index c4f147d9130d..ed33e85f3a80 100644 --- a/users/rupa/rules.mk +++ b/users/rupa/rules.mk @@ -1,3 +1,5 @@ +UNICODEMAP_ENABLE = yes +LTO_ENABLE = yes SRC += rupa.c \ process_records.c \ unicode.c diff --git a/users/rupa/rupa.c b/users/rupa/rupa.c old mode 100755 new mode 100644 index 60fec3caf095..85de5c16fdea --- a/users/rupa/rupa.c +++ b/users/rupa/rupa.c @@ -18,14 +18,46 @@ along with this program. If not, see . #include #include "rupa.h" +#if defined(UNICODE_SCRIPT_MODE_ENABLE) +const font_t * translator = NULL; + // https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols -font_t script_bold = {0x1D4D0, 0x1D4EA, 0x1D7CE}; // with bold numbers -font_t fraktu_bold = {0x1D56C, 0x1D586, 0x1D7D8}; // with doublestruck numbers -font_t monosp_bold = {0x1D670, 0x1D68A, 0x1D7F6}; +static const font_t *fonts_map[] = { + [F_FRACT] = &(font_t){0x1D56C, 0x1D586, 0x1D7D8}, // fraktur/doublestruck numbers + [F_ITALI] = &(font_t){0x1D468, 0x1D482, 0x1D7CE}, // italic/bold numbers + [F_MONOS] = &(font_t){0x1D670, 0x1D68A, 0x1D7F6}, // monospace + [F_NORML] = &(font_t){0x1D400, 0x1D41A, 0x00030}, // normal! + [F_SANSI] = &(font_t){0x1D63C, 0x1D656, 0x1D7EC}, // sans 1talic/sans bold numbers + [F_SANSN] = &(font_t){0x1D5D4, 0x1D5EE, 0x1D7E2}, // sans normal/sans numbers + [F_SCRPT] = &(font_t){0x1D4D0, 0x1D4EA, 0x1D7CE}, // script/bold numbers +}; + +/* +font_t doublestruc = {0x1D538, 0x1D552, 0x1D7D8}; +uint_32 []snowflakes = { + // doublestruck + 0x1D53B, // C + 0x1D540, // H + 0x1D546, // N + 0x1D548, // P + 0x1D549, // Q + 0x1D54A, // R + 0x1D552, // Z +}; +*/ + +const font_t *get_script_mode(void) { + return translator; +} +bool set_script_mode(int fc) { + translator = translator == fonts_map[fc] ? NULL : fonts_map[fc]; + dprintf("set_script_mode: %u %b\n", fc, translator != NULL); + return true; +} // Maps A-Z, a-z, and 0-9 to other unicode ranges. We also map space to EN // SPACE for some reason :) -uint32_t map_alnum(font_t *f, bool is_shifted, uint32_t keycode) { +uint32_t map_alnum(const font_t *f, bool is_shifted, uint32_t keycode) { switch (keycode) { case KC_SPACE: return (is_shifted ? 0 : 0x2002); // EN SPACE @@ -40,10 +72,11 @@ uint32_t map_alnum(font_t *f, bool is_shifted, uint32_t keycode) { } } -bool script_mode_translate(font_t *translator, bool is_shifted, uint32_t keycode) { +bool script_mode_translate(bool is_shifted, uint32_t keycode) { uint32_t translated = map_alnum(translator, is_shifted, keycode); if (translated == 0) return true; dprintf("script_mode_translate: %u => %d\n", keycode, translated); register_unicode(translated); return false; } +#endif diff --git a/users/rupa/rupa.h b/users/rupa/rupa.h old mode 100755 new mode 100644 index 9be3a2d62fca..cfe873ffc685 --- a/users/rupa/rupa.h +++ b/users/rupa/rupa.h @@ -20,19 +20,55 @@ along with this program. If not, see . #include "version.h" #include "process_records.h" #include "unicode.h" +#include "wrappers.h" enum userspace_layers { _QWERTY = 0, + _LOWER, _RAISE, + _ADJUST }; enum userspace_custom_keycodes { VRSN = SAFE_RANGE, + BUGS, + CATS, + DANCE, + DICE, + DOMO, + FART, + FLIP, + HUGS, + JOY, + KISS, LOD, + MUSIC, + RNDM, RUPA, + SHRUG, + TADA, U_FRACT, + U_ITALI, U_MONOS, + U_NORML, + U_SANSI, + U_SANSN, U_SCRPT, + WAT, + YUNO, + ZALGO, + ZZZZZ, + NEXT_SAFE_RANGE +}; + +enum userspace_font_choices { + F_FRACT = 0, + F_ITALI, + F_MONOS, + F_NORML, + F_SANSI, + F_SANSN, + F_SCRPT }; typedef struct font_t { @@ -41,14 +77,6 @@ typedef struct font_t { uint32_t zero_glyph; } font_t; -font_t fraktu_bold; -font_t monosp_bold; -font_t script_bold; - -bool script_mode_translate(font_t *translator, bool is_shifted, uint32_t keycode); - -#define RAISE MO(_RAISE) -#define OS_RGUI OSM(MOD_RGUI) -#define OS_RALT OSM(MOD_RALT) -#define OS_RCTL OSM(MOD_RCTL) -#define OS_RSFT OSM(MOD_RSFT) +const font_t* get_script_mode(void); +bool set_script_mode(int fc); +bool script_mode_translate(bool is_shifted, uint32_t keycode); diff --git a/users/rupa/unicode.c b/users/rupa/unicode.c old mode 100755 new mode 100644 index 89a0d4766563..2302a9555219 --- a/users/rupa/unicode.c +++ b/users/rupa/unicode.c @@ -17,26 +17,155 @@ along with this program. If not, see . #include "unicode.h" +combined_mode_t combined_mode = CM_NULL; +bool _seeded = false; + #if defined(UNICODEMAP_ENABLE) const uint32_t PROGMEM unicode_map[] = { - [CHEK] = 0x2713, // ✓ - /* - [DI1] = 0x2680, // ⚀ - [DI2] = 0x2681, // ⚁ - [DI3] = 0x2682, // ⚂ - [DI4] = 0x2683, // ⚃ - [DI5] = 0x2684, // ⚄ - [DI6] = 0x2685, // ⚅ - */ - [HAS] = 0x262D, // ☭ - [IBNG] = 0x203D, // ‽ - [IRNY] = 0x2E2E, // ⸮ - [M4] = 0x2669, // ♩ - [M8] = 0x266A, // ♪ - [M8B] = 0x266B, // ♫ - [M16] = 0x266C, // ♬ - [OM] = 0x0950, // ॐ - [STB] = 0x2605, // ★ - [STW] = 0x2606, // ☆ + [CCIR] = 0x20DD, // COMBINING CIRCLE ⃝ + [CENT] = 0x00A2, // ¢ + [CHEK] = 0x2713, // ✓ + [CKEY] = 0x20E3, // COMBINING KEYCAP ⃣ + [CUI] = 0x26A0, // ⚠ + [ECKS] = 0x2716, // ✖ + [EFF] = 0x017F, // ſ + [HAS] = 0x262D, // ☭ + [HUN] = 0x1F4AF, // 💯 + [IBNG] = 0x203D, // ‽ + [IRNY] = 0x2E2E, // ⸮ + [LALL] = 0x2200, // ∀ + [LELM] = 0x2208, // ∈ + [LEXI] = 0x2203, // ∃ + [LPRO] = 0x22A2, // ⊢ + [M4] = 0x2669, // ♩ + [M8] = 0x266A, // ♪ + [M8B] = 0x266B, // ♫ + [M16] = 0x266C, // ♬ + [NEG] = 0x20E0, // COMBINING NO ⃠ + [NOPE] = 0x1F6AB, // 🚫 + [NUM] = 0x2116, // № + [OM] = 0x0950, // ॐ + [SMB] = 0x263A, // ☻ + [SMW] = 0x263B, // ☺ + [STB] = 0x2605, // ★ + [STOP] = 0x26D4, // ⛔ + [STW] = 0x2606, // ☆ }; #endif + +const char *d6_map[] = { + "⚀", "⚁", "⚂", "⚃", "⚄", "⚅" +}; +const char *dance_map[] = { + "〜( ̄▽ ̄〜)", + "(〜 ̄▽ ̄)〜" +}; +const char *dance_more_map[] = { + "ƪ(˘⌣˘)┐", + "┌(˘⌣˘)ʃ" +}; +const char *flip_map[] = { + "(╯°□°)╯︵ ┻━━┻", + "(ノ-_-)ノ・・ ┻━━┻", + "(ノꐦ⊙曲ఠ)ノ彡┻━┻" +}; +const char *flip_back_map[] = { + "┬──┬◡ノ(° -°ノ)", + "┬──┬ノ( ゜-゜ノ)", + "┬──┬ノ(ಠ_ಠノ)" +}; +const char *joy_map[] = { + "ᕕ( ᐛ )ᕗ ", + "٩(ˊᗜˋ*)و", + "٩( ᐛ )و" +}; +const char *joy_harder_map[] = { + "\\\ ٩( ᐛ )و //", + "✧*。٩(ˊᗜˋ*)و✧*。" +}; + +const char *choice(const char *choices[], int size) { + if (_seeded == false) { + srand(timer_read32()); + dprintf("_seeded the roll\n"); + _seeded = true; + } + return choices[rand() % size]; +} + +const char *d6(void) { + return choice(d6_map, 6); +} +const char *dance(bool more) { + if (more) { + return choice(dance_more_map, 2); + } + return choice(dance_map, 2); +} +const char *flip(bool flip_back) { + if (flip_back) { + return choice(flip_back_map, 3); + } + return choice(flip_map, 3); +} +const char *joy(bool harder) { + if (harder) { + return choice(joy_harder_map, 2); + } + return choice(joy_map, 3); +} + +bool u_x(const char *text) { + send_unicode_string(text); + return false; +}; +bool u_xp(bool is_shifted, const char *shifted, const char *plain) { + send_unicode_string(is_shifted ? shifted : plain); + return false; +}; + +void zalgo(void) { + int number = (rand() % (8 + 1 - 2)) + 2; + unsigned int index; + for (index=0; index KC_0 && keycode < KC_MINUS) || keycode > KC_SLASH) { + return false; + } + tap_code(keycode); + unicode_input_start(); + switch (combined_mode) { + case CM_CIRCLE: + register_hex(0x20DD); + break; + case CM_NO: + register_hex(0x20E0); + break; + case CM_KEYCAP: + register_hex(0x20E3); + break; + case CM_ZALGO: + zalgo(); + break; + default: + break; + } + unicode_input_finish(); + return true; +} + +void cycle_combined_mode(void) { + if (combined_mode++ >= CM_MAX - 1) { + combined_mode = CM_NULL; + } +} + +combined_mode_t set_combined_mode(combined_mode_t mode) { + combined_mode = combined_mode == mode ? CM_NULL : mode; + return combined_mode; +} diff --git a/users/rupa/unicode.h b/users/rupa/unicode.h old mode 100755 new mode 100644 index 0c067bd913c2..92303b13f5bd --- a/users/rupa/unicode.h +++ b/users/rupa/unicode.h @@ -20,24 +20,58 @@ along with this program. If not, see . #if defined(UNICODEMAP_ENABLE) enum unicode_names { - CHEK, - /* - DI1, // ⚀ - DI2, // ⚁ - DI3, // ⚂ - DI4, // ⚃ - DI5, // ⚄ - DI6, // ⚅ - */ + CCIR, // COMBINING ⃝ + CENT, // ¢ + CHEK, // ✓ + CKEY, // COMBINING ⃣ + CUI, // ⚠ + ECKS, // ✖ + EFF, // ſ HAS, // ☭ + HUN, // 💯 IBNG, // ‽ IRNY, // ⸮ + LALL, // ∀ + LELM, // ∈ + LEXI, // ∃ + LPRO, // ⊢ M4, // ♩ M8, // ♪ M8B, // ♫ M16, // ♬ + NEG, // COMBINING ⃠ + NOPE, // 🚫 + NUM, // № OM, // ॐ + SMB, // ☻ + SMW, // ☺ STB, // ★ + STOP, // ⛔ STW, // ☆ }; #endif + +typedef enum combined_modes { + CM_NULL = 0, + CM_CIRCLE, + CM_NO, + CM_KEYCAP, + CM_ZALGO, + CM_MAX +} combined_mode_t; + +combined_mode_t combined_mode; + +// random choices +const char * d6(void); +const char * dance(bool more); +const char * flip(bool back); +const char * joy(bool harder); + +// like X and XP +bool u_x(const char *text); +bool u_xp(bool is_shifted, const char * shifted, const char *plain); + +bool combined_text(uint16_t keycode); +void cycle_combined_mode(void); +combined_mode_t set_combined_mode(combined_mode_t mode); diff --git a/users/rupa/wrappers.h b/users/rupa/wrappers.h new file mode 100644 index 000000000000..c5cae464b80b --- /dev/null +++ b/users/rupa/wrappers.h @@ -0,0 +1,122 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 "rupa.h" + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_RALT OSM(MOD_RALT) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_RSFT OSM(MOD_RSFT) + +#define G_LWR LT(_LOWER, KC_G) + +#if defined(UNICODEMAP_ENABLE) +# define CSHAPES XP(CCIR,CKEY) +# define CUIDADO XP(CUI,HAS) +# define NOPENAH XP(NOPE,STOP) +# define MUSIC_A XP(M4,M8) +# define MUSIC_B XP(M8B,M16) +# define SMILE XP(SMB,SMW) +# define STARS XP(STB,STW) +# define YEPYEP XP(CHEK,HUN) +#endif + +/* _QWERTY + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Es~│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│~ `│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │RAISE │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Alt │Gui │ Space │RAI│LOW│CAP│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_QWERTY______________ROW1 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_GRV +#define ____65_QWERTY______________ROW2 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 +#define ____65_QWERTY______________ROW3 RAISE, KC_A, KC_S, KC_D, KC_F, G_LWR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP +#define ____65_QWERTY______________ROW4 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 +#define ____65_QWERTY______________ROW5 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, RAISE, LOWER, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT + +/* _RAISE + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │ ‽ │ ⸮ │ │ ¢ │ │ │ │★ │ │ ☻ │ ⃠ │CSH│ Del │Hme│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │WAT│ ∃ │Rup│TAD│YUN│ │ ∈ │ ॐ │ │♩ ♪│♫ ♬│ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ ∀ │ ſ │ ⚂ │FRT│ │HUG│JOY│KSS│LOD│ │NO!│ ✓ 💯 │End│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ RShift │⚠ ☭│ ✖ │CAT│BOW│BUG│ № │MUS│DNC│ ⊢ │SHR│ McL│M↑ │McR│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │RCtl│RAlt│RGui│ FLIP │ │ │ │M← │M↓ │M→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_RAISE_______________ROW1 KC_GRV, X(IBNG), X(IRNY), _______, X(CENT), _______, _______, _______, STARS, _______, SMILE, X(NEG), CSHAPES, KC_DEL, KC_HOME +#define ____65_RAISE_______________ROW2 _______, _______, WAT, X(LEXI), RUPA, TADA, YUNO, _______, X(LELM), X(OM), _______, MUSIC_A, MUSIC_B, _______, KC_INS +#define ____65_RAISE_______________ROW3 _______, X(LALL), X(EFF), DICE, FART, _______, HUGS, JOY, KISS, LOD, _______, NOPENAH, YEPYEP, KC_END +#define ____65_RAISE_______________ROW4 OS_RSFT, CUIDADO, X(ECKS), CATS, DOMO, BUGS, X(NUM), MUSIC, DANCE, X(LPRO), SHRUG, KC_BTN1, KC_MS_U, KC_BTN2 +#define ____65_RAISE_______________ROW5 OS_RCTL, OS_RALT, OS_RGUI, FLIP, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + +/* _LOWER + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │zzz│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │u_f│u_i│u_m│u_n│usi│usn│u_s│ │ │PRT│ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │SLK│PAU│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ZAL│ │CAP│VSN│ │NLK│ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_LOWER_______________ROW1 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ZZZZZ, _______, _______ +#define ____65_LOWER_______________ROW2 _______, U_FRACT, U_ITALI, U_MONOS, U_NORML, U_SANSI, U_SANSN, U_SCRPT, _______, _______, KC_PSCR, _______, _______, _______, _______ +#define ____65_LOWER_______________ROW3 _______, _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +#define ____65_LOWER_______________ROW4 _______, ZALGO , _______, KC_CAPS, VRSN, _______, KC_NLCK, _______, _______, _______, _______, _______, _______, _______ +#define ____65_LOWER_______________ROW5 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + +/* _ADJUST + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │r x│r m│rh+│rh-│rs+│rs-│rv+│rv-│ra+│ra-│ │ │RESET│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │EEP RSET│ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │Mut│V- │V+ │ │U MODE│ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_ADJUST______________ROW1 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______ +#define ____65_ADJUST______________ROW2 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______ +#define ____65_ADJUST______________ROW3 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______ +#define ____65_ADJUST______________ROW4 _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, UC_MOD, _______, _______ +#define ____65_ADJUST______________ROW5 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + +#define ____65_ADJUST__________RGB_ROW2 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, RESET, _______ +#define ____65_ADJUST__________RGB_ROW3 _______, RGB_M_P, RGB_M_B, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______ + +#define ____65_ADJUST___________BL_ROW2 _______, BL_TOGG, BL_BRTG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______ + +// clang-format on diff --git a/users/talljoe/config.h b/users/talljoe/config.h index 33374014dfae..8a5fd50cb7e1 100644 --- a/users/talljoe/config.h +++ b/users/talljoe/config.h @@ -1,5 +1,19 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD @@ -9,4 +23,5 @@ #define BOOTMAGIC_KEY_SKIP KC_I #define BOOTMAGIC_KEY_EEPROM_CLEAR KC_E -#endif // !USERSPACE_CONFIG_H +#define COMBO_COUNT 2 +#define COMBO_TERM 250 diff --git a/users/talljoe/macros.c b/users/talljoe/macros.c new file mode 100644 index 000000000000..db8d28d4ce1d --- /dev/null +++ b/users/talljoe/macros.c @@ -0,0 +1,40 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "talljoe.h" + +extern keymap_config_t keymap_config; + +ostype_t get_os() { + if(keymap_config.swap_lalt_lgui) { + return MACOSX; + } + + return WINDOWS; +} + +#define IS_OSX() (get_os() == MACOSX) + +#define MOD_SEND(KEY) (IS_OSX() ? SEND_STRING(SS_LCMD(KEY)) : SEND_STRING(SS_LCTRL(KEY))) + +void macro_copy() { MOD_SEND("c"); } +void macro_paste() { MOD_SEND("v"); } +void macro_lock() { + if (IS_OSX()) { + SEND_STRING(SS_LCTRL(SS_LCMD("q"))); + } else { + SEND_STRING(SS_LGUI("l")); + } +} diff --git a/users/talljoe/macros.h b/users/talljoe/macros.h new file mode 100644 index 000000000000..832d4403fce3 --- /dev/null +++ b/users/talljoe/macros.h @@ -0,0 +1,27 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +typedef enum OSTYPE { + WINDOWS, + MACOSX, + LINUX +} ostype_t; + +ostype_t get_os(void); + +void macro_copy(void); +void macro_paste(void); +void macro_lock(void); diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index e0a71561f467..42ffb411a90b 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk @@ -1,4 +1,11 @@ -SRC += talljoe.c tapdance.c +SRC += talljoe.c macros.c $(wildcard users/talljoe/tapdance/*.c) +ifeq ($(strip $(VISUALIZER_ENABLE)), yes) + SRC += visualizer.c +endif + +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif EXTRAFLAGS+=-flto diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c index a533ff610325..517f712ec88b 100644 --- a/users/talljoe/talljoe.c +++ b/users/talljoe/talljoe.c @@ -1,3 +1,18 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "talljoe.h" @@ -5,14 +20,31 @@ #include "../../../keyboards/wilba_tech/wt_rgb_backlight.h" #endif +#ifdef VISUALIZER_ENABLE +const char layer_names[32][16] = { + [_BASE] = "QWERTY", + [_WORKMAN] = "Workman", + [_NORMAN] = "Norman", + [_DVORAK] = "Dvorak", + [_COLMAK] = "Colmak", + [_MALTROFF] = "Maltroff", + [_NORTRON] = "Nortron", + [_GAME] = "Game", + [_NAV] = "Navigation", + [_NUM] = "Numpad", + [_ADJUST] = "Adjust", + [_RESET] = "Reset", +}; +#endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = TEMPLATE_TKL( - 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, MO_ADJ , + US_LOCK, 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, MO_ADJ , US_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 , US_BSLS, KC_INS , KC_HOME, KC_PGUP, US_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_END , KC_PGDN, CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_SCLN, KC_QUOT, US_ENT , SH_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SH_RBRC, KC_UP , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC3, KC_SPC1, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), [_WORKMAN] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_SCLN, _______, _______, _______, @@ -42,9 +74,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MALTROFF] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_Q, KC_P, KC_Y, KC_G, KC_B , KC_J, KC_M, KC_U, KC_K, KC_L, _______, _______, _______, - _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , US_ENT , KC_BSPC, - _______, KC_Z, KC_X, KC_C, KC_V, US_QUOT, KC_SCLN, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, + _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , _______, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_SCLN, KC_BSPC, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, MLT_E , _______, _______, _______, _______, _______, _______), + // It's Norman but like Maltron + [_NORTRON] = TEMPLATE( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_BSPC, KC_L , US_SCLN, _______, _______, _______, + _______, KC_A , KC_S , KC_I , KC_T , KC_G , KC_Y , KC_N , KC_R , KC_O , KC_H , _______, _______, + _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, + _______, _______, _______, MLT_E , US_ENT , _______, _______, _______, _______, _______), #endif #ifdef ENABLE_GAME_LAYER [_GAME] = TEMPLATE( @@ -57,27 +96,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = TEMPLATE_NAV( 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 , XXXXXXX, XXXXXXX, US_TAB , KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN3, KC_BTN2, KC_DEL , - CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , US_QUOT, TG_ADJ , + CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_BSPC, TG_ADJ , KC_LSFT, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, KC_ASTR, KC_CALC, US_GRV , KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP , - KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), + KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC3, NV_SPC1, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), [_NUM] = TEMPLATE_NUM( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_CIRC, KC_7, KC_8, KC_9, KC_PMNS, XXXXXXX, XXXXXXX, KC_DEL , - CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, KC_ENT , + CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, KC_BSPC, KC_ENT , KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_PIPE, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, TG_NUM , - KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), + KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC3, NM_SPC1, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) [_ADJUST] = TEMPLATE_ADJUST( MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , MO_RST , H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, MO_RST , XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , - TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, - MO_RST , AG_SWAP, AG_NORM, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), + TG_NKRO, LY_QWER, LY_WORK, LY_CLMK, LY_DVRK, LY_NTRN, LY_NRMN, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, + MO_RST , AG_SWAP, AG_NORM, XXXXXXX, XXXXXXX, BL_TOGG, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), // To Reset hit FN + ` + Esc [_RESET] = TEMPLATE_RESET, }; +__attribute__((weak)) +void matrix_scan_keymap(void) { +} + void matrix_scan_user(void) { + matrix_scan_keymap(); + #ifdef KEYBOARD_gh60 if (IS_LAYER_ON(_GAME)) { gh60_wasd_leds_on(); @@ -140,16 +185,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP - - #if defined(BOOTLOADER_HALFKAY) - ":teensy" - #elif defined(BOOTLOADER_CATERINA) - ":avrdude" - #else - ":dfu" - #endif - SS_TAP(X_ENTER)); + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); +#ifndef FLASH_BOOTLOADER + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) +#endif + { + SEND_STRING(":flash"); + } + if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { + SEND_STRING(" -j8 --output-sync"); + } + tap_code(KC_ENT); + set_mods(temp_mod); } return false; break; diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index 496a6222a92f..f151bde685c5 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -1,7 +1,24 @@ -#ifndef USERSPACE -#define USERSPACE - -#include "quantum.h" +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "tapdance/tapdance.h" +#include "macros.h" enum userspace_custom_keycodes { KC_MAKE = SAFE_RANGE, // can always be here @@ -22,6 +39,7 @@ enum layers { _DVORAK, _COLMAK, _MALTROFF, + _NORTRON, _GAME, _NAV, _NUM, @@ -29,14 +47,12 @@ enum layers { _RESET = RESET_LAYER, }; -enum tap_dancers { - TD_SEMICOLON, - TD_GRAVE, - TD_QUOTE, -}; +#ifdef VISUALIZER_ENABLE + extern const char layer_names[][16]; +#endif #define MO_NAV MO(_NAV) -#define MO_ADJ MO(_ADJUST) +#define MO_ADJ TD(TD_FUNCTION) #define MO_RST MO(_RESET) #define TG_ADJ TG(_ADJUST) #define TG_NUM TG(_NUM) @@ -52,8 +68,10 @@ enum tap_dancers { #define LY_CLMK DF(_COLMAK) #if SPACE_COUNT >= 2 #define LY_MALT DF(_MALTROFF) + #define LY_NTRN DF(_NORTRON) #else #define LY_MALT KC_NO + #define LY_NTRN KC_NO #endif #define TG_NKRO MAGIC_TOGGLE_NKRO #define KC_PTT KC_F24 @@ -66,61 +84,29 @@ enum tap_dancers { #define US_BSLS LCA_T(KC_BSLS) #define US_SCLN TD(TD_SEMICOLON) #define US_GRV TD(TD_GRAVE) -#define US_QUOT TD(TD_QUOTE) #define US_TAB C_S_T(KC_TAB) #define SH_LBRC LSFT_T(KC_LBRC) #define SH_RBRC RSFT_T(KC_RBRC) +#define US_LOCK TD(TD_LOCK) #define MLT_E LT(_NUM, KC_E) -#ifndef SPACE_COUNT - #define SPACE_COUNT 1 -#endif -#if (SPACE_COUNT == 1) - #define KC_SPC1 LT(_NAV, KC_SPC) - #define KC_SPC2 XXXXXXX - #define KC_SPC3 XXXXXXX - - #define NV_SPC1 _______ - #define NV_SPC2 _______ - #define NV_SPC3 _______ - - #define NM_SPC1 _______ - #define NM_SPC2 _______ - #define NM_SPC3 _______ -#elif (SPACE_COUNT == 2) - #define KC_SPC1 LT(_NAV,KC_SPC) - #define KC_SPC2 LT(_NUM,KC_ENT) - - #define NV_SPC1 KC_SPC - #define NV_SPC2 KC_ENT - - #define NM_SPC1 KC_0 - #define NM_SPC2 KC_SPC - - #define KC_SPC3 XXXXXXX - #define NV_SPC3 XXXXXXX - #define NM_SPC3 XXXXXXX -#elif (SPACE_COUNT == 3) - #ifdef SWAP_HANDS_ENABLE - #define KC_SPC1 SH_T(KC_BSPC) - #else - #define KC_SPC1 KC_BSPC - #endif - #define KC_SPC2 LT(_NUM,KC_ENT) - #define KC_SPC3 LT(_NAV,KC_SPC) - - #define NV_SPC1 KC_SPC - #define NV_SPC2 KC_ENT - #define NV_SPC3 KC_SPC - - #define NM_SPC1 KC_SPC - #define NM_SPC2 XXXXXXX - #define NM_SPC3 KC_0 -#else - #error "Unsupported space count:" SPACE_COUNT +#ifndef SWAP_HANDS_ENABLE +#define SH_T #endif +#define KC_SPC1 LT(_NAV,KC_SPC) +#define KC_SPC2 LT(_NUM,KC_ENT) +#define KC_SPC3 SH_T(KC_BSPC) + +#define NV_SPC1 KC_SPC +#define NV_SPC2 KC_ENT +#define NV_SPC3 KC_SPC + +#define NM_SPC1 KC_0 +#define NM_SPC2 XXXXXXX +#define NM_SPC3 KC_SPC + #ifndef ZEAL_RGB #define BR_INC KC_NO #define BR_DEC KC_NO @@ -195,5 +181,3 @@ enum tap_dancers { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ RESET , XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX) #endif - -#endif diff --git a/users/talljoe/tapdance.c b/users/talljoe/tapdance.c deleted file mode 100644 index c4d6025f0f77..000000000000 --- a/users/talljoe/tapdance.c +++ /dev/null @@ -1,146 +0,0 @@ -//Tap Dance -#include "talljoe.h" - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send two single taps - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7, - SPECIAL = 8 -}; - -static struct { - int quote; - int semicolon; -} tap_state = {0}; - -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted) { - // if (!state->pressed) return SINGLE_TAP; - //need "permissive hold" here. - // else return SINGLE_HOLD; - //If the interrupting key is released before the tap-dance key, then it is a single HOLD - //However, if the tap-dance key is released first, then it is a single TAP - //But how to get access to the state of the interrupting key???? - return SINGLE_TAP; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; - else if (state->count == 3) return TRIPLE_HOLD; - else return SPECIAL; -} - -int hold_cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted) { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if (state->count == 3) { - if (!state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return SPECIAL; -} - -// Send semi-colon + enter on two taps -void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { - tap_state.semicolon = hold_cur_dance(state); - switch (tap_state.semicolon) { - case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; - case SINGLE_HOLD: layer_on(_NUM); break; - } -} - -void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (tap_state.semicolon) { - case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; - case DOUBLE_TAP: { - if (get_mods()) { - SEND_STRING(";;"); // send normal when mods are pressed - } - else { - SEND_STRING(";\n"); - } - break; - } - case TRIPLE_TAP: { - SEND_STRING(";\n\n"); - } - case SPECIAL: layer_invert(_NUM); break; - case SINGLE_HOLD: layer_off(_NUM); break; - } - tap_state.semicolon = 0; -} - -// Send `. ~. ``` -void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: - SEND_STRING("`"); - break; - case 2: - SEND_STRING("~"); - break; - } -} - -void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { - if(state->count == 3) { - SEND_STRING("```"); - } else if (state->count > 3) { - SEND_STRING("`"); - } -} - - -void tap_dance_quote_finished(qk_tap_dance_state_t *state, void *user_data) { - tap_state.quote = hold_cur_dance(state); - switch (tap_state.quote) { - case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_QUOT); break; - case SINGLE_HOLD: layer_on(_NAV); break; - } -} - -void tap_dance_quote_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (tap_state.quote) { - case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_QUOTE); break; - case DOUBLE_TAP: SEND_STRING("\""); break; - case TRIPLE_TAP: layer_invert(_NAV); break; - case SINGLE_HOLD: layer_off(_NAV); break; - } - tap_state.quote = 0; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_semicolon_finished, tap_dance_semicolon_reset), - [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), - [TD_QUOTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_quote_finished, tap_dance_quote_reset), -}; diff --git a/users/talljoe/tapdance/actions/td.function.c b/users/talljoe/tapdance/actions/td.function.c new file mode 100644 index 000000000000..fffbf283dda7 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.function.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +static struct { + int state; +} function_state = {0}; + +// Send semi-colon + enter on two taps +void tap_dance_function_finished(qk_tap_dance_state_t *state, void *user_data) { + function_state.state = hold_cur_dance(state); + switch (function_state.state) { + case SINGLE_HOLD: layer_on(_ADJUST); break; + } +} + +void tap_dance_function_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (function_state.state) { + case SPECIAL: reset_keyboard(); break; + case SINGLE_HOLD: layer_off(_ADJUST); break; + } + function_state.state = 0; +} diff --git a/users/talljoe/tapdance/actions/td.grave.c b/users/talljoe/tapdance/actions/td.grave.c new file mode 100644 index 000000000000..509b66dc35c4 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.grave.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Send `. ~. ``` +void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: + SEND_STRING("`"); + break; + case 2: + SEND_STRING("~"); + break; + } +} + +void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { + if(state->count == 3) { + SEND_STRING("```"); + } else if (state->count > 3) { + SEND_STRING("`"); + } +} + diff --git a/users/talljoe/tapdance/actions/td.lock.c b/users/talljoe/tapdance/actions/td.lock.c new file mode 100644 index 000000000000..4422d9e252b4 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.lock.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +static struct { + int state; +} lock_state = {0}; + +// Send semi-colon + enter on two taps +void tap_dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) { + lock_state.state = cur_dance(state); + switch (lock_state.state) { + case SINGLE_TAP: register_code(KC_ESC); break; + case SINGLE_HOLD: macro_lock(); break; + } +} + +void tap_dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (lock_state.state) { + case SINGLE_TAP: unregister_code(KC_ESC); break; + } + lock_state.state = 0; +} diff --git a/users/talljoe/tapdance/actions/td.semicolon.c b/users/talljoe/tapdance/actions/td.semicolon.c new file mode 100644 index 000000000000..45776492a4ae --- /dev/null +++ b/users/talljoe/tapdance/actions/td.semicolon.c @@ -0,0 +1,54 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +static struct { + int semicolon; + bool mods; +} tap_state = {0}; + +void tap_dance_semicolon_each(qk_tap_dance_state_t *state, void *user_data) { + tap_state.mods |= get_mods(); +} + +// Send semi-colon + enter on two taps +void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { + tap_state.semicolon = hold_cur_dance(state); + switch (tap_state.semicolon) { + case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; + case SINGLE_HOLD: layer_on(_NUM); break; + } +} + +void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (tap_state.semicolon) { + case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; + case DOUBLE_TAP: { + if (tap_state.mods) { + SEND_STRING(";;"); // send normal when mods are pressed + } + else { + SEND_STRING(";\n"); + } + break; + } + case TRIPLE_TAP: { + SEND_STRING(";\n\n"); + } + case SPECIAL: layer_invert(_NUM); break; + case SINGLE_HOLD: layer_off(_NUM); break; + } + tap_state.semicolon = 0; +} diff --git a/users/talljoe/tapdance/tapdance.h b/users/talljoe/tapdance/tapdance.h new file mode 100644 index 000000000000..532e978ca8c4 --- /dev/null +++ b/users/talljoe/tapdance/tapdance.h @@ -0,0 +1,26 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" +#include "td_setup.h" + +enum tap_dancers { + TD_SEMICOLON, + TD_GRAVE, + TD_LOCK, + TD_FUNCTION, +}; + diff --git a/users/talljoe/tapdance/tapdance_actions.c b/users/talljoe/tapdance/tapdance_actions.c new file mode 100644 index 000000000000..59a34b7b9ed9 --- /dev/null +++ b/users/talljoe/tapdance/tapdance_actions.c @@ -0,0 +1,28 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "../talljoe.h" +#include "actions/td.grave.c" +#include "actions/td.lock.c" +#include "actions/td.semicolon.c" +#include "actions/td.function.c" + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_semicolon_each, tap_dance_semicolon_finished, tap_dance_semicolon_reset), + [TD_LOCK] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_lock_finished, tap_dance_lock_reset), + [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), + [TD_FUNCTION] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_function_finished, tap_dance_function_reset), +}; diff --git a/users/talljoe/tapdance/td_setup.c b/users/talljoe/tapdance/td_setup.c new file mode 100644 index 000000000000..d8464144acf9 --- /dev/null +++ b/users/talljoe/tapdance/td_setup.c @@ -0,0 +1,70 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "tapdance.h" + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP + if (state->interrupted) { + // if (!state->pressed) return SINGLE_TAP; + //need "permissive hold" here. + // else return SINGLE_HOLD; + //If the interrupting key is released before the tap-dance key, then it is a single HOLD + //However, if the tap-dance key is released first, then it is a single TAP + //But how to get access to the state of the interrupting key???? + return SINGLE_TAP; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; + else if (state->count == 3) return TRIPLE_HOLD; + else return SPECIAL; +} + +int hold_cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted) { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if (state->count == 3) { + if (!state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return SPECIAL; +} diff --git a/users/talljoe/tapdance/td_setup.h b/users/talljoe/tapdance/td_setup.h new file mode 100644 index 000000000000..85d45d944f88 --- /dev/null +++ b/users/talljoe/tapdance/td_setup.h @@ -0,0 +1,29 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7, + SPECIAL = 8 +}; + +int cur_dance (qk_tap_dance_state_t *state); +int hold_cur_dance (qk_tap_dance_state_t *state); diff --git a/users/talljoe/visualizer.c b/users/talljoe/visualizer.c new file mode 100644 index 000000000000..c17b56706bfc --- /dev/null +++ b/users/talljoe/visualizer.c @@ -0,0 +1,21 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "talljoe.h" + +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + state->status_text = layer_names[biton32(state->status.layer)]; +} diff --git a/util/travis_docs.sh b/util/travis_docs.sh deleted file mode 100755 index 93c2d7186729..000000000000 --- a/util/travis_docs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -source util/travis_utils.sh -source util/travis_push.sh - -if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip docs]"* ]] ; then - if git diff --name-only ${TRAVIS_COMMIT_RANGE} | grep -e '^quantum/' -e '^tmk_core/' -e '^docs/internals_.*'; then - echo "Generating internal docs..." - rm -rf doxygen - doxygen Doxyfile - moxygen -q -a -g -o docs/internals_%s.md doxygen/xml - git add docs/internals_* - git commit -m'autogenerated internal docs for ${TRAVIS_COMMIT_RANGE}' || true - fi -fi diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules index d2abf490d686..70bd7e6e3e08 100644 --- a/util/udev/50-qmk.rules +++ b/util/udev/50-qmk.rules @@ -1,60 +1,60 @@ # Atmel DFU ### ATmega16U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess" ### ATmega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess" ### ATmega16U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess" ### ATmega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess" ### AT90USB64 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess" ### AT90USB128 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess" # Input Club -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess" # STM32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess" # STM32 DFU -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" # BootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess" # USBAspLoader -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"