forked from mirrors/qmk_firmware
Merge remote-tracking branch 'origin/master' into develop
Resolved Conflicts: keyboards/kc60/rules.mk keyboards/xd96/rules.mk lib/python/qmk/cli/__init__.py
This commit is contained in:
commit
ac3b7d79e0
938 changed files with 35990 additions and 13003 deletions
3
.github/workflows/api.yml
vendored
3
.github/workflows/api.yml
vendored
|
@ -13,6 +13,9 @@ jobs:
|
|||
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:
|
||||
|
|
42
.github/workflows/develop_api.yml
vendored
Normal file
42
.github/workflows/develop_api.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Update Develop API Data
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who work in their fork on develop
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards_devel
|
||||
TARGET_FOLDER: v1
|
37
.github/workflows/develop_update.yml
vendored
Normal file
37
.github/workflows/develop_update.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Update develop after master merge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
develop_update:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout develop
|
||||
run: |
|
||||
git fetch origin master develop
|
||||
git checkout develop
|
||||
|
||||
- name: Check if branch locked
|
||||
id: check_locked
|
||||
uses: andstor/file-existence-action@v1
|
||||
with:
|
||||
files: ".locked"
|
||||
|
||||
- name: Update develop from master
|
||||
if: steps.check_locked.outputs.files_exists == 'false'
|
||||
run: |
|
||||
git config --global user.name "QMK Bot"
|
||||
git config --global user.email "hello@qmk.fm"
|
||||
git merge origin/master
|
||||
git push origin develop
|
43
.github/workflows/docs.yml
vendored
Normal file
43
.github/workflows/docs.yml
vendored
Normal file
|
@ -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
|
|
@ -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
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -106,6 +106,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)
|
||||
|
|
|
@ -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`
|
||||
|
@ -212,6 +230,16 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
|||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk clean`
|
||||
|
||||
This command cleans up the `.build` folder. If `--all` is passed, any .hex or .bin files present in the `qmk_firmware` directory will also be deleted.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk clean [-a]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Developer Commands
|
||||
|
@ -258,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.
|
||||
|
@ -299,4 +337,3 @@ This command runs the python test suite. If you make changes to python code you
|
|||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
116
docs/feature_led_indicators.md
Normal file
116
docs/feature_led_indicators.md
Normal file
|
@ -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).
|
|
@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.<br>
|
|||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||
![QMK Color Wheel with HSV Values](https://i.imgur.com/vkYVo66.jpg)
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
'/unicode': '/feature_unicode',
|
||||
'/python_development': '/cli_development',
|
||||
'/getting_started_build_tools':'/newbs_getting_started',
|
||||
'/tutorial':'/newbs',
|
||||
},
|
||||
basePath: '/',
|
||||
name: 'QMK Firmware',
|
||||
|
|
33
docs/ko-kr/README.md
Normal file
33
docs/ko-kr/README.md
Normal file
|
@ -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)를 변경하는데에 특화되어 있습니다.
|
156
docs/ko-kr/getting_started_build_tools.md
Normal file
156
docs/ko-kr/getting_started_build_tools.md
Normal file
|
@ -0,0 +1,156 @@
|
|||
# 컴파일 도구 설치
|
||||
|
||||
이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
|
||||
**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](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)에서 더 많은 정보를 확인할 수 있습니다.
|
17
docs/ko-kr/getting_started_getting_help.md
Normal file
17
docs/ko-kr/getting_started_getting_help.md
Normal file
|
@ -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)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다.
|
67
docs/ko-kr/getting_started_github.md
Normal file
67
docs/ko-kr/getting_started_github.md
Normal file
|
@ -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/<whoeveryouare>/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 :)"**
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
||||
CONSOLE_ENABLE = no
|
||||
|
|
|
@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#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);
|
||||
}
|
|
@ -40,6 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* 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
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
VIA_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
86
keyboards/acekeyboard/titan60/config.h
Normal file
86
keyboards/acekeyboard/titan60/config.h
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
32
keyboards/acekeyboard/titan60/info.json
Normal file
32
keyboards/acekeyboard/titan60/info.json
Normal file
|
@ -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}]
|
||||
}
|
||||
}
|
||||
}
|
48
keyboards/acekeyboard/titan60/keymaps/default/keymap.c
Normal file
48
keyboards/acekeyboard/titan60/keymaps/default/keymap.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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
|
||||
),
|
||||
};
|
64
keyboards/acekeyboard/titan60/keymaps/via/keymap.c
Normal file
64
keyboards/acekeyboard/titan60/keymaps/via/keymap.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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
|
||||
)
|
||||
};
|
3
keyboards/acekeyboard/titan60/keymaps/via/rules.mk
Normal file
3
keyboards/acekeyboard/titan60/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
17
keyboards/acekeyboard/titan60/readme.md
Normal file
17
keyboards/acekeyboard/titan60/readme.md
Normal file
|
@ -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).
|
22
keyboards/acekeyboard/titan60/rules.mk
Normal file
22
keyboards/acekeyboard/titan60/rules.mk
Normal file
|
@ -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
|
18
keyboards/acekeyboard/titan60/titan60.c
Normal file
18
keyboards/acekeyboard/titan60/titan60.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "titan60.h"
|
109
keyboards/acekeyboard/titan60/titan60.h
Normal file
109
keyboards/acekeyboard/titan60/titan60.h
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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 } \
|
||||
}
|
||||
|
||||
|
22
keyboards/ai03/polaris/keymaps/mekberg/config.h
Normal file
22
keyboards/ai03/polaris/keymaps/mekberg/config.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Copyright 2019 Ryota Goto
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Define some configuration for modtap behavior
|
||||
// #define TAPPING_TERM 150
|
||||
#define PERMISSIVE_HOLD
|
97
keyboards/ai03/polaris/keymaps/mekberg/keymap.c
Normal file
97
keyboards/ai03/polaris/keymaps/mekberg/keymap.c
Normal file
|
@ -0,0 +1,97 @@
|
|||
/* Copyright 2019 Ryota Goto
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_NAV,
|
||||
_FN
|
||||
};
|
||||
|
||||
#define MY_LOCK C(LCMD(KC_L)) // Mac: Custom lock hotkey in BTT (when Alt/Command have been swapped in macOS)
|
||||
|
||||
/*
|
||||
KBD6x ANSI physical layout
|
||||
1u == 8chars
|
||||
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
| | | | | | | | | | | | | | | |
|
||||
|─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
| 1,5u | | | | | | | | | | | | | 1,5u |
|
||||
|─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
| 1,75u | | | | | | | | | | | | 1,25u |
|
||||
|─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
| 2,25u | | | | | | | | | | | 1,75u | |
|
||||
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
| | 1,25u | | 1,25u | |
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_60_tsangan_hhkb(
|
||||
// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// | | | | | | | | | | | | | | | |
|
||||
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_NUBS, KC_RBRC,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,5u | | | | | | | | | | | | | 1,5u |
|
||||
LT(_NAV,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_NUHS, KC_BSPC,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,75u | | | | | | | | | | | | 1,25u |
|
||||
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,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,25u | | | | | | | | | | | 1,75u | |
|
||||
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(_FN),
|
||||
// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// | | 1,25u | | 1,25u | |
|
||||
XXXXXXX, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, XXXXXXX
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
),
|
||||
[_NAV] = LAYOUT_60_tsangan_hhkb(
|
||||
// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// | | | | | | | | | | | | | | | |
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_BSPC,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,5u | | | | | | | | | | | | | 1,5u |
|
||||
_______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, _______, _______, KC_DEL,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,75u | | | | | | | | | | | | 1,25u |
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,25u | | | | | | | | | | | 1,75u | |
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// | | 1,25u | | 1,25u | |
|
||||
XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
),
|
||||
[_FN] = LAYOUT_60_tsangan_hhkb(
|
||||
// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// | | | | | | | | | | | | | | | |
|
||||
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, _______, _______,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,5u | | | | | | | | | | | | | 1,5u |
|
||||
_______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,75u | | | | | | | | | | | | 1,25u |
|
||||
KC_RCTL, KC_VOLD, KC_VOLU, KC_MUTE, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, MY_LOCK,
|
||||
// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────|
|
||||
// | 1,25u | | | | | | | | | | | 1,75u | |
|
||||
_______, BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, KC_MRWD, KC_MFFD, _______, _______, _______,
|
||||
// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
// | | 1,25u | | 1,25u | |
|
||||
XXXXXXX, _______, _______, KC_MPLY, _______, _______, XXXXXXX
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
),
|
||||
};
|
14
keyboards/ai03/polaris/keymaps/mekberg/readme.md
Normal file
14
keyboards/ai03/polaris/keymaps/mekberg/readme.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# General Information
|
||||
|
||||
This is more or less a HHKB base layout, but with completely different Fn layers. I don't use most of the HHKB secondary key positions because, honestly, they make no sense to me at all.
|
||||
|
||||
Fn key layer is focused mostly on keyboard firmware features (like RGB) as well as some of the necessary alternate functions. It also hold media controls, F-keys and Reset.
|
||||
|
||||
Left Tab-Hold layer is focused on nav cluster functionality, and turns Backspace into Delete (and moves Backspace up into the top right 1u position).
|
||||
|
||||
|
||||
# Build instructions
|
||||
|
||||
To simply build the firmware file: `make clean && make ai03/polaris:mekberg`
|
||||
|
||||
To build and immediately flash: `make clean && make ai03/polaris:mekberg:flash`
|
2
keyboards/ai03/polaris/keymaps/mekberg/rules.mk
Normal file
2
keyboards/ai03/polaris/keymaps/mekberg/rules.mk
Normal file
|
@ -0,0 +1,2 @@
|
|||
BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Disable keyboard RGB underglow
|
|
@ -14,27 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "al1.h"
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
CONFIG_LED_IO;
|
||||
print_dec(usb_led);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||
PORTB &= ~(1<<7);
|
||||
else
|
||||
PORTB |= (1<<7);
|
||||
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||
PORTD &= ~(1<<0);
|
||||
else
|
||||
PORTD |= (1<<0);
|
||||
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||
PORTD &= ~(1<<1);
|
||||
else
|
||||
PORTD |= (1<<1);
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
|
||||
#include "quantum.h"
|
||||
|
||||
#define CONFIG_LED_IO \
|
||||
DDRB |= (1<<7) | (1<<6); \
|
||||
DDRD |= (1<<0) | (1<<1);
|
||||
|
||||
|
||||
#define LAYOUT( \
|
||||
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\
|
||||
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
|
||||
|
|
|
@ -46,6 +46,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define LED_NUM_LOCK_PIN D0
|
||||
#define LED_CAPS_LOCK_PIN B7
|
||||
#define LED_SCROLL_LOCK_PIN D1
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
|
|
@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* 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
|
||||
|
|
|
@ -14,36 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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);
|
||||
}
|
||||
|
|
|
@ -48,10 +48,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* 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
|
||||
|
|
|
@ -14,51 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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);
|
||||
}
|
||||
|
|
|
@ -15,23 +15,3 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "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);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define LED_CAPS_LOCK_PIN C5
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
|
|
|
@ -1,30 +1 @@
|
|||
#include "amj40.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<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB |= (1<<2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7}
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define LED_CAPS_LOCK_PIN B2
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
|
|
|
@ -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<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB |= (1<<2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,11 +38,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#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
|
||||
|
||||
|
|
|
@ -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<<USB_LED_NUM_LOCK)) {
|
||||
// Turn numlock on
|
||||
PORTD &= ~(1<<6);
|
||||
} else {
|
||||
// Turn numlock off
|
||||
PORTD |= (1<<6);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* 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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
VIA_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
|
|
@ -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
|
53
keyboards/atreus/keymaps/talljoe/config.h
Normal file
53
keyboards/atreus/keymaps/talljoe/config.h
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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 \
|
||||
)
|
16
keyboards/beatervan/beatervan.c
Normal file
16
keyboards/beatervan/beatervan.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "beatervan.h"
|
70
keyboards/beatervan/beatervan.h
Normal file
70
keyboards/beatervan/beatervan.h
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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 } \
|
||||
}
|
55
keyboards/beatervan/config.h
Normal file
55
keyboards/beatervan/config.h
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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
|
204
keyboards/beatervan/info.json
Normal file
204
keyboards/beatervan/info.json
Normal file
|
@ -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} ]
|
||||
}
|
||||
}
|
||||
}
|
93
keyboards/beatervan/keymaps/default/keymap.c
Normal file
93
keyboards/beatervan/keymaps/default/keymap.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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;
|
||||
};
|
1
keyboards/beatervan/keymaps/default/readme.md
Normal file
1
keyboards/beatervan/keymaps/default/readme.md
Normal file
|
@ -0,0 +1 @@
|
|||
# The default keymap for tv44
|
93
keyboards/beatervan/keymaps/oj/keymap.c
Normal file
93
keyboards/beatervan/keymaps/oj/keymap.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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;
|
||||
};
|
1
keyboards/beatervan/keymaps/oj/readme.md
Normal file
1
keyboards/beatervan/keymaps/oj/readme.md
Normal file
|
@ -0,0 +1 @@
|
|||
#Objectively superior keymap for v44
|
13
keyboards/beatervan/readme.md
Normal file
13
keyboards/beatervan/readme.md
Normal file
|
@ -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).
|
23
keyboards/beatervan/rules.mk
Normal file
23
keyboards/beatervan/rules.mk
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
43
keyboards/bm16s/keymaps/via/keymap.c
Normal file
43
keyboards/bm16s/keymaps/via/keymap.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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
|
||||
),
|
||||
};
|
1
keyboards/bm16s/keymaps/via/readme.md
Normal file
1
keyboards/bm16s/keymaps/via/readme.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Via keymap for bm16s
|
2
keyboards/bm16s/keymaps/via/rules.mk
Normal file
2
keyboards/bm16s/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1,2 @@
|
|||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
104
keyboards/boardsource/microdox/keymaps/via/keymap.c
Normal file
104
keyboards/boardsource/microdox/keymaps/via/keymap.c
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
4
keyboards/boardsource/microdox/keymaps/via/rules.mk
Normal file
4
keyboards/boardsource/microdox/keymaps/via/rules.mk
Normal file
|
@ -0,0 +1,4 @@
|
|||
OLED_DRIVER_ENABLE = yes
|
||||
VIA_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
|
@ -1,4 +1,4 @@
|
|||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
EXTRAKEY_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
|
|
|
@ -48,6 +48,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* 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
|
||||
|
|
|
@ -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<<USB_LED_CAPS_LOCK))
|
||||
USB_LED_CAPS_LOCK_ON;
|
||||
else
|
||||
USB_LED_CAPS_LOCK_OFF;
|
||||
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||
USB_LED_NUM_LOCK_ON;
|
||||
else
|
||||
USB_LED_NUM_LOCK_OFF;
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||
USB_LED_SCROLL_LOCK_ON;
|
||||
else
|
||||
USB_LED_SCROLL_LOCK_OFF;
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
|
|
@ -3,17 +3,6 @@
|
|||
|
||||
#include "quantum.h"
|
||||
|
||||
#define CONFIG_LED_IO \
|
||||
DDRB |= (1<<7); \
|
||||
DDRC |= (1<<5) | (1<<6);
|
||||
|
||||
#define USB_LED_CAPS_LOCK_ON PORTC &= ~(1<<6)
|
||||
#define USB_LED_CAPS_LOCK_OFF PORTC |= (1<<6)
|
||||
#define USB_LED_NUM_LOCK_ON PORTB &= ~(1<<7)
|
||||
#define USB_LED_NUM_LOCK_OFF PORTB |= (1<<7)
|
||||
#define USB_LED_SCROLL_LOCK_ON PORTC &= ~(1<<5)
|
||||
#define USB_LED_SCROLL_LOCK_OFF PORTC |= (1<<5)
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
|
|
|
@ -44,6 +44,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
#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
|
||||
|
||||
|
|
|
@ -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<<USB_LED_NUM_LOCK))
|
||||
PORTC &= ~(1<<5);
|
||||
else
|
||||
PORTC |= (1<<5);
|
||||
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||
PORTB &= ~(1<<7);
|
||||
else
|
||||
PORTB |= (1<<7);
|
||||
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
||||
PORTC &= ~(1<<6);
|
||||
else
|
||||
PORTC |= (1<<6);
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
}
|
|
@ -35,6 +35,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
/* 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
|
||||
|
||||
|
|
|
@ -14,57 +14,3 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#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<<USB_LED_CAPS_LOCK))
|
||||
PORTC &= ~(1<<5);
|
||||
else
|
||||
PORTC |= (1<<5);
|
||||
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK))
|
||||
PORTB &= ~(1<<7);
|
||||
else
|
||||
PORTB |= (1<<7);
|
||||
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
||||
PORTC &= ~(1<<6);
|
||||
else
|
||||
PORTC |= (1<<6);
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
|
173
keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c
Normal file
173
keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c
Normal file
|
@ -0,0 +1,173 @@
|
|||
/* Copyright 2020 Brandon Schlack
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "brandonschlack.h"
|
||||
|
||||
/**
|
||||
* Layer Names
|
||||
*
|
||||
* Layers mostly used for macro keys
|
||||
*/
|
||||
#define _REEDER _M1
|
||||
#define _NAV _M2
|
||||
#define _MOUSE _M3
|
||||
|
||||
/**
|
||||
* Keycodes & Macros
|
||||
*/
|
||||
#define TG_BASE TO(_BASE)
|
||||
#define TG_REDR TO(_REEDER)
|
||||
#define TG_NAV TO(_NAV)
|
||||
#define TG_MOUS TO(_MOUSE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/**
|
||||
* Base
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │Esc│││Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│Bck│
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │PgU│││HyEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │PgD│││Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│Shft│ Fn│
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │End│││││││││││Opt│Cmd │ │ │ Cmd│Ctl│││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_BASE] = LAYOUT_default(
|
||||
KC_ESC, 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_PGUP, HY_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_PGDN, 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, PLY_FN1, \
|
||||
KC_END, KC_LOPT, KC_LCMD, SPC_RAI, SPC_RAI, KC_RCMD, KC_RCTL \
|
||||
),
|
||||
/**
|
||||
* Reeder
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │ P │││ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ K │││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │ J │││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │ N │││││││││││ │ │ │ │ │ │││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_REEDER] = LAYOUT_default( \
|
||||
KC_P, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_K, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_J, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_N, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
/**
|
||||
* Nav
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │ → │││ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ ↑ │││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │ ↓ │││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │ ← │││││││││││ │ │ │ │ │ │││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_NAV] = LAYOUT_default( \
|
||||
KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOWN, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LEFT, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
/**
|
||||
* Mouse
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │WhU│││ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ ↑ │││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │ ↓ │││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │WhD│││││││││││ │ │ │ │ │ │││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_MOUSE] = LAYOUT_default( \
|
||||
MC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_DOWN, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
MC_WH_D, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
/**
|
||||
* Lower
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │Nxt│││Del │BrD│BrU│Msn│LHP│ │ │ │ │ │ │ ↑ │Mut│SlD│
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │VlU│││HyCaps│ │ │NxW│PvT│Bck│Fwd│NxT│ │ │ ← │ → │ Play │
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │VlD│││ │ │ │ │1PX│1Ps│ │ │ │ │ ↓ │ │ │
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │Prv│││││││││││ │ │ │ │ │ │││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_LOWER] = LAYOUT_default( \
|
||||
KC_MNXT, KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, _______, _______, _______, KC_UP, KC_MUTE, MC_SLPD, \
|
||||
KC_VOLU, HY_CAPS, _______, _______, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, _______, _______, KC_LEFT, KC_RGHT, KC_MPLY, \
|
||||
KC_VOLD, _______, XXXXXXX, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, _______, KC_DOWN, _______, _______, \
|
||||
KC_MPRV, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/**
|
||||
* Raise
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │Hom│││~ ` │! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ │
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │PgU│││ │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│ │ │ │ │
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │PgD│││ │ F7│ F8│ F9│F10│F11│F12│ │ │ │| \│ │ │
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │End│││││││││││ │ │ │ │ │ │││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_RAISE] = LAYOUT_default( \
|
||||
KC_HOME, 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_PGUP, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, _______, _______, _______, _______, \
|
||||
KC_PGDN, _______, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_BSLS, _______, _______, \
|
||||
KC_END, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
/**
|
||||
* Adjust
|
||||
* ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │Bse│││Make │ │ │EEP│RST│ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │Rdr│││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤
|
||||
* │Nav│││ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤
|
||||
* │Mse│││││││││││ │ │ │ │ │ │││││││││││
|
||||
* └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_default( \
|
||||
TG_BASE, QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
TG_REDR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
TG_NAV, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
TG_MOUS, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
};
|
||||
|
||||
void keyboard_post_init_keymap(void) {
|
||||
rgblight_disable_noeeprom();
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
|
@ -1,10 +1 @@
|
|||
#include "claw44.h"
|
||||
#include "ssd1306.h"
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef SSD1306OLED
|
||||
return process_record_gfx(keycode,record) && process_record_user(keycode, record);
|
||||
#else
|
||||
return process_record_user(keycode, record);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
#include <serial_config.h>
|
||||
|
||||
#define USE_I2C
|
||||
#define USE_SERIAL
|
||||
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
#include <util/twi.h>
|
||||
#include <avr/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/twi.h>
|
||||
#include <stdbool.h>
|
||||
#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<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
|
||||
lim++;
|
||||
|
||||
// easier way, but will wait slightly longer
|
||||
// _delay_us(100);
|
||||
}
|
||||
|
||||
// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK)
|
||||
void i2c_master_init(void) {
|
||||
// no prescaler
|
||||
TWSR = 0;
|
||||
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>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<<TWINT) | (1<<TWEN) | (1<<TWSTA);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
// check that we started successfully
|
||||
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
|
||||
return 1;
|
||||
|
||||
TWDR = address;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
|
||||
return 1; // slave did not acknowledge
|
||||
else
|
||||
return 0; // success
|
||||
}
|
||||
|
||||
|
||||
// Finish the i2c transaction.
|
||||
void i2c_master_stop(void) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
|
||||
uint16_t lim = 0;
|
||||
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
|
||||
lim++;
|
||||
}
|
||||
|
||||
// Write one byte to the i2c slave.
|
||||
// returns 0 => slave ACK
|
||||
// 1 => slave NACK
|
||||
uint8_t i2c_master_write(uint8_t data) {
|
||||
TWDR = data;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
i2c_delay();
|
||||
|
||||
// check if the slave acknowledged us
|
||||
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
|
||||
}
|
||||
|
||||
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
|
||||
// if ack=0 the acknowledge bit is not set.
|
||||
// returns: byte read from i2c device
|
||||
uint8_t i2c_master_read(int ack) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
|
||||
|
||||
i2c_delay();
|
||||
return TWDR;
|
||||
}
|
||||
|
||||
void i2c_reset_state(void) {
|
||||
TWCR = 0;
|
||||
}
|
||||
|
||||
void i2c_slave_init(uint8_t address) {
|
||||
TWAR = address << 0; // slave i2c address
|
||||
// TWEN - twi enable
|
||||
// TWEA - enable address acknowledgement
|
||||
// TWINT - twi interrupt flag
|
||||
// TWIE - enable the twi interrupt
|
||||
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
ISR(TWI_vect);
|
||||
|
||||
ISR(TWI_vect) {
|
||||
uint8_t ack = 1;
|
||||
switch(TW_STATUS) {
|
||||
case TW_SR_SLA_ACK:
|
||||
// this device has been addressed as a slave receiver
|
||||
slave_has_register_set = false;
|
||||
break;
|
||||
|
||||
case TW_SR_DATA_ACK:
|
||||
// this device has received data as a slave receiver
|
||||
// The first byte that we receive in this transaction sets the location
|
||||
// of the read/write location of the slaves memory that it exposes over
|
||||
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
|
||||
// slave_buffer_pos after each write.
|
||||
if(!slave_has_register_set) {
|
||||
slave_buffer_pos = TWDR;
|
||||
// don't acknowledge the master if this memory loctaion is out of bounds
|
||||
if ( slave_buffer_pos >= 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<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
#endif
|
|
@ -1,46 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#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();
|
|
@ -20,16 +20,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#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
|
||||
|
|
|
@ -1,28 +1,14 @@
|
|||
#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
|
||||
|
@ -35,7 +21,6 @@ enum macro_keycodes {
|
|||
#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,
|
||||
|
@ -48,10 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// `----------+--------+---------+--------' `--------+---------+--------+---------'
|
||||
),
|
||||
|
||||
// \ ^ ! & | @ = + * % -
|
||||
// ( # $ " ' ~ ← ↓ ↑ → ` )
|
||||
// { [ ] }
|
||||
|
||||
[_RAISE] = LAYOUT( \
|
||||
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||
_______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS,
|
||||
|
@ -76,93 +57,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// `--------+--------+--------+--------' `--------+--------+--------+--------'
|
||||
),
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -20,17 +20,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#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"
|
137
keyboards/claw44/keymaps/oled/keymap.c
Normal file
137
keyboards/claw44/keymaps/oled/keymap.c
Normal file
|
@ -0,0 +1,137 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include <stdio.h>
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_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
|
1
keyboards/claw44/keymaps/oled/rules.mk
Normal file
1
keyboards/claw44/keymaps/oled/rules.mk
Normal file
|
@ -0,0 +1 @@
|
|||
OLED_DRIVER_ENABLE = yes
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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 <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#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
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#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;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#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;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue