mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-02 17:46:42 +00:00
Compare commits
93 Commits
0.5.143
...
subvendor_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
522876dc5a | ||
![]() |
f2991c639d | ||
![]() |
c31070dd3f | ||
![]() |
392121b10e | ||
![]() |
0533362e82 | ||
![]() |
4df4fa7c26 | ||
![]() |
66f13e4972 | ||
![]() |
bb11df6b7a | ||
![]() |
e236f1eba1 | ||
![]() |
847ade44fc | ||
![]() |
7044dafe59 | ||
![]() |
fd1a0d6753 | ||
![]() |
c2c9d9b386 | ||
![]() |
05f15b789f | ||
![]() |
7e2223f822 | ||
![]() |
3b5381d689 | ||
![]() |
aee6785476 | ||
![]() |
363aa8aa2e | ||
![]() |
ef2961798c | ||
![]() |
3e861c2fd5 | ||
![]() |
f113f1927f | ||
![]() |
27ee425892 | ||
![]() |
89357b96d4 | ||
![]() |
16843bc8c9 | ||
![]() |
7854746704 | ||
![]() |
245b3376d6 | ||
![]() |
2c703b1528 | ||
![]() |
90a6fea4e8 | ||
![]() |
e45290a62e | ||
![]() |
1d3a19757c | ||
![]() |
cf9f6bbd91 | ||
![]() |
41df0dc9a7 | ||
![]() |
30dc34d529 | ||
![]() |
e899cb8940 | ||
![]() |
80e489e122 | ||
![]() |
29d1abff07 | ||
![]() |
b546da0a19 | ||
![]() |
f357bd0ccc | ||
![]() |
685d4c2f97 | ||
![]() |
535c2f60a9 | ||
![]() |
65eaab8a1a | ||
![]() |
18f3cd1123 | ||
![]() |
e45ce2dcb3 | ||
![]() |
137456e5b1 | ||
![]() |
ec59147507 | ||
![]() |
074b78700a | ||
![]() |
432674781a | ||
![]() |
4e41beeaa6 | ||
![]() |
00733f4b87 | ||
![]() |
19753788c1 | ||
![]() |
54a8abd785 | ||
![]() |
d6ad9787a0 | ||
![]() |
e2e387f8f8 | ||
![]() |
039cc8c932 | ||
![]() |
004826e1b8 | ||
![]() |
f445a7f971 | ||
![]() |
13e1388f2d | ||
![]() |
fe56fffe7d | ||
![]() |
d069a42c07 | ||
![]() |
029234f1f1 | ||
![]() |
ddf49e8b21 | ||
![]() |
371922ad61 | ||
![]() |
f868a3bb86 | ||
![]() |
5329a80f6c | ||
![]() |
32bb8f6b8a | ||
![]() |
1683d3a559 | ||
![]() |
b79a4cfeba | ||
![]() |
44d9ad95b7 | ||
![]() |
fad967af4c | ||
![]() |
20e18d15e3 | ||
![]() |
83af62322c | ||
![]() |
2d77f9cbb9 | ||
![]() |
c9a0436422 | ||
![]() |
fca03e15b9 | ||
![]() |
bc98b0d9eb | ||
![]() |
38261920a9 | ||
![]() |
f9881793e3 | ||
![]() |
04b9b62bdc | ||
![]() |
b2bbbc2dfc | ||
![]() |
6169cd52ba | ||
![]() |
101b998ac2 | ||
![]() |
7b65b7e948 | ||
![]() |
4c1164c469 | ||
![]() |
e555e42aae | ||
![]() |
38da7795f4 | ||
![]() |
8c10b60c5f | ||
![]() |
c8fca10f0d | ||
![]() |
1f6002db3f | ||
![]() |
07017871e5 | ||
![]() |
0bb457e573 | ||
![]() |
364aeeec53 | ||
![]() |
2e3b99f7f1 | ||
![]() |
bcfba27101 |
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
9
.gitignore
vendored
9
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
*.eep
|
||||
*.elf
|
||||
*.hex
|
||||
*.qmk
|
||||
!util/bootloader.hex
|
||||
!quantum/tools/eeprom_reset.hex
|
||||
*.log
|
||||
@@ -27,7 +28,14 @@ cmake-build-debug
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
/keyboards/*/*/Makefile
|
||||
/keyboards/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/*/Makefile
|
||||
/keyboards/*/keymaps/Makefile
|
||||
/keyboards/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/*/keymaps/Makefile
|
||||
|
||||
# Eclipse/PyCharm/Other IDE Settings
|
||||
.cproject
|
||||
@@ -38,6 +46,7 @@ cmake-build-debug
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
|
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig"
|
||||
]
|
||||
}
|
@@ -70,6 +70,8 @@ ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
|
||||
OPT_DEFS += -DMOUSE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||
endif
|
||||
|
||||
|
@@ -42,6 +42,22 @@
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* Reference
|
||||
* [Config Options](config_options.md)
|
||||
* [Customizing Functionality](custom_quantum_functions.md)
|
||||
@@ -49,25 +65,10 @@
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
|
||||
* For Makers and Modders
|
||||
* [Hand Wiring Guide](hand_wiring.md)
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP flashing guide](isp_flashing_guide.md)
|
||||
* [Modding your keyboard](modding_your_keyboard.md)
|
||||
|
||||
|
@@ -109,6 +109,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
* `#define TAPPING_TERM 200`
|
||||
* how long before a tap becomes a hold
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
|
@@ -104,6 +104,8 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
|
||||
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
|
||||
* Do not include `Makefile`s in your keymap folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Keyboards
|
||||
|
||||
@@ -114,6 +116,9 @@ We also ask that you follow these guidelines:
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
|
||||
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
|
@@ -159,6 +159,7 @@ byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
And see this discussion for further reference.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
|
||||
|
||||
## Special Extra key doesn't work(System, Audio control keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
## What Differences Are There Between QMK and TMK?
|
||||
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
|
||||
From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md).
|
||||
|
||||
|
@@ -49,6 +49,8 @@ Once you have a good feel for how layers work and what you can do, you can get m
|
||||
|
||||
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
||||
|
||||
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
|
||||
|
||||
# Modifier keys
|
||||
|
||||
These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
|
||||
@@ -145,6 +147,8 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
|
||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
|
||||
|
||||
## Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||
|
@@ -42,7 +42,7 @@ Yes, unfortunately.
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = YES
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
|
@@ -200,12 +200,12 @@ typedef struct {
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
|
||||
if (state->interrupted || state->!pressed) return SINGLE_TAP;
|
||||
if (state->interrupted || state->pressed==0) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
}
|
||||
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||
//with single tap. In example below, that means to send `xx` instead of `Escape`.
|
||||
else if (state->count = 2) {
|
||||
else if (state->count == 2) {
|
||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return DOUBLE_HOLD;
|
||||
else return DOUBLE_TAP;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Installing Build Tools
|
||||
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4).
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
@@ -44,7 +44,7 @@ By default, this will download compilers for both AVR and ARM. If you don't need
|
||||
|
||||
nix-shell --arg arm false
|
||||
|
||||
## Mac
|
||||
## macOS
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
@@ -58,10 +58,10 @@ This is the recommended method. If you don't have homebrew, [install it!](http:/
|
||||
|
||||
## Windows with msys2 (recommended)
|
||||
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org).
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10), is [msys2](http://www.msys2.org).
|
||||
|
||||
* Install msys2 by downloading and following the instructions here: http://www.msys2.org
|
||||
* Open the "MSYS2 MingGW 64-bit" shortcut
|
||||
* Install msys2 by downloading it and following the instructions here: http://www.msys2.org
|
||||
* Open the ``MSYS2 MingGW 64-bit`` shortcut
|
||||
* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
|
||||
* `$ cd /c/qmk_firmware`
|
||||
* Run `util/msys2_install.sh` and follow the prompts
|
||||
@@ -80,7 +80,7 @@ If you already have cloned the repository on your Windows file system you can ig
|
||||
|
||||
You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
|
||||
|
||||
Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
Once Git is installed, open the Git Bash command and change the directory to where you want to clone QMK; note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
|
||||
### Toolchain setup
|
||||
The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
|
||||
@@ -122,8 +122,11 @@ If this is a bit complex for you, Docker might be the turn-key solution you need
|
||||
# defaults are ergodox/default
|
||||
|
||||
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||
```
|
||||
|
||||
# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
|
||||
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
|
||||
|
||||
```bash
|
||||
docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
||||
|
||||
```
|
||||
@@ -131,4 +134,4 @@ docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/D
|
||||
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
|
||||
|
||||
## Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
||||
|
@@ -52,7 +52,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
Your changes now exist on your fork on Github - if you go back there (https://github.com/<whoeveryouare>/qmk_firmware), you can create a "New Pull Request" by clicking this button:
|
||||
Your changes now exist on your fork on Github - if you go back there (`https://github.com/<whoeveryouare>/qmk_firmware`), you can create a "New Pull Request" by clicking this button:
|
||||
|
||||

|
||||
|
||||
@@ -60,4 +60,4 @@ Here you'll be able to see exactly what you've committed - if it all looks good,
|
||||
|
||||

|
||||
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
|
@@ -1,22 +1,22 @@
|
||||
# Introduction
|
||||
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make.
|
||||
|
||||
## Basic QMK structure
|
||||
|
||||
QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Keyboard project structure
|
||||
|
||||
Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap structure
|
||||
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen.
|
||||
|
||||
* `config.h`: the options to configure your keymap
|
||||
* `keymap.c`: all of your keymap code, required
|
||||
@@ -30,13 +30,13 @@ There are 2 `config.h` locations:
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
|
||||
```
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#include "config_common.h"
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
@@ -14,7 +14,7 @@ Other than having Vagrant and Virtualbox installed and possibly a restart of you
|
||||
|
||||
The "easy" way to flash the firmware is using a tool from your host OS:
|
||||
|
||||
* [QMK Flasher](https://github.com/qmk/qmk_flasher)
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (reccommened)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
||||
|
||||
|
@@ -16,6 +16,94 @@ In an effort to keep the repo size down, we're no longer accepting images of any
|
||||
|
||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||
|
||||
## Keyboard Metadata
|
||||
|
||||
As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK.
|
||||
|
||||
You can create `info.json` files at every level under `qmk_firmware/keyboards/<name>` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%.
|
||||
|
||||
### `info.json` Format
|
||||
|
||||
The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard.
|
||||
|
||||
* `keyboard_name`
|
||||
* A free-form text string describing the keyboard.
|
||||
* Example: `Clueboard 66%`
|
||||
* `manufacturer`
|
||||
* A free-form text string naming the manufacturer.
|
||||
* Example: `Clueboard`
|
||||
* `identifier`
|
||||
* The Vendor, Product, and Revision ID's joined by a :
|
||||
* Example: `c1ed:2370:0001`
|
||||
* `url`
|
||||
* A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
|
||||
* `processor`
|
||||
* The MCU or CPU this keyboard uses.
|
||||
* Example: `atmega32u4` or `stm32f303`
|
||||
* `bootloader`
|
||||
* What bootloader this keyboard uses. Available options:
|
||||
* `atmel-dfu`
|
||||
* `kiibohd-dfu-util`
|
||||
* `lufa-dfu`
|
||||
* `qmk-dfu`
|
||||
* `stm32-dfu-util`
|
||||
* (FIXME: This list is incomplete.)
|
||||
* `maintainer`
|
||||
* GitHub username of the maintainer, or `qmk` for community maintained boards
|
||||
* `width`
|
||||
* Width of the board in Key Units
|
||||
* `height`
|
||||
* Height of the board in Key Units
|
||||
* `layouts`
|
||||
* Physical Layout representations. See the next section for more detail.
|
||||
|
||||
#### Layout Format
|
||||
|
||||
Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. Within each layout macro are keys for `width`, `height`, and `key_count`, each of which should be self-explanatory.
|
||||
|
||||
* `width`
|
||||
* Optional: The width of the layout in Key Units
|
||||
* `height`
|
||||
* Optional: The height of the layout in Key Units
|
||||
* `key_count`
|
||||
* **Required**: The number of keys in this layout
|
||||
* `layout`
|
||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||
|
||||
#### Key Dictionary Format
|
||||
|
||||
Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for <http://keyboard-layout-editor.com> you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it.
|
||||
|
||||
All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key.
|
||||
|
||||
* `X`
|
||||
* **Required**: The absolute position of the key in the horizontal axis, in Key Units.
|
||||
* `Y`
|
||||
* **Required**: The absolute position of the key in the vertical axis, in Key Units.
|
||||
* `W`
|
||||
* The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `H`
|
||||
* The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `R`
|
||||
* How many degrees clockwise to rotate the key.
|
||||
* `RX`
|
||||
* The absolute position of the point to rotate the key around in the horizontal axis. Default: `x`
|
||||
* `RY`
|
||||
* The absolute position of the point to rotate the key around in the vertical axis. Default: `y`
|
||||
* `KS`
|
||||
* Key Shape: define a polygon by providing a list of points, in Key Units.
|
||||
* **Important**: These are relative to the top-left of the key, not absolute.
|
||||
* Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
|
||||
|
||||
### How Is The Metadata Exposed?
|
||||
|
||||
This metadata is primarily used in two ways:
|
||||
|
||||
* To allow web-based configurators to dynamically generate UI
|
||||
* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter.
|
||||
|
||||
Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API.
|
||||
|
||||
## Non-production/handwired projects
|
||||
|
||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||
|
@@ -115,7 +115,7 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
|
||||
|`KC_DOWN`||DownArrow|
|
||||
|`KC_UP`||UpArrow|
|
||||
|`KC_APPLICATION`|`KC_APP`|Application|
|
||||
|`KC_POWER`||Power|
|
||||
|`KC_POWER`||Old power button scancode. MS has deprecated this in favor of `KC_SYSTEM_POWER`.|
|
||||
|`KC_EXECUTE`||Execute|
|
||||
|`KC_HELP`||Help|
|
||||
|`KC_MENU`||Menu|
|
||||
@@ -138,7 +138,7 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
|
||||
|`KC_CLEAR_AGAIN`||Clear/Again|
|
||||
|`KC_CRSEL`||CrSel/Props|
|
||||
|`KC_EXSEL`||ExSel|
|
||||
|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down|
|
||||
|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down. Recommended over `KC_POWER`.|
|
||||
|`KC_SYSTEM_SLEEP`|`KC_SLEP`|System Sleep|
|
||||
|`KC_SYSTEM_WAKE`|`KC_WAKE`|System Wake|
|
||||
|`KC_MAIL`|`KC_MAIL`||
|
||||
|
@@ -28,14 +28,12 @@ Respective layers can be validated simultaneously. Layers are indexed with 0 to
|
||||
Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
|
||||
|
||||
### Keymap layer status
|
||||
Keymap layer has its state in two 32 bit parameters:
|
||||
The state of the Keymap layer is determined by two 32 bit parameters:
|
||||
|
||||
* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
|
||||
* **`layer_state`** () has current on/off status of the layer on its each bit.
|
||||
* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer).
|
||||
* **`layer_state`** has current on/off status of each layer in its bits.
|
||||
|
||||
Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
|
||||
Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
|
||||
To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
|
||||
Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty.
|
||||
|
||||
Initial state of Keymap Change base layout
|
||||
----------------------- ------------------
|
||||
@@ -52,7 +50,7 @@ To change `default_layer` will be useful when you switch key layout completely,
|
||||
`--- default_layer = 0 `--- default_layer = 1
|
||||
layer_state = 0x00000001 layer_state = 0x00000002
|
||||
|
||||
On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
|
||||
On the other hand, you can change `layer_state` to overlay the base layer with other layers for features such as navigation keys, function keys (F1-F12), media keys, and/or special actions.
|
||||
|
||||
Overlay feature layer
|
||||
--------------------- bit|status
|
||||
|
17
docs/subvendor_ids.md
Normal file
17
docs/subvendor_ids.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Vendor, Product, Project IDs in QMK
|
||||
|
||||
#define VENDOR_ID 0x03A8
|
||||
^
|
||||
+ QMK's self-assigned Vendor ID
|
||||
|
||||
#define PRODUCT_ID 0x0000
|
||||
^
|
||||
+ Project IDs
|
||||
|
||||
There are many projects using QMK that aren't large enough where it would make sense to obtain a Vendor ID of their own, and [the USB-IF isn't interested in others transferring a VID to communities like ours](http://www.arachnidlabs.com/blog/2013/10/18/usb-if-no-vid-for-open-source/), so QMK uses the unassigned Vendor ID `0x03A8` for all Vendors/Makers/Companies (Projects for clarification) that aren't interested in obtaining their own, and maintains a master list (`project_ids.txt`) in the repo to ensure unique values for each project.
|
||||
|
||||
Project IDs are created from the first 4 digits of a SHA-256 hash of the main project location in QMK (e.g. `olkb/planck`), without the revision folder. If that ID exists in the list, the range is shifted down one digit (e.g. it would now selected digits 2 through 5).
|
||||
|
||||
## Using other values
|
||||
|
||||
It's not recommended using custom Vendor IDs, but some projects may have obtained their own, and are welcome to use them in QMK, but only with permission of the project's creator (the owner of the Vendor ID).
|
5
keyboards/6ball/6ball.c
Normal file
5
keyboards/6ball/6ball.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "6ball.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
16
keyboards/6ball/6ball.h
Normal file
16
keyboards/6ball/6ball.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef SIXBALL_H
|
||||
#define SIXBALL_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
k01, k02, k03, \
|
||||
k04, k05, k06 \
|
||||
) \
|
||||
{ \
|
||||
{ k02, k03, k06, k05, k04, k01 } \
|
||||
}
|
||||
|
||||
#define KC_KEYMAP(k01, k02, k03, k04, k05, k06) KEYMAP(KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06)
|
||||
|
||||
#endif
|
53
keyboards/6ball/config.h
Normal file
53
keyboards/6ball/config.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x0007
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER That-Canadian
|
||||
#define PRODUCT 6-Ball
|
||||
#define DESCRIPTION 6-Ball Macropuck
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/* pin-out */
|
||||
#define MATRIX_ROW_PINS { F5 }
|
||||
#define MATRIX_COL_PINS { F4, D4, B5, B6, B2, F6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN F7
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 6 // Number of LEDs
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
28
keyboards/6ball/keymaps/default/keymap.c
Normal file
28
keyboards/6ball/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "6ball.h"
|
||||
|
||||
#define _MAIN 0
|
||||
#define _FN 1
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
||||
#define KC_X0 LT(_FN, KC_ESC)
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAIN] = KC_KEYMAP(
|
||||
F , X0 ,LCTL,
|
||||
R , D , M
|
||||
),
|
||||
|
||||
[_FN] = KC_KEYMAP(
|
||||
F , ,RHUI,
|
||||
RTOG,RMOD,RHUD
|
||||
)
|
||||
};
|
3
keyboards/6ball/keymaps/default/rules.mk
Normal file
3
keyboards/6ball/keymaps/default/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
14
keyboards/6ball/readme.md
Normal file
14
keyboards/6ball/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
6-Ball
|
||||
======
|
||||
|
||||
A circular 6-key macropad made by ThatCanadian.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: Pro Micro ATmega32U4
|
||||
Hardware Availability: ThatCanadian
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 6ball:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
67
keyboards/6ball/rules.mk
Normal file
67
keyboards/6ball/rules.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# 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 = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
@@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define VENDOR_ID 0x03A8
|
||||
#define PRODUCT_ID 0x5A61
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Ortholinear Keyboards
|
||||
#define PRODUCT The Atomic Keyboard
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT Atomic
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
|
@@ -30,24 +30,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
},
|
||||
|
||||
[KEYNAV] = {
|
||||
{KC_ESC, MEH(KC_A), RCTL(KC_Z), RCTL(KC_S), MEH(KC_B), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, },
|
||||
{MEH(KC_C), MEH(KC_D), RSFT(KC_TAB), KC_TAB, MEH(KC_E), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), },
|
||||
{MEH(KC_F), MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
{KC_ESC, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, },
|
||||
{MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB, MEH(KC_A), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), },
|
||||
{MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
},
|
||||
|
||||
[KEYSEL] = {
|
||||
{KC_TRNS, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), },
|
||||
{KC_TRNS, KC_TRNS, RSFT(KC_TAB), KC_TAB, KC_TRNS, KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), },
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
{MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), },
|
||||
{MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), },
|
||||
{MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), },
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
},
|
||||
|
||||
[COMBINED] = {
|
||||
{KC_ESC, KC_LABK, KC_RABK, KC_DQUO, KC_GRAVE, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, },
|
||||
{KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, },
|
||||
{KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_TILD, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS, }
|
||||
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, },
|
||||
{KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, },
|
||||
{KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, },
|
||||
{KC_PIPE, KC_BSLS, KC_CIRC, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TILD, KC_GRAVE, }
|
||||
},
|
||||
|
||||
[MOUSE] = {
|
||||
|
31
keyboards/chimera_ortho/chimera_ortho.c
Normal file
31
keyboards/chimera_ortho/chimera_ortho.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "chimera_ortho.h"
|
||||
|
||||
void uart_init(void) {
|
||||
SERIAL_UART_INIT();
|
||||
}
|
||||
|
||||
void led_init(void) {
|
||||
DDRD |= (1<<1);
|
||||
PORTD |= (1<<1);
|
||||
DDRF |= (1<<4) | (1<<5);
|
||||
PORTF |= (1<<4) | (1<<5);
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
uart_init();
|
||||
led_init();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
}
|
66
keyboards/chimera_ortho/chimera_ortho.h
Normal file
66
keyboards/chimera_ortho/chimera_ortho.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef CHIMERA_ORTHO_H
|
||||
#define CHIMERA_ORTHO_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "matrix.h"
|
||||
#include "backlight.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#define red_led_off PORTF |= (1<<5)
|
||||
#define red_led_on PORTF &= ~(1<<5)
|
||||
#define blu_led_off PORTF |= (1<<4)
|
||||
#define blu_led_on PORTF &= ~(1<<4)
|
||||
#define grn_led_off PORTD |= (1<<1)
|
||||
#define grn_led_on PORTD &= ~(1<<1)
|
||||
|
||||
#define set_led_off red_led_off; grn_led_off; blu_led_off
|
||||
#define set_led_red red_led_on; grn_led_off; blu_led_off
|
||||
#define set_led_blue red_led_off; grn_led_off; blu_led_on
|
||||
#define set_led_green red_led_off; grn_led_on; blu_led_off
|
||||
#define set_led_yellow red_led_on; grn_led_on; blu_led_off
|
||||
#define set_led_magenta red_led_on; grn_led_off; blu_led_on
|
||||
#define set_led_cyan red_led_off; grn_led_on; blu_led_on
|
||||
#define set_led_white red_led_on; grn_led_on; blu_led_on
|
||||
|
||||
/*
|
||||
#define LED_B 5
|
||||
#define LED_R 6
|
||||
#define LED_G 7
|
||||
|
||||
#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
|
||||
#define red_led_on PORTF |= (1<<LED_R)
|
||||
#define red_led_off PORTF &= ~(1<<LED_R)
|
||||
#define grn_led_on PORTF |= (1<<LED_G)
|
||||
#define grn_led_off PORTF &= ~(1<<LED_G)
|
||||
#define blu_led_on PORTF |= (1<<LED_B)
|
||||
#define blu_led_off PORTF &= ~(1<<LED_B)
|
||||
|
||||
#define set_led_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
#define set_led_red PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
|
||||
#define set_led_blue PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_green PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_yellow PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_cyan PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
|
||||
#define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
*/
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
|
||||
k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \
|
||||
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44,\
|
||||
k45, k46, k47, k48 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
|
||||
{ KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
|
||||
{ KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
|
||||
{ KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
|
||||
{ KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO }, \
|
||||
}
|
||||
|
||||
#endif
|
87
keyboards/chimera_ortho/config.h
Normal file
87
keyboards/chimera_ortho/config.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER unknown
|
||||
#define PRODUCT Chimera Ortho
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Chimera Ortho
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define ONESHOT_TIMEOUT 500
|
||||
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* 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
|
||||
|
||||
//UART settings for communication with the RF microcontroller
|
||||
#define SERIAL_UART_BAUD 1000000
|
||||
#define SERIAL_UART_DATA UDR1
|
||||
#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
|
||||
#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
|
||||
#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
|
||||
#define SERIAL_UART_INIT() do { \
|
||||
/* baud rate */ \
|
||||
UBRR1L = SERIAL_UART_UBRR; \
|
||||
/* baud rate */ \
|
||||
UBRR1H = SERIAL_UART_UBRR >> 8; \
|
||||
/* enable TX and RX */ \
|
||||
UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
|
||||
/* 8-bit data */ \
|
||||
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
193
keyboards/chimera_ortho/keymaps/default/keymap.c
Normal file
193
keyboards/chimera_ortho/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,193 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include "chimera_ortho.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum chimera_ortho_layers
|
||||
{
|
||||
_QWERTY,
|
||||
_CAPS,
|
||||
_NUMPAD,
|
||||
_SYMBOLS,
|
||||
_MACROS,
|
||||
_NAV
|
||||
};
|
||||
|
||||
#define KC_NMPD TG(_NUMPAD)
|
||||
#define KC_SYMB TG(_SYMBOLS)
|
||||
#define KC_SPFN LT(_NAV,KC_EQL)
|
||||
#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
|
||||
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
|
||||
#define KC_SPLT MT(MOD_LALT, KC_MINS)
|
||||
#define KC_SPRT MT(MOD_LALT, KC_1)
|
||||
#define KC_GBRC MT(MOD_RGUI, KC_8)
|
||||
#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
|
||||
#define KC_MESC LT(_MACROS, KC_ESC)
|
||||
#define KC_INCL M(0)
|
||||
#define KC_PULL M(1)
|
||||
#define KC_PUSH M(2)
|
||||
#define KC_SCAP M(3)
|
||||
#define KC_SCOF M(4)
|
||||
#define KC_CAD LALT(LCTL(KC_DEL))
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
//#define LAYER_TOGGLE_DELAY 300
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
MESC, Q , W , E , R , T ,SCTL, SCTR, Y , U , I , O , P ,QUOT,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
TAB , A , S , D , F , G ,SPLT, SPRT, H , J , K , L ,SCLN,ENT ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
LSPO, Z , X , C , V , B ,SPFN, GBRC, N , M ,COMM,DOT ,SLSH,RSPC,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
NMPD,BSPC, SPC ,SYMB
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_CAPS] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, , , , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , ,UNDS, , , , , ,COLN, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
SCOF, , , , , , , , , , , , ,SCOF,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_NUMPAD] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, ,COLN , , , , , , , 7 , 8 , 9 ,ASTR,MINS,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, ,DOT , , , , , , , 4 , 5 , 6 ,PLUS, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , , , 1 , 2 , 3 ,SLSH, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , 0
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_SYMBOLS] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, F1 , F2 , F3 , F4 , F5 , , ,TILD,COLN,UNDS,LCBR,RCBR, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, F6 , F7 , F8 , F9 ,F10 , , ,GRV ,SCLN,MINS,LBRC,RBRC, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
PIPE, , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_NAV] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, , , , , , , , , , UP , ,PSCR, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , , ,LEFT,DOWN,RGHT, , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , , ,PGUP,PGDN, , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
,DEL , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_MACROS] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, , , , , , , , , ,INCL, , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , ,CAD , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
SCAP, , , , , , , , , ,PULL,PUSH, ,SCAP,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
/* include some kind of library or header */
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("#include <>");
|
||||
return MACRO( T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git pull");
|
||||
return MACRO( T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed){
|
||||
SEND_STRING("git push");
|
||||
return MACRO( T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed){
|
||||
layer_on(_CAPS);
|
||||
register_code(KC_CAPSLOCK);
|
||||
unregister_code(KC_CAPSLOCK);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed){
|
||||
layer_off(_CAPS);
|
||||
register_code(KC_CAPSLOCK);
|
||||
unregister_code(KC_CAPSLOCK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
set_led_green;
|
||||
break;
|
||||
case _CAPS:
|
||||
set_led_white;
|
||||
break;
|
||||
case _NUMPAD:
|
||||
set_led_blue;
|
||||
break;
|
||||
case _SYMBOLS:
|
||||
set_led_red;
|
||||
break;
|
||||
case _NAV:
|
||||
set_led_magenta;
|
||||
break;
|
||||
case _MACROS:
|
||||
set_led_cyan;
|
||||
break;
|
||||
default:
|
||||
set_led_green;
|
||||
break;
|
||||
}
|
||||
};
|
164
keyboards/chimera_ortho/matrix.c
Normal file
164
keyboards/chimera_ortho/matrix.c
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako
|
||||
Copyright 2014 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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#if defined(__AVR__)
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "timer.h"
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#elif (MATRIX_COLS <= 16)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||
# define ROW_SHIFTER ((uint16_t)1)
|
||||
#elif (MATRIX_COLS <= 32)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||
# define ROW_SHIFTER ((uint32_t)1)
|
||||
#endif
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
SERIAL_UART_INIT();
|
||||
|
||||
uint32_t timeout = 0;
|
||||
|
||||
//the s character requests the RF slave to send the matrix
|
||||
SERIAL_UART_DATA = 's';
|
||||
|
||||
//trust the external keystates entirely, erase the last data
|
||||
uint8_t uart_data[11] = {0};
|
||||
|
||||
//there are 10 bytes corresponding to 10 columns, and an end byte
|
||||
for (uint8_t i = 0; i < 11; i++) {
|
||||
//wait for the serial data, timeout if it's been too long
|
||||
//this only happened in testing with a loose wire, but does no
|
||||
//harm to leave it in here
|
||||
while(!SERIAL_UART_RXD_PRESENT){
|
||||
timeout++;
|
||||
if (timeout > 10000){
|
||||
break;
|
||||
}
|
||||
}
|
||||
uart_data[i] = SERIAL_UART_DATA;
|
||||
}
|
||||
|
||||
//check for the end packet, the key state bytes use the LSBs, so 0xE0
|
||||
//will only show up here if the correct bytes were recieved
|
||||
if (uart_data[10] == 0xE0)
|
||||
{
|
||||
//shifting and transferring the keystates to the QMK matrix variable
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += matrix_bitpop(i);
|
||||
}
|
||||
return count;
|
||||
}
|
19
keyboards/chimera_ortho/readme.md
Normal file
19
keyboards/chimera_ortho/readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Chimera Ortho
|
||||
|
||||

|
||||
|
||||
A split wireless 40% ortholinear keyboard
|
||||
|
||||
Keyboard Maintainer: [William Wilson](https://github.com/GlenPickle)
|
||||
|
||||
|
||||
Hardware Supported: Chimera Ortho PCB, WaveShare core nRF51822
|
||||
|
||||
Hardware Availability: [Gerbers](https://github.com/GlenPickle/Chimera/tree/master/ortho/gerbers)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make chimera_ortho:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
|
78
keyboards/chimera_ortho/rules.mk
Normal file
78
keyboards/chimera_ortho/rules.mk
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||
CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
|
||||
|
||||
# # project specific files
|
||||
SRC = matrix.c
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE = YES # MIDI controls
|
||||
UNICODE_ENABLE = YES # Unicode
|
||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
USB = /dev/ttyACM0
|
12
keyboards/clueboard/66/info.json
Normal file
12
keyboards/clueboard/66/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "Clueboard 66%",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 16.5,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"KEYMAP": {
|
||||
"layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 12.75, "y": 2, "w": 1, "label": "ISOHASH"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 12.25, "y": 3, "w": 1, "label": "JPBACKSLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}]
|
||||
}
|
||||
}
|
||||
}
|
3
keyboards/clueboard/66/rev1/info.json
Normal file
3
keyboards/clueboard/66/rev1/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier":"c1ed:2301:0003"
|
||||
}
|
3
keyboards/clueboard/66/rev2/info.json
Normal file
3
keyboards/clueboard/66/rev2/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier":"c1ed:2320:0001"
|
||||
}
|
3
keyboards/clueboard/66/rev3/info.json
Normal file
3
keyboards/clueboard/66/rev3/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier":"c1ed:2370:0001"
|
||||
}
|
4
keyboards/clueboard/info.json
Normal file
4
keyboards/clueboard/info.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"manufacturer": "Clueboard",
|
||||
"maintainer": "skullydazed"
|
||||
}
|
@@ -6,7 +6,7 @@ This is a port of TMK's converter/terminal_usb to QMK.
|
||||
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
|
||||
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
|
||||
|
||||
Source code: https://github.com/tmk/tmk_keyboard
|
||||
Source code: https://github.com/qmk/qmk_firmware.git
|
||||
Article: http://geekhack.org/index.php?topic=27272.0
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
|
||||
|
||||
BUILD
|
||||
-----
|
||||
$ git clone https://github.com/tmk/tmk_keyboard.git
|
||||
$ cd converter/terminal_usb
|
||||
$ make
|
||||
$ git clone https://github.com/qmk/qmk_firmware.git
|
||||
$ cd qmk_firmware
|
||||
$ make converter/ibm_terminal:default
|
||||
|
||||
|
||||
RESOURCE
|
@@ -1,6 +1 @@
|
||||
#include "ibm_terminal.h"
|
||||
|
||||
// void matrix_init_kb(void) {
|
||||
|
||||
// matrix_init_user();
|
||||
// }
|
@@ -13,13 +13,18 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
|
||||
Note that you have to choose the right hardware variant as your subproject, otherwise you will probably have issues.
|
||||
|
||||
Troubleshooting & Known Issues
|
||||
------------------------------
|
||||
The Pro Micro variant runs at 8MHz, hence the following line in `usb_usb/rules.mk`:
|
||||
`F_CPU ?= 8000000`
|
||||
If the firmware doesn't work, try changing that line to
|
||||
`F_CPU ?= 16000000`
|
||||
or override the `F_CPU` variable in the `rules.mk` of your keymap.
|
||||
If something doesn't work, it's probably because of the CPU clock.
|
||||
Be sure to select the correct subproject (the middle part of the `make` argument) according to your hardware.
|
||||
If you are sure you have this correct, try changeing the default in `usb_usb/rules.mk` or overriding the value in the `rules.mk` of your keymap.
|
||||
|
||||
The Pro Micro variant uses a 3.3V Pro Micro and thus runs at 8MHz, hence the following line in `usb_usb/pro_micro/rules.mk`:
|
||||
`F_CPU = 8000000`
|
||||
The converter sold by Hasu runs at 16MHz and so the corresponding line in `usb_usb/hasu/rules.mk` is:
|
||||
`F_CPU = 16000000`
|
||||
|
||||
Getting the Hardware
|
||||
--------------------
|
||||
|
1
keyboards/converter/usb_usb/ble/ble.c
Normal file
1
keyboards/converter/usb_usb/ble/ble.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "ble.h"
|
6
keyboards/converter/usb_usb/ble/ble.h
Normal file
6
keyboards/converter/usb_usb/ble/ble.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef BLE_H
|
||||
#define BLE_H
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#endif
|
13
keyboards/converter/usb_usb/ble/config.h
Normal file
13
keyboards/converter/usb_usb/ble/config.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef CONFIG_BLE_H
|
||||
#define CONFIG_BLE_H
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT QMK BLE Adapter
|
||||
#undef DESCRIPTION
|
||||
#define DESCRIPTION
|
||||
|
||||
// Turn off the mode leds on the BLE module
|
||||
#define ADAFRUIT_BLE_ENABLE_MODE_LEDS 0
|
||||
#define ADAFRUIT_BLE_ENABLE_POWER_LED 0
|
||||
|
||||
#endif
|
4
keyboards/converter/usb_usb/ble/rules.mk
Normal file
4
keyboards/converter/usb_usb/ble/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
BLUETOOTH = AdafruitBLE
|
||||
ADAFRUIT_BLE_ENABLE = yes
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||
F_CPU = 8000000
|
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// do not #include "config_common.h" because the pin names conflict with the USB HID code.
|
||||
// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves.
|
||||
// It's a hack, yeah...
|
||||
|
||||
#define CUSTOM_MATRIX 2
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
@@ -35,6 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "host.h"
|
||||
#include "keyboard.h"
|
||||
|
||||
extern "C" {
|
||||
#include "quantum.h"
|
||||
}
|
||||
|
||||
/* KEY CODE to Matrix
|
||||
*
|
||||
@@ -62,7 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
// Integrated key state of all keyboards
|
||||
static report_keyboard_t keyboard_report;
|
||||
static report_keyboard_t local_keyboard_report;
|
||||
|
||||
static bool matrix_is_mod = false;
|
||||
|
||||
@@ -98,13 +101,13 @@ extern "C"
|
||||
}
|
||||
|
||||
static void or_report(report_keyboard_t report) {
|
||||
// integrate reports into keyboard_report
|
||||
keyboard_report.mods |= report.mods;
|
||||
// integrate reports into local_keyboard_report
|
||||
local_keyboard_report.mods |= report.mods;
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (IS_ANY(report.keys[i])) {
|
||||
for (uint8_t j = 0; j < KEYBOARD_REPORT_KEYS; j++) {
|
||||
if (! keyboard_report.keys[j]) {
|
||||
keyboard_report.keys[j] = report.keys[i];
|
||||
if (! local_keyboard_report.keys[j]) {
|
||||
local_keyboard_report.keys[j] = report.keys[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +133,7 @@ extern "C"
|
||||
last_time_stamp4 = kbd_parser4.time_stamp;
|
||||
|
||||
// clear and integrate all reports
|
||||
keyboard_report = {};
|
||||
local_keyboard_report = {};
|
||||
or_report(kbd_parser1.report);
|
||||
or_report(kbd_parser2.report);
|
||||
or_report(kbd_parser3.report);
|
||||
@@ -138,9 +141,9 @@ extern "C"
|
||||
|
||||
matrix_is_mod = true;
|
||||
|
||||
dprintf("state: %02X %02X", keyboard_report.mods, keyboard_report.reserved);
|
||||
dprintf("state: %02X %02X", local_keyboard_report.mods, local_keyboard_report.reserved);
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
dprintf(" %02X", keyboard_report.keys[i]);
|
||||
dprintf(" %02X", local_keyboard_report.keys[i]);
|
||||
}
|
||||
dprint("\r\n");
|
||||
} else {
|
||||
@@ -177,12 +180,12 @@ extern "C"
|
||||
uint8_t code = CODE(row, col);
|
||||
|
||||
if (IS_MOD(code)) {
|
||||
if (keyboard_report.mods & ROW_BITS(code)) {
|
||||
if (local_keyboard_report.mods & ROW_BITS(code)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (keyboard_report.keys[i] == code) {
|
||||
if (local_keyboard_report.keys[i] == code) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -192,14 +195,14 @@ extern "C"
|
||||
matrix_row_t matrix_get_row(uint8_t row) {
|
||||
uint16_t row_bits = 0;
|
||||
|
||||
if (IS_MOD(CODE(row, 0)) && keyboard_report.mods) {
|
||||
row_bits |= keyboard_report.mods;
|
||||
if (IS_MOD(CODE(row, 0)) && local_keyboard_report.mods) {
|
||||
row_bits |= local_keyboard_report.mods;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (IS_ANY(keyboard_report.keys[i])) {
|
||||
if (row == ROW(keyboard_report.keys[i])) {
|
||||
row_bits |= ROW_BITS(keyboard_report.keys[i]);
|
||||
if (IS_ANY(local_keyboard_report.keys[i])) {
|
||||
if (row == ROW(local_keyboard_report.keys[i])) {
|
||||
row_bits |= ROW_BITS(local_keyboard_report.keys[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,9 +212,9 @@ extern "C"
|
||||
uint8_t matrix_key_count(void) {
|
||||
uint8_t count = 0;
|
||||
|
||||
count += bitpop(keyboard_report.mods);
|
||||
count += bitpop(local_keyboard_report.mods);
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (IS_ANY(keyboard_report.keys[i])) {
|
||||
if (IS_ANY(local_keyboard_report.keys[i])) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -233,6 +236,7 @@ extern "C"
|
||||
kbd2.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||
kbd3.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||
kbd4.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||
led_set_kb(usb_led);
|
||||
}
|
||||
|
||||
};
|
||||
|
1
keyboards/converter/usb_usb/hasu/hasu.c
Normal file
1
keyboards/converter/usb_usb/hasu/hasu.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "hasu.h"
|
6
keyboards/converter/usb_usb/hasu/hasu.h
Normal file
6
keyboards/converter/usb_usb/hasu/hasu.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef HASU_H
|
||||
#define HASU_H
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#endif
|
1
keyboards/converter/usb_usb/hasu/rules.mk
Normal file
1
keyboards/converter/usb_usb/hasu/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
F_CPU = 16000000
|
@@ -3,13 +3,4 @@
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT QMK BLE Adapter
|
||||
#undef DESCRIPTION
|
||||
#define DESCRIPTION
|
||||
|
||||
// Turn off the mode leds on the BLE module
|
||||
#define ADAFRUIT_BLE_ENABLE_MODE_LEDS 0
|
||||
#define ADAFRUIT_BLE_ENABLE_POWER_LED 0
|
||||
|
||||
#endif
|
||||
|
@@ -1,3 +0,0 @@
|
||||
BLUETOOTH = AdafruitBLE
|
||||
ADAFRUIT_BLE_ENABLE = yes
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
1
keyboards/converter/usb_usb/pro_micro/pro_micro.c
Normal file
1
keyboards/converter/usb_usb/pro_micro/pro_micro.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "pro_micro.h"
|
6
keyboards/converter/usb_usb/pro_micro/pro_micro.h
Normal file
6
keyboards/converter/usb_usb/pro_micro/pro_micro.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef PRO_MICRO_H
|
||||
#define PRO_MICRO_H
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#endif
|
1
keyboards/converter/usb_usb/pro_micro/rules.mk
Normal file
1
keyboards/converter/usb_usb/pro_micro/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
F_CPU = 8000000
|
@@ -13,7 +13,15 @@ MCU = atmega32u4
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 8000000
|
||||
|
||||
# Since there are different hardware variations of these adapters and since these
|
||||
# have different CPU clocks, the clock speed should be set in the rules.mk file of the
|
||||
# respective hardware variantion (i.e. subproject). For example, in /pro_micro/rules.mk
|
||||
# this is set to 8000000.
|
||||
# The value here is only a fallback and is ignored if it is defined in the subproject.
|
||||
F_CPU ?= 16000000
|
||||
|
||||
DEFAULT_FOLDER = converter/usb_usb/hasu
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1 +1 @@
|
||||
#include "usb_usb.h"
|
||||
#include "usb_usb.h"
|
||||
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
|
@@ -1,9 +1,28 @@
|
||||
#include "dz60.h"
|
||||
#include "led.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// Keyboard start-up code goes here
|
||||
// Runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// Looping keyboard code goes here
|
||||
// This runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// Set caps lock LED pin as output
|
||||
DDRB |= (1 << 2);
|
||||
// Default to off
|
||||
PORTB |= (1 << 2);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
}
|
||||
// Code for caps lock LED as reported by the OS
|
||||
// Set this per keymap, instead of globally
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
@@ -8,7 +8,20 @@
|
||||
#include "rev2.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#endif
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \
|
||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \
|
||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k010, KC_##k011, KC_##k012, KC_##k013, KC_##k014 }, \
|
||||
{ KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k110, KC_##k111, KC_##k112, KC_##k113, KC_##k114 }, \
|
||||
{ KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k210, KC_##k211, KC_##k212, KC_##k213, KC_##k214 }, \
|
||||
{ KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k310, KC_##k311, KC_##k312, KC_##k313, KC_##k314 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
120
keyboards/eco/keymaps/hexwire/keymap.c
Normal file
120
keyboards/eco/keymaps/hexwire/keymap.c
Normal file
@@ -0,0 +1,120 @@
|
||||
|
||||
// Default ECO Layout
|
||||
// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039
|
||||
|
||||
#include "eco.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _FN3 3
|
||||
|
||||
enum eco_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define KC_ KC_TRNS
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#define KC_RST RESET
|
||||
#define KC_DBUG DEBUG
|
||||
#define KC_LOWR MO(_LOWER)
|
||||
#define KC_RASE MO(_RAISE)
|
||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
||||
#define KC_GRVF LT(_FN3, KC_GRV)
|
||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
#define KC_RSAI RGB_SAI
|
||||
#define KC_RSAD RGB_SAD
|
||||
#define KC_RVAI RGB_VAI
|
||||
#define KC_RVAD RGB_VAD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
TAB , Q , W , E , R , T ,LPRN,RPRN, Y , U , I , O , P ,MINS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
ESCC, A , S , D , F , G ,LBRC,RBRC, H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B ,LCBR,RCBR, N , M ,COMM,DOT ,SLSH,ENTS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
GRVF,LCTL,LALT,LGUI,LOWR,SPC ,SPC ,BSPC,BSPC,RASE,LEFT,DOWN, UP ,RGHT
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
|
||||
[_LOWER] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
, 1 , 2 , 3 , 4 , 5 ,LPRN,RPRN, 6 , 7 , 8 , 9 , 0 , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
DEL ,CAPP,LEFT,RGHT, UP ,LBRC,LBRC,RBRC,RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
,CPYP, , ,DOWN,LCBR,LCBR,RCBR,RCBR, P1 , P2 , P3 ,MINS, ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
, , , , , , ,DEL ,DEL , , P0 ,PDOT, ,
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
[_RAISE] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , ,EQL ,HOME, , , ,BSLS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
, , , , , , , , , , , , ,
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
[_FN3] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
F12 , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
RST ,DBUG,RHUD,RSAD,RVAD, , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
, , , , , , , , , , , , ,
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
25
keyboards/eco/keymaps/hexwire/rules.mk
Normal file
25
keyboards/eco/keymaps/hexwire/rules.mk
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
# 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 = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -92,4 +92,4 @@ ONEHAND_ENABLE = no # Disable Onehand
|
||||
RGBLIGHT_ENABLE = no
|
||||
MIDI_ENABLE = no
|
||||
|
||||
LAYOUTS = ergodox ergodox_80
|
||||
LAYOUTS = ergodox
|
||||
|
@@ -87,6 +87,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 500
|
||||
|
||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
|
@@ -61,11 +61,46 @@ void ergodox_blink_all_leds(void)
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_on();
|
||||
_delay_ms(50);
|
||||
#ifdef LEFT_LEDS
|
||||
ergodox_left_led_1_on();
|
||||
_delay_ms(50);
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
ergodox_left_led_2_on();
|
||||
_delay_ms(50);
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
ergodox_left_led_3_on();
|
||||
_delay_ms(50);
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
#endif
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
#ifdef LEFT_LEDS
|
||||
_delay_ms(50);
|
||||
ergodox_left_led_1_off();
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
_delay_ms(50);
|
||||
ergodox_left_led_2_off();
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
_delay_ms(50);
|
||||
ergodox_left_led_3_off();
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
#endif
|
||||
|
||||
//ergodox_led_all_on();
|
||||
//_delay_ms(333);
|
||||
ergodox_led_all_off();
|
||||
@@ -107,11 +142,49 @@ uint8_t init_mcp23018(void) {
|
||||
out:
|
||||
i2c_stop();
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
|
||||
// SREG=sreg_prev;
|
||||
|
||||
return mcp23018_status;
|
||||
}
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
uint8_t ergodox_left_leds_update(void) {
|
||||
if (mcp23018_status) { // if there was an error
|
||||
return mcp23018_status;
|
||||
}
|
||||
#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B
|
||||
#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B
|
||||
#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A
|
||||
|
||||
// set logical value (doesn't matter on inputs)
|
||||
// - unused : hi-Z : 1
|
||||
// - input : hi-Z : 1
|
||||
// - driving : hi-Z : 1
|
||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE);
|
||||
if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(OLATA);
|
||||
if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(0b11111111
|
||||
& ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT)
|
||||
);
|
||||
if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(0b11111111
|
||||
& ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT)
|
||||
& ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT)
|
||||
);
|
||||
if (mcp23018_status) goto out;
|
||||
|
||||
out:
|
||||
i2c_stop();
|
||||
return mcp23018_status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ONEHAND_ENABLE
|
||||
__attribute__ ((weak))
|
||||
// swap-hands action needs a matrix to define the swap
|
||||
|
@@ -46,12 +46,31 @@ inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6);
|
||||
inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
|
||||
inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); }
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
bool ergodox_left_led_1;
|
||||
bool ergodox_left_led_2;
|
||||
bool ergodox_left_led_3;
|
||||
|
||||
inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; }
|
||||
inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; }
|
||||
inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; }
|
||||
|
||||
inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; }
|
||||
inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; }
|
||||
inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; }
|
||||
#endif // LEFT_LEDS
|
||||
|
||||
inline void ergodox_led_all_on(void)
|
||||
{
|
||||
ergodox_board_led_on();
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef LEFT_LEDS
|
||||
ergodox_left_led_1_on();
|
||||
ergodox_left_led_2_on();
|
||||
ergodox_left_led_3_on();
|
||||
#endif // LEFT_LEDS
|
||||
}
|
||||
|
||||
inline void ergodox_led_all_off(void)
|
||||
@@ -60,6 +79,11 @@ inline void ergodox_led_all_off(void)
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
#ifdef LEFT_LEDS
|
||||
ergodox_left_led_1_off();
|
||||
ergodox_left_led_2_off();
|
||||
ergodox_left_led_3_off();
|
||||
#endif // LEFT_LEDS
|
||||
}
|
||||
|
||||
inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; }
|
||||
|
@@ -194,30 +194,82 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
};
|
||||
|
||||
// Runs whenever there is a layer state change.
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case SYMB:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case MDIA:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
uint8_t layer = biton32(state);
|
||||
switch (layer) {
|
||||
case 0:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#else
|
||||
rgblight_init();
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_1
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_2
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
|
||||
#endif
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_3
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_4
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_5
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
|
||||
#endif
|
||||
break;
|
||||
case 6:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_6
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
|
||||
#endif
|
||||
break;
|
||||
case 7:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_7
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
||||
|
@@ -1,18 +0,0 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#include "../../config.h"
|
||||
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#define FORCE_NKRO
|
||||
|
||||
#endif
|
@@ -1,820 +0,0 @@
|
||||
/*
|
||||
This is the keymap for the keyboard
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2017 Art Ortenburger
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
#include "keymap_nordic.h"
|
||||
|
||||
// Define layer names
|
||||
#define QWERTY 0
|
||||
#define COLEMAK 1
|
||||
#define DVORAK 2
|
||||
#define WORKMAN 3
|
||||
#define SYMB 8
|
||||
#define OVERWATCH 9
|
||||
#define DIABLO 10
|
||||
#define MOUS 12
|
||||
|
||||
//Leader Key stuff
|
||||
#ifdef LEADER_TIMEOUT
|
||||
#undef LEADER_TIMEOUT
|
||||
#endif
|
||||
#define LEADER_TIMEOUT 1500
|
||||
|
||||
//define modifiers
|
||||
#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_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||
|
||||
//define layer change stuff for underglow indicator
|
||||
bool skip_leds = false;
|
||||
|
||||
#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
|
||||
#define rgblight_set_red rgblight_sethsv(0x00, 0xFF, 0xFF);
|
||||
#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
|
||||
#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
|
||||
#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF);
|
||||
#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
|
||||
#define rgblight_set_urine rgblight_sethsv (0x3C, 0xFF, 0xFF);
|
||||
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
|
||||
//This is both for underglow, and Diablo 3 macros
|
||||
|
||||
static uint8_t current_layer = 0;
|
||||
|
||||
//define diablo macro timer variables
|
||||
static uint16_t diablo_timer[4];
|
||||
static uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30};
|
||||
static uint8_t diablo_key_time[4];
|
||||
|
||||
bool check_dtimer(uint8_t dtimer) {
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < ( diablo_key_time[dtimer] * 1000 ) ) ? false : true;
|
||||
};
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
RGB_0000FF,
|
||||
RGB_008000,
|
||||
RGB_FF0000,
|
||||
RGB_800080,
|
||||
RGB_00FF90,
|
||||
KC_DIABLO_CLEAR,
|
||||
KC_QWERTY,
|
||||
KC_COLEMAK,
|
||||
KC_DVORAK,
|
||||
KC_WORKMAN,
|
||||
KC_MAKEQMK
|
||||
};
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
enum {
|
||||
TD_FLSH = 0,
|
||||
TD_DIABLO_1,
|
||||
TD_DIABLO_2,
|
||||
TD_DIABLO_3,
|
||||
TD_DIABLO_4
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
skip_leds = true;
|
||||
}
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// on the fourth tap, set the keyboard on flash state
|
||||
// and set the underglow to red, because red == bad
|
||||
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
reset_keyboard();
|
||||
reset_tap_dance(state);
|
||||
}
|
||||
}
|
||||
|
||||
// Cycle through the times for the macro, starting at 0, for disabled.
|
||||
// Max of six values, so don't exceed
|
||||
void diablo_tapdance_master (qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) {
|
||||
if (state->count >= 7) {
|
||||
diablo_key_time[diablo_key] = diablo_times[0];
|
||||
reset_tap_dance(state);
|
||||
} else {
|
||||
diablo_key_time[diablo_key] = diablo_times[state->count - 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Would rather have one function for all of this, but no idea how to do that...
|
||||
void diablo_tapdance1 (qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master (state, user_data, 0);
|
||||
}
|
||||
|
||||
void diablo_tapdance2 (qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master (state, user_data, 1);
|
||||
}
|
||||
|
||||
void diablo_tapdance3 (qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master (state, user_data, 2);
|
||||
}
|
||||
|
||||
void diablo_tapdance4 (qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master (state, user_data, 3);
|
||||
}
|
||||
|
||||
|
||||
// if the flash state didnt happen, then turn off leds, left to right
|
||||
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(500);
|
||||
skip_leds = false;
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset),
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " |
|
||||
* |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------|
|
||||
* | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | `/SYM| ' " | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* |Alt/Ap| Win | | Alt |Ctl/Esc|
|
||||
* ,------|------|-------| |------+-------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space| Bksp |-------| |------| DEL |Enter |
|
||||
* | | | End | | PgDn | | |
|
||||
* `---------------------' `---------------------'
|
||||
*/
|
||||
[QWERTY] = KEYMAP(
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(OVERWATCH), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[COLEMAK] = KEYMAP(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[DVORAK] = KEYMAP(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TG(OVERWATCH),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT,
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[WORKMAN] = KEYMAP(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(OVERWATCH),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
|
||||
/* Keymap 3: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | RESET | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | RGBM | RED | | OFF | SOLID|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | GREEN| | | | |
|
||||
* | RGB | RGB |------| |------| NUM0 | NUME |
|
||||
* | DARK |BRITE | BLUE | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[SYMB] = KEYMAP(
|
||||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
KC_MAKEQMK, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
KC_NO, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
KC_KP_MINUS,KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN,
|
||||
KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
||||
RGB_TOG, RGB_SLD,
|
||||
KC_NO,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Customized Overwatch Layout
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F1 | K | Q | W | E | R | T | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | TAB | G | A | S | D | F |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | J | U | I | Y | T | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | O | P | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | LGUI | | | | |
|
||||
* | V | SPACE|------ |------| | Enter|
|
||||
* | | | H | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[OVERWATCH] = KEYMAP(
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
||||
KC_G, KC_U, KC_I, KC_Y, KC_T,
|
||||
KC_O, KC_P,
|
||||
KC_LGUI,
|
||||
KC_V, KC_SPACE, KC_H,
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
TG(OVERWATCH), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 3:
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | V | D | ALT | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | S | I | F | M | T | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LCTL | MAC1 | MAC2 | MAC3 | MAC4 | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L | J | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | G | | | | |
|
||||
* | SPACE| Q |------ |------| | |
|
||||
* | SHIFT| ALT | 0MAC | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[DIABLO] = KEYMAP(
|
||||
KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G,
|
||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_L, KC_J,
|
||||
KC_F,
|
||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR,
|
||||
|
||||
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | MsUp | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Play | Stop | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | MWUp | | | | |
|
||||
* | Lclk | Rclk |------| |------| MBn4 | MBn5 |
|
||||
* | | | MWDn | | Mclk | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[MOUS] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_WH_U,
|
||||
KC_BTN1, KC_BTN2, KC_WH_D,
|
||||
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO,KC_NO,
|
||||
KC_NO,
|
||||
KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB),
|
||||
// FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_0000FF:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x00,0x00,0xff);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_008000:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x00,0x80,0x00);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_FF0000:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_800080:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x80,0x00,0x80);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_00FF90:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x00,0xff,0x90);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them
|
||||
if (record->event.pressed) {
|
||||
uint8_t dtime;
|
||||
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
diablo_key_time[dtime] = diablo_times[0];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_DVORAK:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_MAKEQMK:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("make ergodox_ez:drashna-custom:teensy"SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke (uint8_t diablo_key) {
|
||||
if (current_layer == DIABLO) {
|
||||
switch (diablo_key) {
|
||||
case 0:
|
||||
SEND_STRING("1");
|
||||
break;
|
||||
case 1:
|
||||
SEND_STRING("2");
|
||||
break;
|
||||
case 2:
|
||||
SEND_STRING("3");
|
||||
break;
|
||||
case 3:
|
||||
SEND_STRING("4");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Checks each of the 4 timers/keys to see if enough time has elapsed
|
||||
// Runs the "send string" command if enough time has passed, and resets the timer.
|
||||
void run_diablo_macro_check(void) {
|
||||
uint8_t dtime;
|
||||
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
|
||||
diablo_timer[dtime] = timer_read();
|
||||
send_diablo_keystroke(dtime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void matrix_init_user(void) { // Runs boot tasks for keyboard
|
||||
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) { // runs frequently to update info
|
||||
uint8_t modifiders = get_mods();
|
||||
uint8_t layer = biton32(layer_state);
|
||||
static bool has_layer_changed = true;
|
||||
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
// Since we're not using the LEDs here for layer indication anymore,
|
||||
// then lets use them for modifier indicators. Shame we don't have 4...
|
||||
// Also, no "else", since we want to know each, independantly.
|
||||
if ( modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
if ( modifiders & MODS_CTRL_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
if ( modifiders & MODS_ALT_MASK) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
|
||||
}
|
||||
if (layer != current_layer) {
|
||||
has_layer_changed = true;
|
||||
current_layer = layer;
|
||||
}
|
||||
// Check layer, and apply color if its changed since last check
|
||||
if (has_layer_changed) {
|
||||
uint8_t default_layer = 0;
|
||||
default_layer = eeconfig_read_default_layer();
|
||||
|
||||
switch (layer) {
|
||||
case SYMB:
|
||||
rgblight_set_blue;
|
||||
rgblight_mode(2);
|
||||
break;
|
||||
case OVERWATCH:
|
||||
rgblight_set_orange;
|
||||
rgblight_mode(17);
|
||||
break;
|
||||
case DIABLO:
|
||||
rgblight_set_red;
|
||||
rgblight_mode(5);
|
||||
break;
|
||||
case MOUS:
|
||||
rgblight_set_urine;
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
case 7:
|
||||
rgblight_sethsv (255,255,255);
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
default:
|
||||
if (default_layer & (1UL << COLEMAK)) {
|
||||
rgblight_set_green;
|
||||
}
|
||||
else if (default_layer & (1UL << DVORAK)) {
|
||||
rgblight_set_magenta;
|
||||
}
|
||||
else if (default_layer & (1UL << WORKMAN)) {
|
||||
rgblight_set_purple;
|
||||
}
|
||||
else {
|
||||
rgblight_set_teal;
|
||||
}
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
}
|
||||
has_layer_changed = false;
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
#ifdef LEADER_KEYS
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
SEQ_ONE_KEY(KC_C) {
|
||||
SEND_STRING("Covecube");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_D) {
|
||||
SEND_STRING("StableBit DrivePool");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_C, KC_D) {
|
||||
SEND_STRING("StableBit CloudDrive");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_C) {
|
||||
SEND_STRING("StableBit Scanner");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_T) {
|
||||
SEND_STRING("StableBit Troubleshooter");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
@@ -1,10 +0,0 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
LEADER_KEYS = no
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -1,11 +1,17 @@
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#include "../../config.h"
|
||||
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
// make this easy to toggle behavior, so that it can be more easily toggled
|
||||
#define LAYER_UNDERGLOW_LIGHTING
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,195 +1,574 @@
|
||||
/*
|
||||
This is the keymap for the keyboard
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2017 Art Ortenburger
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
#include "keymap_nordic.h"
|
||||
|
||||
#define VERSION M(0)
|
||||
|
||||
|
||||
// Define layer names
|
||||
#define BASE 0
|
||||
#define SYMB 1
|
||||
#define MOUS 2
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
bool has_layer_changed = true;
|
||||
|
||||
#define rgblight_set_teal rgblight_setrgb(0x00, 0xFF, 0xFF)
|
||||
#define rgblight_set_red rgblight_setrgb(0xFF, 0x00, 0x00)
|
||||
#define rgblight_set_blue rgblight_setrgb(0x00, 0xFF, 0x00);
|
||||
#define rgblight_set_green rgblight_setrgb(0x00, 0x00, 0xFF);
|
||||
#define rgblight_set_yellow rgblight_setrgb(0xFF, 0xFF, 0x00);
|
||||
//define layer change stuff for underglow indicator
|
||||
bool skip_leds = false;
|
||||
|
||||
|
||||
#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_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||
#endif
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
|
||||
//define diablo macro timer variables
|
||||
static uint16_t diablo_timer[4];
|
||||
static uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 };
|
||||
static uint8_t diablo_key_time[4];
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
#ifndef LAYER_UNDERGLOW_LIGHTING
|
||||
RGB_SLD,
|
||||
#endif
|
||||
bool check_dtimer(uint8_t dtimer) {
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = KEYMAP(KC_EQUAL,KC_1,KC_2,KC_3,KC_4,KC_5,KC_LEFT,KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSHIFT,CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,ALL_T(KC_NO),LT(1,KC_GRAVE),KC_QUOTE,LALT(KC_LSHIFT),KC_LEFT,KC_RIGHT,ALT_T(KC_APPLICATION),KC_LGUI,KC_HOME,KC_SPACE,KC_BSPACE,KC_END,KC_RIGHT,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,KC_J,KC_K,KC_L,LT(2,KC_SCOLON),GUI_T(KC_QUOTE),MEH_T(KC_NO),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),KC_RSHIFT,KC_UP,KC_DOWN,KC_LBRACKET,KC_RBRACKET,MO(1),KC_LALT,CTL_T(KC_ESCAPE),KC_PGUP,KC_PGDOWN,KC_TAB,KC_ENTER),
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
[1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT),
|
||||
#else
|
||||
[1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_MOD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,RGB_TOG,RGB_SLD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_HUD,RGB_HUI),
|
||||
#endif
|
||||
|
||||
[2] = KEYMAP(KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_BTN1,KC_MS_BTN2,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_WWW_BACK),
|
||||
|
||||
enum {
|
||||
TD_FLSH = 0,
|
||||
TD_DIABLO_1,
|
||||
TD_DIABLO_2,
|
||||
TD_DIABLO_3,
|
||||
TD_DIABLO_4
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(1)
|
||||
};
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
|
||||
// leaving this in place for compatibilty with old keymaps cloned and re-compiled.
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#ifndef LAYER_UNDERGLOW_LIGHTING
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#endif
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t new_layer = biton32(layer_state);
|
||||
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
static uint8_t old_layer = 0;
|
||||
uint8_t modifiders = get_mods();
|
||||
|
||||
if ( modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
if ( modifiders & MODS_CTRL_MASK) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
if ( modifiders & MODS_ALT_MASK) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
|
||||
if (old_layer != new_layer) {
|
||||
has_layer_changed = true;
|
||||
old_layer = new_layer;
|
||||
}
|
||||
if (has_layer_changed) {
|
||||
switch (new_layer) {
|
||||
case 1:
|
||||
rgblight_set_red;
|
||||
break;
|
||||
case 2:
|
||||
rgblight_set_blue;
|
||||
break;
|
||||
case 3:
|
||||
rgblight_set_green;
|
||||
break;
|
||||
case 4:
|
||||
rgblight_set_yellow;
|
||||
break;
|
||||
case 5:
|
||||
rgblight_setrgb(0xFF, 0xFF, 0x00);
|
||||
break;
|
||||
case 6:
|
||||
rgblight_setrgb(0xFF, 0xFF, 0x00);
|
||||
break;
|
||||
case 7:
|
||||
rgblight_setrgb(0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
default:
|
||||
rgblight_set_teal;
|
||||
break;
|
||||
}
|
||||
has_layer_changed = false;
|
||||
}
|
||||
|
||||
#else
|
||||
switch (new_layer) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 5:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 6:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 7:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
skip_leds = true;
|
||||
}
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// on the fourth tap, set the keyboard on flash state
|
||||
// and set the underglow to red, because red == bad
|
||||
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff, 0x00, 0x00);
|
||||
#endif
|
||||
reset_tap_dance(state);
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
// Cycle through the times for the macro, starting at 0, for disabled.
|
||||
// Max of six values, so don't exceed
|
||||
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) {
|
||||
if (state->count >= 7) {
|
||||
diablo_key_time[diablo_key] = diablo_times[0];
|
||||
reset_tap_dance(state);
|
||||
}
|
||||
else {
|
||||
diablo_key_time[diablo_key] = diablo_times[state->count - 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Would rather have one function for all of this, but no idea how to do that...
|
||||
void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master(state, user_data, 0);
|
||||
}
|
||||
|
||||
void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master(state, user_data, 1);
|
||||
}
|
||||
|
||||
void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master(state, user_data, 2);
|
||||
}
|
||||
|
||||
void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master(state, user_data, 3);
|
||||
}
|
||||
|
||||
|
||||
// if the flash state didnt happen, then turn off leds, left to right
|
||||
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(500);
|
||||
skip_leds = false;
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(dance_flsh_each, dance_flsh_finished, dance_flsh_reset),
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " |
|
||||
* |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------|
|
||||
* | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | `/SYM| ' " | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* |Alt/Ap| Win | | Alt |Ctl/Esc|
|
||||
* ,------|------|-------| |------+-------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space| Bksp |-------| |------| DEL |Enter |
|
||||
* | | | End | | PgDn | | |
|
||||
* `---------------------' `---------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ergodox(
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(_DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(_OVERWATCH), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_COLEMAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(_OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(_DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TG(_OVERWATCH),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT,
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |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(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(_OVERWATCH),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
|
||||
/* Keymap 3: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | RESET | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | RGBM | RED | | OFF | SOLID|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | GREEN| | | | |
|
||||
* | RGB | RGB |------| |------| NUM0 | NUME |
|
||||
* | DARK |BRITE | BLUE | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_SYMB] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
KC_KP_MINUS,KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN,
|
||||
KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Customized Overwatch Layout
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F1 | K | Q | W | E | R | T | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | TAB | G | A | S | D | F |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | J | U | I | Y | T | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | O | P | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | LGUI | | | | |
|
||||
* | V | SPACE|------ |------| | Enter|
|
||||
* | | | H | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_OVERWATCH] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
||||
KC_G, KC_U, KC_I, KC_Y, KC_T,
|
||||
KC_O, KC_P,
|
||||
KC_LGUI,
|
||||
KC_V, KC_SPACE, KC_H,
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
TG(_OVERWATCH), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 3:
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | V | D | ALT | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | S | I | F | M | T | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LCTL | MAC1 | MAC2 | MAC3 | MAC4 | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L | J | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | G | | | | |
|
||||
* | SPACE| Q |------ |------| | |
|
||||
* | SHIFT| ALT | 0MAC | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_DIABLO] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G,
|
||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_L, KC_J,
|
||||
KC_F,
|
||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR,
|
||||
|
||||
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | MsUp | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Play | Stop | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | MWUp | | | | |
|
||||
* | Lclk | Rclk |------| |------| MBn4 | MBn5 |
|
||||
* | | | MWDn | | Mclk | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_MOUS] = LAYOUT_ergodox(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_WH_U,
|
||||
KC_BTN1, KC_BTN2, KC_WH_D,
|
||||
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO,KC_NO,
|
||||
KC_NO,
|
||||
KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke(uint8_t diablo_key) {
|
||||
if (biton32(layer_state) == _DIABLO) {
|
||||
switch (diablo_key) {
|
||||
case 0:
|
||||
SEND_STRING("1");
|
||||
break;
|
||||
case 1:
|
||||
SEND_STRING("2");
|
||||
break;
|
||||
case 2:
|
||||
SEND_STRING("3");
|
||||
break;
|
||||
case 3:
|
||||
SEND_STRING("4");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Checks each of the 4 timers/keys to see if enough time has elapsed
|
||||
// Runs the "send string" command if enough time has passed, and resets the timer.
|
||||
void run_diablo_macro_check(void) {
|
||||
uint8_t dtime;
|
||||
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
|
||||
diablo_timer[dtime] = timer_read();
|
||||
send_diablo_keystroke(dtime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void matrix_init_keymap(void) { // Runs boot tasks for keyboard
|
||||
};
|
||||
|
||||
|
||||
void matrix_scan_keymap(void) { // runs frequently to update info
|
||||
uint8_t modifiders = get_mods();
|
||||
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
// Since we're not using the LEDs here for layer indication anymore,
|
||||
// then lets use them for modifier indicators. Shame we don't have 4...
|
||||
// Also, no "else", since we want to know each, independantly.
|
||||
if (modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
if (modifiders & MODS_CTRL_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
if (modifiders & MODS_ALT_MASK) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
run_diablo_macro_check();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
# Drashna's ErgoDox EZ Underglow Mod
|
||||
|
||||
This is based on the default Ergodox EZ keymap.
|
||||
|
||||
This modifieds the keymay so that it uses the underglow to indicate which layer you're on, rather than the top LEDs.
|
||||
|
||||
Default colors are "teal" for base layer, "red" for Symbols, and "green" for mouse/media. Blue would be the next layer, if you had more.
|
||||
|
||||
Additionally, the top LEDs are Shift/Control/Alt indicators instead (in that order).
|
@@ -1,5 +1,10 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ANIMATION = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
EXTRAFLAGS = -flto
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
|
@@ -14,16 +14,32 @@ enum custom_keycodes {
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
// shell nav macros
|
||||
SHELL_LS,
|
||||
SHELL_LSLTR,
|
||||
SHELL_CDPRE,
|
||||
SHELL_LESS,
|
||||
SHELL_PLESS,
|
||||
SHELL_PGREP,
|
||||
SHELL_TAILF,
|
||||
|
||||
SHELL_PWD,
|
||||
SHELL_H3,
|
||||
SHELL_AMMCOLO,
|
||||
SHELL_SCREENRD,
|
||||
SHELL_SCREEN_NEW,
|
||||
SHELL_SCREEN_LIST,
|
||||
SHELL_MKE,
|
||||
};
|
||||
|
||||
|
||||
#define BASE 0 // base dvorak layer
|
||||
#define KEYNAV 1 // arrow navigation (right hand)
|
||||
#define KEYSEL 2 // arrow navigation + shift (allow text selection)
|
||||
#define SHELL_NAV 3 // bash shortcuts
|
||||
#define MOUSE 4 // mouse layer (can be locked with lock key)
|
||||
#define COMBINED 5 // combined numbers and symbols layer
|
||||
#define BASE 0 // base dvorak layer
|
||||
#define KEYNAV 1 // arrow navigation (right hand)
|
||||
#define KEYSEL 2 // arrow navigation + shift (allow text selection)
|
||||
#define SHELL_NAV 3 // bash shortcuts
|
||||
#define SHELL_SCREEN 4 // linux screen shortcuts
|
||||
#define MOUSE 5 // mouse layer (can be locked with lock key)
|
||||
#define COMBINED 6 // combined numbers and symbols layer
|
||||
|
||||
// macros
|
||||
#define MOUSE_TOGGLE 1
|
||||
@@ -34,18 +50,38 @@ enum custom_keycodes {
|
||||
#define SWITCH_NDS 7
|
||||
#define SCREEN_COPY_MODE 8
|
||||
#define SCREEN_PASTE 9
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
|
||||
#define SCREEN_RENAME 10
|
||||
#define SCREEN_NUMBER 11
|
||||
#define SCREEN_0 12
|
||||
#define SCREEN_1 13
|
||||
#define SCREEN_2 14
|
||||
#define SCREEN_3 15
|
||||
#define SCREEN_4 16
|
||||
#define SCREEN_5 17
|
||||
#define SCREEN_6 18
|
||||
#define SCREEN_7 19
|
||||
#define SCREEN_8 20
|
||||
#define SCREEN_9 21
|
||||
#define SCREEN_DETACH 22
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 30
|
||||
|
||||
|
||||
#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
|
||||
case MACRO_NAME:\
|
||||
if (record->event.pressed) {\
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\
|
||||
}\
|
||||
break;\
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
||||
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
MEH(KC_0), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
||||
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
||||
OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
||||
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
|
||||
|
||||
// left thumb cluster
|
||||
MEH(KC_4), MEH(KC_5),
|
||||
@@ -114,23 +150,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// shell navigation layer
|
||||
[SHELL_NAV] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, SHELL_MKE, SHELL_H3,
|
||||
KC_TRNS,LCTL(KC_A), SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_PWD,
|
||||
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, KC_TRNS, SHELL_AMMCOLO,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
LALT(KC_D),
|
||||
KC_TRNS,RCTL(KC_W),KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(SWITCH_NDS),
|
||||
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(SWITCH_NDS),
|
||||
RCTL(KC_L), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), KC_TRNS, M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row (match functionality of base layer)
|
||||
KC_TRNS, RCTL(KC_W), KC_TRNS, LALT(KC_D), RCTL(KC_U),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
@@ -138,16 +174,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
|
||||
// linux screen layer
|
||||
[SHELL_SCREEN] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M(SCREEN_NEW_TAB), M(SCREEN_7), M(SCREEN_8), M(SCREEN_9), M(SCREEN_RENAME), KC_TRNS,
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_4), M(SCREEN_5), M(SCREEN_6), M(SCREEN_TAB_RIGHT), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(SCREEN_1), M(SCREEN_2), M(SCREEN_3), M(SCREEN_NUMBER), KC_TRNS,
|
||||
// bottom row
|
||||
M(SCREEN_0), KC_TRNS, KC_TRNS, KC_TRNS, M(SCREEN_DETACH),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
[COMBINED] = KEYMAP(
|
||||
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_ESC, KC_LABK, KC_RABK, KC_DQUO, KC_GRAVE,KC_TRNS,
|
||||
KC_TRNS,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC,KC_TRNS,
|
||||
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS,
|
||||
KC_TRNS,KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_TRNS,KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_PIPE, KC_BSLS, KC_CIRC, KC_AMPR,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
|
||||
@@ -157,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, MEH(KC_N),
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, MEH(KC_O),
|
||||
// bottom row
|
||||
KC_0, KC_DOT, KC_TRNS, KC_TRNS, MEH(KC_P),
|
||||
KC_0, KC_DOT, KC_TILD, KC_GRAVE, MEH(KC_P),
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
|
||||
|
||||
@@ -230,6 +292,41 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_DETACH:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(D), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_RENAME:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(A), U(LSFT), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_NUMBER:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),
|
||||
T(N),
|
||||
T(U),
|
||||
T(M),
|
||||
T(B),
|
||||
T(E),
|
||||
T(R),
|
||||
T(SPC),
|
||||
END);
|
||||
}
|
||||
break;
|
||||
|
||||
MACRO_SCREEN_NUM(SCREEN_0,0);
|
||||
MACRO_SCREEN_NUM(SCREEN_1,1);
|
||||
MACRO_SCREEN_NUM(SCREEN_2,2);
|
||||
MACRO_SCREEN_NUM(SCREEN_3,3);
|
||||
MACRO_SCREEN_NUM(SCREEN_4,4);
|
||||
MACRO_SCREEN_NUM(SCREEN_5,5);
|
||||
MACRO_SCREEN_NUM(SCREEN_6,6);
|
||||
MACRO_SCREEN_NUM(SCREEN_7,7);
|
||||
MACRO_SCREEN_NUM(SCREEN_8,8);
|
||||
MACRO_SCREEN_NUM(SCREEN_9,9);
|
||||
|
||||
case SCREEN_COPY_MODE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
|
||||
@@ -282,8 +379,70 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// shell macros
|
||||
if(record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case SHELL_LS:
|
||||
SEND_STRING("ls\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LSLTR:
|
||||
SEND_STRING("ls -ltr\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_CDPRE:
|
||||
SEND_STRING("cd ..\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LESS:
|
||||
SEND_STRING("less ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PLESS:
|
||||
SEND_STRING(" | less");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PGREP:
|
||||
SEND_STRING(" | grep ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_TAILF:
|
||||
SEND_STRING("tail -f ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PWD:
|
||||
SEND_STRING("echo `pwd`/");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_H3:
|
||||
SEND_STRING("h3\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_AMMCOLO:
|
||||
SEND_STRING("ammcolo\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREENRD:
|
||||
SEND_STRING("screen -r -d ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_NEW:
|
||||
SEND_STRING("screen -S ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_LIST:
|
||||
SEND_STRING("screen -list\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_MKE:
|
||||
SEND_STRING("mke\n");
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -306,6 +465,8 @@ void matrix_scan_user(void) {
|
||||
case COMBINED:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case SHELL_NAV:
|
||||
case SHELL_SCREEN:
|
||||
case KEYNAV:
|
||||
case KEYSEL:
|
||||
ergodox_right_led_3_on();
|
||||
|
@@ -202,6 +202,9 @@ uint8_t matrix_scan(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
select_row(i);
|
||||
wait_us(30); // without this wait read unstable value.
|
||||
|
@@ -66,6 +66,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
# If you have Left LEDs (see
|
||||
# https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for
|
||||
# details), include the following define:
|
||||
# OPT_DEFS += -DLEFT_LEDS
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
25
keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md
Normal file
25
keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# DudeOfAwesome's ErgoDox Infinity Layout
|
||||
|
||||
A basic ErgoDox layout with Planck-like tri-layer support.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- Planck-like tri-layer
|
||||
- Workman layout
|
||||
- In-progress gaming layer
|
||||
- Numpad
|
||||
- LCD colors are linked together, like the default KLL firmware
|
||||
|
||||
## Building and flashing
|
||||
|
||||
1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware
|
||||
1. Flash left half:
|
||||
```bash
|
||||
$ make ergodox_infinity:dudeofawesome:dfu-util
|
||||
```
|
||||
1. Flash right half:
|
||||
```bash
|
||||
$ make ergodox_infinity:dudeofawesome:dfu-util MASTER=right
|
||||
```
|
568
keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c
Normal file
568
keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c
Normal file
@@ -0,0 +1,568 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
enum custom_layers {
|
||||
_QWERTY,
|
||||
_DVORAK,
|
||||
_WORKMAN,
|
||||
_GAME,
|
||||
_MOUSE,
|
||||
_NUM,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
DVORAK,
|
||||
WORKMAN,
|
||||
LOWER,
|
||||
RAISE,
|
||||
GAME,
|
||||
MOUSE,
|
||||
NUM,
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic QWERTY layer
|
||||
*
|
||||
* ,---------------------------------------------. ,---------------------------------------------.
|
||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||
* | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC |
|
||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||
* | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | '" |
|
||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter |
|
||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||
* `------------------------------' `------------------------------'
|
||||
* ,------------. ,------------.
|
||||
* |Play |Mouse | | Num |Mouse|
|
||||
* ,----|-----|------| |------+-----+-----.
|
||||
* | | | Alt | | Alt | | |
|
||||
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||
* | | | LGUI | | LGUI | | |
|
||||
* `-----------------' `------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1,
|
||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||
|
||||
KC_MPLY, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
LOWER, KC_BSPACE, KC_LGUI,
|
||||
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
|
||||
KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER,
|
||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||
|
||||
TG(_NUM), TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_LGUI, KC_SPACE, RAISE
|
||||
),
|
||||
|
||||
/* Keymap 0: Basic Dvorak layer
|
||||
*
|
||||
* ,---------------------------------------------. ,--------------------------------------------.
|
||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||
* | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC |
|
||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||
* | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | / |
|
||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | Enter |
|
||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||
* `------------------------------' `------------------------------'
|
||||
* ,------------. ,------------.
|
||||
* |Play |Mouse | | Num |Mouse|
|
||||
* ,----|-----|------| |------+-----+-----.
|
||||
* | | | Alt | | Alt | | |
|
||||
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||
* | | | LGUI | | LGUI | | |
|
||||
* `-----------------' `------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET,
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSPO, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1,
|
||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||
|
||||
KC_MPLY, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_BSPACE, LOWER, KC_LGUI,
|
||||
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH),
|
||||
KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENTER,
|
||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||
|
||||
TG(_NUM), TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_LGUI, RAISE, KC_SPACE
|
||||
),
|
||||
|
||||
/* Keymap 0: Basic Workman layer
|
||||
*
|
||||
* ,---------------------------------------------. ,--------------------------------------------.
|
||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||
* | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC |
|
||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||
* | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | '" |
|
||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||
* | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter |
|
||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||
* `------------------------------' `------------------------------'
|
||||
* ,------------. ,------------.
|
||||
* |Play |Mouse | | Num |Mouse|
|
||||
* ,----|-----|------| |------+-----+-----.
|
||||
* | | | Alt | | Alt | | |
|
||||
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||
* | | | LGUI | | LGUI | | |
|
||||
* `-----------------' `------------------'
|
||||
*/
|
||||
[_WORKMAN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET,
|
||||
KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSPO, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1,
|
||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||
|
||||
KC_MPLY, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_BSPACE, LOWER, KC_LGUI,
|
||||
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER,
|
||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||
|
||||
NUM, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_LGUI, RAISE, KC_SPACE
|
||||
),
|
||||
|
||||
/* Lower
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | |
|
||||
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Animat| | |Toggle|Solid |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Bright|Bright| | | |Hue- |Hue+ |
|
||||
* |ness- |ness+ |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||
_______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Raise
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ |
|
||||
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Animat| | |Toggle|Solid |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Bright|Bright| | | |Hue- |Hue+ |
|
||||
* |ness- |ness+ |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
_______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Adjust
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, _______, _______, _______, _______, _______, _______,
|
||||
_______, RESET, DEBUG, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, AG_NORM,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL,
|
||||
AG_SWAP, QWERTY, WORKMAN, DVORAK, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | Lclk | MsUp | Rclk |Wh Up | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght|Wh Dn |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Brwser|Brwser|
|
||||
* | Lclk | Rclk |------| |------|Back |Fwd |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MOUSE
|
||||
[_MOUSE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, _______,
|
||||
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U,
|
||||
_______, _______, KC_WH_L, KC_BTN3, KC_WH_R, _______, TO(_GAME),
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
KC_WH_D,
|
||||
KC_BTN1, KC_BTN2, KC_WH_U,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_MPLY,
|
||||
TO(_GAME), _______, _______, KC_MPRV, KC_MNXT, _______, _______,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, KC_WBAK, KC_WFWD
|
||||
),
|
||||
|
||||
/* Keymap 2: GAME
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | Lclk | MsUp | Rclk | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Brwser|Brwser|
|
||||
* | Lclk | Rclk |------| |------|Back |Fwd |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_GAME] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
KC_SPACE, KC_LGUI, KC_LALT,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
TG(_MOUSE), TG(_NUM),
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
|
||||
/* Keymap 2: NUMPAD
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | * | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | . | 0 | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_NUM] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______,
|
||||
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
|
||||
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, _______,
|
||||
_______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, _______,
|
||||
_______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_SLASH, _______,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_0, KC_KP_EQUAL, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_LOWER);
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_RAISE);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_LOWER);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs just one time when the keyboard initializes.
|
||||
*/
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Runs constantly in the background, in a loop.
|
||||
*/
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
switch (layer) {
|
||||
case _LOWER:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case _RAISE:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case _ADJUST:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
}
|
||||
};
|
345
keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c
Normal file
345
keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c
Normal file
@@ -0,0 +1,345 @@
|
||||
/*
|
||||
Copyright 2016 Fred Sundvik <fsundvik@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Currently we are assuming that both the backlight and LCD are enabled
|
||||
* But it's entirely possible to write a custom visualizer that use only
|
||||
* one of them
|
||||
*/
|
||||
#ifndef LCD_BACKLIGHT_ENABLE
|
||||
#error This visualizer needs that LCD backlight is enabled
|
||||
#endif
|
||||
|
||||
#ifndef LCD_ENABLE
|
||||
#error This visualizer needs that LCD is enabled
|
||||
#endif
|
||||
|
||||
#include "visualizer.h"
|
||||
#include "visualizer_keyframes.h"
|
||||
#include "lcd_keyframes.h"
|
||||
#include "lcd_backlight_keyframes.h"
|
||||
#include "system/serial_link.h"
|
||||
#include "default_animations.h"
|
||||
|
||||
static const uint32_t logo_background_color = LCD_COLOR(0, 0, 255);
|
||||
static const uint32_t initial_color = LCD_COLOR(84, 255, 255);
|
||||
|
||||
static const uint32_t led_emulation_colors[4] = {
|
||||
LCD_COLOR(0, 0, 255),
|
||||
LCD_COLOR(141, 255, 255),
|
||||
LCD_COLOR(18, 255, 255),
|
||||
LCD_COLOR(194, 255, 255),
|
||||
};
|
||||
|
||||
static uint32_t next_led_target_color = 0;
|
||||
|
||||
typedef enum {
|
||||
LCD_STATE_INITIAL,
|
||||
LCD_STATE_LAYER_BITMAP,
|
||||
LCD_STATE_BITMAP_AND_LEDS,
|
||||
} lcd_state_t;
|
||||
|
||||
static lcd_state_t lcd_state = LCD_STATE_INITIAL;
|
||||
|
||||
typedef struct {
|
||||
uint8_t led_on;
|
||||
uint8_t led1;
|
||||
uint8_t led2;
|
||||
uint8_t led3;
|
||||
} visualizer_user_data_t;
|
||||
|
||||
/**
|
||||
* Don't access from visualization function, use the visualizer state instead
|
||||
*/
|
||||
static visualizer_user_data_t user_data_keyboard = {
|
||||
.led_on = 0,
|
||||
.led1 = LED_BRIGHTNESS_HI,
|
||||
.led2 = LED_BRIGHTNESS_HI,
|
||||
.led3 = LED_BRIGHTNESS_HI,
|
||||
};
|
||||
|
||||
_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE,
|
||||
"Please increase the VISUALIZER_USER_DATA_SIZE");
|
||||
|
||||
// Feel free to modify the animations below, or even add new ones if needed
|
||||
|
||||
// The color animation animates the LCD color when you change layers
|
||||
static keyframe_animation_t one_led_color = {
|
||||
.num_frames = 1,
|
||||
.loop = false,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {lcd_backlight_keyframe_set_color},
|
||||
};
|
||||
|
||||
bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) {
|
||||
uint32_t temp = next_led_target_color;
|
||||
next_led_target_color = state->target_lcd_color;
|
||||
state->target_lcd_color = temp;
|
||||
return false;
|
||||
}
|
||||
|
||||
// The color animation animates the LCD color when you change layers
|
||||
static keyframe_animation_t two_led_colors = {
|
||||
.num_frames = 2,
|
||||
.loop = true,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color},
|
||||
};
|
||||
|
||||
/**
|
||||
* The LCD animation alternates between the layer name display and a
|
||||
* bitmap that displays all active layers
|
||||
*/
|
||||
static keyframe_animation_t lcd_bitmap_animation = {
|
||||
.num_frames = 1,
|
||||
.loop = false,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(0)},
|
||||
.frame_functions = {lcd_keyframe_display_layer_bitmap},
|
||||
};
|
||||
|
||||
static keyframe_animation_t lcd_bitmap_leds_animation = {
|
||||
.num_frames = 2,
|
||||
.loop = true,
|
||||
.frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)},
|
||||
.frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states},
|
||||
};
|
||||
|
||||
void initialize_user_visualizer(visualizer_state_t* state) {
|
||||
/**
|
||||
* The brightness will be dynamically adjustable in the future
|
||||
* But for now, change it here.
|
||||
*/
|
||||
lcd_backlight_brightness(180);
|
||||
state->current_lcd_color = initial_color;
|
||||
state->target_lcd_color = logo_background_color;
|
||||
lcd_state = LCD_STATE_INITIAL;
|
||||
start_keyframe_animation(&default_startup_animation);
|
||||
}
|
||||
|
||||
static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) {
|
||||
return user_data->led_on & (1u << num);
|
||||
}
|
||||
|
||||
static uint8_t get_led_index_master(visualizer_user_data_t* user_data) {
|
||||
for (int i=0; i < 4; i++) {
|
||||
if (is_led_on(user_data, i)) {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) {
|
||||
uint8_t master_index = get_led_index_master(user_data);
|
||||
if (master_index!=0) {
|
||||
for (int i=master_index; i < 4; i++) {
|
||||
if (is_led_on(user_data, i)) {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) {
|
||||
if (
|
||||
is_led_on(user_data, 0) &&
|
||||
is_led_on(user_data, 1) &&
|
||||
is_led_on(user_data, 2)
|
||||
) {
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
return user_data->led1;
|
||||
case 2:
|
||||
return user_data->led2;
|
||||
case 3:
|
||||
return user_data->led3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data;
|
||||
visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data;
|
||||
|
||||
uint8_t new_index;
|
||||
uint8_t old_index;
|
||||
|
||||
if (true || is_serial_link_master()) {
|
||||
new_index = get_led_index_master(user_data_new);
|
||||
old_index = get_led_index_master(user_data_old);
|
||||
} else {
|
||||
new_index = get_led_index_slave(user_data_new);
|
||||
old_index = get_led_index_slave(user_data_old);
|
||||
}
|
||||
|
||||
uint8_t new_secondary_index = get_secondary_led_index(user_data_new);
|
||||
uint8_t old_secondary_index = get_secondary_led_index(user_data_old);
|
||||
|
||||
uint8_t new_brightness = get_brightness(user_data_new, new_index);
|
||||
uint8_t old_brightness = get_brightness(user_data_old, old_index);
|
||||
|
||||
uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index);
|
||||
uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index);
|
||||
|
||||
if (
|
||||
lcd_state == LCD_STATE_INITIAL ||
|
||||
new_index != old_index ||
|
||||
new_secondary_index != old_secondary_index ||
|
||||
new_brightness != old_brightness ||
|
||||
new_secondary_brightness != old_secondary_brightness
|
||||
) {
|
||||
if (new_secondary_index != 0) {
|
||||
state->target_lcd_color = change_lcd_color_intensity(
|
||||
led_emulation_colors[new_index], new_brightness);
|
||||
next_led_target_color = change_lcd_color_intensity(
|
||||
led_emulation_colors[new_secondary_index], new_secondary_brightness);
|
||||
|
||||
stop_keyframe_animation(&one_led_color);
|
||||
start_keyframe_animation(&two_led_colors);
|
||||
} else {
|
||||
state->target_lcd_color = change_lcd_color_intensity(
|
||||
led_emulation_colors[new_index], new_brightness);
|
||||
|
||||
stop_keyframe_animation(&two_led_colors);
|
||||
start_keyframe_animation(&one_led_color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
if (state->status.leds) {
|
||||
if (
|
||||
lcd_state != LCD_STATE_BITMAP_AND_LEDS ||
|
||||
state->status.leds != prev_status->leds ||
|
||||
state->status.layer != prev_status->layer ||
|
||||
state->status.default_layer != prev_status->default_layer
|
||||
) {
|
||||
// NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case
|
||||
stop_keyframe_animation(&lcd_bitmap_animation);
|
||||
|
||||
lcd_state = LCD_STATE_BITMAP_AND_LEDS;
|
||||
/**
|
||||
* For information:
|
||||
* The logic in this function makes sure that this doesn't happen, but if you call start on an
|
||||
* animation that is already playing it will be restarted.
|
||||
*/
|
||||
start_keyframe_animation(&lcd_bitmap_leds_animation);
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
lcd_state != LCD_STATE_LAYER_BITMAP ||
|
||||
state->status.layer != prev_status->layer ||
|
||||
state->status.default_layer != prev_status->default_layer
|
||||
) {
|
||||
stop_keyframe_animation(&lcd_bitmap_leds_animation);
|
||||
|
||||
lcd_state = LCD_STATE_LAYER_BITMAP;
|
||||
start_keyframe_animation(&lcd_bitmap_animation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) {
|
||||
/**
|
||||
* Check the status here to start and stop animations
|
||||
* You might have to save some state, like the current animation here so that you can start the right
|
||||
* This function is called every time the status changes
|
||||
*
|
||||
* NOTE that this is called from the visualizer thread, so don't access anything else outside the status
|
||||
* This is also important because the slave won't have access to the active layer for example outside the
|
||||
* status.
|
||||
*/
|
||||
|
||||
update_emulated_leds(state, prev_status);
|
||||
update_lcd_text(state, prev_status);
|
||||
}
|
||||
|
||||
void user_visualizer_suspend(visualizer_state_t* state) {
|
||||
state->layer_text = "Suspending...";
|
||||
uint8_t hue = LCD_HUE(state->current_lcd_color);
|
||||
uint8_t sat = LCD_SAT(state->current_lcd_color);
|
||||
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
|
||||
start_keyframe_animation(&default_suspend_animation);
|
||||
}
|
||||
|
||||
void user_visualizer_resume(visualizer_state_t* state) {
|
||||
state->current_lcd_color = initial_color;
|
||||
state->target_lcd_color = logo_background_color;
|
||||
lcd_state = LCD_STATE_INITIAL;
|
||||
start_keyframe_animation(&default_startup_animation);
|
||||
}
|
||||
|
||||
void ergodox_board_led_on(void){
|
||||
// No board led support
|
||||
}
|
||||
|
||||
void ergodox_right_led_1_on(void){
|
||||
user_data_keyboard.led_on |= (1u << 0);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_2_on(void){
|
||||
user_data_keyboard.led_on |= (1u << 1);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_3_on(void){
|
||||
user_data_keyboard.led_on |= (1u << 2);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_board_led_off(void){
|
||||
// No board led support
|
||||
}
|
||||
|
||||
void ergodox_right_led_1_off(void){
|
||||
user_data_keyboard.led_on &= ~(1u << 0);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_2_off(void){
|
||||
user_data_keyboard.led_on &= ~(1u << 1);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_3_off(void){
|
||||
user_data_keyboard.led_on &= ~(1u << 2);
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_1_set(uint8_t n) {
|
||||
user_data_keyboard.led1 = n;
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_2_set(uint8_t n) {
|
||||
user_data_keyboard.led2 = n;
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
||||
|
||||
void ergodox_right_led_3_set(uint8_t n) {
|
||||
user_data_keyboard.led3 = n;
|
||||
visualizer_set_user_data(&user_data_keyboard);
|
||||
}
|
275
keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c
Normal file
275
keyboards/ergodox_infinity/keymaps/nordic_ergo/keymap.c
Normal file
@@ -0,0 +1,275 @@
|
||||
// Nordic layout for Ergodox infinity
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "keymap_nordic.h"
|
||||
#include "keymap_german.h"
|
||||
|
||||
// Layer names
|
||||
#define BASE 0 // default layer
|
||||
#define FUNCL 1 // function layer
|
||||
#define SYMB 2 // symbol layer
|
||||
#define MDIA 3 // media keys
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
*
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | §½ | | PRSC | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Å |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Caps | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä |
|
||||
* |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Ctrl | ¨^ | <|> | Alt | LGui| | Ctrl | Alt | ´` | + | RGui |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | LEFT |RIGHT | | DOWN | UP |
|
||||
* ,------+------+------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Del |------| |------| Enter | Bkspc|
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
|
||||
[BASE] = LAYOUT_ergodox( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2),
|
||||
KC_LCTRL, KC_RBRC, KC_NONUS_BSLASH, KC_LALT, KC_LGUI,
|
||||
KC_LEFT, KC_RIGHT,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_DELT,KC_END,
|
||||
// right hand
|
||||
KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
MO(2), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_RCTRL, KC_RALT, KC_BSLS, KC_EQL, KC_RGUI,
|
||||
KC_DOWN, KC_UP,
|
||||
KC_PGUP,
|
||||
KC_PGDN, KC_ENT, KC_BSPC
|
||||
),
|
||||
|
||||
/* Keymap 1: Basic layer with functions
|
||||
*
|
||||
*
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Å |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Caps | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä |
|
||||
* |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | Ctrl | ¨^ | <|> | Alt | LGui| | Ctrl | Alt | ´` | + | RGui |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | LEFT |RIGHT | | DOWN | UP |
|
||||
* ,------+------+------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Del |------| |------| Enter | Bkspc|
|
||||
* | | | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
|
||||
[FUNCL] = LAYOUT_ergodox( // layer 1 : functions
|
||||
// left hand
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______,_______,_______,
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Keymap 2: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | . | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Animat| BLTOG| |Toggle|Solid |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Bright|Bright| BL+ | | |Hue- |Hue+ |
|
||||
* |ness- |ness+ |------| |------| | |
|
||||
* | | | BL- | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
KC_TRNS,DE_EXLM,DE_AT, DE_LCBR,DE_RCBR,DE_PIPE,KC_TRNS,
|
||||
KC_TRNS,DE_HASH,DE_DLR, DE_LPRN,DE_RPRN,DE_GRV,
|
||||
KC_TRNS,DE_PERC,DE_CIRC,DE_LBRC,DE_RBRC,DE_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
RGB_MOD,BL_TOGG,
|
||||
BL_INC,
|
||||
RGB_VAD,RGB_VAI,BL_DEC,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, KC_F12,
|
||||
KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, KC_TRNS,
|
||||
KC_TRNS, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, KC_TRNS,
|
||||
KC_TRNS,KC_DOT, KC_0, DE_EQL, KC_TRNS,
|
||||
RGB_TOG, RGB_SLD,
|
||||
KC_TRNS,
|
||||
KC_TRNS, RGB_HUD, RGB_HUI
|
||||
),
|
||||
|
||||
/* Keymap 3: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | RESET | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | Lclk | MsUp | Rclk | | | | | |VolDwn| Mute |VolUp | | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Btn4 |MsLeft|MsDown|MsRght| Btn5 |------| |------| | Prev | Stop | Play | Next | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |WhRght|WhDown| WhUp |WhLeft|WhClk | | | |BwSrch|BwBack|BwHome|BwRefr|BwFwd | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | |MsAcl0|MsAcl1|MsAcl2| | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Brwser|Brwser|
|
||||
* | Lclk | Rclk |------| |------|Back |Forwd |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MDIA] = LAYOUT_ergodox(
|
||||
RESET, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5,
|
||||
KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_BTN1, KC_BTN2, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11,
|
||||
KC_TRNS, KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_F12,
|
||||
KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,
|
||||
KC_TRNS, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_WBAK, KC_WFWD
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 2 (Symbols)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
};
|
9
keyboards/ergodox_infinity/keymaps/nordic_ergo/readme.md
Normal file
9
keyboards/ergodox_infinity/keymaps/nordic_ergo/readme.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Nordic Ergodox Infinity layout
|
||||
|
||||
QWERTY Nordic layout for ergodox infinity.
|
||||
|
||||
Features:
|
||||
|
||||
- Basic ISO Nordic qwerty layout.
|
||||
- Backlight control.
|
||||
- Still work in progress.
|
@@ -19,7 +19,7 @@ for the left and right halves seperately. To flash them:
|
||||
|
||||
- Press the program button (back of keyboard, above thumb pad).
|
||||
|
||||
- Install the firmware with `sudo make ergodox_infinity-keymapname-dfu-util MASTER=right`
|
||||
- Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util MASTER=right`
|
||||
|
||||
More information on the Infinity firmware is available in the [TMK/chibios for
|
||||
Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md)
|
||||
|
@@ -86,4 +86,4 @@ LED_DRIVER = is31fl3731c
|
||||
LED_WIDTH = 7
|
||||
LED_HEIGHT = 7
|
||||
|
||||
LAYOUTS = ergodox ergodox_80
|
||||
LAYOUTS = ergodox
|
||||
|
@@ -1,3 +1,6 @@
|
||||
|
||||
#define TAPPING_TERM 150 //reduce time required to register a held key
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
|
@@ -7,12 +7,14 @@
|
||||
|
||||
enum QFR_layers {
|
||||
_COLEMAK,
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_MOUSE
|
||||
};
|
||||
|
||||
enum QFR_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
LOWER,
|
||||
MOUSE
|
||||
};
|
||||
@@ -40,8 +42,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL,KC_LGUI, KC_LALT, SPC_LW, MSE, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
|
||||
),
|
||||
|
||||
[_QWERTY] = KEYMAP_TKL(\
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
||||
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
|
||||
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
||||
KC_LCTL,KC_LGUI,KC_LALT, SPC_LW, MSE, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_LOWER] = KEYMAP_TKL(\
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK,_______, \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_BSPC, _______,_______,_______, \
|
||||
KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, _______,_______,_______, \
|
||||
KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
@@ -58,3 +69,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, KC_ACL2, MSE, _______, _______, _______, _______,_______,_______ \
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
//print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
@@ -1,7 +1,15 @@
|
||||
# TKL keymap for frosty_flake
|
||||
|
||||
# TKL keymap for frosty\_flake
|
||||
```
|
||||
make frosty_flake:QFR_JM
|
||||
|
||||
dfu-programmer atmega32u2 erase
|
||||
dfu-programmer atmega32u2 flash frosty_flake_QFR_JM.hex
|
||||
dfu-programmer atmega32u2 start
|
||||
```
|
||||
|
||||
##Layers
|
||||
|
||||
```
|
||||
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
|
||||
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||
@@ -17,20 +25,21 @@
|
||||
|Ctrl|LGUI|LAlt| Space/Lower |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||
'-------------------------------------------------------------------------' '--------------'
|
||||
|
||||
```
|
||||
### Base Layer - Colemak
|
||||
* The base layout is Colemak.
|
||||
* I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does...
|
||||
The base layout is Colemak by default, but this can be changed to QWERTY via the *LOWER* layer.
|
||||
* I've implemented COLEMAK = SAFE\_RANGE when enumerating the custom\_keycodes, but I don't actually know what this does...
|
||||
|
||||
* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
|
||||
* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
|
||||
|
||||
#### Layer Shifting
|
||||
* The spacebar is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
|
||||
* The Right hand ALT key is a **TAP_TOGGLE** macro for the *MOUSE* layer (RAlt is accessible through LOWER, if you want...)
|
||||
#### Layer Shifting
|
||||
* The spacebar is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
|
||||
* The Right hand ALT key is a **TAP_TOGGLE** macro for the *MOUSE* layer (RAlt is accessible through LOWER, if you want...)
|
||||
|
||||
### LOWER
|
||||
|
||||
```
|
||||
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
|
||||
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |QWTY|CLMK|PsBk|
|
||||
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||
,-------------------------------------------------------------------------. ,--------------.
|
||||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | Bspc | | Ins|Home|PgUp|
|
||||
@@ -41,17 +50,19 @@
|
||||
|-------------------------------------------------------------------------| ,----.
|
||||
| LSPO | Z | X | C | V | | | | , | . | / | RSPC | | Up |
|
||||
|-------------------------------------------------------------------------| ,--------------.
|
||||
|Ctrl|LGUI|LAlt| |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||
|Ctrl|LGUI|LAlt| |RAlt|RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||
'-------------------------------------------------------------------------' '--------------'
|
||||
|
||||
* The *LOWER* layer contains a navigation cluster on the left hand. This layer is momentary when the spacebar or LOWER (RAlt) key is held and toggled on/off when the LOWER key is tapped.
|
||||
```
|
||||
The *LOWER* layer contains a navigation cluster on the left hand. This layer is momentary when the spacebar or LOWER (RAlt) key is held and toggled on/off when the LOWER key is tapped.
|
||||
|
||||
* The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
|
||||
* The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
|
||||
|
||||
* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
|
||||
* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC\_NO), all modifiers (edge |\_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (\_\_\_\_\_\_\_) to the Base layer.
|
||||
|
||||
* The base layer can be switched to QWERTY or COLEMAK by pressing the Pause Break or Scroll Lock keys respectively
|
||||
|
||||
### MOUSE
|
||||
|
||||
```
|
||||
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
|
||||
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||
@@ -66,8 +77,10 @@
|
||||
|-------------------------------------------------------------------------| ,--------------.
|
||||
|Ctrl|LGUI|LAlt| Accel ++ |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||
'-------------------------------------------------------------------------' '--------------'
|
||||
```
|
||||
The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||
|
||||
* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Downkeys.
|
||||
* The primary click (right & left) buttons are on the right home row (index & middle fingers)
|
||||
* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
|
||||
|
||||
* The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||
* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys.
|
||||
* The primary click (right & left) buttons are on the right home row (index & middle fingers)
|
||||
* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
|
||||
|
17
keyboards/gh60/info.json
Normal file
17
keyboards/gh60/info.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"keyboard_name": "GH60",
|
||||
"identifier": "FEED:6060:0001",
|
||||
"layout": {
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":14, "y":0, "label":"Backspace", "w":2}, {"x":0.5, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":14, "y":1, "label":"|", "w":1.5}, {"x":0.75, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":14, "y":2, "label":"Enter", "w":2.25}, {"x":1.25, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":14, "y":3, "label":"Shift", "w":2.75}, {"x":0.25, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.5, "y":4, "label":"Win", "w":1.25}, {"x":2.75, "y":4, "label":"Alt", "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "label":"Alt", "w":1.25}, {"x":11.5, "y":4, "label":"Win", "w":1.25}, {"x":12.75, "y":4, "label":"Menu", "w":1.25}, {"x":14, "y":4, "label":"Ctrl", "w":1.25}]
|
||||
}
|
||||
},
|
||||
"maintainer": "qmk",
|
||||
"keyboard_folder": "gh60",
|
||||
"width": 15,
|
||||
"bootloader": "atmel-dfu",
|
||||
"processor": "atmega32u4",
|
||||
"height": 5,
|
||||
"url": "http://qmk.fm/keyboards/gh60",
|
||||
"manufacturer": "geekhack"
|
||||
}
|
@@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define TAPPING_TOGGLE 1
|
||||
|
||||
//define maximum duration of hold required to register a tap vs hold default is 200
|
||||
#define TAPPING_TERM 150 //reduce time required so fast typing doesn't disrupt
|
||||
#define TAPPING_TERM 150 //reduce time required to register a held key
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
@@ -14,6 +14,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define TAPPING_TERM 150 //reduce time required to register a held key
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
|
@@ -72,14 +72,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | LSPO| Z | X | C | V | B | K | M | , | . | / | RSPC |
|
||||
* |-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl| LGUI | LAlt | Lower| SpaceLW | RSEnter | Fn | Mouse| Menu | Ctrl |
|
||||
* | Ctrl| LGUI | Lower| LAlt | SpaceLW | RSEnter | Fn | Mouse| Menu | Ctrl |
|
||||
* `----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = TERMINUS_MINI(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LWR, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \
|
||||
KC_LCTL, KC_LGUI, LWR, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LSPO | Z | X | C | V | = | 1 | 2 | 3 | Enter| | RSPC |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Alt | Lower| Space/Lower | 0 | . | Fn | Menu | Ctrl |
|
||||
* | Ctrl | LGUI | Lower| LAlt | Space/Lower | 0 | . | Fn | Menu | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
Want to add tap-dance function to 0 key: Tap=0, doubleTap=Ent
|
||||
*/
|
||||
@@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LSPO | | | { | [ | ` | \ | ] | } | . | ? | RSPC |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Alt | | Space/Lower | Raise/Enter | Fn | Mouse| Menu | Ctrl |
|
||||
* | Ctrl | LGUI | | LAlt | Space/Lower | Raise/Enter | Fn | Mouse| Menu | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
@@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||
_______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \
|
||||
_______, _______, _______, _______, SPC_LW, ENT_RS, FNC, MSE, _______, _______ \
|
||||
_______, _______, XXXXXXX, _______, SPC_LW, ENT_RS, FNC, MSE, _______, _______ \
|
||||
),
|
||||
|
||||
/*Function
|
||||
@@ -129,7 +129,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LSOB | | | | | | | F9 | F10 | F11 | F12 |ScrLk |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Alt | | Space/Lower | Enter/Raise | Fn | | |PsBrk |
|
||||
* | Ctrl | LGUI | | Alt | Space/Lower | Enter/Raise | Fn | | |PsBrk |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
@@ -6,117 +6,114 @@ This keymap is modified from the Planck default layout. Credit for the layout na
|
||||
|
||||
The terminus_mini is a handwired 4x12 ortholinear keyboard with two 2U thumb bar keys. The microcontroller is a Teensy 2.0
|
||||
|
||||
The TERMINUS_MINI layout (../../../terminus_mini/terminus_mini.h) is handwired and the 2U keys are handled using KC_NO to detail that two columns do not have a 4th column.
|
||||
|
||||
> .----------------------------------------. .-----------------------------------------. \
|
||||
> | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Del | \
|
||||
> |-----+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | BS | A | R | S | T | D | | H | N | E | I | O | ' | \
|
||||
> |-----+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | LSPO| Z | X | C | V | B | | K | M | , | \. | / | RSPC | \
|
||||
> |-----+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | Ctrl| LGUI | LAlt | Lower| Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | \
|
||||
> '----------------------------------------' '-----------------------------------------' \
|
||||
\
|
||||
> [_COLEMAK] = KEYMAP( \
|
||||
> KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \
|
||||
> KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
> KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \
|
||||
> KC_LCTL, KC_LGUI, KC_LALT, LWR, SPC_LW, SPC_LW, ENT_RS, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \
|
||||
> ),
|
||||
|
||||
##Layers
|
||||
The TERMINUS_MINI layout (../../../terminus\_mini/terminus\_mini.h) is handwired and the 2U keys are handled using KC\_NO to detail that two columns do not have a 4th column.
|
||||
```
|
||||
.----------------------------------------. .-----------------------------------------.
|
||||
| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Del |
|
||||
|-----+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| BS | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||
|-----+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| LSPO| Z | X | C | V | B | | K | M | , | \. | / | RSPC |
|
||||
|-----+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl| LGUI | LAlt | Lower| Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl |
|
||||
'----------------------------------------' '-----------------------------------------'
|
||||
```
|
||||
|
||||
|
||||
### Base Layer - Colemak
|
||||
* The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location.
|
||||
* QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
|
||||
* I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does...
|
||||
The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location.
|
||||
|
||||
* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
|
||||
* I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
|
||||
* QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
|
||||
* I've implemented COLEMAK = SAFE\_RANGE when enumerating the custom\_keycodes, but I don't actually know what this does...
|
||||
* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
|
||||
* I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
|
||||
|
||||
|
||||
#### Layer Shifting
|
||||
* The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer
|
||||
* The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
|
||||
* The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
|
||||
* The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
|
||||
* The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
|
||||
#### Layer Shifting
|
||||
* The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer
|
||||
* The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
|
||||
* The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
|
||||
* The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
|
||||
* The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
|
||||
|
||||
### LOWER - Numpad & Navigation keys
|
||||
|
||||
,-----------------------------------------. .-----------------------------------------. \
|
||||
| Tab | PgUp | Home | Up | End | | | 7 | 8 | 9 | \+ | | Del | \
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
| BS | PgDn | Left | Down |Right | | | 4 | 5 | 6 | Enter| | ' | \
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
| LSPO | Z | X | C | V | | | 1 | 2 | 3 | Enter| | RSPC | \
|
||||
|------+------+------+------+-------------| |-------------+------+------+------+------| \
|
||||
| Ctrl | LGUI | Alt | LOWER| Space/Lower | | 0 | \. | Fn | Menu | Ctrl | \
|
||||
'-----------------------------------------' '-----------------------------------------' \
|
||||
|
||||
* The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
|
||||
```
|
||||
,-----------------------------------------. .-----------------------------------------.
|
||||
| Tab | PgUp | Home | Up | End | | | 7 | 8 | 9 | \+ | | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| BS | PgDn | Left | Down |Right | | | 4 | 5 | 6 | Enter| | ' |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| LSPO | Z | X | C | V | | | 1 | 2 | 3 | Enter| | RSPC |
|
||||
|------+------+------+------+-------------| |-------------+------+------+------+------|
|
||||
| Ctrl | LGUI | Alt | LOWER| Space/Lower | | 0 | \. | Fn | Menu | Ctrl |
|
||||
'-----------------------------------------' '-----------------------------------------'
|
||||
```
|
||||
The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
|
||||
|
||||
* The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
|
||||
* The Navigation cluster is offset to the right compared to the traditional WASD nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
|
||||
|
||||
* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC\_NO), all modifiers (edge |\_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (\_\_\_\_\_\_\_) to the Base layer.
|
||||
|
||||
* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
|
||||
[] TO DO!! - It would be nice to have a **TAP\_DANCE\_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT
|
||||
|
||||
- [] TO DO!! - It would be nice to have a **TAP_DANCE_DOUBLE** implementation whereby a double tap of the right 2U key sends KC_PENT
|
||||
* Couldn't get this to work in Rev1, produced an error in the Make process.
|
||||
* When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB.
|
||||
* Couldn't get this to work in Rev1, produced an error in the Make process.
|
||||
* When this is done, I can remove the clunky double Enter on the 4th column of the right hand PCB.
|
||||
|
||||
### RAISE - Symbol Layer
|
||||
```
|
||||
,-----------------------------------. .-----------------------------------.
|
||||
| Tab | | | | | | | | | | | | \ |
|
||||
|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----|
|
||||
| BS | ! | @ | # | $ | % | | ^ | & | * | - | + | ' |
|
||||
|-----+-----+-----+-----+-----------| |-----+-----+-----+-----+-----+-----|
|
||||
| LSPO| | | { | [ | ` | | | | ] | } | . | ? |RSPC |
|
||||
|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----|
|
||||
| Ctrl|LGUI | |Lower|Space/Lower| |Enter/Raise| Fn |Mouse| Menu| Ctrl|
|
||||
'-----------------------------------' '-----------------------------------'
|
||||
```
|
||||
The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
|
||||
|
||||
> ,-----------------------------------------. .-----------------------------------------. \
|
||||
> | Esc | | | | | | | | | | | | Del | \
|
||||
> |------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | BS | \! | @ | \# | $ | % | | ^ | & | \* | \- | \+ | ' | \
|
||||
> |------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | LSBO | | | \{ | \[ | \` | | | | \] | \} | \. | ? | RSBC | \
|
||||
> |------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl | \
|
||||
> '-----------------------------------------' '-----------------------------------------' \
|
||||
|
||||
* The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
|
||||
* Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
|
||||
* Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
|
||||
* At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see.
|
||||
* The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, *RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
|
||||
* The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with **XXXXXXX**.
|
||||
* Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
|
||||
* Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
|
||||
* At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see.
|
||||
* The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, * RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
|
||||
* The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with XXXXXXX.
|
||||
|
||||
### FUNCTION - Function & Media keys
|
||||
```
|
||||
,-----------------------------------------. .-----------------------------------------.
|
||||
| Esc | Mute | Vol- | Vol+ | | RESET| | POWER| | | | | Ins |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Caps | Stop | |<< | >/|| | >>| | | | | | | | |PrtSc |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| LSOB | | | | | | | | | | | |ScrLk |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| |PsBrk |
|
||||
'-----------------------------------------' '-----------------------------------------'
|
||||
```
|
||||
The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
|
||||
|
||||
> ,-----------------------------------------. .-----------------------------------------. \
|
||||
> | Esc | Mute | Vol- | Vol+ | | RESET| | POWER| | | | | Ins | \
|
||||
> |------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | Caps | Stop | |<< | >/|| | >>| | | | | | | | |PrtSc | \
|
||||
> |------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | LSOB | | | | | | | | | | | |ScrLk | \
|
||||
> |------+------+------+------+------+------| |------+------+------+------+------+------| \
|
||||
> | Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| |PsBrk | \
|
||||
> '-----------------------------------------' '-----------------------------------------' \
|
||||
|
||||
* The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
|
||||
* The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions.
|
||||
* Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
|
||||
* Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column.
|
||||
I don't really use these keys so their position is not optimised.
|
||||
* Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
|
||||
* The RESET key will reset the Teensy for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
|
||||
* The media cluster is based on the nav cluster in the *LOWER* layer, with RW, PP & FF in the Left, Down & Right positions.
|
||||
* Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
|
||||
* Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column. I don't really use these keys so their position is not optimised.
|
||||
* Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
|
||||
* The RESET key will reset the Teensy for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
|
||||
|
||||
### MOUSE - Mouse keys: The functionality of this layer is not as optimal as using a true mouse, generally slower but will work in a pinch.
|
||||
> ,----------------------------------------. .----------------------------------------.
|
||||
> | Tab | WhlU | WhlL | MsUp | WhlR | | | | M3 | M4 | M5 | | | \
|
||||
> |------+------+------+------+------+-----| |-----+------+------+------+------+------| \
|
||||
> | | WhlD | MsL | MsDn | MsR | | | |LClick|RClick| | | | \
|
||||
> |------+------+------+------+------+-----| |-----+------+------+------+------+------| \
|
||||
> | LSPO | | | | | | | | | | | | RSCB | \
|
||||
> |------+------+------+------+------+-----| |-----+------+------+------+------+------| \
|
||||
> | Ctrl | | | |Sensitivity | | Sensitivity| |MOUSE | | Ctrl | \
|
||||
> '----------------------------------------' '----------------------------------------' \
|
||||
```
|
||||
,----------------------------------------. .----------------------------------------.
|
||||
| Tab | WhlU | WhlL | MsUp | WhlR | | | | M3 | M4 | M5 | | |
|
||||
|------+------+------+------+------+-----| |-----+------+------+------+------+------|
|
||||
| | WhlD | MsL | MsDn | MsR | | | |LClick|RClick| | | |
|
||||
|------+------+------+------+------+-----| |-----+------+------+------+------+------|
|
||||
| LSPO | | | | | | | | | | | | RSCB |
|
||||
|------+------+------+------+------+-----| |-----+------+------+------+------+------|
|
||||
| Ctrl | | | |Sensitivity | | Sensitivity| |MOUSE | | Ctrl |
|
||||
'----------------------------------------' '----------------------------------------'
|
||||
```
|
||||
The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||
|
||||
* The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||
* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are nalagous to the Page Up & Down keys.
|
||||
*) The primary click (right & left) buttons are on the right home row (index & middle fingers)
|
||||
* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
|
||||
* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are nalagous to the Page Up & Down
|
||||
keys.
|
||||
*) The primary click (right & left) buttons are on the right home row (index & middle fingers)
|
||||
* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
|
||||
|
@@ -53,6 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define CATERINA_BOOTLOADER
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
@@ -23,18 +23,18 @@
|
||||
#define TAPPING_TERM 200
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
||||
#define CATERINA_BOOTLOADER
|
||||
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLED_NUM 7 // Number of LEDs
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user