Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7222e3691b | ||
|
|
7e1b57add4 | ||
|
|
f4094930a3 | ||
|
|
8efe8b498d | ||
|
|
fc1c692f71 | ||
|
|
480651cf9d | ||
|
|
53a43dbe99 | ||
|
|
db03b76910 | ||
|
|
14bdd5ed2a | ||
|
|
f45bc9b362 | ||
|
|
4a7baaaf50 | ||
|
|
dad79cafcd | ||
|
|
d08f9cb6e4 | ||
|
|
397d404ce0 | ||
|
|
9de4ace6f2 | ||
|
|
1f13254460 | ||
|
|
1d03af876c | ||
|
|
8ce9e3255e | ||
|
|
1dc1e12fec | ||
|
|
6cf9402cbc | ||
|
|
76aa2baf3e | ||
|
|
423b419138 | ||
|
|
4e2817eff1 | ||
|
|
31d12662bd | ||
|
|
44a348d56f | ||
|
|
85f315ad65 | ||
|
|
2c3e617fba | ||
|
|
088b476343 | ||
|
|
4c9372a081 | ||
|
|
4930e22dda | ||
|
|
0beb945554 | ||
|
|
bf0bb1a4db |
No files matched your search
+21
-1
@@ -110,8 +110,28 @@ ifneq ("$(wildcard $(KEYBOARD_C_1))","")
|
|||||||
KEYBOARD_SRC += $(KEYBOARD_C_1)
|
KEYBOARD_SRC += $(KEYBOARD_C_1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE)
|
# Generate KEYBOARD_name_subname for all levels of the keyboard folder
|
||||||
|
KEYBOARD_FILESAFE_1 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_1)))
|
||||||
|
KEYBOARD_FILESAFE_2 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_2)))
|
||||||
|
KEYBOARD_FILESAFE_3 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_3)))
|
||||||
|
KEYBOARD_FILESAFE_4 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_4)))
|
||||||
|
KEYBOARD_FILESAFE_5 := $(subst .,,$(subst /,_,$(KEYBOARD_FOLDER_PATH_5)))
|
||||||
|
|
||||||
|
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/)","")
|
||||||
|
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_5)
|
||||||
|
endif
|
||||||
|
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/)","")
|
||||||
|
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_4)
|
||||||
|
endif
|
||||||
|
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/)","")
|
||||||
|
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_3)
|
||||||
|
endif
|
||||||
|
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/)","")
|
||||||
|
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_2)
|
||||||
|
endif
|
||||||
|
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/)","")
|
||||||
|
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE_1)
|
||||||
|
endif
|
||||||
|
|
||||||
# Setup the define for QMK_KEYBOARD_H. This is used inside of keymaps so
|
# Setup the define for QMK_KEYBOARD_H. This is used inside of keymaps so
|
||||||
# that the same keymap may be used on multiple keyboards.
|
# that the same keymap may be used on multiple keyboards.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||||
* [Flashing Firmware](newbs_flashing.md)
|
* [Flashing Firmware](newbs_flashing.md)
|
||||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||||
|
* [Best Practices](newbs_best_practices.md)
|
||||||
* [Learning Resources](newbs_learn_more_resources.md)
|
* [Learning Resources](newbs_learn_more_resources.md)
|
||||||
|
|
||||||
* [QMK Basics](README.md)
|
* [QMK Basics](README.md)
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||||
* [Flashing Firmware](newbs_flashing.md)
|
* [Flashing Firmware](newbs_flashing.md)
|
||||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||||
|
* [Best Practices](newbs_best_practices.md)
|
||||||
|
* [Learning Resources](newbs_learn_more_resources.md)
|
||||||
|
|
||||||
* [QMK Basics](README.md)
|
* [QMK Basics](README.md)
|
||||||
* [QMK Introduction](getting_started_introduction.md)
|
* [QMK Introduction](getting_started_introduction.md)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Start on the [QMK Github page](https://github.com/qmk/qmk_firmware), and you'll
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
If you're apart of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button:
|
If you're a part of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -27,17 +27,17 @@ This usually happens with a periodic scan of key presses. This speed often is li
|
|||||||
|
|
||||||
## 2. What the Firmware Sends
|
## 2. What the Firmware Sends
|
||||||
|
|
||||||
The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) tells what a keyboard can actually send through USB to have a chance to be properly recognised. This includes a pre-defined list of scancodes which are simple numbers from `0x00` to `0xE7`. The firmware assigns a scancode to each key of the keyboard.
|
The [HID specification](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) tells what a keyboard can actually send through USB to have a chance to be properly recognised. This includes a pre-defined list of scancodes which are simple numbers from `0x00` to `0xE7`. The firmware assigns a scancode to each key of the keyboard.
|
||||||
|
|
||||||
The firmware does not send actually letters or characters, but only scancodes.
|
The firmware does not send actual letters or characters, but only scancodes.
|
||||||
Thus, by modifying the firmware, you only can modify what scancode is sent over
|
Thus, by modifying the firmware, you can only modify what scancode is sent over
|
||||||
USB for a given key.
|
USB for a given key.
|
||||||
|
|
||||||
## 3. What the Operating System Does
|
## 3. What the Operating System Does
|
||||||
|
|
||||||
Once the keycode reaches the operating system, a piece of software has to have
|
Once the keycode reaches the operating system, a piece of software has to have
|
||||||
it match an actual character thanks to a keyboard layout. For example, if your
|
it match an actual character thanks to a keyboard layout. For example, if your
|
||||||
layout is set to QWERTY, a sample of the matching table is as follow:
|
layout is set to QWERTY, a sample of the matching table is as follows:
|
||||||
|
|
||||||
| keycode | character |
|
| keycode | character |
|
||||||
|---------|-----------|
|
|---------|-----------|
|
||||||
@@ -55,11 +55,11 @@ As the layout is generally fixed (unless you create your own), the firmware can
|
|||||||
|
|
||||||
## List of Characters You Can Send
|
## List of Characters You Can Send
|
||||||
|
|
||||||
Putting aside shortcuts, having a limited set of keycodes mapped to a limited layout means that **the list of characters you can assign to a given key only is the ones present in the layout**.
|
Putting aside shortcuts, having a limited set of keycodes mapped to a limited layout means that **the list of characters you can assign to a given key are only the ones present in the layout**.
|
||||||
|
|
||||||
For example, this means that if you have a QWERTY US layout, and you want to assign 1 key to produce `€` (euro currency symbol), you are unable to do so, because the QWERTY US layout does not have such mapping. You could fix that by using a QWERTY UK layout, or a QWERTY US International.
|
For example, this means that if you have a QWERTY US layout, and you want to assign one key to produce `€` (euro currency symbol), you are unable to do so, because the QWERTY US layout does not have such mapping. You could fix that by using a QWERTY UK layout, or a QWERTY US International.
|
||||||
|
|
||||||
You may wonder why a keyboard layout containing all of Unicode is not devised then? The limited number of keycode available through USB simply disallow such a thing.
|
You may wonder why a keyboard layout containing all of Unicode is not devised then? The limited number of keycodes available through USB simply disallows such a thing.
|
||||||
|
|
||||||
## How to (Maybe) Enter Unicode Characters
|
## How to (Maybe) Enter Unicode Characters
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Basic Keycodes
|
# Basic Keycodes
|
||||||
|
|
||||||
The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with the exception of `KC_NO`, `KC_TRNS` and keycodes in the `0xA5-DF` range. See below for more details.
|
The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07)](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) with the exception of `KC_NO`, `KC_TRNS` and keycodes in the `0xA5-DF` range. See below for more details.
|
||||||
|
|
||||||
## Letters and Numbers
|
## Letters and Numbers
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ There are 5 main sections to this guide:
|
|||||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||||
* [Flashing Firmware](newbs_flashing.md)
|
* [Flashing Firmware](newbs_flashing.md)
|
||||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||||
|
* [Best Practices](newbs_best_practices.md)
|
||||||
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
||||||
|
|
||||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
# Best Practices
|
||||||
|
|
||||||
|
## Or, "How I Learned to Stop Worrying and Love Git."
|
||||||
|
|
||||||
|
This document aims to instruct novices in the best ways to have a smooth experience in contributing to QMK. We will walk through the process of contributing to QMK, detailing some ways to make this task easier, and then later we'll break some things in order to teach you how to fix them.
|
||||||
|
|
||||||
|
This document assumes a few things:
|
||||||
|
|
||||||
|
1. You have a GitHub account, and have [forked the qmk_firmware repository](getting_started_github.md) to your account.
|
||||||
|
2. You've [set up your build environment](newbs_getting_started.md?id=environment-setup).
|
||||||
|
|
||||||
|
|
||||||
|
## Your fork's master: Update Often, Commit Never
|
||||||
|
|
||||||
|
It is highly recommended for QMK development, regardless of what is being done or where, to keep your `master` branch updated, but ***never*** commit to it. Instead, do all your changes in a development branch and issue pull requests from your branches when you're developing.
|
||||||
|
|
||||||
|
To reduce the chances of merge conflicts — instances where two or more users have edited the same part of a file concurrently — keep your `master` branch relatively up-to-date, and start any new developments by creating a new branch.
|
||||||
|
|
||||||
|
### Updating your master branch
|
||||||
|
|
||||||
|
To keep your `master` branch updated, it is recommended to add the QMK Firmware repository ("repo") as a remote repository in git. To do this, open your Git command line interface and enter:
|
||||||
|
|
||||||
|
```
|
||||||
|
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||||
|
```
|
||||||
|
|
||||||
|
To verify that the repository has been added, run `git remote -v`, which should return the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git remote -v
|
||||||
|
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||||
|
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||||
|
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||||
|
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that this is done, you can check for updates to the repo by running `git fetch upstream`. This retrieves the branches and tags — collectively referred to as "refs" — from the QMK repo, which now has the nickname `upstream`. We can now compare the data on our fork `origin` to that held by QMK.
|
||||||
|
|
||||||
|
To update your fork's master, run the following, hitting the Enter key after each line:
|
||||||
|
|
||||||
|
```
|
||||||
|
git checkout master
|
||||||
|
git fetch upstream
|
||||||
|
git pull upstream master
|
||||||
|
git push origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
This switches you to your `master` branch, retrieves the refs from the QMK repo, downloads the current QMK `master` branch to your computer, and then uploads it to your fork.
|
||||||
|
|
||||||
|
### Making Changes
|
||||||
|
|
||||||
|
To make changes, create a new branch by entering:
|
||||||
|
|
||||||
|
```
|
||||||
|
git checkout -b dev_branch
|
||||||
|
git push --set-upstream origin dev_branch
|
||||||
|
```
|
||||||
|
|
||||||
|
This creates a new branch named `dev_branch`, checks it out, and then saves the new branch to your fork. The `--set-upstream` argument tells git to use your fork and the `dev_branch` branch every time you use `git push` or `git pull` from this branch. It only needs to be used on the first push; after that, you can safely use `git push` or `git pull`, without the rest of the arguments.
|
||||||
|
|
||||||
|
!> With `git push`, you can use `-u` in place of `--set-upstream` — `-u` is an alias for `--set-upstream`.
|
||||||
|
|
||||||
|
You can name your branch nearly anything you want, though it is recommended to name it something related to the changes you are going to make.
|
||||||
|
|
||||||
|
By default `git checkout -b` will base your new branch on the branch that is checked out. You can base your new branch on an existing branch that is not checked out by adding the name of the existing branch to the command:
|
||||||
|
|
||||||
|
```
|
||||||
|
git checkout -b dev_branch master
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that you have a development branch, open your text editor and make whatever changes you need to make. It is recommended to make many small commits to your branch; that way, any change that causes issues can be more easily traced and undone if needed. To make your changes, edit and save any files that need to be updated, add them to Git's *staging area*, and then commit them to your branch:
|
||||||
|
|
||||||
|
```
|
||||||
|
git add path/to/updated_file
|
||||||
|
git commit -m "My commit message."
|
||||||
|
```
|
||||||
|
|
||||||
|
`git add` adds files that have been changed to Git's *staging area*, which is Git's "loading zone." This contains the changes that are going to be *committed* by `git commit`, which saves the changes to the repo. Use descriptive commit messages so you can know what was changed at a glance.
|
||||||
|
|
||||||
|
!> If you've changed a lot of files, but all the files are part of the same change, you can use `git add .` to add all the changed files that are in your current directory, rather than having to add each file individually.
|
||||||
|
|
||||||
|
### Publishing Your Changes
|
||||||
|
|
||||||
|
The last step is to push your changes to your fork. To do this, enter `git push`. Git now publishes the current state of `dev_branch` to your fork.
|
||||||
|
|
||||||
|
|
||||||
|
## Resolving Merge Conflicts
|
||||||
|
|
||||||
|
Sometimes when your work in a branch takes a long time to complete, changes that have been made by others conflict with changes you have made to your branch when you open a pull request. This is called a *merge conflict*, and is what happens when multiple people edit the same parts of the same files.
|
||||||
|
|
||||||
|
### Rebasing Your Changes
|
||||||
|
|
||||||
|
A *rebase* is Git's way of taking changes that were applied at one point, reversing them, and then applying the same changes to another point. In the case of a merge conflict, you can rebase your branch to grab the changes that were made between when you created your branch and the present time.
|
||||||
|
|
||||||
|
To start, run the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
git fetch upstream
|
||||||
|
git rev-list --left-right --count HEAD...upstream/master
|
||||||
|
```
|
||||||
|
|
||||||
|
The `git rev-list` command entered here returns the number of commits that differ between the current branch and QMK's master branch. We run `git fetch` first to make sure we have the refs that represent the current state of the upstream repo. The output of the `git rev-list` command entered returns two numbers:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git rev-list --left-right --count HEAD...upstream/master
|
||||||
|
7 35
|
||||||
|
```
|
||||||
|
|
||||||
|
The first number represents the number of commits on the current branch since it was created, and the second number is the number of commits made to `upstream/master` since the current branch was created, and thus, the changes that are not recorded in the current branch.
|
||||||
|
|
||||||
|
Now that the current states of both the current branch and the upstream repo are known, we can start a rebase operation:
|
||||||
|
|
||||||
|
```
|
||||||
|
git rebase upstream/master
|
||||||
|
```
|
||||||
|
|
||||||
|
This tells Git to undo the commits on the current branch, and then reapply them against QMK's master branch.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git rebase upstream/master
|
||||||
|
First, rewinding head to replay your work on top of it...
|
||||||
|
Applying: Commit #1
|
||||||
|
Using index info to reconstruct a base tree...
|
||||||
|
M conflicting_file_1.txt
|
||||||
|
Falling back to patching base and 3-way merge...
|
||||||
|
Auto-merging conflicting_file_1.txt
|
||||||
|
CONFLICT (content): Merge conflict in conflicting_file_1.txt
|
||||||
|
error: Failed to merge in the changes.
|
||||||
|
hint: Use 'git am --show-current-patch' to see the failed patch
|
||||||
|
Patch failed at 0001 Commit #1
|
||||||
|
|
||||||
|
Resolve all conflicts manually, mark them as resolved with
|
||||||
|
"git add/rm <conflicted_files>", then run "git rebase --continue".
|
||||||
|
You can instead skip this commit: run "git rebase --skip".
|
||||||
|
To abort and get back to the state before "git rebase", run "git rebase --abort".
|
||||||
|
```
|
||||||
|
|
||||||
|
This tells us that we have a merge conflict, and gives the name of the file with the conflict. Open the conflicting file in your text editor, and somewhere in the file, you'll find something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<p>For help with any issues, email us at [email protected].</p>
|
||||||
|
=======
|
||||||
|
<p>Need help? Email [email protected].</p>
|
||||||
|
>>>>>>> Commit #1
|
||||||
|
```
|
||||||
|
|
||||||
|
The line `<<<<<<< HEAD` marks the beginning of a merge conflict, and the `>>>>>>> Commit #1` line marks the end, with the conflicting sections separated by `=======`. The part on the `HEAD` side is from the QMK master version of the file, and the part marked with the commit message is from the current branch and commit.
|
||||||
|
|
||||||
|
Because Git tracks *changes to files* rather than the contents of the files directly, if Git can't find the text that was in the file previous to the commit that was made, it won't know how to edit the file. Re-editing the file will solve the conflict. Make your changes, and then save the file.
|
||||||
|
|
||||||
|
```
|
||||||
|
<p>Need help? Email [email protected].</p>
|
||||||
|
```
|
||||||
|
|
||||||
|
Now run:
|
||||||
|
|
||||||
|
```
|
||||||
|
git add conflicting_file_1.txt
|
||||||
|
git rebase --continue
|
||||||
|
```
|
||||||
|
|
||||||
|
Git logs the changes to the conflicting file, and continues applying the commits from our branch until it reaches the end.
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
# Learning Resources
|
# Learning Resources
|
||||||
These resources are aimed at giving new members in the qmk community more understanding to the information provided in the newbs docs.
|
|
||||||
|
These resources are aimed at giving new members in the QMK community more understanding to the information provided in the Newbs docs.
|
||||||
|
|
||||||
Git resources:
|
Git resources:
|
||||||
|
|
||||||
* [Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
* [Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
||||||
* [Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
* [Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
||||||
* [Git Resources to Learn More About Github](getting_started_github.md)
|
* [Git Resources to Learn More About Github](getting_started_github.md)
|
||||||
* [Git Resources Aimed Specificly toward QMK](contributing.md)
|
* [Git Resources Aimed Specifically toward QMK](contributing.md)
|
||||||
|
|
||||||
|
|
||||||
Command Line resources:
|
Command Line resources:
|
||||||
|
|
||||||
* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
* [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||||
+64
-14
@@ -1,28 +1,79 @@
|
|||||||
# List of Useful Core Functions To Make Your Keyboard Better
|
# List of Useful Core Functions To Make Your Keyboard Better
|
||||||
|
|
||||||
There are a lot of hidden functions in QMK that are incredible useful, or may add a bit of functionality that you've been wanting. Functions that are specific to certain features are not included here, as those will be on their respective feature page.
|
There are a lot of hidden functions in QMK that are incredible useful, or may add a bit of functionality that you've been wanting. Functions that are specific to certain features are not included here, as those will be on their respective feature page.
|
||||||
|
|
||||||
## (OLKB) Tri Layers
|
## (OLKB) Tri Layers
|
||||||
|
|
||||||
There are actually separate functions that you can use there, depending on what you're after.
|
There are actually separate functions that you can use there, depending on what you're after.
|
||||||
|
|
||||||
The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it runs on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it runs off layer `z`.
|
### `update_tri_layer(x, y, z)`
|
||||||
|
|
||||||
This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this.
|
The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it runs on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it runs off layer `z`.
|
||||||
|
|
||||||
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from they [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
|
This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this.
|
||||||
|
|
||||||
The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
|
#### Example
|
||||||
|
|
||||||
|
```c
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### `update_tri_layer_state(state, x, y, z)`
|
||||||
|
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from they [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
|
||||||
|
|
||||||
|
The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
|
```c
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you don't have to immediately "return" the value. This is useful if you want to add multiple tri layers, or if you want to add additional effects.
|
||||||
|
|
||||||
|
```c
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
state = update_tri_layer_state(state, _RAISE, _SYMB, _SPECIAL);
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Setting the Persistent Default Layer
|
## Setting the Persistent Default Layer
|
||||||
|
|
||||||
Do you want to set the default layer, so that it's retained even after you unplug the board? If so, this is the function for you.
|
Do you want to set the default layer, so that it's retained even after you unplug the board? If so, this is the function for you.
|
||||||
|
|
||||||
To use this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK).
|
To use this, you would use `set_single_persistent_default_layer(layer)`. If you have a name defined for your layer, you can use that instead (such as _QWERTY, _DVORAK or _COLEMAK).
|
||||||
|
|
||||||
This will set the default layer, update the persistent settings, and play a tune if you have [Audio](feature_audio.md) enabled on your board, and the default layer sounds set.
|
This will set the default layer, update the persistent settings, and play a tune if you have [Audio](feature_audio.md) enabled on your board, and the default layer sounds set.
|
||||||
|
|
||||||
To configure the default layer sounds, you would want to define this in your `config.h` file, like this:
|
To configure the default layer sounds, you would want to define this in your `config.h` file, like this:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||||
@@ -36,13 +87,12 @@ To configure the default layer sounds, you would want to define this in your `co
|
|||||||
|
|
||||||
## Reseting the keyboard
|
## Reseting the keyboard
|
||||||
|
|
||||||
There is the `RESET` quantum keycode that you can use. But if you want to reset the board as part of a macro, rather than hitting a key separately, you can do that.
|
There is the `RESET` quantum keycode that you can use. But if you want to reset the board as part of a macro, rather than hitting a key separately, you can do that.
|
||||||
|
|
||||||
And to do so, add `reset_keyboard()` to your function or macro, and this will reset to bootloader.
|
And to do so, add `reset_keyboard()` to your function or macro, and this will reset to bootloader.
|
||||||
|
|
||||||
## Wiping the EEPROM (Persistent Storage)
|
## Wiping the EEPROM (Persistent Storage)
|
||||||
|
|
||||||
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.
|
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.
|
||||||
|
|
||||||
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.
|
|
||||||
|
|
||||||
|
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.
|
||||||
@@ -128,7 +128,7 @@ The standard Deutsche (German) keyboard layout. Named for the first 6 letters on
|
|||||||
The term for pressing a key while a key is already held down. Variants include 2KRO, 6KRO, and NKRO.
|
The term for pressing a key while a key is already held down. Variants include 2KRO, 6KRO, and NKRO.
|
||||||
|
|
||||||
## Scancode
|
## Scancode
|
||||||
A 1 byte number that is sent as part of a HID report over USB that represents a single key. These numbers are documented in the [HID Usage Tables](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) published by the [USB-IF](http://www.usb.org/).
|
A 1 byte number that is sent as part of a HID report over USB that represents a single key. These numbers are documented in the [HID Usage Tables](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) published by the [USB-IF](http://www.usb.org/).
|
||||||
|
|
||||||
## Space Cadet Shift
|
## Space Cadet Shift
|
||||||
A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times.
|
A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times.
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
#define ONESHOT_TIMEOUT 3000
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
#define FORCE_NKRO
|
||||||
|
#define LEADER_TIMEOUT 1000
|
||||||
|
#define TAPPING_TOGGLE 3
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
//The current Nordic and Norwegian layout files are a mess. I'll do it myself:
|
||||||
|
//Norwegian
|
||||||
|
#define NO_AE KC_QUOT // Æ
|
||||||
|
#define NO_AO KC_LBRC // Å
|
||||||
|
#define NO_BSLS KC_EQL // Backslash
|
||||||
|
#define NO_LT KC_NUBS // <
|
||||||
|
#define NO_MINS KC_SLSH // -
|
||||||
|
#define NO_OE KC_SCLN // Ø
|
||||||
|
#define NO_PIPE KC_GRV // |
|
||||||
|
#define NO_PLUS KC_MINS // +
|
||||||
|
#define NO_QUOT KC_NUHS // '
|
||||||
|
#define NO_UMLA KC_RBRC // ¨
|
||||||
|
//Norwegian - Modifier dependant definitions
|
||||||
|
#define NO_EXLM LSFT(KC_1) // !
|
||||||
|
#define NO_DQT LSFT(KC_2) // "
|
||||||
|
#define NO_AT RALT(KC_2) // @
|
||||||
|
#define NO_HASH LSFT(KC_3) // #
|
||||||
|
#define NO_EUR LSFT(KC_4) // €
|
||||||
|
#define NO_DLR RALT(KC_4) // $
|
||||||
|
#define NO_PERC LSFT(KC_5) // %
|
||||||
|
#define NO_AND LSFT(KC_6) // &
|
||||||
|
#define NO_SLSH LSFT(KC_7) // /
|
||||||
|
#define NO_PO LSFT(KC_8) // (
|
||||||
|
#define NO_PC LSFT(KC_9) // )
|
||||||
|
#define NO_EQL LSFT(KC_0) // =
|
||||||
|
#define NO_LCBR RALT(KC_7) // {
|
||||||
|
#define NO_LBRC RALT(KC_8) // [
|
||||||
|
#define NO_RBRC RALT(KC_9) // ]
|
||||||
|
#define NO_RCBR RALT(KC_0) // }
|
||||||
|
#define NO_COLN LSFT(KC_DOT) // :
|
||||||
|
#define NO_SCLN LSFT(KC_COMM) // ;
|
||||||
|
#define NO_MU RALT(KC_M) // µ
|
||||||
|
#define NO_EURO RALT(KC_E) // €
|
||||||
|
#define NO_SECT LSFT(KC_GRV) // §
|
||||||
|
#define NO_GERC RALT(KC_COMM) // ¸
|
||||||
|
#define NO_QUAR LSFT(RALT(KC_4)) // ¼
|
||||||
|
//Norwegian layout - dependant on previous definitions
|
||||||
|
#define NO_UNDS LSFT(NO_MINS) // _
|
||||||
|
#define NO_QUES LSFT(NO_PLUS) // ?
|
||||||
|
#define NO_GRAV LSFT(NO_BSLS) // `
|
||||||
|
#define NO_GT LSFT(NO_LT) // >
|
||||||
|
#define NO_HALF RALT(NO_LT) // ½
|
||||||
|
#define NO_HAT LSFT(NO_UMLA) // ^
|
||||||
|
#define NO_ASTR LSFT(NO_QUOT) // *
|
||||||
|
#define NO_TILD RALT(NO_UMLA) // ~
|
||||||
|
|
||||||
|
//One Shot Modifier
|
||||||
|
#define OSM_LCTL OSM(MOD_LCTL)
|
||||||
|
#define OSM_LALT OSM(MOD_LALT)
|
||||||
|
#define OSM_LSFT OSM(MOD_LSFT)
|
||||||
|
#define OSM_LGUI OSM(MOD_LGUI)
|
||||||
|
#define OSM_RCTL OSM(MOD_RCTL)
|
||||||
|
#define OSM_RALT OSM(MOD_RALT)
|
||||||
|
#define OSM_RSFT OSM(MOD_RSFT)
|
||||||
|
#define OSM_RGUI OSM(MOD_RGUI)
|
||||||
|
|
||||||
|
//Layers
|
||||||
|
#define L1 0
|
||||||
|
#define L2 1
|
||||||
|
#define L3 2
|
||||||
|
#define L4 3
|
||||||
|
#define L5 4
|
||||||
|
|
||||||
|
// Momentary switch to layer - One Shot Layer
|
||||||
|
#define OSL_L3 OSL(L3)
|
||||||
|
#define OSL_L4 OSL(L4)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[L1] = LAYOUT(
|
||||||
|
KC_LGUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RGUI,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_DQT,
|
||||||
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_SCLN, NO_QUOT,
|
||||||
|
OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, OSM_RSFT,
|
||||||
|
CTL_T(KC_ESC), MO(L5), KC_LEAD, OSM_LALT, MO(L4), OSL_L3, KC_SPC, KC_ENT, OSL_L3, MO(L4), OSM_RALT, NO_EQL, NO_PLUS, KC_RCTL
|
||||||
|
),
|
||||||
|
[L2] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_AO,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_OE, NO_AE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[L3] = LAYOUT(
|
||||||
|
NO_LBRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_RBRC,
|
||||||
|
NO_LCBR, XXXXXXX, XXXXXXX, NO_AT, XXXXXXX, NO_TILD, NO_QUES, NO_EXLM, NO_PIPE, XXXXXXX, XXXXXXX, NO_RCBR,
|
||||||
|
_______, NO_ASTR, NO_BSLS, NO_DLR, NO_HASH, XXXXXXX, NO_HAT, XXXXXXX, NO_COLN, NO_SLSH, NO_SCLN, NO_QUOT,
|
||||||
|
NO_PO, KC_0, NO_SECT, NO_PERC, XXXXXXX, NO_GRAV, NO_AND, NO_UMLA, NO_LT, NO_GT, NO_UNDS, NO_PC,
|
||||||
|
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX
|
||||||
|
),
|
||||||
|
[L4] = LAYOUT(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX,
|
||||||
|
_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, KC_DEL,
|
||||||
|
XXXXXXX, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, KC_VOLD, XXXXXXX,
|
||||||
|
OSM_LCTL, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, OSM_RCTL
|
||||||
|
),
|
||||||
|
[L5] = LAYOUT(
|
||||||
|
XXXXXXX, TO(L1), TO(L2), TO(L3), TO(L4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_AO,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_OE, NO_AE,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Unicode Linux
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define TAP_ONCE(code) \
|
||||||
|
register_code (code); \
|
||||||
|
unregister_code (code)
|
||||||
|
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop. Only supports basic keycodes.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
LEADER_DICTIONARY() {
|
||||||
|
leading = false;
|
||||||
|
leader_end();
|
||||||
|
|
||||||
|
//probably useless in practice, but cool
|
||||||
|
SEQ_ONE_KEY (KC_P) {
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
tap_random_base64();
|
||||||
|
}
|
||||||
|
|
||||||
|
SEQ_ONE_KEY (KC_G) {
|
||||||
|
SEND_STRING("grep something !");
|
||||||
|
register_code(KC_RALT);
|
||||||
|
TAP_ONCE(KC_4);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
}
|
||||||
|
SEQ_ONE_KEY (KC_T) {
|
||||||
|
SEND_STRING("tail ");
|
||||||
|
TAP_ONCE(KC_SLSH);
|
||||||
|
SEND_STRING("f !");
|
||||||
|
register_code(KC_RALT);
|
||||||
|
TAP_ONCE(KC_4);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
}
|
||||||
|
SEQ_ONE_KEY (KC_S) {
|
||||||
|
SEND_STRING("sudo !!");
|
||||||
|
TAP_ONCE(KC_ENT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
NKRO_ENABLE = true
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
KEY_LOCK_ENABLE = no
|
||||||
|
AUTO_SHIFT_ENABLE = no
|
||||||
|
LEADER_ENABLE = yes
|
||||||
@@ -20,13 +20,17 @@
|
|||||||
enum contra_layers {
|
enum contra_layers {
|
||||||
_QWERTZ,
|
_QWERTZ,
|
||||||
_FUNC,
|
_FUNC,
|
||||||
_NUMROW
|
_NUMROW,
|
||||||
|
_NUMROW_L3,
|
||||||
|
_GAMING
|
||||||
};
|
};
|
||||||
|
|
||||||
#define KC_I3 LM(_NUMROW, MOD_LALT)
|
#define KC_I3 LM(_NUMROW, MOD_LALT)
|
||||||
#define KC_NR MO(_NUMROW)
|
#define KC_NR MO(_NUMROW)
|
||||||
#define NR_L3 SAFE_RANGE
|
#define NR_L3 SAFE_RANGE
|
||||||
#define FUN MO(_FUNC)
|
#define FUN MO(_FUNC)
|
||||||
|
#define G_1 TO(_GAMING)
|
||||||
|
#define G_0 TG(_GAMING)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
@@ -52,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | | | | | | | Ü | | Ö | | Del |
|
* | | | | | | | | Ü | | Ö | | Del |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | Lock | Ä | ß | | | | | RGBS | RGBB | RGBS | | |
|
* | Lock | Ä | ß | | | GAME | | RGBS | RGBB | RGBS | | |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
|
* | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
@@ -61,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
[_FUNC] = {
|
[_FUNC] = {
|
||||||
{_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
|
{_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL },
|
||||||
{KC_LOCK, DE_AE, DE_SS, _______, _______, _______, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
|
{KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______},
|
||||||
{_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
|
{_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______},
|
||||||
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Numrow layer (special characters with Shift and ISO_L3_Shift)
|
/* Numrow layer (special characters with Shift and ISO_L3_Shift)
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß |
|
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | #' | |
|
* | | | | | | | | | | | #' | |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
@@ -78,25 +82,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_NUMROW] = {
|
[_NUMROW] = {
|
||||||
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS },
|
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______},
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______},
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______},
|
||||||
{_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
|
{_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
|
||||||
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
||||||
|
},
|
||||||
|
[_NUMROW_L3] = {
|
||||||
|
{_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______},
|
||||||
|
{_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______},
|
||||||
|
{_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______}
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Gaming
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Space| | | | | | | | Reset| | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_GAMING] = {
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||||
|
{KC_SPC, _______, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (keycode == NR_L3) {
|
switch(keycode) {
|
||||||
if (record->event.pressed) {
|
case KC_BSPC:
|
||||||
register_code(DE_ALGR);
|
if (record->event.pressed) {
|
||||||
layer_on(_NUMROW);
|
if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) {
|
||||||
} else {
|
register_code(DE_SS);
|
||||||
layer_off(_NUMROW);
|
return false;
|
||||||
unregister_code(DE_ALGR);
|
}
|
||||||
}
|
} else {
|
||||||
return false;
|
unregister_code(DE_SS);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
case NR_L3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(DE_ALGR);
|
||||||
|
layer_on(_NUMROW_L3);
|
||||||
|
} else {
|
||||||
|
layer_off(_NUMROW_L3);
|
||||||
|
unregister_code(DE_ALGR);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|||||||
@@ -40,3 +40,5 @@ ifdef HARDWARE_SERIAL
|
|||||||
else
|
else
|
||||||
SRC += protocol/serial_soft.c
|
SRC += protocol/serial_soft.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
DEFAULT_FOLDER = converter/sun_usb/type5
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Yann Hodique <[email protected]> @sigma
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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 "sigma.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] =
|
||||||
|
{
|
||||||
|
[_QWERTY] = LAYOUT_us_unix(
|
||||||
|
KC_LEAD, KC_SCRT, KC_F1,KC_F2,KC_F3,KC_F4, KC_F5,KC_F6,KC_F7,KC_F8, KC_F9,KC_F10,KC_F11,KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, KC_MUTE,KC_VOLD,KC_VOLU,KC_OS_LOCK,
|
||||||
|
KC_STOP, KC_OS_REDO, KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSLS,KC_GRV, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
|
||||||
|
VRSN, KC_OS_UNDO, KC_TAB, KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC, KC_BSPC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_MAKE, KC_OS_COPY, KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||||
|
KC_EXECUTE,KC_OS_PASTE, KC_LSFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_FIND, KC_OS_CUT, KC_CAPS,KC_LGUI,KC_LALT, KC_SPC, KC_RGUI,KC_APP,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
Overview
|
||||||
|
========
|
||||||
|
|
||||||
|
This is my personal Sun Type 5 configuration.
|
||||||
|
|
||||||
|
How to build
|
||||||
|
------------
|
||||||
|
|
||||||
|
make converter/sun_usb/type5:sigma:teensy
|
||||||
|
|
||||||
|
Layers
|
||||||
|
------
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
BOOTLOADER = halfkay
|
||||||
@@ -34,10 +34,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// #define TAPPING_FORCE_HOLD
|
// #define TAPPING_FORCE_HOLD
|
||||||
// #define TAPPING_TERM 100
|
// #define TAPPING_TERM 100
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLED_NUM 27
|
#define RGBLED_NUM 27
|
||||||
|
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_LIMIT_VAL 120
|
#define RGBLIGHT_LIMIT_VAL 120
|
||||||
#define RGBLIGHT_HUE_STEP 10
|
#endif
|
||||||
#define RGBLIGHT_SAT_STEP 17
|
|
||||||
#define RGBLIGHT_VAL_STEP 17
|
|
||||||
@@ -20,37 +20,48 @@ enum crkbd_keycodes {
|
|||||||
RGBRST = NEW_SAFE_RANGE
|
RGBRST = NEW_SAFE_RANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define LAYOUT_crkbd_base( \
|
||||||
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
|
) \
|
||||||
|
LAYOUT_wrapper( \
|
||||||
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
|
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
||||||
|
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||||
|
)
|
||||||
|
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_QWERTY] = LAYOUT_wrapper(
|
[_QWERTY] = LAYOUT_crkbd_base_wrapper(
|
||||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||||
KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_MRSF,
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
),
|
||||||
[_COLEMAK] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
|
[_COLEMAK] = LAYOUT_crkbd_base_wrapper(
|
||||||
KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_MRSF,
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||||
),
|
),
|
||||||
[_DVORAK] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
|
[_DVORAK] = LAYOUT_crkbd_base_wrapper(
|
||||||
KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_MRSF,
|
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||||
),
|
),
|
||||||
[_WORKMAN] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
|
[_WORKMAN] = LAYOUT_crkbd_base_wrapper(
|
||||||
KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_MRSF,
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MODS] = LAYOUT_wrapper(
|
[_MODS] = LAYOUT_wrapper(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -65,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC,
|
KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC,
|
||||||
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
|
_______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
|
||||||
_______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
|
_______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______ //`--------------------' `--------------------'
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
[_ADJUST] = LAYOUT_wrapper( \
|
[_ADJUST] = LAYOUT_wrapper( \
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT_60_ansi(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
|
||||||
|
|
||||||
|
LAYOUT_60_ansi(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# 60_ansi DZ60 Layout
|
||||||
|
|
||||||
|
This is a basic keymap for the 60_ansi layout of the DZ60.
|
||||||
|
The default layer is normal ANSI and the Fn layer is used for RGB
|
||||||
|
and backlighting functions.
|
||||||
@@ -12,25 +12,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL |
|
* | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | DEL |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | Ctrl | Alt | Cmd | Space | Cmd | FN | L | D | R |
|
* | FN1 | Alt | Cmd | Space | Cmd | FN2 | L | D | R |
|
||||||
* `-----------------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LAYOUT_directional(
|
LAYOUT_directional(
|
||||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL,
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* FN Layer
|
/* FN1 Layer
|
||||||
* ,-----------------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
* | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | RESET |
|
* | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
|
* | | | | | | | | | | | | | | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | BL T| BL M| BL+ | BL- | | | | | | | | |
|
* | | | | | | | L | D | U | R | | | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | | | | | | |PgUp | |
|
* | | | | | | | | | | | | |PgUp | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
@@ -39,10 +39,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
LAYOUT_directional(
|
LAYOUT_directional(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, RESET,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* FN2 Layer (Media)
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | RESET |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | |RBB T|RGB M| Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | | | | | | |Pl/Ps|Vol+ |Mute |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | | |Prev |Vol- |Next |
|
||||||
|
* `-----------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
LAYOUT_directional(
|
||||||
|
KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLU, KC_MUTE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
|
||||||
|
),
|
||||||
};
|
};
|
||||||
@@ -1,71 +1,553 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap.h"
|
||||||
|
|
||||||
enum marianas_layers {
|
enum marianas_layers {
|
||||||
BASE,
|
QWERTY,
|
||||||
|
/*
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
*/
|
||||||
NAV_CLUSTER,
|
NAV_CLUSTER,
|
||||||
RGB,
|
|
||||||
MOUSE,
|
|
||||||
GAMING,
|
GAMING,
|
||||||
FN_LAYER,
|
SQLMACROS,
|
||||||
LAYER_SEL
|
SQLNAMES,
|
||||||
|
FN_LAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
enum sql_macros {
|
||||||
|
S_LFTJN = SAFE_RANGE, // L
|
||||||
|
S_INRJN, // I
|
||||||
|
S_SLCT, // S
|
||||||
|
S_FROM, // F
|
||||||
|
S_DSNCT, // D
|
||||||
|
S_ORDER, // O
|
||||||
|
S_WHERE, // W
|
||||||
|
S_ALTER, // Esc
|
||||||
|
S_ASTRK, // *
|
||||||
|
|
||||||
|
TD_A,
|
||||||
|
TD_B,
|
||||||
|
TD_C, // Corp, Corporation, Company
|
||||||
|
TD_D, // Distribution, Dist, Distributor
|
||||||
|
TD_E,
|
||||||
|
TD_F,
|
||||||
|
TD_G, // GlobalLookup
|
||||||
|
TD_H,
|
||||||
|
TD_I, // Instance, Item
|
||||||
|
TD_J,
|
||||||
|
TD_K,
|
||||||
|
TD_L,
|
||||||
|
TD_M,
|
||||||
|
TD_N, // NadRate
|
||||||
|
TD_O,
|
||||||
|
TD_P, // Product, Person,
|
||||||
|
TD_Q, // Darden
|
||||||
|
TD_R,
|
||||||
|
TD_S, // Supplier, Step
|
||||||
|
TD_T, // Task, Type
|
||||||
|
TD_U,
|
||||||
|
TD_V,
|
||||||
|
TD_W, // Workflow,
|
||||||
|
TD_X,
|
||||||
|
TD_Y,
|
||||||
|
TD_Z,
|
||||||
|
TD_BSPC,
|
||||||
|
TD_ENT,
|
||||||
|
TD_ESC
|
||||||
|
};
|
||||||
|
|
||||||
|
uint16_t *macroTaps = 0;
|
||||||
|
|
||||||
|
char *tableNameList = 0;
|
||||||
|
|
||||||
|
uint8_t *charCount = 0;
|
||||||
|
uint8_t countPointer = 0;
|
||||||
|
|
||||||
|
bool shifted = false;
|
||||||
|
|
||||||
|
bool sendAbbr = false;
|
||||||
|
|
||||||
|
|
||||||
|
void initStringData(void)
|
||||||
|
{
|
||||||
|
if (macroTaps == 0)
|
||||||
|
{
|
||||||
|
macroTaps = malloc(macroTapsLen*sizeof(uint16_t));
|
||||||
|
for(int i = 0; i < macroTapsLen; i++)
|
||||||
|
{
|
||||||
|
macroTaps[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tableNameList == 0)
|
||||||
|
{
|
||||||
|
tableNameList = malloc(tableNameListLen*sizeof(char));
|
||||||
|
for(int i = 0; i < tableNameListLen; i++)
|
||||||
|
{
|
||||||
|
tableNameList[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (charCount == 0)
|
||||||
|
{
|
||||||
|
charCount = malloc(charCountLen*sizeof(uint8_t));
|
||||||
|
for (int i = 0; i < charCountLen; i++)
|
||||||
|
{
|
||||||
|
charCount[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state)
|
||||||
|
{
|
||||||
|
switch (biton32(state))
|
||||||
|
{
|
||||||
|
case QWERTY:
|
||||||
|
rgblight_mode(9);
|
||||||
|
break;
|
||||||
|
case NAV_CLUSTER:
|
||||||
|
rgblight_mode(29);
|
||||||
|
break;
|
||||||
|
case GAMING:
|
||||||
|
rgblight_mode(26);
|
||||||
|
break;
|
||||||
|
case SQLMACROS:
|
||||||
|
rgblight_mode(1);
|
||||||
|
rgblight_setrgb(0x00, 0xFF, 0x80);
|
||||||
|
break;
|
||||||
|
case SQLNAMES:
|
||||||
|
rgblight_mode(1);
|
||||||
|
rgblight_setrgb(0x80, 0xFF, 0x00);
|
||||||
|
break;
|
||||||
|
case FN_LAYER:
|
||||||
|
rgblight_mode(1);
|
||||||
|
rgblight_setrgb(0x00, 0x80, 0xFF);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool containsCode(uint16_t kc)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < macroTapsLen && macroTaps[i] > 0; i++)
|
||||||
|
{
|
||||||
|
if (macroTaps[i] == kc) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool lastCodeIs(uint16_t kc)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < macroTapsLen-1 && macroTaps[i] > 0; i++)
|
||||||
|
{
|
||||||
|
if (macroTaps[i] == kc && macroTaps[i+1] == 0) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool last2CodeAre(uint16_t kc)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++)
|
||||||
|
{
|
||||||
|
if (macroTaps[i] == kc && macroTaps[i+1] == kc && macroTaps[i+2] == 0) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool last2CodesAre(uint16_t kc, uint16_t kc2)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < macroTapsLen-2 && macroTaps[i] > 0; i++)
|
||||||
|
{
|
||||||
|
if (macroTaps[i] == kc && macroTaps[i+1] == kc2 && macroTaps[i+2] == 0) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void addKeyCode(uint16_t kc)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while (i < macroTapsLen-2 && macroTaps[i] > 0) i++;
|
||||||
|
if (macroTaps[i] == 0)
|
||||||
|
{
|
||||||
|
macroTaps[i] = kc;
|
||||||
|
macroTaps[i+1] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eraseKeyCodes(void)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while (i < macroTapsLen && macroTaps[i] > 0) macroTaps[i++] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void eraseCharCounts(void)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while (i < charCountLen)
|
||||||
|
{
|
||||||
|
charCount[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void printTableAbbreviation(void)
|
||||||
|
{
|
||||||
|
initStringData();
|
||||||
|
if (tableNameList[0] == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
send_char(0x20);
|
||||||
|
int i = 0;
|
||||||
|
for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++)
|
||||||
|
{
|
||||||
|
if (tableNameList[i] >= 65 && tableNameList[i] <= 90)
|
||||||
|
{
|
||||||
|
send_char(tableNameList[i]+32);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
send_char(tableNameList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
send_char(0x20);
|
||||||
|
}
|
||||||
|
|
||||||
|
void eraseTableAbbreviation(void)
|
||||||
|
{
|
||||||
|
initStringData();
|
||||||
|
for (int i = 0; i < tableNameListLen && tableNameList[i] > 0; i++)
|
||||||
|
{
|
||||||
|
tableNameList[i] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void printString(char* str)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (str[0] != '\0')
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (str[i] == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
send_char(str[i++]);
|
||||||
|
charCount[countPointer]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void printStringAndQueueChar(char* str)
|
||||||
|
{
|
||||||
|
initStringData();
|
||||||
|
if (charCount[countPointer] != 0)
|
||||||
|
{
|
||||||
|
countPointer++;
|
||||||
|
}
|
||||||
|
sendAbbr = true;
|
||||||
|
if (str[0] != '\0')
|
||||||
|
{
|
||||||
|
printString(str);
|
||||||
|
|
||||||
|
for (int i = 0; i < tableNameListLen-1; i++)
|
||||||
|
{
|
||||||
|
if (tableNameList[i] == '\0')
|
||||||
|
{
|
||||||
|
tableNameList[i] = str[0];
|
||||||
|
tableNameList[i+1] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (i == tableNameListLen-2)
|
||||||
|
{
|
||||||
|
printTableAbbreviation();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//for (i = 0; i < tableNameListLen && tableNameList[i] > 0; i++)
|
||||||
|
//{
|
||||||
|
// send_char(tableNameList[i]);
|
||||||
|
//}
|
||||||
|
//send_string_P("Darden");
|
||||||
|
//send_string_P(&myarray);
|
||||||
|
//send_string_P(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReplaceString(char *orig, char *repl)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while((orig[i] != 0x0 && repl[i] != 0x0) && orig[i] == repl[i])
|
||||||
|
i++;
|
||||||
|
|
||||||
|
if(orig[i] != 0x0)
|
||||||
|
{
|
||||||
|
int o = i;
|
||||||
|
while (orig[o++] != 0x0) {
|
||||||
|
charCount[countPointer]--;
|
||||||
|
register_code(KC_BSPC);
|
||||||
|
unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printString(repl+i);
|
||||||
|
}
|
||||||
|
|
||||||
|
void deletePrev(void)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < charCount[countPointer]; i++)
|
||||||
|
{
|
||||||
|
register_code(KC_BSPC);
|
||||||
|
unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
charCount[countPointer] = 0;
|
||||||
|
countPointer--;
|
||||||
|
int i = 1;
|
||||||
|
for (;i < tableNameListLen-1; i++)
|
||||||
|
{
|
||||||
|
if (tableNameList[i] == 0x0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tableNameList[i-1] = 0x0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void processSmartMacroTap(uint16_t kc)
|
||||||
|
{
|
||||||
|
initStringData();
|
||||||
|
switch(kc)
|
||||||
|
{
|
||||||
|
case TD_C:
|
||||||
|
if (containsCode(TD_D))
|
||||||
|
{
|
||||||
|
printString("ribution");
|
||||||
|
printStringAndQueueChar("Center");
|
||||||
|
}
|
||||||
|
else if (last2CodeAre(TD_C))
|
||||||
|
{
|
||||||
|
ReplaceString("Corporation", "Contact");
|
||||||
|
}
|
||||||
|
else if(lastCodeIs(TD_C))
|
||||||
|
{
|
||||||
|
printString("oration");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printStringAndQueueChar("Corp");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TD_D:
|
||||||
|
if (last2CodeAre(TD_D))
|
||||||
|
{
|
||||||
|
ReplaceString("Distribution", "Distributor");
|
||||||
|
}
|
||||||
|
else if(lastCodeIs(TD_D))
|
||||||
|
{
|
||||||
|
printString("ribution");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printStringAndQueueChar("Dist");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TD_G:
|
||||||
|
printStringAndQueueChar("Global");
|
||||||
|
printStringAndQueueChar("Lookup");
|
||||||
|
break;
|
||||||
|
case TD_I:
|
||||||
|
if (containsCode(TD_W))
|
||||||
|
printStringAndQueueChar("Instance");
|
||||||
|
else
|
||||||
|
printStringAndQueueChar("Item");
|
||||||
|
break;
|
||||||
|
case TD_N:
|
||||||
|
printStringAndQueueChar("NadRate");
|
||||||
|
break;
|
||||||
|
case TD_P:
|
||||||
|
if (last2CodesAre(TD_D, TD_C))
|
||||||
|
{
|
||||||
|
ReplaceString("DistributionCenter", "DistCenter");
|
||||||
|
printStringAndQueueChar("Pricing");
|
||||||
|
}
|
||||||
|
else if (last2CodeAre(TD_P))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else if(lastCodeIs(TD_P))
|
||||||
|
{
|
||||||
|
ReplaceString("Product", "Person");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printStringAndQueueChar("Product");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TD_Q:
|
||||||
|
printStringAndQueueChar("Darden");
|
||||||
|
break;
|
||||||
|
case TD_S:
|
||||||
|
if (containsCode(TD_W))
|
||||||
|
if (containsCode(TD_S) || containsCode(TD_D))
|
||||||
|
printStringAndQueueChar("Step");
|
||||||
|
else
|
||||||
|
printStringAndQueueChar("Session");
|
||||||
|
else
|
||||||
|
printStringAndQueueChar("Supplier");
|
||||||
|
break;
|
||||||
|
case TD_T:
|
||||||
|
if (containsCode(TD_W))
|
||||||
|
printStringAndQueueChar("Task");
|
||||||
|
else
|
||||||
|
printStringAndQueueChar("Type");
|
||||||
|
break;
|
||||||
|
case TD_W:
|
||||||
|
printStringAndQueueChar("Workflow");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
addKeyCode(kc);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
|
case KC_LSPO:
|
||||||
|
case KC_RSPC:
|
||||||
|
shifted = true;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case S_LFTJN: SEND_STRING("LEFT JOIN"); return false;
|
||||||
|
case S_INRJN: SEND_STRING("INNER JOIN "); return false;
|
||||||
|
case S_SLCT: SEND_STRING("SELECT "); return false;
|
||||||
|
case S_FROM: SEND_STRING("FROM "); return false;
|
||||||
|
case S_DSNCT: SEND_STRING("DISTINCT "); return false;
|
||||||
|
case S_ORDER: SEND_STRING("ORDER "); return false;
|
||||||
|
case S_WHERE: SEND_STRING("WHERE "); return false;
|
||||||
|
case S_ALTER: SEND_STRING("ALTER SESSION SET CURRENT_SCHEMA = "); return false;
|
||||||
|
case S_ASTRK: SEND_STRING("* "); return false;
|
||||||
|
|
||||||
|
case KC_BSLS:
|
||||||
|
initStringData();
|
||||||
|
layer_on(SQLNAMES);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case TD_BSPC:
|
||||||
|
if (!shifted){
|
||||||
|
deletePrev();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
register_code(KC_BSPC);
|
||||||
|
unregister_code(KC_BSPC);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case TD_A:
|
||||||
|
case TD_B:
|
||||||
|
case TD_C:
|
||||||
|
case TD_D:
|
||||||
|
case TD_E:
|
||||||
|
case TD_F:
|
||||||
|
case TD_G:
|
||||||
|
case TD_H:
|
||||||
|
case TD_I:
|
||||||
|
case TD_J:
|
||||||
|
case TD_K:
|
||||||
|
case TD_L:
|
||||||
|
case TD_M:
|
||||||
|
case TD_N:
|
||||||
|
case TD_O:
|
||||||
|
case TD_P:
|
||||||
|
case TD_Q:
|
||||||
|
case TD_R:
|
||||||
|
case TD_S:
|
||||||
|
case TD_T:
|
||||||
|
case TD_U:
|
||||||
|
case TD_V:
|
||||||
|
case TD_W:
|
||||||
|
case TD_X:
|
||||||
|
case TD_Y:
|
||||||
|
case TD_Z:
|
||||||
|
processSmartMacroTap(keycode);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case TD_ENT:
|
||||||
|
printTableAbbreviation();
|
||||||
|
case TD_ESC:
|
||||||
|
eraseKeyCodes();
|
||||||
|
eraseTableAbbreviation();
|
||||||
|
layer_off(SQLNAMES);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
|
|
||||||
|
case KC_BSLS:
|
||||||
|
if (macroTaps[0] == 0)
|
||||||
|
{
|
||||||
|
SEND_STRING("\\");
|
||||||
|
layer_off(SQLNAMES);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
case KC_LSPO:
|
||||||
|
case KC_RSPC:
|
||||||
|
shifted = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[BASE]=
|
[QWERTY]=
|
||||||
LAYOUT(
|
LAYOUT_60_ansi(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
|
ESCAP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MNUS, EQUL, BACKSPC,
|
||||||
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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LBRC, RBRC, BSLASH,
|
||||||
MO(FN_LAYER), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
MO_FNLR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, COLN, QUOT, ENTER_OR_SQL,
|
||||||
KC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_NO,
|
LEFTSHFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, CMMA, PRRD, SLSH, RIGHT_SHIFT__PAREN,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_LGUI, KC_NO, KC_APP, KC_RCTL),
|
CTLL, WINL, ALTL, SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE, ALTR, WINR, APPR, CTLR),
|
||||||
|
|
||||||
[NAV_CLUSTER]=
|
[NAV_CLUSTER]=
|
||||||
LAYOUT(
|
LAYOUT_60_ansi(
|
||||||
KC_TRNS, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_INSERT, KC_HOME, KC_PGUP, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_____, PSCR, SCRL, PAUS, NSRT, HOME, PGUP, NMLK, KSSH, STAR, KMIN, ____, ____, ______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, KC_TRNS, KC_TRNS,
|
______, ____, ____, ____, DELT, END_, PGDN, KP_7, KP_8, KP_9, PLUS, ____, ____, _____,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_UP, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS, KC_TRNS,
|
_______, ____, ____, ____, ____, UPUP, UPUP, KP_4, KP_5, KP_6, PLUS, ____, ___________,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS, KC_TRNS,
|
________, ____, ____, ____, LEFT, D_WN, RGHT, KP_1, KP_2, KP_3, KNTR, _________________,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, KC_TRNS, KC_TRNS),
|
____, ____, ____, /*-----------------*/KC_KP_0/*-----------------*/, KDOT, KNTR, ____, ____),
|
||||||
|
|
||||||
[RGB]=
|
|
||||||
LAYOUT(
|
|
||||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
|
||||||
|
|
||||||
[MOUSE]=
|
|
||||||
LAYOUT(
|
|
||||||
KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
|
||||||
|
|
||||||
[GAMING]=
|
[GAMING]=
|
||||||
LAYOUT(
|
LAYOUT_60_ansi(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, 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_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
KCNO, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ___________,
|
||||||
KC_LSHIFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_NO,
|
________, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, _________________,
|
||||||
KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_NO, KC_NO, TO(BASE)),
|
____, KCNO, ____, /*------------------*/_____/*------------------*/, ____, KCNO, ____, QWRTY),
|
||||||
|
|
||||||
|
[SQLMACROS]=
|
||||||
|
LAYOUT_60_ansi(
|
||||||
|
S_ALTER, ____, ____, ____, ____, ____, ____, ____, S_ASTRK, ____, ____, ____, ____, ___________,
|
||||||
|
______, ____, S_WHERE, ____, ____, ____, ____, ____, S_INRJN, S_ORDER, ____, ____, ____, ______,
|
||||||
|
_______, KC_LBRC, S_SLCT, KC_PAST,S_FROM, ____, ____, ____, ____, S_LFTJN, ____, RBRC, ___________,
|
||||||
|
________, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, _________________,
|
||||||
|
____, ____, ____, /*------------------*/_____/*------------------*/, ____, ____, ____, ____),
|
||||||
|
|
||||||
|
[SQLNAMES]=
|
||||||
|
LAYOUT_60_ansi(
|
||||||
|
TD_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, TD_BSPC,
|
||||||
|
________, TD_Q, TD_W, TD_E, TD_R, TD_T, TD_Y, TD_U, TD_I, TD_O, TD_P, ____, ____, _____,
|
||||||
|
___________, TD_A, TD_S, TD_D, TD_F, TD_G, TD_H, TD_J, TD_K, TD_L, ____, ____, TD_ENT,
|
||||||
|
___________, TD_Z, TD_X, TD_C, TD_V, TD_B, TD_N, TD_M, ____, ____, ____, _________________,
|
||||||
|
____, ____, ____, /*----------------------*/TD_ENT/*-----------------------*/, ____, ____, ____, RESET),
|
||||||
|
|
||||||
[FN_LAYER]=
|
[FN_LAYER]=
|
||||||
LAYOUT(
|
LAYOUT_60_ansi(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
KC_CAPSLOCK, KC_MPRV, KC_MPLY, KC_MNXT, LWIN(KC_R), KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_BRK, KC_TRNS,
|
KC_CAPSLOCK, KC_MPRV, KC_MPLY, KC_MNXT, LWIN(KC_R), ____, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_BRK, ____,
|
||||||
KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, MO(LAYER_SEL),
|
____, KC_VOLD, KC_MUTE, KC_VOLU, ____, ____, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, ____,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
____, ____, ____, ____, ____, ____, KC_END, ____, QWRTY, NAVS, GAME, ____,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HYPR, KC_TRNS, KC_MEH, KC_TRNS),
|
____, ____, ____, _________________, ____, KC_HYPR, KC_MEH, ____)
|
||||||
|
|
||||||
[LAYER_SEL]=
|
|
||||||
LAYOUT(
|
|
||||||
TO(BASE), TO(NAV_CLUSTER), TO(RGB), TO(MOUSE), TO(GAMING), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
//Control
|
||||||
|
#define MO_FNLR MO(FN_LAYER)
|
||||||
|
#define BACKSPC KC_BSPC
|
||||||
|
#define ENTER_OR_SQL LT(SQLMACROS,KC_ENT)
|
||||||
|
#define ESCAP KC_ESC
|
||||||
|
#define PSCR KC_PSCREEN
|
||||||
|
#define SCRL KC_SCROLLLOCK
|
||||||
|
#define PAUS KC_PAUSE
|
||||||
|
#define NSRT KC_INSERT
|
||||||
|
#define HOME KC_HOME
|
||||||
|
#define PGUP KC_PGUP
|
||||||
|
#define PGDN KC_PGDN
|
||||||
|
#define END_ KC_END
|
||||||
|
#define DELT KC_DELETE
|
||||||
|
#define UPUP KC_UP
|
||||||
|
#define D_WN KC_DOWN
|
||||||
|
#define LEFT KC_LEFT
|
||||||
|
#define RGHT KC_RIGHT
|
||||||
|
|
||||||
|
//KEYPAD
|
||||||
|
#define KP_1 KC_KP_1
|
||||||
|
#define KP_2 KC_KP_2
|
||||||
|
#define KP_3 KC_KP_3
|
||||||
|
#define KP_4 KC_KP_4
|
||||||
|
#define KP_5 KC_KP_5
|
||||||
|
#define KP_6 KC_KP_6
|
||||||
|
#define KP_7 KC_KP_7
|
||||||
|
#define KP_8 KC_KP_8
|
||||||
|
#define KP_9 KC_KP_9
|
||||||
|
#define KP_0 KC_KP_0
|
||||||
|
#define NMLK KC_NUMLOCK
|
||||||
|
#define STAR KC_KP_ASTERISK
|
||||||
|
#define KSSH KC_KP_SLASH
|
||||||
|
#define KMIN KC_KP_MINUS
|
||||||
|
#define PLUS KC_KP_PLUS
|
||||||
|
#define KNTR KC_KP_ENTER
|
||||||
|
#define KDOT KC_KP_DOT
|
||||||
|
|
||||||
|
//Modifiers
|
||||||
|
#define CTLL KC_LCTL
|
||||||
|
#define LEFTSHFT KC_LSPO
|
||||||
|
#define WINL KC_LGUI
|
||||||
|
#define ALTL KC_LALT
|
||||||
|
#define CTLR KC_RCTL
|
||||||
|
#define RIGHT_SHIFT__PAREN KC_RSPC
|
||||||
|
#define WINR KC_RGUI
|
||||||
|
#define ALTR KC_RALT
|
||||||
|
#define APPR KC_APP
|
||||||
|
|
||||||
|
|
||||||
|
//Punctuation
|
||||||
|
#define CMMA KC_COMM
|
||||||
|
#define PRRD KC_DOT
|
||||||
|
#define SLSH KC_SLSH
|
||||||
|
#define QUOT KC_QUOT
|
||||||
|
#define COLN KC_SCLN
|
||||||
|
#define LBRC KC_LBRC
|
||||||
|
#define RBRC KC_RBRC
|
||||||
|
#define EQUL KC_EQL
|
||||||
|
#define MNUS KC_MINS
|
||||||
|
#define BSLASH KC_BSLS
|
||||||
|
|
||||||
|
//Layers
|
||||||
|
#define QWRTY TO(QWERTY)
|
||||||
|
#define NAVS TO(NAV_CLUSTER)
|
||||||
|
#define GAME TO(GAMING)
|
||||||
|
|
||||||
|
//Space
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
#define _____ KC_TRNS
|
||||||
|
#define ______ KC_TRNS
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define ________ KC_TRNS
|
||||||
|
#define ___________ KC_TRNS
|
||||||
|
#define _________________ KC_TRNS
|
||||||
|
#define SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE KC_SPC
|
||||||
|
#define KCNO KC_NO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define macroTapsLen 32
|
||||||
|
#define tableNameListLen 32
|
||||||
|
#define charCountLen 32
|
||||||
|
|
||||||
|
void initStringData(void);
|
||||||
|
uint32_t layer_state_set_user(uint32_t state);
|
||||||
|
bool containsCode(uint16_t kc);
|
||||||
|
bool lastCodeIs(uint16_t kc);
|
||||||
|
bool last2CodeAre(uint16_t kc);
|
||||||
|
bool last2CodesAre(uint16_t kc, uint16_t kc2);
|
||||||
|
void addKeyCode(uint16_t kc);
|
||||||
|
void eraseKeyCodes(void);
|
||||||
|
void eraseCharCounts(void);
|
||||||
|
void printTableAbbreviation(void);
|
||||||
|
void eraseTableAbbreviation(void);
|
||||||
|
void printString(char* str);
|
||||||
|
void printStringAndQueueChar(char* str);
|
||||||
|
void ReplaceString(char *orig, char *repl);
|
||||||
|
void deletePrev(void);
|
||||||
|
void processSmartMacroTap(uint16_t kc);
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record);
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
AUTO_SHIFT_ENABLE = no
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define FORCE_NKRO
|
||||||
|
|
||||||
#undef LSPO_KEY
|
#undef LSPO_KEY
|
||||||
#undef RSPC_KEY
|
#undef RSPC_KEY
|
||||||
#define LSPO_KEY KC_8 // Nordic Left SpaceCadet
|
#define LSPO_KEY KC_8 // Nordic Left SpaceCadet
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "keymap_swedish.h"
|
#include "keymap_swedish.h"
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
#define BASE 0 // default layer
|
#define BASE 0 // default layer
|
||||||
#define SYMB 1 // symbols
|
#define SYMB 1 // symbols
|
||||||
#define MDIA 2 // media keys
|
#define MDIA 2 // media keys
|
||||||
@@ -47,8 +45,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | | | | | | | | |
|
* | | | | | | | | | | | | | | | |
|
||||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
* | L4 | A | S | D | F | G |------| |------| H | J | K | L |Ö / L3| Ä/L2 |
|
* | L4 | A | S | D | F | G |------| |------| H | J | K | L |Ö / L3| Ä/L2 |
|
||||||
* | | | | | | | Hypr/| | Meh/ | | | | | | |
|
* | | | | | | | | | | | | | | | |
|
||||||
* |--------+------+------+------+------+------| Esc | | Ent |------+------+------+------+------+--------|
|
* |--------+------+------+------+------+------| Back | |Forwd |------+------+------+------+------+--------|
|
||||||
* | LShift/| Z | X | C | V | B | | | | N | M | ; | : | _ | RShift/|
|
* | LShift/| Z | X | C | V | B | | | | N | M | ; | : | _ | RShift/|
|
||||||
* | ( | | | | | | | | | | | , | . | - | ) |
|
* | ( | | | | | | | | | | | , | . | - | ) |
|
||||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
@@ -71,8 +69,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
NO_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS,
|
NO_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_INS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||||
MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G,
|
MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_ESC),
|
KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_WBAK,
|
||||||
CTL_T(NO_APOS), NO_ACUT, KC_LALT, KC_BSPC, KC_SPC,
|
CTL_T(NO_APOS), NO_ACUT, KC_LALT, KC_BSPC, KC_SPC,
|
||||||
NO_LESS, KC_END,
|
NO_LESS, KC_END,
|
||||||
KC_LEFT, KC_RIGHT, KC_PGDN,
|
KC_LEFT, KC_RIGHT, KC_PGDN,
|
||||||
CTL_T(KC_ENT), ALT_T(KC_ESC), KC_LGUI,
|
CTL_T(KC_ENT), ALT_T(KC_ESC), KC_LGUI,
|
||||||
@@ -81,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS,
|
TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS,
|
||||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA,
|
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA,
|
||||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), LT(SYMB, NO_AE),
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), LT(SYMB, NO_AE),
|
||||||
MEH_T(KC_ENT), KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC,
|
KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC,
|
||||||
KC_SPC, KC_BSPC, NO_ALGR, NO_ASTR, CTL_T(NO_TILD),
|
KC_SPC, KC_BSPC, NO_ALGR, NO_ASTR, CTL_T(NO_TILD),
|
||||||
KC_HOME, NO_CIRC,
|
KC_HOME, NO_CIRC,
|
||||||
KC_PGUP, KC_UP, KC_DOWN,
|
KC_PGUP, KC_UP, KC_DOWN,
|
||||||
@@ -101,11 +99,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | . | 0 | = | |
|
* | | | | | | | | . | 0 | = | |
|
||||||
* `----------------------------------' `----------------------------------'
|
* `----------------------------------' `----------------------------------'
|
||||||
* ,-------------. ,-------------.
|
* ,-------------. ,-------------.
|
||||||
* |Animat| | |Toggle|Solid |
|
* | | | | | |
|
||||||
* ,------|------|------| |------+------+------.
|
* ,------|------|------| |------+------+------.
|
||||||
* | | | | | | | |
|
* | | | | | | | |
|
||||||
* |------|------|------| |------|------|------|
|
* |------|------|------| |------|------|------|
|
||||||
* |BNess-|Bness+| | | |Hue- |Hue+ |
|
* | | | | | | | |
|
||||||
* `--------------------' `--------------------'
|
* `--------------------' `--------------------'
|
||||||
*/
|
*/
|
||||||
// SYMBOLS
|
// SYMBOLS
|
||||||
@@ -116,18 +114,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______,KC_HASH,NO_DLR, NO_LPRN,NO_RPRN,NO_GRV,
|
_______,KC_HASH,NO_DLR, NO_LPRN,NO_RPRN,NO_GRV,
|
||||||
_______,KC_PERC,NO_CIRC,NO_LBRC,NO_RBRC,NO_TILD,_______,
|
_______,KC_PERC,NO_CIRC,NO_LBRC,NO_RBRC,NO_TILD,_______,
|
||||||
EPRM,_______,_______,_______,_______,
|
EPRM,_______,_______,_______,_______,
|
||||||
RGB_MOD,_______,
|
_______,_______,
|
||||||
|
_______,_______,_______,
|
||||||
_______,_______,_______,
|
_______,_______,_______,
|
||||||
RGB_VAD,RGB_VAI,_______,
|
|
||||||
// right hand
|
// right hand
|
||||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
_______, KC_UP, KC_7, KC_8, KC_9, NO_ASTR, KC_F12,
|
_______, KC_UP, KC_7, KC_8, KC_9, NO_ASTR, KC_F12,
|
||||||
KC_DOWN, KC_4, KC_5, KC_6, NO_PLUS, _______,
|
KC_DOWN, KC_4, KC_5, KC_6, NO_PLUS, _______,
|
||||||
_______, NO_AMPR, KC_1, KC_2, KC_3, NO_MINS, _______,
|
_______, NO_AMPR, KC_1, KC_2, KC_3, NO_MINS, _______,
|
||||||
_______,KC_DOT, KC_0, NO_EQL, _______,
|
_______,KC_DOT, KC_0, NO_EQL, _______,
|
||||||
RGB_TOG, RGB_SLD,
|
_______, _______,
|
||||||
_______, _______, _______,
|
_______, _______, _______,
|
||||||
_______, RGB_HUD, RGB_HUI
|
_______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap: Media and mouse keys
|
/* Keymap: Media and mouse keys
|
||||||
@@ -183,10 +181,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______,
|
_______, _______, _______,
|
||||||
// right hand
|
// right hand
|
||||||
TO(BASE), _______, _______, _______, _______, _______, _______,
|
TO(BASE), _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, KC_BTN4, KC_MS_U, KC_BTN5, _______, _______,
|
|
||||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_BTN1, KC_BTN3, KC_BTN2, _______, _______,
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
_______, _______,
|
_______, _______,
|
||||||
_______, _______, _______,
|
_______, _______, _______,
|
||||||
_______, _______, _______
|
_______, _______, _______
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
#include "rev1.h"
|
#include "rev1.h"
|
||||||
#elif KEYBOARD_iris_rev1_led
|
#elif KEYBOARD_iris_rev1_led
|
||||||
#include "rev1_led.h"
|
#include "rev1_led.h"
|
||||||
#else
|
#elif KEYBOARD_iris_rev2
|
||||||
#include "rev2.h"
|
#include "rev2.h"
|
||||||
|
#else
|
||||||
|
#include "rev3.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 18 // Number of LEDs
|
#define RGBLED_NUM 18 // Number of LEDs
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
#define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
#define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
#define RGBLIGHT_VAL_STEP 12
|
||||||
|
|||||||
@@ -2,42 +2,53 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "drashna.h"
|
#include "drashna.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT_iris_base( \
|
||||||
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
|
) \
|
||||||
|
LAYOUT_wrapper( \
|
||||||
|
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||||
|
KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||||
|
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, ALT_APP, OS_RGUI, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
||||||
|
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||||
|
)
|
||||||
|
#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_wrapper(
|
[_QWERTY] = LAYOUT_iris_base_wrapper(
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||||
KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS,
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, ALT_APP, OS_RGUI, _________________QWERTY_R3_________________, KC_MRSF,
|
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
),
|
||||||
[_COLEMAK] = LAYOUT_wrapper(
|
|
||||||
KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
[_COLEMAK] = LAYOUT_iris_base_wrapper(
|
||||||
KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS,
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||||
KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||||
KC_MLSF, _________________COLEMAK_L3________________, ALT_APP, OS_RGUI, _________________COLEMAK_R3________________, KC_MRSF,
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
),
|
||||||
[_DVORAK] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
[_DVORAK] = LAYOUT_iris_base_wrapper(
|
||||||
KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS,
|
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||||
KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT,
|
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||||
KC_MLSF, _________________DVORAK_L3_________________, ALT_APP, OS_RGUI, _________________DVORAK_R3_________________, KC_MRSF,
|
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
),
|
||||||
[_WORKMAN] = LAYOUT_wrapper(
|
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS,
|
[_WORKMAN] = LAYOUT_iris_base_wrapper(
|
||||||
KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS,
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||||
KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||||
KC_MLSF, _________________WORKMAN_L3________________, ALT_APP, OS_RGUI, _________________WORKMAN_R3________________, KC_MRSF,
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MODS] = LAYOUT_wrapper(
|
[_MODS] = LAYOUT_wrapper(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
KC_LSFT, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, KC_RSFT,
|
||||||
_______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ RGBLIGHT_ENABLE = yes
|
|||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
SWAP_HANDS_ENABLE = no
|
SWAP_HANDS_ENABLE = yes
|
||||||
|
|
||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
RGBLIGHT_TWINKLE = no
|
RGBLIGHT_TWINKLE = yes
|
||||||
|
|
||||||
BOOTLOADER = qmk-dfu
|
BOOTLOADER = qmk-dfu
|
||||||
@@ -65,8 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
#define RGBLIGHT_TIMER
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
#define RGBLIGHT_TIMER
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
#define RGBLIGHT_TIMER
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Danny Nguyen <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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 QMK_KEYBOARD_CONFIG_H
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCEEB
|
||||||
|
#define PRODUCT_ID 0x1256
|
||||||
|
#define DEVICE_VER 0x0300
|
||||||
|
#define MANUFACTURER Keebio
|
||||||
|
#define PRODUCT Iris Keyboard
|
||||||
|
#define DESCRIPTION Split 50 percent ergonomic keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
// Rows are doubled-up
|
||||||
|
#define MATRIX_ROWS 10
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
// wiring of each half
|
||||||
|
#define MATRIX_ROW_PINS { D2, D3, D5, D7, D6 }
|
||||||
|
#define MATRIX_COL_PINS { F1, F4, F5, F6, D4, B4 }
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 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
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B5
|
||||||
|
#define BACKLIGHT_LEVELS 5
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN F7
|
||||||
|
#define RGBLIGHT_TIMER
|
||||||
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
// #define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
// #define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#include "rev3.h"
|
||||||
|
|
||||||
|
#ifdef SSD1306OLED
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// // green led on
|
||||||
|
// DDRD |= (1<<5);
|
||||||
|
// PORTD &= ~(1<<5);
|
||||||
|
|
||||||
|
// // orange led on
|
||||||
|
// DDRB |= (1<<0);
|
||||||
|
// PORTB &= ~(1<<0);
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
|
__attribute__ ((weak))
|
||||||
|
// swap-hands action needs a matrix to define the swap
|
||||||
|
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Left hand, matrix positions */
|
||||||
|
{{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
|
||||||
|
{{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
|
||||||
|
{{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
|
||||||
|
{{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
|
||||||
|
{{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
|
||||||
|
/* Right hand, matrix positions */
|
||||||
|
{{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
|
||||||
|
{{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
|
||||||
|
{{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
|
||||||
|
{{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
|
||||||
|
{{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "iris.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_I2C
|
||||||
|
#include <stddef.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//void promicro_bootloader_jmp(bool program);
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L30, L31, L32, L33, L34, L35, LT4, RT4, R30, R31, R32, R33, R34, R35, \
|
||||||
|
LT1, LT2, LT3, RT3, RT2, RT1 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
|
{ KC_NO, KC_NO, LT4, LT1, LT2, LT3 }, \
|
||||||
|
{ R05, R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R15, R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R25, R24, R23, R22, R21, R20 }, \
|
||||||
|
{ R35, R34, R33, R32, R31, R30 }, \
|
||||||
|
{ KC_NO, KC_NO, RT4, RT1, RT2, RT3 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
BACKLIGHT_ENABLE = yes
|
||||||
@@ -37,7 +37,11 @@ F_USB = $(F_CPU)
|
|||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
BOOTLOADER = caterina
|
ifeq ($(strip $(KEYBOARD)), iris/rev3)
|
||||||
|
BOOTLOADER = dfu
|
||||||
|
else
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
endif
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
# Interrupt driven control endpoint task(+60)
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|||||||
@@ -0,0 +1,219 @@
|
|||||||
|
/* Copyright 2017 Kenny Hung
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 "keymap_uk.h"
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
enum Layers {
|
||||||
|
cm, // colemak
|
||||||
|
dv, // dvorak
|
||||||
|
qw, // qwerty
|
||||||
|
nbl, // numbers left
|
||||||
|
nbr, // numbers right
|
||||||
|
syl, // symbols left
|
||||||
|
syr, // symbols right
|
||||||
|
nal, // navigation left
|
||||||
|
nar // navigation right
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layer buttons
|
||||||
|
#define _Z_SFT SFT_T(UK_Z)
|
||||||
|
#define _SCLSH SFT_T(UK_SCLN)
|
||||||
|
#define _SLSH SFT_T(UK_SLSH)
|
||||||
|
|
||||||
|
#define _X_NB LT(nbl, UK_X)
|
||||||
|
#define _Q_NB LT(nbl, UK_Q)
|
||||||
|
#define _DOT_NB LT(nbr, UK_DOT)
|
||||||
|
#define _V_NB LT(nbr, UK_V)
|
||||||
|
#define __NBL LT(nbl, _______)
|
||||||
|
#define __NBR LT(nbr, _______)
|
||||||
|
|
||||||
|
#define _C_SY LT(syl, UK_C)
|
||||||
|
#define _J_SY LT(syl, UK_J)
|
||||||
|
#define _W_SY LT(syr, UK_W)
|
||||||
|
#define _COM_SY LT(syr, UK_COMM)
|
||||||
|
#define __SYL LT(syl, _______)
|
||||||
|
#define __SYR LT(syr, _______)
|
||||||
|
|
||||||
|
#define _V_NAL LT(nal, UK_V)
|
||||||
|
#define _K_NAL LT(nal, UK_K)
|
||||||
|
#define _M_NAR LT(nar, UK_M)
|
||||||
|
#define __NAL LT(nal, _______)
|
||||||
|
#define __NAR LT(nar, _______)
|
||||||
|
|
||||||
|
// Custom hotkeys
|
||||||
|
#define _TERM LCTL(UK_QUOT) // Hotkey for terminal
|
||||||
|
#define _S_TAB S(UK_TAB)
|
||||||
|
#define _C_LEFT LCTL(UK_LEFT)
|
||||||
|
#define _C_RGHT LCTL(UK_RGHT)
|
||||||
|
#define _A_LEFT LALT(UK_LEFT)
|
||||||
|
#define _A_RGHT LALT(UK_RGHT)
|
||||||
|
|
||||||
|
// Custom hotkeys
|
||||||
|
#define _TERM LCTL(UK_QUOT) // Hotkey for terminal
|
||||||
|
#define _S_TAB S(UK_TAB)
|
||||||
|
#define _C_LEFT LCTL(UK_LEFT)
|
||||||
|
#define _C_RGHT LCTL(UK_RGHT)
|
||||||
|
#define _A_LEFT LALT(UK_LEFT)
|
||||||
|
#define _A_RGHT LALT(UK_RGHT)
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
IJ_OMN = SAFE_RANGE // IntelliJ Omnibox
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
* | Q | W | F | P | G | | | J | L | U | Y | ; |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | A | R | S | T | D | | | H | N | E | I | O |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | Z | X | C | V | B | | | K | M | , | . | / |
|
||||||
|
* | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT |
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[cm] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \
|
||||||
|
UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O, \
|
||||||
|
_Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \
|
||||||
|
UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ' | , | . | P | Y | | | F | G | C | R | L |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | A | O | E | U | I | | | D | H | T | N | S |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | ; | Q | J | K | X | | | B | M | W | V | Z |
|
||||||
|
* | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
*/
|
||||||
|
[dv] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_QUOT, UK_COMM, UK_DOT, UK_P, UK_Y, _______, _______, UK_F, UK_G, UK_C, UK_R, UK_L, \
|
||||||
|
UK_A, UK_O, UK_E, UK_U, UK_I, _______, _______, UK_D, UK_H, UK_T, UK_N, UK_S, \
|
||||||
|
_SCLSH, _Q_NB, _J_SY, _K_NAL, UK_X, _______, _______, UK_B, _M_NAR, _W_SY, _V_NB, _Z_SFT, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
* | Q | W | E | R | T | | | Y | U | I | O | P |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | A | S | D | F | G | | | H | J | K | L | ; |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | Z | X | C | V | B | | | N | M | , | . | / |
|
||||||
|
* | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT |
|
||||||
|
* |-----------------------------------------------------------------------------------------------------------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[qw] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_Q, UK_W, UK_E, UK_R, UK_T, _______, _______, UK_Y, UK_U, UK_I, UK_O, UK_P, \
|
||||||
|
UK_A, UK_S, UK_D, UK_F, UK_G, _______, _______, UK_H, UK_J, UK_K, UK_L, UK_SCLN, \
|
||||||
|
_Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_N, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Numbers _NB
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | F7 | F8 | F9 | F10 | | | | 7 | 8 | 9 | |
|
||||||
|
* |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | F4 | F5 | F6 | F11 | | | | 4 | 5 | 6 | |
|
||||||
|
* |-----------------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | F1 | F2 | F3 | F12 | | | 0 | 1 | 2 | 3 | . |
|
||||||
|
* |-----------------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[nbl] = LAYOUT_ortho_4x12( \
|
||||||
|
_______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
|
||||||
|
_______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
|
||||||
|
_______, __NBL, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
[nbr] = LAYOUT_ortho_4x12( \
|
||||||
|
_______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \
|
||||||
|
_______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \
|
||||||
|
_______, UK_F1, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Symbols _SY
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ! | £ | _ | - | ~ | | | \ | { | } | / | # |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | $ | % | + | = | | | | " | ( | ) | ' | @ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | ^ | & | * | | | | | | < | [ | ] | > | ` |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[syl] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \
|
||||||
|
UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \
|
||||||
|
UK_CIRC, UK_AMPR, __SYL, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
[syr] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \
|
||||||
|
UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \
|
||||||
|
UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, __SYR, UK_RABK, UK_GRV, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Navigation
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Ctrl L | Up | Ctrl R | RGB RMD| RGB HD | RGB HI | RGB_TG | PtSn | ScLk | Pause | DVORAK |
|
||||||
|
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | Tab | Left | Down | Right | RGB MD | RGB SD | RGB SI | COLEMAK| Insert | Home | PgUp | Term |
|
||||||
|
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | ShTab | Alt L | IJ Omni| Alt R | | RGB VD | RGB VI | | ScLk | End | PgDn | QWERTY |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[nal] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \
|
||||||
|
UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \
|
||||||
|
_S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, UK_SLCK, UK_END, UK_PGDN, DF(qw), \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
[nar] = LAYOUT_ortho_4x12( \
|
||||||
|
UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \
|
||||||
|
UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \
|
||||||
|
_S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, __NAR, UK_END, UK_PGDN, DF(qw), \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch(keycode) {
|
||||||
|
case IJ_OMN:
|
||||||
|
SEND_STRING(SS_TAP(X_LSHIFT)SS_TAP(X_LSHIFT));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 16 // Number of LEDs
|
#define RGBLED_NUM 16 // Number of LEDs
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
#define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
#define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
#define RGBLIGHT_VAL_STEP 12
|
||||||
|
|||||||
@@ -30,41 +30,47 @@ uint8_t last_led;
|
|||||||
uint8_t last_osm;
|
uint8_t last_osm;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
#define LAYOUT_orthodox_base( \
|
||||||
#define _______ KC_TRNS
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
#define XXXXXXX KC_NO
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
|
) \
|
||||||
|
LAYOUT_wrapper( \
|
||||||
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
|
KC_TAB, K11, K12, K13, K14, K15, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF \
|
||||||
|
)
|
||||||
|
#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_wrapper(\
|
[_QWERTY] = LAYOUT_orthodox_base_wrapper(
|
||||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||||
KC_TAB, _________________QWERTY_L2_________________, ___________ORTHODOX_THUMP_TOP_____________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, ___________________ORTHODOX_THUMB_BOTTOM____________________, _________________QWERTY_R3_________________, KC_MRSF
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||||
),
|
),
|
||||||
|
|
||||||
[_COLEMAK] = LAYOUT_wrapper(\
|
[_COLEMAK] = LAYOUT_orthodox_base_wrapper(
|
||||||
KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC,
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||||
KC_TAB, _________________COLEMAK_L2________________, ___________ORTHODOX_THUMP_TOP_____________, _________________COLEMAK_R2________________, KC_QUOT,
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||||
KC_MLSF, _________________COLEMAK_L3________________, ___________________ORTHODOX_THUMB_BOTTOM____________________, _________________COLEMAK_R3________________, KC_MRSF
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||||
),
|
),
|
||||||
|
|
||||||
[_DVORAK] = LAYOUT_wrapper(\
|
[_DVORAK] = LAYOUT_orthodox_base_wrapper(
|
||||||
KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC,
|
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||||
KC_TAB, _________________DVORAK_L2_________________, ___________ORTHODOX_THUMP_TOP_____________, _________________DVORAK_R2_________________, KC_MINS,
|
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||||
KC_MLSF, _________________DVORAK_L3_________________, ___________________ORTHODOX_THUMB_BOTTOM____________________, _________________DVORAK_R3_________________, KC_MRSF
|
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||||
),
|
),
|
||||||
[_WORKMAN] = LAYOUT_wrapper(\
|
|
||||||
KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC,
|
[_WORKMAN] = LAYOUT_orthodox_base_wrapper(
|
||||||
KC_TAB, _________________WORKMAN_L2________________, ___________ORTHODOX_THUMP_TOP_____________, _________________WORKMAN_R2________________, KC_MINS,
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||||
KC_MLSF, _________________WORKMAN_L3________________, ___________________ORTHODOX_THUMB_BOTTOM____________________, _________________WORKMAN_R3________________, KC_MRSF
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||||
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MODS] = LAYOUT_wrapper(\
|
[_MODS] = LAYOUT_wrapper(\
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ NKRO_ENABLE = yes
|
|||||||
|
|
||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
RGBLIGHT_TWINKLE = no
|
RGBLIGHT_TWINKLE = yes
|
||||||
|
|
||||||
BOOTLOADER = qmk-dfu
|
BOOTLOADER = qmk-dfu
|
||||||
@@ -459,6 +459,480 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"LAYOUT_tkl_ansi_plus_five": {
|
||||||
|
"key_count": 92,
|
||||||
|
"layout": [
|
||||||
|
{
|
||||||
|
"label": "Esc",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F1",
|
||||||
|
"x": 2,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F2",
|
||||||
|
"x": 3,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F3",
|
||||||
|
"x": 4,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F4",
|
||||||
|
"x": 5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F5",
|
||||||
|
"x": 6.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F6",
|
||||||
|
"x": 7.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F7",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F8",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F9",
|
||||||
|
"x": 11,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F10",
|
||||||
|
"x": 12,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F11",
|
||||||
|
"x": 13,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F12",
|
||||||
|
"x": 14,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "PrtSc",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Scroll Lock",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Pause",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "~",
|
||||||
|
"x": 0,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "!",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "@",
|
||||||
|
"x": 2,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "#",
|
||||||
|
"x": 3,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "$",
|
||||||
|
"x": 4,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "%",
|
||||||
|
"x": 5,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "^",
|
||||||
|
"x": 6,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "&",
|
||||||
|
"x": 7,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "*",
|
||||||
|
"x": 8,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "(",
|
||||||
|
"x": 9,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ")",
|
||||||
|
"x": 10,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "_",
|
||||||
|
"x": 11,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "+",
|
||||||
|
"x": 12,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Backspace",
|
||||||
|
"x": 13,
|
||||||
|
"y": 1.5,
|
||||||
|
"w": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Insert",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Home",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "PgUp",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Tab",
|
||||||
|
"x": 0,
|
||||||
|
"y": 2.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Q",
|
||||||
|
"x": 1.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "W",
|
||||||
|
"x": 2.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "E",
|
||||||
|
"x": 3.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "R",
|
||||||
|
"x": 4.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "T",
|
||||||
|
"x": 5.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Y",
|
||||||
|
"x": 6.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "U",
|
||||||
|
"x": 7.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "I",
|
||||||
|
"x": 8.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "O",
|
||||||
|
"x": 9.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "P",
|
||||||
|
"x": 10.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "{",
|
||||||
|
"x": 11.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "}",
|
||||||
|
"x": 12.5,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "|",
|
||||||
|
"x": 13.5,
|
||||||
|
"y": 2.5,
|
||||||
|
"w": 1.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Delete",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "End",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "PgDn",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 2.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Caps Lock",
|
||||||
|
"x": 0,
|
||||||
|
"y": 3.5,
|
||||||
|
"w": 1.75
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "A",
|
||||||
|
"x": 1.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "S",
|
||||||
|
"x": 2.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "D",
|
||||||
|
"x": 3.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "F",
|
||||||
|
"x": 4.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "G",
|
||||||
|
"x": 5.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "H",
|
||||||
|
"x": 6.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "J",
|
||||||
|
"x": 7.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "K",
|
||||||
|
"x": 8.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "L",
|
||||||
|
"x": 9.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ":",
|
||||||
|
"x": 10.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\"",
|
||||||
|
"x": 11.75,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Enter",
|
||||||
|
"x": 12.75,
|
||||||
|
"y": 3.5,
|
||||||
|
"w": 2.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 3.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Shift",
|
||||||
|
"x": 0,
|
||||||
|
"y": 4.5,
|
||||||
|
"w": 2.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Z",
|
||||||
|
"x": 2.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "X",
|
||||||
|
"x": 3.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "C",
|
||||||
|
"x": 4.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "V",
|
||||||
|
"x": 5.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "B",
|
||||||
|
"x": 6.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "N",
|
||||||
|
"x": 7.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "M",
|
||||||
|
"x": 8.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "<",
|
||||||
|
"x": 9.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": ">",
|
||||||
|
"x": 10.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "?",
|
||||||
|
"x": 11.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Shift",
|
||||||
|
"x": 12.25,
|
||||||
|
"y": 4.5,
|
||||||
|
"w": 2.75
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\\u2191",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 4.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Ctrl",
|
||||||
|
"x": 0,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Win",
|
||||||
|
"x": 1.25,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alt",
|
||||||
|
"x": 2.5,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 3.75,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 6.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Alt",
|
||||||
|
"x": 10,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Win",
|
||||||
|
"x": 11.25,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "FN",
|
||||||
|
"x": 12.5,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Ctrl",
|
||||||
|
"x": 13.75,
|
||||||
|
"y": 5.5,
|
||||||
|
"w": 1.25
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\\u2190",
|
||||||
|
"x": 15.25,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\\u2193",
|
||||||
|
"x": 16.25,
|
||||||
|
"y": 5.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "\\u2192",
|
||||||
|
"x": 17.25,
|
||||||
|
"y": 5.5
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"LAYOUT_tkl_ansi_wkl": {
|
"LAYOUT_tkl_ansi_wkl": {
|
||||||
"key_count": 86,
|
"key_count": 86,
|
||||||
"layout": [
|
"layout": [
|
||||||
|
|||||||
@@ -54,6 +54,24 @@
|
|||||||
K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Keymap for a standard ANSI layout plus the five extra keys
|
||||||
|
// above the arrow block.
|
||||||
|
#define LAYOUT_tkl_ansi_plus_five( \
|
||||||
|
K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||||
|
K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, K3G, \
|
||||||
|
K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, K4G, \
|
||||||
|
K50, K51, K52, K57, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
||||||
|
) LAYOUT_7bit( \
|
||||||
|
K00, KC_NO, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||||
|
K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, K1D, K1E, K1F, K1G, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F, K3G, \
|
||||||
|
K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F, K4G, \
|
||||||
|
K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G \
|
||||||
|
)
|
||||||
|
|
||||||
#define LAYOUT_tkl_ansi_wkl( \
|
#define LAYOUT_tkl_ansi_wkl( \
|
||||||
K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||||
K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \
|
K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(ONE_UP_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||||
|
#define GOODBYE_SONG SONG(COIN_SOUND)
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND) }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
// Most tactile encoders have detents every 4 stages
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
@@ -0,0 +1,295 @@
|
|||||||
|
// from <https://github.com/noahfrederick/dots/tree/master/planck
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_plover.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Keymap layers
|
||||||
|
enum planck_layers {
|
||||||
|
QWERTY_LAYER,
|
||||||
|
LOWER_LAYER,
|
||||||
|
RAISE_LAYER,
|
||||||
|
NAV_LAYER,
|
||||||
|
GUI_LAYER,
|
||||||
|
STENO_LAYER,
|
||||||
|
ADJUST_LAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
// Dashes (macOS)
|
||||||
|
#define KC_NDSH LALT(KC_MINS)
|
||||||
|
#define KC_MDSH S(LALT(KC_MINS))
|
||||||
|
|
||||||
|
// Window manager keys
|
||||||
|
#define WM_FULL LALT(LGUI(KC_F))
|
||||||
|
#define WM_NEXT LCTL(LALT(LGUI(KC_RGHT)))
|
||||||
|
#define WM_PREV LCTL(LALT(LGUI(KC_LEFT)))
|
||||||
|
#define WM_NW LCTL(LGUI(KC_LEFT))
|
||||||
|
#define WM_N LALT(LGUI(KC_UP))
|
||||||
|
#define WM_NE LCTL(LGUI(KC_RGHT))
|
||||||
|
#define WM_E LALT(LGUI(KC_RGHT))
|
||||||
|
#define WM_SE S(LCTL(LGUI(KC_RGHT)))
|
||||||
|
#define WM_S LALT(LGUI(KC_DOWN))
|
||||||
|
#define WM_SW S(LCTL(LGUI(KC_LEFT)))
|
||||||
|
#define WM_W LALT(LGUI(KC_LEFT))
|
||||||
|
#define WM_CNTR LALT(LGUI(KC_C))
|
||||||
|
|
||||||
|
// Custom key codes
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
STENO,
|
||||||
|
PV_EXIT,
|
||||||
|
PV_LOOK,
|
||||||
|
SEND_VERSION,
|
||||||
|
SEND_MAKE
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(LOWER_LAYER)
|
||||||
|
#define RAISE MO(RAISE_LAYER)
|
||||||
|
|
||||||
|
#define GUI_L LT(GUI_LAYER, KC_LBRC)
|
||||||
|
#define GUI_R LT(GUI_LAYER, KC_RBRC)
|
||||||
|
|
||||||
|
#define NAV_SCLN LT(NAV_LAYER, KC_SCLN)
|
||||||
|
#define NAV_O LT(NAV_LAYER, KC_O)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base layer (Qwerty)
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ ⇥ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ' │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* Tap for Esc -- │ ⌃ │ A │ S │ D │ F │ G │ H │ J │ K │ L │; Nav│ ⌃ │ -- Tap for Enter
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* Tap for ( -- │ ⇧ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ ⇧ │ -- Tap for )
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* Tap for [ -- │ GUI │Hyper│ ⌥ │ ⌘ │ ↓ │ Space │ ↑ │ ⌘ │ ⌥ │Hyper│ GUI │ -- Tap for ]
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
* / /
|
||||||
|
* Tap for ] [ --------'-----------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[QWERTY_LAYER] = LAYOUT_planck_grid(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NAV_SCLN, CTL_T(KC_ENT),
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
|
GUI_L, ALL_T(KC_RBRC), KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, ALL_T(KC_LBRC), GUI_R
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Numeric layer
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* Application -- │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ # │
|
||||||
|
* window ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* switcher │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ - │ + │ ` │ | │ : │ │ │ , │ . │ \ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ Backspace │ │ │ │ │ │
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
[LOWER_LAYER] = LAYOUT_planck_grid(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3),
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, KC_MINS, KC_PLUS, KC_GRV, KC_PIPE, KC_COLN, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Symbol layer
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ ~ │ F11 │ F12 │ F13 │ F14 │ F15 │ F16 │ F17 │ F18 │ F19 │ F20 │ # │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ' │ " │ │ \
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ |-- Mostly shifted version
|
||||||
|
* │ │ _ │ = │ ~ │ | │ : │ │ │ , │ . │ / │ │ / of lower layer
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ Delete │ │ │ │ │ │
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
[RAISE_LAYER] = LAYOUT_planck_grid(
|
||||||
|
S(KC_GRV), KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(KC_3),
|
||||||
|
_______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_QUOT, S(KC_QUOT), _______,
|
||||||
|
_______, KC_UNDS, KC_EQL, KC_TILD, KC_PIPE, KC_COLN, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_DEL, KC_DEL, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Directional navigation layer
|
||||||
|
*
|
||||||
|
* Large movements -----/```````````````````\ /```````````````````\----- Vim-style arrow keys
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │Home │PgUp │PgDn │ End │ ← │ ↓ │ ↑ │ → │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
[NAV_LAYER] = LAYOUT_planck_grid(
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
_______, XXXXXXX, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NAV_SCLN, _______,
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||||
|
_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* GUI (window management/mouse/media controls) layer
|
||||||
|
*
|
||||||
|
* Mouse keys -----/```````````````````\ /```````````````````\----- Window manager
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ │Ms B2│Ms Up│Ms B1│Ms WD│ │ │Prev │ NW │ N │ NE │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │Ms L │Ms Dn│Ms R │Ms WU│ │ │Full │ W │Centr│ E │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │Undo │ Cut │Copy │Paste│ │ │Next │ SW │ S │ SE │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │Prev │Play │Next │ │ Sleep │ │Mute │Vol- │Vol+ │ │
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
* \___ Media ___/ \___ Screen/sleep __/ \___ Volume __/
|
||||||
|
*/
|
||||||
|
[GUI_LAYER] = LAYOUT_planck_grid(
|
||||||
|
_______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, XXXXXXX, XXXXXXX, WM_PREV, WM_NW, WM_N, WM_NE, _______,
|
||||||
|
_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, XXXXXXX, XXXXXXX, WM_FULL, WM_W, WM_CNTR, WM_E, _______,
|
||||||
|
_______, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, WM_NEXT, WM_SW, WM_S, WM_SE, _______,
|
||||||
|
_______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_SLEP, KC_WAKE, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Base layer (Qwerty-Steno)
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* │ # │ # │ # │ # │ # │ # │ # │ # │ # │ # │ # │ # │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │Look │ │ T │ P │ H │ │ F │ P │ L │ T │ D │
|
||||||
|
* │ -up │ S ├─────┼─────┼─────┤ * ├─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │ │ │ K │ W │ R │ │ R │ B │ G │ S │ Z │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼───────────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │Exit │ │ │ A │ O │ │ E │ U │ │ │ │
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
*/
|
||||||
|
[STENO_LAYER] = LAYOUT_planck_grid(
|
||||||
|
PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
|
||||||
|
PV_LOOK, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
|
||||||
|
PV_LOOK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
|
||||||
|
PV_EXIT, XXXXXXX, XXXXXXX, PV_A, PV_O, KC_SPC, KC_BSPC, PV_E, PV_U, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keyboard settings layer
|
||||||
|
* ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
|
||||||
|
* Firmware -- │ │Reset│Make │ │ │ │ │ │ │ │Vers │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* -- │Qwert│ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* Audio -- │ │Voic-│Voic+│Mus +│Mus -│MIDI+│MIDI-│ │ │Aud +│Aud -│ │
|
||||||
|
* ├─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┼─────┼─────┼─────┼─────┤
|
||||||
|
* │Steno│ │Swap │Norm │ │ │ │ │ │ │ │
|
||||||
|
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
|
||||||
|
* Swap GUI/Alt _/________/ \_____________\_ _/
|
||||||
|
*/
|
||||||
|
[ADJUST_LAYER] = LAYOUT_planck_grid(
|
||||||
|
XXXXXXX, RESET, SEND_MAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, SEND_VERSION, XXXXXXX,
|
||||||
|
QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
XXXXXXX, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, XXXXXXX,
|
||||||
|
STENO, XXXXXXX, AG_SWAP, AG_NORM, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Send PHROPB ({PLOVER:RESUME}).
|
||||||
|
void plover_resume(void) {
|
||||||
|
register_code(PV_LP);
|
||||||
|
register_code(PV_LH);
|
||||||
|
register_code(PV_LR);
|
||||||
|
register_code(PV_O);
|
||||||
|
register_code(PV_RP);
|
||||||
|
register_code(PV_RB);
|
||||||
|
unregister_code(PV_LP);
|
||||||
|
unregister_code(PV_LH);
|
||||||
|
unregister_code(PV_LR);
|
||||||
|
unregister_code(PV_O);
|
||||||
|
unregister_code(PV_RP);
|
||||||
|
unregister_code(PV_RB);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send PHROF ({PLOVER:SUSPEND}).
|
||||||
|
void plover_suspend(void) {
|
||||||
|
register_code(PV_LP);
|
||||||
|
register_code(PV_LH);
|
||||||
|
register_code(PV_LR);
|
||||||
|
register_code(PV_O);
|
||||||
|
register_code(PV_RF);
|
||||||
|
unregister_code(PV_LP);
|
||||||
|
unregister_code(PV_LH);
|
||||||
|
unregister_code(PV_LR);
|
||||||
|
unregister_code(PV_O);
|
||||||
|
unregister_code(PV_RF);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send PHROBG ({PLOVER:LOOKUP}).
|
||||||
|
void plover_lookup(void) {
|
||||||
|
register_code(PV_LP);
|
||||||
|
register_code(PV_LH);
|
||||||
|
register_code(PV_LR);
|
||||||
|
register_code(PV_O);
|
||||||
|
register_code(PV_RB);
|
||||||
|
register_code(PV_RG);
|
||||||
|
unregister_code(PV_LP);
|
||||||
|
unregister_code(PV_LH);
|
||||||
|
unregister_code(PV_LR);
|
||||||
|
unregister_code(PV_O);
|
||||||
|
unregister_code(PV_RB);
|
||||||
|
unregister_code(PV_RG);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
return update_tri_layer_state(state, LOWER_LAYER, RAISE_LAYER, ADJUST_LAYER);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case STENO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
stop_all_notes();
|
||||||
|
PLAY_SONG(plover_song);
|
||||||
|
#endif
|
||||||
|
layer_off(RAISE_LAYER);
|
||||||
|
layer_off(LOWER_LAYER);
|
||||||
|
layer_off(ADJUST_LAYER);
|
||||||
|
layer_on(STENO_LAYER);
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
plover_resume();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case PV_EXIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_gb_song);
|
||||||
|
#endif
|
||||||
|
plover_suspend();
|
||||||
|
layer_off(STENO_LAYER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case PV_LOOK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
plover_lookup();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case SEND_VERSION:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION " (" QMK_BUILDDATE ")");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case SEND_MAKE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":dfu\n");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Disable shift combination, which conflicts with shift-parens
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys (disabled to save space)
|
||||||
|
NKRO_ENABLE = no # N-key rollover required for use as a steno board
|
||||||
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||||
|
SONG(COLEMAK_SOUND), \
|
||||||
|
SONG(DVORAK_SOUND) \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
// Most tactile encoders have detents every 4 stages
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "muse.h"
|
||||||
|
#include "keymap_slovenian.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
_ALTGR,
|
||||||
|
_CAPS
|
||||||
|
};
|
||||||
|
|
||||||
|
enum planck_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define CAPS MO(_CAPS)
|
||||||
|
#define ALTGR MO(_ALTGR)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | CAPS | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Y | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_planck_grid(
|
||||||
|
KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, KC_BSPC,
|
||||||
|
CAPS, SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT ,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, KC_DOWN, KC_UP, KC_F5
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_MINS, KC_PPLS , KC_ENT,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_planck_grid(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT_planck_grid(
|
||||||
|
_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
|
||||||
|
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
|
||||||
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ALTGR] = LAYOUT_planck_grid(
|
||||||
|
_______, ALTG(KC_Q), ALTG(KC_W), ALTG(KC_E), _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, ALTG(KC_F), ALTG(KC_G), _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, ALTG(KC_V), ALTG(KC_B), ALTG(KC_N), _______, ALTG(KC_COMM), ALTG(KC_DOT), _______, _______ ,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_CAPS] = LAYOUT_planck_grid(
|
||||||
|
KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool muse_mode = false;
|
||||||
|
uint8_t last_muse_note = 0;
|
||||||
|
uint16_t muse_counter = 0;
|
||||||
|
uint8_t muse_offset = 70;
|
||||||
|
uint16_t muse_tempo = 50;
|
||||||
|
|
||||||
|
void encoder_update(bool clockwise) {
|
||||||
|
if (muse_mode) {
|
||||||
|
if (IS_LAYER_ON(_RAISE)) {
|
||||||
|
if (clockwise) {
|
||||||
|
muse_offset++;
|
||||||
|
} else {
|
||||||
|
muse_offset--;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
muse_tempo+=1;
|
||||||
|
} else {
|
||||||
|
muse_tempo-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
register_code(KC_PGDN);
|
||||||
|
unregister_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
register_code(KC_PGUP);
|
||||||
|
unregister_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dip_update(uint8_t index, bool active) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
if (active) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_song);
|
||||||
|
#endif
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_gb_song);
|
||||||
|
#endif
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (active) {
|
||||||
|
muse_mode = true;
|
||||||
|
} else {
|
||||||
|
muse_mode = false;
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
stop_all_notes();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
if (muse_mode) {
|
||||||
|
if (muse_counter == 0) {
|
||||||
|
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
||||||
|
if (muse_note != last_muse_note) {
|
||||||
|
stop_note(compute_freq_for_midi_note(last_muse_note));
|
||||||
|
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
||||||
|
last_muse_note = muse_note;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
muse_counter = (muse_counter + 1) % muse_tempo;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RAISE:
|
||||||
|
case LOWER:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The Default Planck Layout
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SRC += muse.c
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
# Quefrency Layout - initial 60%
|
||||||
|
|
||||||
|
Standard qwerty layout.
|
||||||
|
Limited emoji support and proper mouse settings.
|
||||||
|
|
||||||
|
Mostly based off of my other XD75 and Nyquist layouts.
|
||||||
|
|
||||||
|
## Keymap
|
||||||
|
|
||||||
|
```
|
||||||
|
/* BASE
|
||||||
|
*
|
||||||
|
* KC_GESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , /**/ KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS , KC_EQL , KC_DEL , 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 , \
|
||||||
|
* MO_EMOJ , KC_A , KC_S , KC_D , KC_F , KC_G , /**/ KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , KC_ENT , \
|
||||||
|
* KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , /**/ KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , KC_UP , \
|
||||||
|
* KC_LCTL , KC_LALT , KC_LGUI , MO_SYMB , SP_LMS , /**/ SP_RMS , KC_BSPC , KC_RGUI , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* LMSE
|
||||||
|
*
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ ,\
|
||||||
|
* _______ , _______ , KC_PGDN , KC_PGUP , KC_END , KC_HOME , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* RMSE
|
||||||
|
*
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , /**/ KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ , _______ , _______ , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , /**/ KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ , _______ ,\
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , /**/ KC_HOME , KC_END , KC_PGUP , KC_PGDN , _______ , _______ , _______ , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* SYMB
|
||||||
|
*
|
||||||
|
* KC_GESC , KC_F1 , KC_F12 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , /**/ KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , KC_BSPC , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , /**/ KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , _______ , _______ ,\
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* EMOJ
|
||||||
|
*
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
* _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , /**/ X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , \
|
||||||
|
* _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , /**/ X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ ,\
|
||||||
|
* _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , /**/ X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , \
|
||||||
|
* _______ , _______ , _______ , _______ , _______ , /**/ _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
```
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/* Copyright 2018 darm
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General 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 USE_SERIAL
|
||||||
|
#define MASTER_LEFT
|
||||||
|
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#define MOUSEKEY_INTERVAL 16
|
||||||
|
#define MOUSEKEY_MAX_SPEED 7
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||||
|
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||||
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
#define _BASE 0
|
||||||
|
#define _LMSE 1
|
||||||
|
#define _RMSE 2
|
||||||
|
#define _SYMB 3
|
||||||
|
#define _EMOJ 4
|
||||||
|
|
||||||
|
#define SP_LMS LT(_LMSE, KC_SPC)
|
||||||
|
#define SP_RMS LT(_RMSE, KC_SPC)
|
||||||
|
#define MO_SYMB TT(_SYMB)
|
||||||
|
#define MO_EMOJ TT(_EMOJ)
|
||||||
|
|
||||||
|
|
||||||
|
enum emoji_map {
|
||||||
|
UNAM, // unamused 😒
|
||||||
|
HEYE, // smiling face with heart shaped eyes 😍
|
||||||
|
OK, // ok hand sign 👌
|
||||||
|
SMIR, // smirk 😏
|
||||||
|
PRAY, // pray 🙏
|
||||||
|
CELE, // celebration 🙌
|
||||||
|
COOL, // smile with sunglasses 😎
|
||||||
|
EYES, // eyes
|
||||||
|
THNK, // BIG THONK
|
||||||
|
NAIL, // Nailcare
|
||||||
|
SOS, // Vuile sos
|
||||||
|
REDB, // Red B
|
||||||
|
HNDR, // 100
|
||||||
|
MONY,
|
||||||
|
FIRE,
|
||||||
|
CAR,
|
||||||
|
BUTT,
|
||||||
|
BNIS,
|
||||||
|
CUM,
|
||||||
|
CLAP,
|
||||||
|
TRIU, // Fart from nose
|
||||||
|
SCRM,
|
||||||
|
VOMI,
|
||||||
|
DTIV, // Detective
|
||||||
|
EXPL, // Brainsplosion
|
||||||
|
HAIR, // Haircut
|
||||||
|
DANC, // Salsa dancer
|
||||||
|
STRN, // Stronk
|
||||||
|
LEFT, // Point Left
|
||||||
|
RGHT, // Point Right
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
[UNAM] = 0x1F612,
|
||||||
|
[HEYE] = 0x1f60d,
|
||||||
|
[OK] = 0x1F44C,
|
||||||
|
[SMIR] = 0x1F60F,
|
||||||
|
[PRAY] = 0x1F64F,
|
||||||
|
[CELE] = 0x1F64C,
|
||||||
|
[COOL] = 0x1F60E,
|
||||||
|
[EYES] = 0x1F440,
|
||||||
|
[THNK] = 0x1F914,
|
||||||
|
[NAIL] = 0x1F485,
|
||||||
|
[SOS] = 0x1F198,
|
||||||
|
[REDB] = 0x1F171,
|
||||||
|
[HNDR] = 0x1F4AF,
|
||||||
|
[MONY] = 0x1F480,
|
||||||
|
[FIRE] = 0x1F525,
|
||||||
|
[CAR] = 0x1F697,
|
||||||
|
[BUTT] = 0x1F351,
|
||||||
|
[BNIS] = 0x1F346,
|
||||||
|
[CUM] = 0x1F4A6,
|
||||||
|
[CLAP] = 0x1F44F,
|
||||||
|
[TRIU] = 0x1F624,
|
||||||
|
[SCRM] = 0x1F631,
|
||||||
|
[VOMI] = 0x1F92E,
|
||||||
|
[DTIV] = 0x1F575,
|
||||||
|
[EXPL] = 0x1F92F,
|
||||||
|
[HAIR] = 0x2640,
|
||||||
|
[DANC] = 0x1F483,
|
||||||
|
[STRN] = 0x1F4AA,
|
||||||
|
[LEFT] = 0x1F448,
|
||||||
|
[RGHT] = 0x1F449,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_GESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS , KC_EQL , KC_DEL , 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 , \
|
||||||
|
MO_EMOJ , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , KC_ENT , \
|
||||||
|
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT , KC_UP , \
|
||||||
|
KC_LCTL , KC_LALT , KC_LGUI , MO_SYMB , SP_LMS , SP_RMS , KC_BSPC , KC_RGUI , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LMSE] = LAYOUT(
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,\
|
||||||
|
_______ , _______ , KC_PGDN , KC_PGUP , KC_END , KC_HOME , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RMSE] = LAYOUT(
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ , _______ , _______ , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ , _______ ,\
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , KC_HOME , KC_END , KC_PGUP , KC_PGDN , _______ , _______ , _______ , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_SYMB] = LAYOUT(
|
||||||
|
KC_GESC , KC_F1 , KC_F12 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , KC_BSPC , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , _______ , _______ ,\
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_EMOJ] = LAYOUT(
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \
|
||||||
|
_______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , \
|
||||||
|
_______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ ,\
|
||||||
|
_______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , \
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
};
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Build options
|
||||||
|
MOUSEKEY_ENABLE = yes # Emulates mouse key using keypresses
|
||||||
|
EXTRAKEY_ENABLE = yes # Use system and audio control key codes
|
||||||
|
TAP_DANCE_ENABLE = no # Use multi-tap features
|
||||||
|
UNICODEMAP_ENABLE = yes # Emojify me pls
|
||||||
|
NKRO_ENABLE = yes
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _GM 2
|
||||||
|
#define _GF 3
|
||||||
|
|
||||||
|
|
||||||
|
// Tap dance declarations (These must go above the keymaps)
|
||||||
|
enum {
|
||||||
|
TD_F1 = 0,
|
||||||
|
TD_F2,
|
||||||
|
TD_F3,
|
||||||
|
TD_F4,
|
||||||
|
TD_F5,
|
||||||
|
TD_F6,
|
||||||
|
TD_F7,
|
||||||
|
TD_F8,
|
||||||
|
TD_F9,
|
||||||
|
TD_F10,
|
||||||
|
TD_F11,
|
||||||
|
TD_F12,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |~ ` |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bksp |Del |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Caps|Win |Alt | Space |Alt|Ctrl| FN|Lef|Dow|Rig |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_ansi(
|
||||||
|
KC_ESC, TD(TD_F1), TD(TD_F2), TD(TD_F3), TD(TD_F4), TD(TD_F5), TD(TD_F6), TD(TD_F7), TD(TD_F8), TD(TD_F9), TD(TD_F10), TD(TD_F11), TD(TD_F12), KC_BSLS,KC_GRV, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC,KC_DEL, \
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSPC,KC_UP,KC_PGDN, \
|
||||||
|
KC_CAPS, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(_FL), KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
|
||||||
|
/* Keymap _FL: Function Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |Ins |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | |Up | | | | | | | | | | | |Hme |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | Caps |<- |Dn | ->| | | | | | | | | |End |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | | | |Prev|P/P|Next|
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_ansi(
|
||||||
|
_______, KC_F1 ,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_GM), KC_INS , \
|
||||||
|
_______,_______, KC_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \
|
||||||
|
KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \
|
||||||
|
_______,_______,_______,BL_DEC, BL_TOGG,BL_INC, BL_BRTG,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, \
|
||||||
|
_______,_______,_______, _______, _______,_______,_______,KC_MPRV,KC_MPLY, KC_MNXT),
|
||||||
|
|
||||||
|
[_GM] = LAYOUT_ansi(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______,KC_GRV, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC,KC_DEL, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \
|
||||||
|
KC_CAPS, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RCTL,MO(_GF), KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
|
||||||
|
[_GF] = LAYOUT_ansi(
|
||||||
|
_______, KC_F1 ,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(_GM), KC_INS , \
|
||||||
|
_______,_______, KC_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \
|
||||||
|
KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \
|
||||||
|
_______,_______,_______,BL_DEC, BL_TOGG,BL_INC, BL_BRTG,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______, _______, _______, \
|
||||||
|
_______,_______,_______, _______, _______,_______,_______,KC_MPRV,KC_MPLY, KC_MNXT),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tapdance definitions. Tap Dance F Keys.
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_F1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_F1),
|
||||||
|
[TD_F2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_F2),
|
||||||
|
[TD_F3] = ACTION_TAP_DANCE_DOUBLE(KC_3, KC_F3),
|
||||||
|
[TD_F4] = ACTION_TAP_DANCE_DOUBLE(KC_4, KC_F4),
|
||||||
|
[TD_F5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_F5),
|
||||||
|
[TD_F6] = ACTION_TAP_DANCE_DOUBLE(KC_6, KC_F6),
|
||||||
|
[TD_F7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_F7),
|
||||||
|
[TD_F8] = ACTION_TAP_DANCE_DOUBLE(KC_8, KC_F8),
|
||||||
|
[TD_F9] = ACTION_TAP_DANCE_DOUBLE(KC_9, KC_F9),
|
||||||
|
[TD_F10] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_F10),
|
||||||
|
[TD_F11] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_F11),
|
||||||
|
[TD_F12] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_F12),
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
```
|
||||||
|
______ __ __ ______ ______
|
||||||
|
.-----.--------.| |.-----. | |_.---.-.--| |.---.-.| __| __ |
|
||||||
|
|__ --| || -- || _ | | _| _ | _ || _ || __ | __ |
|
||||||
|
|_____|__|__|__||______||___ | |____|___._|_____||___._||______|______|
|
||||||
|
|_____|
|
||||||
|
```
|
||||||
|
|
||||||
|
Just my simple layout for the Tada68.
|
||||||
|
Space [Cadet Shift](https://docs.qmk.fm/#/feature_space_cadet_shift) is enabled.
|
||||||
|
LCTRL and Caps have been swapped and the new CTRL also acts as ESC when tapped and CTRL when held.
|
||||||
|
This is helpful for me as a VIM user.
|
||||||
|
Some other changes.
|
||||||
|
|
||||||
|
Tap Dance for the F Row.. i.e double tap 1 and get F1 instead.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
TAP_DANCE_ENABLE = yes # Tappa Dance
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
#define BACKLIGHT_LEVELS 5
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Helpful defines
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT
|
||||||
|
(KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
LT(1,KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(1,KC_QUOT),
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, TG(2), LT(3,KC_APP), KC_DEL),
|
||||||
|
|
||||||
|
[1] = LAYOUT
|
||||||
|
(KC_CAPS, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, KC_UNDS, KC_P7, KC_P8, KC_P9, KC_EQL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS,
|
||||||
|
KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_NLCK,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MSTP, KC_PENT, KC_P0, KC_PDOT, KC_APP, KC_TRNS),
|
||||||
|
|
||||||
|
[2] = LAYOUT
|
||||||
|
(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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12),
|
||||||
|
|
||||||
|
[3] = LAYOUT
|
||||||
|
(KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PIPE,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS,
|
||||||
|
BL_TOGG, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET)
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Minivan
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# Custom keymap for the minivan with backlight enabled and 5 backlight levels.
|
||||||
|
# Hardware Supported: Minivan
|
||||||
|
# Hardware Availability: [thevankeyboards.com](https://thevankeyboards.com/)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
@@ -19,16 +19,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLED_NUM 16
|
#define RGBLED_NUM 16
|
||||||
|
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300
|
|
||||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,9 @@
|
|||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLIGHT_SAT_STEP
|
#undef RGBLIGHT_SAT_STEP
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
#define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||||
|
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//define layer change stuff for underglow indicator
|
//define layer change stuff for underglow indicator
|
||||||
bool skip_leds = false;
|
bool skip_leds = false;
|
||||||
|
|
||||||
|
#define LAYOUT_ergodox_pretty_base( \
|
||||||
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
|
) \
|
||||||
|
LAYOUT_ergodox_pretty_wrapper( \
|
||||||
|
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||||
|
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||||
|
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
||||||
|
KC_GRV, OSM(MOD_MEH),OSM(MOD_LGUI),KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC_IRNY, \
|
||||||
|
ALT_T(KC_APP), OSM(MOD_LGUI), OSM(MOD_RGUI), CTL_T(KC_ESCAPE), \
|
||||||
|
KC_HOME, KC_PGUP, \
|
||||||
|
LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -55,15 +73,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | End | | PgDn | | |
|
* | | | End | | PgDn | | |
|
||||||
* `---------------------' `---------------------'
|
* `---------------------' `---------------------'
|
||||||
*/
|
*/
|
||||||
[_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
|
[_QWERTY] = LAYOUT_ergodox_pretty_base_wrapper(
|
||||||
// left hand // right hand
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS,
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
KC_TAB, _________________QWERTY_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________QWERTY_R1_________________, KC_BSLS,
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||||
KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
),
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________QWERTY_R3_________________, KC_MRSF,
|
|
||||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, UC_IRNY,
|
|
||||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
|
||||||
),
|
|
||||||
/* Keymap 0: COLEMAK layer
|
/* Keymap 0: COLEMAK layer
|
||||||
*
|
*
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
@@ -87,15 +101,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
// Otherwise, it needs KC_*
|
// Otherwise, it needs KC_*
|
||||||
[_COLEMAK] = LAYOUT_ergodox_pretty_wrapper(
|
[_COLEMAK] = LAYOUT_ergodox_pretty_base_wrapper(
|
||||||
// left hand // right hand
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS,
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||||
KC_TAB, _________________COLEMAK_L1________________, TG(_DIABLO), TG(_DIABLO), _________________COLEMAK_R1________________, KC_BSLS,
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||||
KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
),
|
||||||
KC_MLSF, _________________COLEMAK_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________COLEMAK_R3________________, KC_MRSF,
|
|
||||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, UC_IRNY,
|
|
||||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
|
||||||
),
|
|
||||||
/* Keymap 0: DVORAK Layout
|
/* Keymap 0: DVORAK Layout
|
||||||
*
|
*
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
@@ -119,15 +129,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||||
// Otherwise, it needs KC_*
|
// Otherwise, it needs KC_*
|
||||||
[_DVORAK] = LAYOUT_ergodox_pretty_wrapper(
|
[_DVORAK] = LAYOUT_ergodox_pretty_base_wrapper(
|
||||||
// left hand // right hand
|
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_BSLS,
|
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||||
KC_TAB, _________________DVORAK_L1_________________, TG(_DIABLO), TG(_DIABLO), _________________DVORAK_R1_________________, KC_SLSH,
|
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||||
KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_MINS,
|
),
|
||||||
KC_MLSF, _________________DVORAK_L3_________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________DVORAK_R3_________________, KC_MRSF,
|
|
||||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, UC_IRNY,
|
|
||||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
|
||||||
),
|
|
||||||
/* Keymap 0: WORKMAN layer
|
/* Keymap 0: WORKMAN layer
|
||||||
*
|
*
|
||||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
@@ -149,17 +155,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | |ace | End | | PgDn | | |
|
* | |ace | End | | PgDn | | |
|
||||||
* `--------------------' `----------------------'
|
* `--------------------' `----------------------'
|
||||||
*/
|
*/
|
||||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
|
||||||
// Otherwise, it needs KC_*
|
[_WORKMAN] = LAYOUT_ergodox_pretty_base_wrapper(
|
||||||
[_WORKMAN] = LAYOUT_ergodox_pretty_wrapper(
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||||
// left hand
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS,
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||||
KC_TAB, _________________WORKMAN_L1________________, TG(_DIABLO), TG(_DIABLO), _________________WORKMAN_R1________________, KC_BSLS,
|
),
|
||||||
KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
|
||||||
KC_MLSF, _________________WORKMAN_L3________________, TG(_GAMEPAD), TG(_GAMEPAD), _________________WORKMAN_R3________________, KC_MRSF,
|
|
||||||
KC_GRV, ___________ERGODOX_BOTTOM_LEFT_____________, ___________ERGODOX_BOTTOM_RIGHT____________, UC_IRNY,
|
|
||||||
__________________ERGODOX_THUMB_CLUSTER_____________________
|
|
||||||
),
|
|
||||||
|
|
||||||
// Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES)
|
// Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES)
|
||||||
[_MODS] = LAYOUT_ergodox_pretty_wrapper(
|
[_MODS] = LAYOUT_ergodox_pretty_wrapper(
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 16 // Number of LEDs
|
#define RGBLED_NUM 16 // Number of LEDs
|
||||||
#define RGBLIGHT_ANIMATIONS
|
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
#define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
#define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
#define RGBLIGHT_VAL_STEP 12
|
||||||
|
|||||||
@@ -25,34 +25,44 @@ enum planck_keycodes {
|
|||||||
#define BACKLIT OSM(MOD_LSFT)
|
#define BACKLIT OSM(MOD_LSFT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_4x12_base( \
|
||||||
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
|
) \
|
||||||
|
LAYOUT_ortho_4x12_wrapper( \
|
||||||
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
|
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), KC_ENT, \
|
||||||
|
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
)
|
||||||
|
#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_ortho_4x12_wrapper(
|
[_QWERTY] = LAYOUT_ortho_4x12_base_wrapper(
|
||||||
KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC,
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||||
KC_TAB, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT,
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||||
KC_MLSF, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT,
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_COLEMAK] = LAYOUT_ortho_4x12_wrapper(
|
[_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper(
|
||||||
KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC,
|
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||||
KC_TAB, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT,
|
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||||
KC_MLSF, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_ENT,
|
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_DVORAK] = LAYOUT_ortho_4x12_wrapper(
|
[_DVORAK] = LAYOUT_ortho_4x12_base_wrapper(
|
||||||
KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC,
|
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||||
KC_TAB, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_SLSH,
|
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||||
KC_MLSF, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________, KC_ENT,
|
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_WORKMAN] = LAYOUT_ortho_4x12_wrapper(
|
[_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper(
|
||||||
KC_TAB, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC,
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||||
KC_ESC, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT,
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||||
KC_MLSF, _________________WORKMAN_L3________________, _________________WORKMAN_R3________________, KC_ENT,
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MODS] = LAYOUT_ortho_4x12_wrapper(
|
[_MODS] = LAYOUT_ortho_4x12_wrapper(
|
||||||
|
|||||||
+3
-1
@@ -17,7 +17,9 @@
|
|||||||
#ifndef _API_H_
|
#ifndef _API_H_
|
||||||
#define _API_H_
|
#define _API_H_
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
#include "lufa.h"
|
#include "lufa.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
enum MESSAGE_TYPE {
|
enum MESSAGE_TYPE {
|
||||||
MT_GET_DATA = 0x10, // Get data from keyboard
|
MT_GET_DATA = 0x10, // Get data from keyboard
|
||||||
@@ -28,7 +30,7 @@ enum MESSAGE_TYPE {
|
|||||||
MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK)
|
MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK)
|
||||||
MT_EXE_ACTION = 0x40, // executing actions on keyboard
|
MT_EXE_ACTION = 0x40, // executing actions on keyboard
|
||||||
MT_EXE_ACTION_ACK =0x41, // return confirmation/value (ACK)
|
MT_EXE_ACTION_ACK =0x41, // return confirmation/value (ACK)
|
||||||
MT_TYPE_ERROR = 0x80 // type not recofgnised (ACK)
|
MT_TYPE_ERROR = 0x80 // type not recognised (ACK)
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DATA_TYPE {
|
enum DATA_TYPE {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2018 Žan Pevec
|
/* Copyright 2018 Žan Pevec
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
// shifted characters
|
// shifted characters
|
||||||
#define SI_EXLM LSFT(KC_1) // !
|
#define SI_EXLM LSFT(KC_1) // !
|
||||||
#define SO_DQOT LSFT(KC_2) // "
|
#define SI_DQOT LSFT(KC_2) // "
|
||||||
#define SI_HASH LSFT(KC_3) // #
|
#define SI_HASH LSFT(KC_3) // #
|
||||||
#define SI_DLR LSFT(KC_4) // $
|
#define SI_DLR LSFT(KC_4) // $
|
||||||
#define SI_PERC LSFT(KC_5) // %
|
#define SI_PERC LSFT(KC_5) // %
|
||||||
@@ -89,18 +89,18 @@
|
|||||||
#define SI_UNDS LSFT(SI_MINS) // _
|
#define SI_UNDS LSFT(SI_MINS) // _
|
||||||
|
|
||||||
// Alt Gr-ed characters
|
// Alt Gr-ed characters
|
||||||
#define SI_CIRC ALGR(KC_3) // ^
|
#define SI_CIRC ALTG(KC_3) // ^
|
||||||
#define SI_DEG ALGR(KC_5) // °
|
#define SI_DEG ALTG(KC_5) // °
|
||||||
#define SI_GRV ALGR(KC_7) // `
|
#define SI_GRV ALTG(KC_7) // `
|
||||||
#define SI_ACCU ALGR(KC_9) // ´
|
#define SI_ACCU ALTG(KC_9) // ´
|
||||||
#define SI_LCBR ALGR(KC_B) // {
|
#define SI_LCBR ALTG(KC_B) // {
|
||||||
#define SI_RCBR ALGR(KC_N) // }
|
#define SI_RCBR ALTG(KC_N) // }
|
||||||
#define SI_LBRC ALGR(KC_F) // [
|
#define SI_LBRC ALTG(KC_F) // [
|
||||||
#define SI_RBRC ALGR(KC_G) // ]
|
#define SI_RBRC ALTG(KC_G) // ]
|
||||||
#define SI_BSLS ALGR(KC_Q) // backslash
|
#define SI_BSLS ALTG(KC_Q) // backslash
|
||||||
#define SI_AT ALGR(KC_V) // @
|
#define SI_AT ALTG(KC_V) // @
|
||||||
#define SI_EURO ALGR(KC_E) // €
|
#define SI_EURO ALTG(KC_E) // €
|
||||||
#define SI_TILD ALGR(KC_1) // ~
|
#define SI_TILD ALTG(KC_1) // ~
|
||||||
#define SI_PIPE ALGR(KC_W) // |
|
#define SI_PIPE ALTG(KC_W) // |
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -93,7 +93,7 @@ void register_ucis(const char *hex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool process_ucis (uint16_t keycode, keyrecord_t *record) {
|
bool process_ucis (uint16_t keycode, keyrecord_t *record) {
|
||||||
uint8_t i;
|
unicode_input_mode_init();
|
||||||
|
|
||||||
if (!qk_ucis_state.in_progress)
|
if (!qk_ucis_state.in_progress)
|
||||||
return true;
|
return true;
|
||||||
@@ -122,7 +122,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) {
|
if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) {
|
||||||
bool symbol_found = false;
|
bool symbol_found = false;
|
||||||
|
|
||||||
for (i = qk_ucis_state.count; i > 0; i--) {
|
for (uint8_t i = qk_ucis_state.count; i > 0; i--) {
|
||||||
register_code (KC_BSPC);
|
register_code (KC_BSPC);
|
||||||
unregister_code (KC_BSPC);
|
unregister_code (KC_BSPC);
|
||||||
wait_ms(UNICODE_TYPE_DELAY);
|
wait_ms(UNICODE_TYPE_DELAY);
|
||||||
@@ -134,7 +134,7 @@ bool process_ucis (uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unicode_input_start();
|
unicode_input_start();
|
||||||
for (i = 0; ucis_symbol_table[i].symbol; i++) {
|
for (uint8_t i = 0; ucis_symbol_table[i].symbol; i++) {
|
||||||
if (is_uni_seq (ucis_symbol_table[i].symbol)) {
|
if (is_uni_seq (ucis_symbol_table[i].symbol)) {
|
||||||
symbol_found = true;
|
symbol_found = true;
|
||||||
register_ucis(ucis_symbol_table[i].code + 2);
|
register_ucis(ucis_symbol_table[i].code + 2);
|
||||||
|
|||||||
@@ -17,15 +17,10 @@
|
|||||||
#include "action_util.h"
|
#include "action_util.h"
|
||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
|
|
||||||
static uint8_t first_flag = 0;
|
|
||||||
|
|
||||||
bool process_unicode(uint16_t keycode, keyrecord_t *record) {
|
bool process_unicode(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (keycode > QK_UNICODE && record->event.pressed) {
|
if (keycode > QK_UNICODE && record->event.pressed) {
|
||||||
if (first_flag == 0) {
|
|
||||||
set_unicode_input_mode(eeprom_read_byte(EECONFIG_UNICODEMODE));
|
|
||||||
first_flag = 1;
|
|
||||||
}
|
|
||||||
uint16_t unicode = keycode & 0x7FFF;
|
uint16_t unicode = keycode & 0x7FFF;
|
||||||
|
unicode_input_mode_init();
|
||||||
unicode_input_start();
|
unicode_input_start();
|
||||||
register_hex(unicode);
|
register_hex(unicode);
|
||||||
unicode_input_finish();
|
unicode_input_finish();
|
||||||
|
|||||||
@@ -22,8 +22,7 @@
|
|||||||
static uint8_t input_mode;
|
static uint8_t input_mode;
|
||||||
uint8_t mods;
|
uint8_t mods;
|
||||||
|
|
||||||
void set_unicode_input_mode(uint8_t os_target)
|
void set_unicode_input_mode(uint8_t os_target) {
|
||||||
{
|
|
||||||
input_mode = os_target;
|
input_mode = os_target;
|
||||||
eeprom_update_byte(EECONFIG_UNICODEMODE, os_target);
|
eeprom_update_byte(EECONFIG_UNICODEMODE, os_target);
|
||||||
}
|
}
|
||||||
@@ -32,6 +31,14 @@ uint8_t get_unicode_input_mode(void) {
|
|||||||
return input_mode;
|
return input_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unicode_input_mode_init(void) {
|
||||||
|
static bool first_flag = false;
|
||||||
|
if (!first_flag) {
|
||||||
|
input_mode = eeprom_read_byte(EECONFIG_UNICODEMODE);
|
||||||
|
first_flag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
void unicode_input_start (void) {
|
void unicode_input_start (void) {
|
||||||
// save current mods
|
// save current mods
|
||||||
@@ -104,8 +111,7 @@ void unicode_input_finish (void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
uint16_t hex_to_keycode(uint8_t hex)
|
uint16_t hex_to_keycode(uint8_t hex) {
|
||||||
{
|
|
||||||
if (hex == 0x0) {
|
if (hex == 0x0) {
|
||||||
return KC_0;
|
return KC_0;
|
||||||
} else if (hex < 0xA) {
|
} else if (hex < 0xA) {
|
||||||
@@ -123,8 +129,7 @@ void register_hex(uint16_t hex) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void send_unicode_hex_string(const char *str)
|
void send_unicode_hex_string(const char *str) {
|
||||||
{
|
|
||||||
if (!str) { return; } // Safety net
|
if (!str) { return; } // Safety net
|
||||||
|
|
||||||
while (*str) {
|
while (*str) {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ static uint8_t input_mode;
|
|||||||
|
|
||||||
void set_unicode_input_mode(uint8_t os_target);
|
void set_unicode_input_mode(uint8_t os_target);
|
||||||
uint8_t get_unicode_input_mode(void);
|
uint8_t get_unicode_input_mode(void);
|
||||||
|
void unicode_input_mode_init(void);
|
||||||
void unicode_input_start(void);
|
void unicode_input_start(void);
|
||||||
void unicode_input_finish(void);
|
void unicode_input_finish(void);
|
||||||
void register_hex(uint16_t hex);
|
void register_hex(uint16_t hex);
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ __attribute__((weak))
|
|||||||
void unicode_map_input_error() {}
|
void unicode_map_input_error() {}
|
||||||
|
|
||||||
bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
|
bool process_unicode_map(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
unicode_input_mode_init();
|
||||||
uint8_t input_mode = get_unicode_input_mode();
|
uint8_t input_mode = get_unicode_input_mode();
|
||||||
if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
|
if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) {
|
||||||
const uint32_t* map = unicode_map;
|
const uint32_t* map = unicode_map;
|
||||||
|
|||||||
+7
-7
@@ -860,13 +860,13 @@ void rgblight_effect_alternating(void){
|
|||||||
last_timer = timer_read();
|
last_timer = timer_read();
|
||||||
|
|
||||||
for(int i = 0; i<RGBLED_NUM; i++){
|
for(int i = 0; i<RGBLED_NUM; i++){
|
||||||
if(i<RGBLED_NUM/2 && pos){
|
if(i<RGBLED_NUM/2 && pos){
|
||||||
rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, i);
|
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
||||||
}else if (i>=RGBLED_NUM/2 && !pos){
|
}else if (i>=RGBLED_NUM/2 && !pos){
|
||||||
rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, i);
|
sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]);
|
||||||
}else{
|
}else{
|
||||||
rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, 0, i);
|
sethsv(rgblight_config.hue, rgblight_config.sat, 0, (LED_TYPE *)&led[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rgblight_set();
|
rgblight_set();
|
||||||
pos = (pos + 1) % 2;
|
pos = (pos + 1) % 2;
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ ifeq ($(PLATFORM),CHIBIOS)
|
|||||||
ifeq ($(MCU_SERIES), STM32F3xx)
|
ifeq ($(MCU_SERIES), STM32F3xx)
|
||||||
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
|
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
|
||||||
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||||
|
TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F303xC
|
||||||
|
TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE
|
||||||
|
else ifeq ($(MCU_SERIES), STM32F1xx)
|
||||||
|
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
|
||||||
|
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||||
|
TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB
|
||||||
|
TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE
|
||||||
else
|
else
|
||||||
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and
|
* This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and
|
||||||
* https://github.com/leaflabs/libmaple
|
* https://github.com/leaflabs/libmaple
|
||||||
*
|
*
|
||||||
* Modifications for QMK and STM32F303 by Yiancar
|
* Modifications for QMK and STM32F303 by Yiancar
|
||||||
@@ -274,7 +274,7 @@ uint16_t EE_VerifyPageFullWriteVariable(uint16_t Address, uint16_t Data)
|
|||||||
|
|
||||||
// Check each active page address starting from begining
|
// Check each active page address starting from begining
|
||||||
for (idx = pageBase + 4; idx < pageEnd; idx += 4)
|
for (idx = pageBase + 4; idx < pageEnd; idx += 4)
|
||||||
if ((*(__IO uint32_t*)idx) == 0xFFFFFFFF) // Verify if element
|
if ((*(__IO uint32_t*)idx) == 0xFFFFFFFF) // Verify if element
|
||||||
{ // contents are 0xFFFFFFFF
|
{ // contents are 0xFFFFFFFF
|
||||||
FlashStatus = FLASH_ProgramHalfWord(idx, Data); // Set variable data
|
FlashStatus = FLASH_ProgramHalfWord(idx, Data); // Set variable data
|
||||||
if (FlashStatus != FLASH_COMPLETE)
|
if (FlashStatus != FLASH_COMPLETE)
|
||||||
@@ -517,7 +517,7 @@ uint16_t EEPROM_read(uint16_t Address, uint16_t *Data)
|
|||||||
|
|
||||||
// Get the valid Page end Address
|
// Get the valid Page end Address
|
||||||
pageEnd = pageBase + ((uint32_t)(PageSize - 2));
|
pageEnd = pageBase + ((uint32_t)(PageSize - 2));
|
||||||
|
|
||||||
// Check each active page address starting from end
|
// Check each active page address starting from end
|
||||||
for (pageBase += 6; pageEnd >= pageBase; pageEnd -= 4)
|
for (pageBase += 6; pageEnd >= pageBase; pageEnd -= 4)
|
||||||
if ((*(__IO uint16_t*)pageEnd) == Address) // Compare the read address with the virtual address
|
if ((*(__IO uint16_t*)pageEnd) == Address) // Compare the read address with the virtual address
|
||||||
@@ -574,7 +574,7 @@ uint16_t EEPROM_update(uint16_t Address, uint16_t Data)
|
|||||||
{
|
{
|
||||||
uint16_t temp;
|
uint16_t temp;
|
||||||
EEPROM_read(Address, &temp);
|
EEPROM_read(Address, &temp);
|
||||||
if (Address == Data)
|
if (temp == Data)
|
||||||
return EEPROM_SAME_VALUE;
|
return EEPROM_SAME_VALUE;
|
||||||
else
|
else
|
||||||
return EEPROM_write(Address, Data);
|
return EEPROM_write(Address, Data);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and
|
* This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and
|
||||||
* https://github.com/leaflabs/libmaple
|
* https://github.com/leaflabs/libmaple
|
||||||
*
|
*
|
||||||
* Modifications for QMK and STM32F303 by Yiancar
|
* Modifications for QMK and STM32F303 by Yiancar
|
||||||
@@ -27,8 +27,14 @@
|
|||||||
#include "flash_stm32.h"
|
#include "flash_stm32.h"
|
||||||
|
|
||||||
// HACK ALERT. This definition may not match your processor
|
// HACK ALERT. This definition may not match your processor
|
||||||
// To Do. Work out correct value for EEPROM_PAGE_SIZE on the STM32F103CT6 etc
|
// To Do. Work out correct value for EEPROM_PAGE_SIZE on the STM32F103CT6 etc
|
||||||
#define MCU_STM32F303CC
|
#if defined(EEPROM_EMU_STM32F303xC)
|
||||||
|
#define MCU_STM32F303CC
|
||||||
|
#elif defined(EEPROM_EMU_STM32F103xB)
|
||||||
|
#define MCU_STM32F103RB
|
||||||
|
#else
|
||||||
|
#error "not implemented."
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef EEPROM_PAGE_SIZE
|
#ifndef EEPROM_PAGE_SIZE
|
||||||
#if defined (MCU_STM32F103RB)
|
#if defined (MCU_STM32F103RB)
|
||||||
|
|||||||
@@ -10,19 +10,27 @@
|
|||||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and
|
* This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and
|
||||||
* https://github.com/leaflabs/libmaple
|
* https://github.com/leaflabs/libmaple
|
||||||
*
|
*
|
||||||
* Modifications for QMK and STM32F303 by Yiancar
|
* Modifications for QMK and STM32F303 by Yiancar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STM32F303xC
|
#if defined(EEPROM_EMU_STM32F303xC)
|
||||||
|
#define STM32F303xC
|
||||||
|
#include "stm32f3xx.h"
|
||||||
|
#elif defined(EEPROM_EMU_STM32F103xB)
|
||||||
|
#define STM32F103xB
|
||||||
|
#include "stm32f1xx.h"
|
||||||
|
#else
|
||||||
|
#error "not implemented."
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "stm32f3xx.h"
|
|
||||||
#include "flash_stm32.h"
|
#include "flash_stm32.h"
|
||||||
|
|
||||||
#define FLASH_KEY1 ((uint32_t)0x45670123)
|
#if defined(EEPROM_EMU_STM32F103xB)
|
||||||
#define FLASH_KEY2 ((uint32_t)0xCDEF89AB)
|
#define FLASH_SR_WRPERR FLASH_SR_WRPRTERR
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Delay definition */
|
/* Delay definition */
|
||||||
#define EraseTimeout ((uint32_t)0x00000FFF)
|
#define EraseTimeout ((uint32_t)0x00000FFF)
|
||||||
@@ -71,7 +79,7 @@ FLASH_Status FLASH_GetStatus(void)
|
|||||||
* FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
|
* FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
|
||||||
*/
|
*/
|
||||||
FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout)
|
FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout)
|
||||||
{
|
{
|
||||||
FLASH_Status status;
|
FLASH_Status status;
|
||||||
|
|
||||||
/* Check for the Flash Status */
|
/* Check for the Flash Status */
|
||||||
@@ -102,7 +110,7 @@ FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
|
|||||||
ASSERT(IS_FLASH_ADDRESS(Page_Address));
|
ASSERT(IS_FLASH_ADDRESS(Page_Address));
|
||||||
/* Wait for last operation to be completed */
|
/* Wait for last operation to be completed */
|
||||||
status = FLASH_WaitForLastOperation(EraseTimeout);
|
status = FLASH_WaitForLastOperation(EraseTimeout);
|
||||||
|
|
||||||
if(status == FLASH_COMPLETE)
|
if(status == FLASH_COMPLETE)
|
||||||
{
|
{
|
||||||
/* if the previous operation is completed, proceed to erase the page */
|
/* if the previous operation is completed, proceed to erase the page */
|
||||||
@@ -128,7 +136,7 @@ FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
|
|||||||
* @param Address: specifies the address to be programmed.
|
* @param Address: specifies the address to be programmed.
|
||||||
* @param Data: specifies the data to be programmed.
|
* @param Data: specifies the data to be programmed.
|
||||||
* @retval FLASH Status: The returned value can be: FLASH_ERROR_PG,
|
* @retval FLASH Status: The returned value can be: FLASH_ERROR_PG,
|
||||||
* FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
|
* FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT.
|
||||||
*/
|
*/
|
||||||
FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data)
|
FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
|
|
||||||
#ifdef STM32F303xC
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "eeprom_stm32.h"
|
#include "eeprom_stm32.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -32,7 +32,7 @@ void eeconfig_init_kb(void) {
|
|||||||
* FIXME: needs doc
|
* FIXME: needs doc
|
||||||
*/
|
*/
|
||||||
void eeconfig_init_quantum(void) {
|
void eeconfig_init_quantum(void) {
|
||||||
#ifdef STM32F303xC
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
EEPROM_format();
|
EEPROM_format();
|
||||||
#endif
|
#endif
|
||||||
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER);
|
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER);
|
||||||
@@ -73,7 +73,7 @@ void eeconfig_enable(void)
|
|||||||
*/
|
*/
|
||||||
void eeconfig_disable(void)
|
void eeconfig_disable(void)
|
||||||
{
|
{
|
||||||
#ifdef STM32F303xC
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
EEPROM_format();
|
EEPROM_format();
|
||||||
#endif
|
#endif
|
||||||
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF);
|
eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
||||||
|
|
||||||
/* eeprom parameteter address */
|
/* eeprom parameteter address */
|
||||||
#if !defined(STM32F303xC)
|
#if !defined(STM32_EEPROM_ENABLE)
|
||||||
#define EECONFIG_MAGIC (uint16_t *)0
|
#define EECONFIG_MAGIC (uint16_t *)0
|
||||||
#define EECONFIG_DEBUG (uint8_t *)2
|
#define EECONFIG_DEBUG (uint8_t *)2
|
||||||
#define EECONFIG_DEFAULT_LAYER (uint8_t *)3
|
#define EECONFIG_DEFAULT_LAYER (uint8_t *)3
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#ifdef MIDI_ENABLE
|
#ifdef MIDI_ENABLE
|
||||||
#include "qmk_midi.h"
|
#include "qmk_midi.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef STM32F303xC
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
#include "eeprom_stm32.h"
|
#include "eeprom_stm32.h"
|
||||||
#endif
|
#endif
|
||||||
#include "suspend.h"
|
#include "suspend.h"
|
||||||
@@ -112,7 +112,7 @@ int main(void) {
|
|||||||
halInit();
|
halInit();
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
#ifdef STM32F303xC
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
EEPROM_init();
|
EEPROM_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,12 @@
|
|||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#define RGBLIGHT_SLEEP
|
#define RGBLIGHT_SLEEP
|
||||||
|
#undef RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
#define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef ONESHOT_TAP_TOGGLE
|
#ifndef ONESHOT_TAP_TOGGLE
|
||||||
#define ONESHOT_TAP_TOGGLE 2
|
#define ONESHOT_TAP_TOGGLE 2
|
||||||
#endif // !ONESHOT_TAP_TOGGLE
|
#endif // !ONESHOT_TAP_TOGGLE
|
||||||
|
|||||||
+23
-12
@@ -36,11 +36,11 @@ bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
|
|||||||
keycode = KC_ENTER;
|
keycode = KC_ENTER;
|
||||||
}
|
}
|
||||||
clear_keyboard();
|
clear_keyboard();
|
||||||
tap(keycode);
|
tap_code(keycode);
|
||||||
wait_ms(50);
|
wait_ms(50);
|
||||||
send_string_with_delay(str, MACRO_TIMER);
|
send_string_with_delay(str, MACRO_TIMER);
|
||||||
wait_ms(50);
|
wait_ms(50);
|
||||||
tap(KC_ENTER);
|
tap_code(KC_ENTER);
|
||||||
}
|
}
|
||||||
if (override) wait_ms(3000);
|
if (override) wait_ms(3000);
|
||||||
return false;
|
return false;
|
||||||
@@ -127,13 +127,13 @@ uint32_t default_layer_state_set_keymap (uint32_t state) {
|
|||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
void led_set_keymap(uint8_t usb_led) {}
|
void led_set_keymap(uint8_t usb_led) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void eeconfig_init_keymap(void) {}
|
||||||
|
|
||||||
// Call user matrix init, set default RGB colors and then
|
// Call user matrix init, set default RGB colors and then
|
||||||
// call the keymap's init function
|
// call the keymap's init function
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
userspace_config.raw = eeprom_read_dword(EECONFIG_USERSPACE);
|
userspace_config.raw = eeconfig_read_user();
|
||||||
|
|
||||||
|
|
||||||
#ifdef BOOTLOADER_CATERINA
|
#ifdef BOOTLOADER_CATERINA
|
||||||
DDRD &= ~(1<<5);
|
DDRD &= ~(1<<5);
|
||||||
@@ -250,7 +250,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
uint8_t temp_mod = get_mods();
|
||||||
|
clear_mods();
|
||||||
|
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10);
|
||||||
|
if (temp_mod & MODS_SHIFT_MASK) {
|
||||||
|
send_string_with_delay_P(PSTR(
|
||||||
#if defined(__ARM__)
|
#if defined(__ARM__)
|
||||||
":dfu-util"
|
":dfu-util"
|
||||||
#elif defined(BOOTLOADER_DFU)
|
#elif defined(BOOTLOADER_DFU)
|
||||||
@@ -260,7 +264,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
#elif defined(BOOTLOADER_CATERINA)
|
#elif defined(BOOTLOADER_CATERINA)
|
||||||
":avrdude"
|
":avrdude"
|
||||||
#endif // bootloader options
|
#endif // bootloader options
|
||||||
SS_TAP(X_ENTER)), 10);
|
), 10);
|
||||||
|
}
|
||||||
|
if (temp_mod & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); }
|
||||||
|
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
|
||||||
|
set_mods(temp_mod);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
@@ -268,8 +276,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
case EPRM: // Resets EEPROM
|
case EPRM: // Resets EEPROM
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
default_layer_set(1UL<<eeconfig_read_default_layer());
|
|
||||||
layer_state_set(layer_state);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
@@ -295,7 +301,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
// to save on firmware space, since it's limited.
|
// to save on firmware space, since it's limited.
|
||||||
#ifdef MACROS_ENABLED
|
#ifdef MACROS_ENABLED
|
||||||
case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
|
case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
|
||||||
if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeprom_update_dword(EECONFIG_USERSPACE, userspace_config.raw); }
|
if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); }
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
|
userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
|
||||||
#endif //RGBLIGHT_ENABLE
|
#endif //RGBLIGHT_ENABLE
|
||||||
@@ -344,11 +350,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
} else {
|
} else {
|
||||||
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
|
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
|
||||||
register_code(KC_LCTL);
|
register_code(KC_LCTL);
|
||||||
tap(KC_C);
|
tap_code(KC_C);
|
||||||
unregister_code(KC_LCTL);
|
unregister_code(KC_LCTL);
|
||||||
} else { // Tap, paste
|
} else { // Tap, paste
|
||||||
register_code(KC_LCTL);
|
register_code(KC_LCTL);
|
||||||
tap(KC_V);
|
tap_code(KC_V);
|
||||||
unregister_code(KC_LCTL);
|
unregister_code(KC_LCTL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -413,3 +419,8 @@ uint32_t default_layer_state_set_user(uint32_t state) {
|
|||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
led_set_keymap(usb_led);
|
led_set_keymap(usb_led);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void eeconfig_init_user(void) {
|
||||||
|
userspace_config.raw = 0;
|
||||||
|
eeconfig_update_user(userspace_config.raw);
|
||||||
|
}
|
||||||
+51
-67
@@ -19,14 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
#include "send_unicode.h"
|
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#include "rgb_matrix.h"
|
#include "rgb_matrix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Define layer names
|
/* Define layer names */
|
||||||
enum userspace_layers {
|
enum userspace_layers {
|
||||||
_QWERTY = 0,
|
_QWERTY = 0,
|
||||||
_NUMLOCK = 0,
|
_NUMLOCK = 0,
|
||||||
@@ -43,28 +42,27 @@ enum userspace_layers {
|
|||||||
_ADJUST,
|
_ADJUST,
|
||||||
};
|
};
|
||||||
|
|
||||||
//define modifiers
|
/*
|
||||||
|
define modifiers here, since MOD_* doesn't seem to work for these
|
||||||
|
*/
|
||||||
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
|
#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
|
||||||
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||||
#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
|
#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
|
||||||
|
|
||||||
|
|
||||||
// RGB color codes are no longer located here anymore. Instead, you will want to
|
/*
|
||||||
// head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h
|
RGB color codes are no longer located here anymore. Instead, you will want to
|
||||||
|
head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h
|
||||||
extern bool rgb_layer_change;
|
*/
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
void rgblight_sethsv_default_helper(uint8_t index);
|
void rgblight_sethsv_default_helper(uint8_t index);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
inline void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
|
|
||||||
bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
|
bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
|
||||||
bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
|
bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
|
||||||
|
|
||||||
#define EECONFIG_USERSPACE (uint32_t *)19
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
uint32_t raw;
|
uint32_t raw;
|
||||||
struct {
|
struct {
|
||||||
@@ -149,7 +147,7 @@ enum userspace_custom_keycodes {
|
|||||||
#define DL_RAIS LT(_RAISE, KC_DEL)
|
#define DL_RAIS LT(_RAISE, KC_DEL)
|
||||||
#define ET_RAIS LT(_RAISE, KC_ENTER)
|
#define ET_RAIS LT(_RAISE, KC_ENTER)
|
||||||
|
|
||||||
// OSM keycodes, to keep things clean and easy to change
|
/* OSM keycodes, to keep things clean and easy to change */
|
||||||
#define KC_MLSF OSM(MOD_LSFT)
|
#define KC_MLSF OSM(MOD_LSFT)
|
||||||
#define KC_MRSF OSM(MOD_RSFT)
|
#define KC_MRSF OSM(MOD_RSFT)
|
||||||
|
|
||||||
@@ -178,9 +176,11 @@ enum {
|
|||||||
#endif // TAP_DANCE_ENABLE
|
#endif // TAP_DANCE_ENABLE
|
||||||
|
|
||||||
|
|
||||||
// Custom Keycodes for Diablo 3 layer
|
/*
|
||||||
// But since TD() doesn't work when tap dance is disabled
|
Custom Keycodes for Diablo 3 layer
|
||||||
// We use custom codes here, so we can substitute the right stuff
|
But since TD() doesn't work when tap dance is disabled
|
||||||
|
We use custom codes here, so we can substitute the right stuff
|
||||||
|
*/
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
#define KC_D3_1 TD(TD_D3_1)
|
#define KC_D3_1 TD(TD_D3_1)
|
||||||
#define KC_D3_2 TD(TD_D3_2)
|
#define KC_D3_2 TD(TD_D3_2)
|
||||||
@@ -193,11 +193,11 @@ enum {
|
|||||||
#define KC_D3_4 KC_4
|
#define KC_D3_4 KC_4
|
||||||
#endif // TAP_DANCE_ENABLE
|
#endif // TAP_DANCE_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
Since our quirky block definitions are basically a list of comma separated
|
||||||
// Since our quirky block definitions are basically a list of comma separated
|
arguments, we need a wrapper in order for these definitions to be
|
||||||
// arguments, we need a wrapper in order for these definitions to be
|
expanded before being used as arguments to the LAYOUT_xxx macro.
|
||||||
// expanded before being used as arguments to the LAYOUT_xxx macro.
|
*/
|
||||||
#if (!defined(LAYOUT) && defined(KEYMAP))
|
#if (!defined(LAYOUT) && defined(KEYMAP))
|
||||||
#define LAYOUT KEYMAP
|
#define LAYOUT KEYMAP
|
||||||
#endif
|
#endif
|
||||||
@@ -208,112 +208,114 @@ enum {
|
|||||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||||
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||||
|
|
||||||
// Blocks for each of the four major keyboard layouts
|
/*
|
||||||
// Organized so we can quickly adapt and modify all of them
|
Blocks for each of the four major keyboard layouts
|
||||||
// at once, rather than for each keyboard, one at a time.
|
Organized so we can quickly adapt and modify all of them
|
||||||
// And this allows for much cleaner blocks in the keymaps.
|
at once, rather than for each keyboard, one at a time.
|
||||||
// For instance Tap/Hold for Control on all of the layouts
|
And this allows for much cleaner blocks in the keymaps.
|
||||||
|
For instance Tap/Hold for Control on all of the layouts
|
||||||
|
|
||||||
// NOTE: These are all the same length. If you do a search/replace
|
NOTE: These are all the same length. If you do a search/replace
|
||||||
// then you need to add/remove underscores to keep the
|
then you need to add/remove underscores to keep the
|
||||||
// lengths consistent.
|
lengths consistent.
|
||||||
|
*/
|
||||||
|
|
||||||
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
|
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||||
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
|
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
|
||||||
#define _________________QWERTY_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
|
#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||||
|
|
||||||
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
|
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
|
||||||
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
|
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
|
||||||
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
|
||||||
|
|
||||||
|
|
||||||
#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G
|
#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G
|
||||||
#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D
|
#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D
|
||||||
#define _________________COLEMAK_L3________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
|
#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||||
|
|
||||||
#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
||||||
#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O
|
#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O
|
||||||
#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH
|
||||||
|
|
||||||
#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B
|
#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B
|
||||||
#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G
|
#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G
|
||||||
#define ______________COLEMAK_MOD_DH_L3____________ CTL_T(KC_Z), KC_X, KC_C, KC_D, KC_V
|
#define ______________COLEMAK_MOD_DH_L3____________ KC_Z, KC_X, KC_C, KC_D, KC_V
|
||||||
|
|
||||||
#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
||||||
#define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O
|
#define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O
|
||||||
#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH
|
||||||
|
|
||||||
|
|
||||||
#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
|
#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
|
||||||
#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
|
#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
|
||||||
#define _________________DVORAK_L3_________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
|
#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
|
||||||
|
|
||||||
#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
|
#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
|
||||||
#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
|
#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
|
||||||
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
|
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z
|
||||||
|
|
||||||
|
|
||||||
#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B
|
#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B
|
||||||
#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G
|
#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G
|
||||||
#define _________________WORKMAN_L3________________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V
|
#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V
|
||||||
|
|
||||||
#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN
|
#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN
|
||||||
#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I
|
#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I
|
||||||
#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
|
||||||
|
|
||||||
|
|
||||||
#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K
|
#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K
|
||||||
#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G
|
#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G
|
||||||
#define _________________NORMAN_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
|
#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||||
|
|
||||||
#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN
|
#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN
|
||||||
#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U
|
#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U
|
||||||
#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH
|
||||||
|
|
||||||
|
|
||||||
#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B
|
#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B
|
||||||
#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F
|
#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F
|
||||||
#define _________________MALTRON_L3________________ CTL_T(KC_SCLN), KC_SLSH, KC_J KC_G, KC_COMM
|
#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J KC_G, KC_COMM
|
||||||
|
|
||||||
#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L
|
#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L
|
||||||
#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R
|
#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R
|
||||||
#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, CTL_T(KC_x)
|
#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X
|
||||||
|
|
||||||
|
|
||||||
#define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q
|
#define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q
|
||||||
#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U
|
#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U
|
||||||
#define _________________EUCALYN_L3________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_W
|
#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_W
|
||||||
|
|
||||||
#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P
|
#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P
|
||||||
#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N
|
#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N
|
||||||
#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, CTL_T(KC_SCLN)
|
#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SCLN
|
||||||
|
|
||||||
|
|
||||||
#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W
|
#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W
|
||||||
#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
|
#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
|
||||||
#define _____________CARPLAX_QFMLWY_L3_____________ CTL_T(KC_Z), KC_V, KC_G, KC_C, KC_X
|
#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X
|
||||||
|
|
||||||
#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J
|
#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J
|
||||||
#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN
|
#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN
|
||||||
#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, CTL_T(KC_SLSH)
|
#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH
|
||||||
|
|
||||||
|
|
||||||
#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
|
#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
|
||||||
#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
|
#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
|
||||||
#define _____________CARPLAX_QGMLWB_L3_____________ CTL_T(KC_Z), KC_X, KC_C, KC_F, KC_J
|
#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J
|
||||||
|
|
||||||
#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN
|
#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN
|
||||||
#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H
|
#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H
|
||||||
#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, CTL_T(KC_SLSH)
|
#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
|
||||||
|
|
||||||
|
|
||||||
#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
|
#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
|
||||||
#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
|
#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
|
||||||
#define _____________CARPLAX_QGMLWY_L3_____________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_J
|
#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J
|
||||||
|
|
||||||
#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
|
#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
|
||||||
#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H
|
#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H
|
||||||
#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, CTL_T(KC_SLSH)
|
#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
|
||||||
|
|
||||||
|
|
||||||
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
|
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
|
||||||
@@ -352,21 +354,3 @@ enum {
|
|||||||
#define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
|
#define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
|
||||||
#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
|
#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
|
||||||
|
|
||||||
|
|
||||||
// Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
|
|
||||||
// this allows us to quickly modify the bottom row for all of the layouts
|
|
||||||
// so we don't have to alter it 4 times and hope that we haven't missed
|
|
||||||
// anything
|
|
||||||
#define ___________ERGODOX_BOTTOM_LEFT_____________ OSM(MOD_MEH), OSM(MOD_LGUI), KC_LBRC, KC_RBRC
|
|
||||||
#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
|
||||||
|
|
||||||
|
|
||||||
#define ___________ORTHODOX_THUMP_TOP_____________ ALT_APP, OS_LGUI, KC_LALT, OS_RGUI
|
|
||||||
#define ___________________ORTHODOX_THUMB_BOTTOM____________________ LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE
|
|
||||||
|
|
||||||
|
|
||||||
#define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), OSM(MOD_LGUI), OSM(MOD_RGUI), CTL_T(KC_ESCAPE), \
|
|
||||||
KC_HOME, KC_PGUP, \
|
|
||||||
LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER)
|
|
||||||
|
|
||||||
|
|
||||||
+10
-10
@@ -230,7 +230,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
userspace_config.rgb_layer_change ^= 1;
|
userspace_config.rgb_layer_change ^= 1;
|
||||||
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||||
eeprom_update_dword(EECONFIG_USERSPACE, userspace_config.raw);
|
eeconfig_update_user(userspace_config.raw);
|
||||||
if (userspace_config.rgb_layer_change) {
|
if (userspace_config.rgb_layer_change) {
|
||||||
layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
|
layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (userspace_config.rgb_layer_change) {
|
if (userspace_config.rgb_layer_change) {
|
||||||
userspace_config.rgb_layer_change = false;
|
userspace_config.rgb_layer_change = false;
|
||||||
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||||
eeprom_update_dword(EECONFIG_USERSPACE, userspace_config.raw);
|
eeconfig_update_user(userspace_config.raw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true; break;
|
return true; break;
|
||||||
@@ -295,31 +295,31 @@ uint32_t layer_state_set_rgb(uint32_t state) {
|
|||||||
switch (biton32(state)) {
|
switch (biton32(state)) {
|
||||||
case _MACROS:
|
case _MACROS:
|
||||||
rgblight_sethsv_noeeprom_orange();
|
rgblight_sethsv_noeeprom_orange();
|
||||||
userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
|
userspace_config.is_overwatch ? rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 2) : rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 3);
|
||||||
break;
|
break;
|
||||||
case _MEDIA:
|
case _MEDIA:
|
||||||
rgblight_sethsv_noeeprom_chartreuse();
|
rgblight_sethsv_noeeprom_chartreuse();
|
||||||
rgblight_mode_noeeprom(22);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1);
|
||||||
break;
|
break;
|
||||||
case _GAMEPAD:
|
case _GAMEPAD:
|
||||||
rgblight_sethsv_noeeprom_orange();
|
rgblight_sethsv_noeeprom_orange();
|
||||||
rgblight_mode_noeeprom(17);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2);
|
||||||
break;
|
break;
|
||||||
case _DIABLO:
|
case _DIABLO:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom_red();
|
||||||
rgblight_mode_noeeprom(5);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||||
break;
|
break;
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
rgblight_sethsv_noeeprom_yellow();
|
rgblight_sethsv_noeeprom_yellow();
|
||||||
rgblight_mode_noeeprom(5);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom_green();
|
||||||
rgblight_mode_noeeprom(5);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom_red();
|
||||||
rgblight_mode_noeeprom(23);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
switch (biton32(default_layer_state)) {
|
switch (biton32(default_layer_state)) {
|
||||||
@@ -332,7 +332,7 @@ uint32_t layer_state_set_rgb(uint32_t state) {
|
|||||||
default:
|
default:
|
||||||
rgblight_sethsv_noeeprom_cyan(); break;
|
rgblight_sethsv_noeeprom_cyan(); break;
|
||||||
}
|
}
|
||||||
biton32(state) == _MODS ? rgblight_mode_noeeprom(2) : rgblight_mode_noeeprom(1); // if _MODS layer is on, then breath to denote it
|
biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
|
// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
|
||||||
|
|||||||
@@ -37,6 +37,3 @@ ifdef CONSOLE_ENABLE
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
|
||||||
SRC += send_unicode.c
|
|
||||||
endif
|
|
||||||
@@ -38,16 +38,16 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
|
|
||||||
// Sends the key press to system, but only if on the Diablo layer
|
// Sends the key press to system, but only if on the Diablo layer
|
||||||
void send_diablo_keystroke(uint8_t diablo_key) {
|
void send_diablo_keystroke(uint8_t diablo_key) {
|
||||||
if (biton32(layer_state) == _DIABLO) {
|
if (IS_LAYER_ON(_DIABLO)) {
|
||||||
switch (diablo_key) {
|
switch (diablo_key) {
|
||||||
case 0:
|
case 0:
|
||||||
tap(KC_1); break;
|
tap_code(KC_1); break;
|
||||||
case 1:
|
case 1:
|
||||||
tap(KC_2); break;
|
tap_code(KC_2); break;
|
||||||
case 2:
|
case 2:
|
||||||
tap(KC_3); break;
|
tap_code(KC_3); break;
|
||||||
case 3:
|
case 3:
|
||||||
tap(KC_4); break;
|
tap_code(KC_4); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Yann Hodique <[email protected]> @sigma
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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 LEADER_TIMEOUT 1000
|
||||||
|
|
||||||
|
#define MACRO_TIMER 5
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
LEADER_ENABLE = yes
|
||||||
|
|
||||||
|
SRC += sigma.c
|
||||||
@@ -0,0 +1,276 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Yann Hodique <[email protected]> @sigma
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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 "sigma.h"
|
||||||
|
|
||||||
|
userspace_config_t runtime_userspace_config;
|
||||||
|
userspace_config_t stored_userspace_config;
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void startup_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void shutdown_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void suspend_power_down_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void suspend_wakeup_init_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_keymap(void) {}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
uint32_t default_layer_state_set_keymap (uint32_t state) {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void led_set_keymap(uint8_t usb_led) {}
|
||||||
|
|
||||||
|
void set_os(uint8_t os) {
|
||||||
|
runtime_userspace_config.os_target = os;
|
||||||
|
|
||||||
|
switch (os) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
set_unicode_input_mode(UC_OSX);
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
break;
|
||||||
|
case _OS_WINDOWS:
|
||||||
|
set_unicode_input_mode(UC_WIN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
stored_userspace_config.raw = eeconfig_read_user();
|
||||||
|
runtime_userspace_config.raw = stored_userspace_config.raw;
|
||||||
|
|
||||||
|
set_os(runtime_userspace_config.os_target);
|
||||||
|
}
|
||||||
|
|
||||||
|
void store_userspace_config(void) {
|
||||||
|
eeconfig_update_user(stored_userspace_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
LEADER_DICTIONARY() {
|
||||||
|
leading = false;
|
||||||
|
leader_end();
|
||||||
|
|
||||||
|
SEQ_TWO_KEYS(KC_F1, KC_L) {
|
||||||
|
set_os(_OS_LINUX);
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_F1, KC_M) {
|
||||||
|
set_os(_OS_MACOS);
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_F1, KC_W) {
|
||||||
|
set_os(_OS_WINDOWS);
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_F1, KC_S) {
|
||||||
|
stored_userspace_config.raw = runtime_userspace_config.raw;
|
||||||
|
store_userspace_config();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
uint8_t os_target = runtime_userspace_config.os_target;
|
||||||
|
bool pressed = record->event.pressed;
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_QWERTY:
|
||||||
|
if (pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||||
|
if (!pressed) {
|
||||||
|
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
||||||
|
#if defined(__ARM__)
|
||||||
|
":dfu-util"
|
||||||
|
#elif defined(BOOTLOADER_DFU)
|
||||||
|
":dfu"
|
||||||
|
#elif defined(BOOTLOADER_HALFKAY)
|
||||||
|
":teensy"
|
||||||
|
#elif defined(BOOTLOADER_CATERINA)
|
||||||
|
":avrdude"
|
||||||
|
#endif // bootloader options
|
||||||
|
SS_TAP(X_ENTER)), 10);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EPRM: // Resets EEPROM
|
||||||
|
if (pressed) {
|
||||||
|
eeconfig_init();
|
||||||
|
default_layer_set(1UL<<eeconfig_read_default_layer());
|
||||||
|
layer_state_set(layer_state);
|
||||||
|
set_os(_OS_MACOS);
|
||||||
|
store_userspace_config();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case VRSN: // Prints firmware version
|
||||||
|
if (pressed) {
|
||||||
|
send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_OS_CUT:
|
||||||
|
switch (os_target) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI("x"));
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
pressed ?
|
||||||
|
register_code(KC_CUT)
|
||||||
|
: unregister_code(KC_CUT);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LCTRL("x"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_OS_COPY:
|
||||||
|
switch (os_target) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI("c"));
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
pressed ?
|
||||||
|
register_code(KC_COPY)
|
||||||
|
: unregister_code(KC_COPY);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LCTRL("c"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_OS_PASTE:
|
||||||
|
switch (os_target) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI("v"));
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
pressed ?
|
||||||
|
register_code(KC_PASTE)
|
||||||
|
: unregister_code(KC_PASTE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LCTRL("v"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_OS_UNDO:
|
||||||
|
switch (os_target) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI("z"));
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
pressed ?
|
||||||
|
register_code(KC_UNDO)
|
||||||
|
: unregister_code(KC_UNDO);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LCTRL("z"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_OS_REDO:
|
||||||
|
switch (os_target) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI(SS_LSFT("z")));
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
pressed ?
|
||||||
|
register_code(KC_AGAIN)
|
||||||
|
: unregister_code(KC_AGAIN);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LCTRL(SS_LSFT("z")));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_OS_LOCK:
|
||||||
|
switch (os_target) {
|
||||||
|
case _OS_MACOS:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI(SS_LCTRL("q")));
|
||||||
|
break;
|
||||||
|
case _OS_LINUX:
|
||||||
|
pressed ?
|
||||||
|
register_code(KC_PWR)
|
||||||
|
: unregister_code(KC_PWR);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (pressed)
|
||||||
|
SEND_STRING(SS_LGUI("l"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case KC_SCRT:
|
||||||
|
if (pressed) {
|
||||||
|
SEND_STRING(SS_LGUI("`"));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return process_record_keymap(keycode, record);
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 Yann Hodique <[email protected]> @sigma
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General 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"
|
||||||
|
#include "version.h"
|
||||||
|
#include "eeprom.h"
|
||||||
|
|
||||||
|
// Define os types
|
||||||
|
enum os_types
|
||||||
|
{
|
||||||
|
_OS_MACOS = 0,
|
||||||
|
_OS_LINUX,
|
||||||
|
_OS_WINDOWS,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Define layer names
|
||||||
|
enum userspace_layers
|
||||||
|
{
|
||||||
|
_QWERTY = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef union {
|
||||||
|
uint32_t raw;
|
||||||
|
struct {
|
||||||
|
uint8_t os_target :2;
|
||||||
|
};
|
||||||
|
} userspace_config_t;
|
||||||
|
|
||||||
|
enum userspace_custom_keycodes
|
||||||
|
{
|
||||||
|
EPRM = SAFE_RANGE, // Resets EEPROM
|
||||||
|
VRSN, // Prints QMK Firmware and board info
|
||||||
|
KC_QWERTY, // Sets default layer to QWERTY
|
||||||
|
KC_MAKE, // Rebuild the current firmware
|
||||||
|
KC_OS_CUT,
|
||||||
|
KC_OS_COPY,
|
||||||
|
KC_OS_PASTE,
|
||||||
|
KC_OS_UNDO,
|
||||||
|
KC_OS_REDO,
|
||||||
|
KC_OS_LOCK,
|
||||||
|
KC_SCRT,
|
||||||
|
NEW_SAFE_RANGE //use NEW_SAFE_RANGE for keymap specific codes
|
||||||
|
};
|
||||||
Reference in new issue
Block a user