Compare commits
96 Commits
Author | SHA1 | Date | |
---|---|---|---|
a89183591c | |||
d0ca713eb4 | |||
abba393f57 | |||
87021371e6 | |||
da887ea412 | |||
2a02df84b6 | |||
25aa474246 | |||
c7ebb0f950 | |||
a8a02455f5 | |||
6cfb85f32f | |||
0b7df9f2ef | |||
d281cd5c40 | |||
69ab37fca1 | |||
024f0455de | |||
6198fed566 | |||
3e1f388bda | |||
7bcf3e2781 | |||
5ad5c230d6 | |||
dc7d0c7b74 | |||
afcf3a2878 | |||
ee9a20ff37 | |||
5eb5b6074c | |||
19f48fa922 | |||
c02de0932a | |||
17c84f24cd | |||
a07d1f22aa | |||
23ce0b43b6 | |||
4549dcd21f | |||
7da585917b | |||
cf001300b3 | |||
63028dde82 | |||
7ad924bae5 | |||
a4ff8b91f7 | |||
63cde006c5 | |||
d331e274b3 | |||
349e0012ba | |||
68b6de60e0 | |||
f10e9586df | |||
4cdcbdb861 | |||
cf8e10533b | |||
927ef81363 | |||
6fc43ddaf6 | |||
0759adeaf1 | |||
43a1ea3035 | |||
af14e672c9 | |||
2b3803eb5e | |||
4580d3a730 | |||
0ce45eb0b7 | |||
85c3c5926c | |||
323fa19e2d | |||
de0e025472 | |||
b032867236 | |||
c8e232907f | |||
994592f985 | |||
4d5b7dea14 | |||
4d5eeb3d7d | |||
4edfa97e03 | |||
5f154f0a00 | |||
94f8b758b3 | |||
f0db2c0512 | |||
8ea690a1b3 | |||
b07b4bb97b | |||
5b897ce223 | |||
da33dfec55 | |||
a4316ba486 | |||
da83f04a30 | |||
9987f9dcff | |||
ad73553aa9 | |||
00d8f0c082 | |||
a729d852fe | |||
da7aece043 | |||
ed56a6859f | |||
ba2ad57ca8 | |||
677b89768b | |||
7960302242 | |||
de315c54eb | |||
a6fe0320f5 | |||
78ab926cc8 | |||
b28982e329 | |||
0965e5203e | |||
8e1c3f410d | |||
2aedbf872b | |||
afd7bf5f09 | |||
402235eeb4 | |||
b2d033ffe8 | |||
ae91af95e2 | |||
4b0c6dc50d | |||
9a23fad36b | |||
4a9e16b394 | |||
d5486265b8 | |||
738b072bb0 | |||
60153e7bbc | |||
945f2f5916 | |||
d4cd5dda5c | |||
964d7060e1 | |||
6037cede2c |
5
.gitignore
vendored
5
.gitignore
vendored
@ -24,6 +24,9 @@ CMakeLists.txt
|
||||
.DS_STORE
|
||||
/util/wsl_downloaded
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
/keyboards/*/*/Makefile
|
||||
/keyboards/*/keymaps/Makefile
|
||||
|
||||
# Eclipse/PyCharm/Other IDE Settings
|
||||
.cproject
|
||||
@ -48,4 +51,4 @@ util/Win_Check_Output.txt
|
||||
|
||||
# things travis sees
|
||||
secrets.tar
|
||||
id_rsa_*
|
||||
id_rsa_*
|
||||
|
21
Makefile
21
Makefile
@ -89,7 +89,7 @@ ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
||||
endif
|
||||
|
||||
# Only consider folders with makefiles, to prevent errors in case there are extra folders
|
||||
KEYBOARDS := $(notdir $(patsubst %/Makefile,%,$(wildcard $(ROOT_DIR)/keyboards/*/Makefile)))
|
||||
KEYBOARDS := $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk)))
|
||||
|
||||
#Compatibility with the old make variables, anything you specify directly on the command line
|
||||
# always overrides the detected folders
|
||||
@ -261,7 +261,7 @@ endef
|
||||
define PARSE_KEYBOARD
|
||||
CURRENT_KB := $1
|
||||
# A subproject is any keyboard subfolder with a makefile
|
||||
SUBPROJECTS := $$(notdir $$(patsubst %/Makefile,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/*/Makefile)))
|
||||
SUBPROJECTS := $$(notdir $$(patsubst %/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/*/rules.mk)))
|
||||
# if the rule starts with allsp, then continue with looping over all subprojects
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allsp),true)
|
||||
$$(eval $$(call PARSE_ALL_SUBPROJECTS))
|
||||
@ -300,7 +300,9 @@ define PARSE_SUBPROJECT
|
||||
endif
|
||||
ifeq ($$(CURRENT_SP),defaultsp)
|
||||
SUBPROJECT_DEFAULT=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/Makefile)
|
||||
ifneq ("$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/subproject.mk)","")
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/subproject.mk)
|
||||
endif
|
||||
CURRENT_SP := $$(SUBPROJECT_DEFAULT)
|
||||
endif
|
||||
# If current subproject is empty (the default was not defined), and we have a list of subproject
|
||||
@ -503,7 +505,7 @@ if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
|
||||
endef
|
||||
|
||||
# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
|
||||
SUBPROJECTS := $(notdir $(patsubst %/Makefile,%,$(wildcard ./*/Makefile)))
|
||||
SUBPROJECTS := $(notdir $(patsubst %/rules.mk,%,$(wildcard ./*/rules.mk)))
|
||||
.PHONY: $(SUBPROJECTS)
|
||||
$(SUBPROJECTS): %: %-allkm
|
||||
|
||||
@ -514,6 +516,9 @@ $(SUBPROJECTS): %: %-allkm
|
||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||
# Check if the submodules are dirty, and display a warning if they are
|
||||
ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi
|
||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi
|
||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi
|
||||
git submodule status --recursive 2>/dev/null | \
|
||||
while IFS= read -r x; do \
|
||||
case "$$x" in \
|
||||
@ -551,6 +556,14 @@ test: test-all
|
||||
.PHONY: test-clean
|
||||
test-clean: test-all-clean
|
||||
|
||||
lib/%:
|
||||
git submodule sync $?
|
||||
git submodule update --init $?
|
||||
|
||||
git-submodule:
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
ifdef SKIP_VERSION
|
||||
SKIP_GIT := yes
|
||||
endif
|
||||
|
@ -91,11 +91,11 @@ MAIN_KEYMAP_C := $(MAIN_KEYMAP_PATH)/keymap.c
|
||||
SUBPROJ_KEYMAP_PATH := $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
|
||||
SUBPROJ_KEYMAP_C := $(SUBPROJ_KEYMAP_PATH)/keymap.c
|
||||
ifneq ("$(wildcard $(SUBPROJ_KEYMAP_C))","")
|
||||
-include $(SUBPROJ_KEYMAP_PATH)/Makefile
|
||||
-include $(SUBPROJ_KEYMAP_PATH)/rules.mk
|
||||
KEYMAP_C := $(SUBPROJ_KEYMAP_C)
|
||||
KEYMAP_PATH := $(SUBPROJ_KEYMAP_PATH)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_C))","")
|
||||
-include $(MAIN_KEYMAP_PATH)/Makefile
|
||||
-include $(MAIN_KEYMAP_PATH)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_C)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH)
|
||||
else ifneq ($(LAYOUTS),)
|
||||
@ -181,4 +181,3 @@ build: elf hex
|
||||
|
||||
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
||||
|
@ -93,10 +93,14 @@ endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += ws2812.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
else
|
||||
SRC += ws2812.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
@ -115,6 +119,11 @@ ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||
OPT_DEFS += $(SERIAL_DEFS)
|
||||
@ -153,6 +162,11 @@ ifeq ($(strip $(LED_TABLES)), yes)
|
||||
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TERMINAL_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
|
||||
OPT_DEFS += -DTERMINAL_ENABLE
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
|
@ -28,6 +28,7 @@
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
* [Stenography](stenography.md)
|
||||
* [Unicode](unicode.md)
|
||||
* [Terminal](feature_terminal.md)
|
||||
|
||||
* Reference
|
||||
* [Glossary](glossary.md)
|
||||
|
160
docs/feature_auto_shift.md
Normal file
160
docs/feature_auto_shift.md
Normal file
@ -0,0 +1,160 @@
|
||||
# Auto Shift: Why do we need a shift key?
|
||||
|
||||
Tap a key and you get its character. Tap a key, but hold it *slightly* longer
|
||||
and you get its shifted state. Viola! No shift key needed!
|
||||
|
||||
## Why Auto Shift?
|
||||
|
||||
Many people suffer from various forms of RSI. A common cause is stretching your
|
||||
fingers repetitively long distances. For us on the keyboard, the pinky does that
|
||||
all too often when reaching for the shift key. Auto Shift looks to alleviate that
|
||||
problem.
|
||||
|
||||
## How does it work?
|
||||
|
||||
When you tap a key, it stays depressed for a short period of time before it is
|
||||
then released. This depressed time is a different length for everyone. Auto Shift
|
||||
defines a constant `AUTO_SHIFT_TIMEOUT` which is typically set to twice your
|
||||
normal pressed state time. When you press a key, a timer starts and then stops
|
||||
when you release the key. If the time depressed is greater than or equal to the
|
||||
`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
|
||||
is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
|
||||
|
||||
## Are there limitations to Auto Shift?
|
||||
|
||||
Yes, unfortunately.
|
||||
|
||||
1. Key repeat will cease to work. For example, before if you wanted 20 'a'
|
||||
characters, you could press and hold the 'a' key for a second or two. This no
|
||||
longer works with Auto Shift because it is timing your depressed time instead
|
||||
of emitting a depressed key state to your operating system.
|
||||
2. Auto Shift is disabled for any key press that is accompanied by one or more
|
||||
modifiers. Thus, Ctrl+A that you hold for a really long time is not the same
|
||||
as Ctrl+Shift+A.
|
||||
3. You will have characters that are shifted when you did not intend on shifting, and
|
||||
other characters you wanted shifted, but were not. This simply comes down to
|
||||
practice. As we get in a hurry, we think we have hit the key long enough
|
||||
for a shifted version, but we did not. On the other hand, we may think we are
|
||||
tapping the keys, but really we have held it for a little longer than
|
||||
anticipated.
|
||||
|
||||
## How do I enable Auto Shift?
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = YES
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
Then compile and install your new firmware with Auto Key enabled! That's it!
|
||||
|
||||
## Configuring Auto Shift
|
||||
|
||||
If desired, there is some configuration that can be done to change the
|
||||
behavior of Auto Shift. This is done by setting various variables the
|
||||
`config.h` file located in your keymap folder. If no `config.h` file exists, you can create one.
|
||||
|
||||
A sample is
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
#define NO_AUTO_SHIFT_SPECIAL
|
||||
|
||||
#endif
|
||||
|
||||
### AUTO_SHIFT_TIMEOUT (value in ms)
|
||||
|
||||
This controls how long you have to hold a key before you get the shifted state.
|
||||
Obviously, this is different for everyone. For the common person, a setting of
|
||||
135 to 150 works great. However, one should start with a value of at least 175, which
|
||||
is the default value. Then work down from there. The idea is to have the shortest time required to get the shifted state without having false positives.
|
||||
|
||||
Play with this value until things are perfect. Many find that all will work well
|
||||
at a given value, but one or two keys will still emit the shifted state on
|
||||
occassion. This is simply due to habit and holding some keys a little longer
|
||||
than others. Once you find this value, work on tapping your problem keys a little
|
||||
quicker than normal and you will be set.
|
||||
|
||||
{% hint style='info' %}
|
||||
Auto Shift has three special keys that can help you get this value right very
|
||||
quick. See "Auto Shift Setup" for more details!
|
||||
{% endhint %}
|
||||
|
||||
### NO_AUTO_SHIFT_SPECIAL (simple define)
|
||||
|
||||
Do not Auto Shift special keys, which include -_, =+, [{, ]}, ;:, '", ,<, .>,
|
||||
and /?
|
||||
|
||||
### NO_AUTO_SHIFT_NUMERIC (simple define)
|
||||
|
||||
Do not Auto Shift numeric keys, zero through nine.
|
||||
|
||||
### NO_AUTO_SHIFT_ALPHA (simple define)
|
||||
|
||||
Do not Auto Shift alpha characters, which include A through Z.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
This will enable you to define three keys temporailiy to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
||||
|
||||
### Setup
|
||||
|
||||
Map three keys temporarily in your keymap:
|
||||
|
||||
| Key Name | Description |
|
||||
|----------|-----------------------------------------------------|
|
||||
| KC_ASDN | Lower the Auto Shift timeout variable (down) |
|
||||
| KC_ASUP | Raise the Auto Shift timeout variable (up) |
|
||||
| KC_ASRP | Report your current Auto Shift timeout value |
|
||||
|
||||
Compile and upload your new firmware.
|
||||
|
||||
### Use
|
||||
|
||||
It is important to note that during these tests, you should be typing
|
||||
completely normal and with no intention of shifted keys.
|
||||
|
||||
1. Type multiple sentences of alphabetical letters.
|
||||
2. Observe any upper case letters.
|
||||
3. If there are none, press the key you have mapped to `KC_ASDN` to decrease
|
||||
time Auto Shift timeout value and go back to step 1.
|
||||
4. If there are some upper case letters, decide if you need to work on tapping
|
||||
those keys with less down time, or if you need to increase the timeout.
|
||||
5. If you decide to increase the timeout, press the key you have mapped to
|
||||
`KC_ASUP` and go back to step 1.
|
||||
6. Once you are happy with your results, press the key you have mapped to
|
||||
`KC_ASRP`. The keyboard will type by itself the value of your
|
||||
`AUTO_SHIFT_TIMEOUT`.
|
||||
7. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported.
|
||||
8. Remove `AUTO_SHIFT_SETUP` from your `config.h`.
|
||||
9. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`.
|
||||
10. Compile and upload your new firmware.
|
||||
|
||||
#### An example run
|
||||
|
||||
'''
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
|
||||
[PRESS KC_ASDN quite a few times]
|
||||
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
|
||||
[PRESS KC_ASUP a few times]
|
||||
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
|
||||
[PRESS KC_ASRP]
|
||||
|
||||
115
|
||||
'''
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
||||
in the testing and you'll be golden.
|
@ -92,7 +92,7 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u
|
||||
| KC_RCBR | } |
|
||||
| KC_LABK | < |
|
||||
| KC_RABK | > |
|
||||
| KC_PIPE | | |
|
||||
| KC_PIPE | | |
|
||||
| KC_COLN | : |
|
||||
|
||||
## Mod Tap
|
||||
|
@ -1,8 +1,107 @@
|
||||
# RGB Lighting
|
||||
|
||||
<!-- FIXME: Describe how to use RGB Lighting here. -->
|
||||
If you've installed addressable RGB lights on your keyboard you can control them with QMK. Currently we support the following addressable LEDs on Atmel AVR processors:
|
||||
|
||||
## RGB Under Glow Mod
|
||||
* WS2811 and variants (WS2812, WS2812B, WS2812C, etc)
|
||||
* SK6812RGBW
|
||||
|
||||
Some keyboards come with RGB LEDs pre-installed. Others have to have LEDs installed after the fact. See below for information on modifying your keyboard.
|
||||
|
||||
## Selecting Colors
|
||||
|
||||
QMK uses Hue, Saturation, and Value to set color rather than using RGB. You can use the color wheel below to see how this works. Changing the Hue will cycle around the circle. Saturation will affect the intensity of the color, which you can see as you move from the inner part to the outer part of the wheel. Value sets the overall brightness.
|
||||
|
||||
![gitbook/images/color-wheel.svg]
|
||||
|
||||
If you would like to learn more about HSV you can start with the [wikipedia article](https://en.wikipedia.org/wiki/HSL_and_HSV).
|
||||
|
||||
## Configuration
|
||||
|
||||
Before RGB Lighting can be used you have to enable it in `rules.mk`:
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
You can configure the behavior of the RGB lighting by defining values inside `config.h`.
|
||||
|
||||
### Required Configuration
|
||||
|
||||
At minimum you have to define the pin your LED strip is connected to and the number of LEDs connected.
|
||||
|
||||
```c
|
||||
#define RGB_DI_PIN D7 // The pin the LED strip is connected to
|
||||
#define RGBLED_NUM 14 // Number of LEDs in your strip
|
||||
```
|
||||
|
||||
### Optional Configuration
|
||||
|
||||
You can change the behavior of the RGB Lighting by setting these configuration values. Use `#define <Option> <Value>` in a `config.h` at the keyboard, revision, or keymap level.
|
||||
|
||||
| Option | Default Value | Description |
|
||||
|--------|---------------|-------------|
|
||||
| `RGBLIGHT_HUE_STEP` | 10 | How many hues you want to have available. |
|
||||
| `RGBLIGHT_SAT_STEP` | 17 | How many steps of saturation you'd like. |
|
||||
| `RGBLIGHT_VAL_STEP` | 17 | The number of levels of brightness you want. |
|
||||
|
||||
### Animations
|
||||
|
||||
If you have `#define RGBLIGHT_ANIMATIONS` in your `config.h` you will have a number of animation modes you can cycle through using the `RGB_MOD` key. You can also `#define` other options to tweak certain animations.
|
||||
|
||||
| Option | Default Value | Description |
|
||||
|--------|---------------|-------------|
|
||||
| `RGBLIGHT_ANIMATIONS` | | `#define` this to enable animation modes. |
|
||||
| `RGBLIGHT_EFFECT_SNAKE_LENGTH` | 4 | The number of LEDs to light up for the "snake" mode. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_LENGTH` | 3 | The number of LEDs to light up for the "knight" mode. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_OFFSET` | 0 | Start the knight animation this many LEDs from the start of the strip. |
|
||||
| `RGBLIGHT_EFFECT_KNIGHT_LED_NUM` | RGBLED_NUM | The number of LEDs to have the "knight" animation travel. |
|
||||
| `RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL` | 1000 | How long to wait between light changes for the "christmas" animation. Specified in ms. |
|
||||
| `RGBLIGHT_EFFECT_CHRISTMAS_STEP` | 2 | How many LED's to group the red/green colors by for the christmas mode. |
|
||||
|
||||
You can also tweak the behavior of the animations by defining these consts in your `keymap.c`. These mostly affect the speed different modes animate at.
|
||||
|
||||
```c
|
||||
// How long (in ms) to wait between animation steps for the breathing mode
|
||||
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the rainbow mode
|
||||
const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the swirl mode
|
||||
const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the snake mode
|
||||
const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||
|
||||
// How long (in ms) to wait between animation steps for the knight modes
|
||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
||||
|
||||
// These control which colors are selected for the gradient mode
|
||||
const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
|
||||
```
|
||||
|
||||
## RGB Lighting Keycodes
|
||||
|
||||
These control the RGB Lighting functionality.
|
||||
|
||||
| Long Name | Short Name | Description |
|
||||
|-----------|------------|-------------|
|
||||
||`RGB_TOG`|toggle on/off|
|
||||
||`RGB_MOD`|cycle through modes|
|
||||
||`RGB_HUI`|hue increase|
|
||||
||`RGB_HUD`|hue decrease|
|
||||
||`RGB_SAI`|saturation increase|
|
||||
||`RGB_SAD`|saturation decrease|
|
||||
||`RGB_VAI`|value (brightness) increase|
|
||||
||`RGB_VAD`|value (brightness) decrease|
|
||||
|`RGB_MODE_PLAIN`|`RGB_M_P `| Switch to the static no animation mode |
|
||||
|`RGB_MODE_BREATHE`|`RGB_M_B`| Switch to the breathing mode |
|
||||
|`RGB_MODE_RAINBOW`|`RGB_M_R`| Switch to the rainbow mode ||
|
||||
|`RGB_MODE_SWIRL`|`RGB_M_SW`| Switch to the swirl mode |
|
||||
|`RGB_MODE_SNAKE`|`RGB_M_SN`| Switch to the snake mode |
|
||||
|`RGB_MODE_KNIGHT`|`RGB_M_K`| Switch to the knight animation |
|
||||
|`RGB_MODE_XMAS`|`RGB_M_X`| Switch to the Christmas animation |
|
||||
|`RGB_MODE_GRADIENT`|`RGB_M_G`| Switch to the static gradient mode |
|
||||
|
||||
## Hardware Modification
|
||||
|
||||

|
||||
|
||||
@ -17,33 +116,6 @@ In order to use the underglow animation functions, you need to have `#define RGB
|
||||
Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default:
|
||||
|
||||
#define RGB_DI_PIN F4 // The pin your RGB strip is wired to
|
||||
#define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio)
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to.
|
||||
|
||||
The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c`
|
||||
|
||||
### WS2812 Wiring
|
||||
|
||||

|
||||
|
||||
Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20.
|
||||
|
||||
## RGB Lighting Keycodes
|
||||
|
||||
This controls the RGB Lighting functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting.
|
||||
|
||||
|Name|Description|
|
||||
|----|-----------|
|
||||
|`RGB_TOG`|toggle on/off|
|
||||
|`RGB_MOD`|cycle through modes|
|
||||
|`RGB_HUI`|hue increase|
|
||||
|`RGB_HUD`|hue decrease|
|
||||
|`RGB_SAI`|saturation increase|
|
||||
|`RGB_SAD`|saturation decrease|
|
||||
|`RGB_VAI`|value increase|
|
||||
|`RGB_VAD`|value decrease|
|
||||
|
80
docs/feature_terminal.md
Normal file
80
docs/feature_terminal.md
Normal file
@ -0,0 +1,80 @@
|
||||
# Terminal
|
||||
|
||||
> This feature is currently *huge* at 4400 bytes, and should probably only be put on boards with a lot of memory, or for fun.
|
||||
|
||||
The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor.
|
||||
|
||||
To enable, stick this in your `rules.mk` or `Makefile`:
|
||||
|
||||
TERMINAL_ENABLE = yes
|
||||
|
||||
And use the `TERM_ON` and `TERM_OFF` keycodes to turn it on or off.
|
||||
|
||||
When enabled, a `> ` prompt will appear, where you'll be able to type, backspace (a bell will ding if you reach the beginning and audio is enabled), and hit enter to send the command. Arrow keys are currently disabled so it doesn't get confused. Moving your cursor around with the mouse is discouraged.
|
||||
|
||||
`#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page.
|
||||
|
||||
## Future ideas
|
||||
|
||||
* Keyboard/user-extendable commands
|
||||
* Smaller footprint
|
||||
* Arrow key support
|
||||
* Command history
|
||||
* SD card support
|
||||
* LCD support for buffer display
|
||||
* Keycode -> name string LUT
|
||||
* Layer status
|
||||
* *Analog/digital port read/write*
|
||||
* RGB mode stuff
|
||||
* Macro definitions
|
||||
* EEPROM read/write
|
||||
* Audio control
|
||||
|
||||
## Current commands
|
||||
|
||||
### `about`
|
||||
|
||||
Prints out the current version of QMK with a build date:
|
||||
|
||||
```
|
||||
> about
|
||||
QMK Firmware
|
||||
v0.5.115-7-g80ed73-dirty
|
||||
Built: 2017-08-29-20:24:44
|
||||
```
|
||||
|
||||
### `help`
|
||||
|
||||
Prints out the available commands:
|
||||
|
||||
```
|
||||
> help
|
||||
commands available:
|
||||
about help keycode keymap exit
|
||||
```
|
||||
|
||||
### `keycode <layer> <row> <col>`
|
||||
|
||||
Prints out the keycode value of a certain layer, row, and column:
|
||||
|
||||
```
|
||||
> keycode 0 1 0
|
||||
0x29 (41)
|
||||
```
|
||||
|
||||
### `keymap <layer>`
|
||||
|
||||
Prints out the entire keymap for a certain layer
|
||||
|
||||
```
|
||||
> keymap 0
|
||||
0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a,
|
||||
0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034,
|
||||
0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028,
|
||||
0x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f,
|
||||
>
|
||||
```
|
||||
|
||||
### `exit`
|
||||
|
||||
Exits the terminal - same as `TERM_OFF`.
|
@ -40,8 +40,11 @@ Debian/Ubuntu example:
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew install avr-libc
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc
|
||||
brew install dfu-programmer
|
||||
brew install gcc-arm-none-eabi
|
||||
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
# More detailed make instruction
|
||||
|
||||
The full syntax of the `make` command is the following, but parts of the command can be left out if you run it from other directories than the `root` (as you might already have noticed by reading the simple instructions).
|
||||
|
||||
`<keyboard>-<subproject>-<keymap>-<target>`, where:
|
||||
The full syntax of the `make` command is `<keyboard>-<subproject>-<keymap>-<target>`, where:
|
||||
|
||||
* `<keyboard>` is the name of the keyboard, for example `planck`
|
||||
* Use `allkb` to compile all keyboards
|
||||
@ -14,24 +12,13 @@ The full syntax of the `make` command is the following, but parts of the command
|
||||
* Use `allkm` to compile all keymaps
|
||||
* `<target>` will be explained in more detail below.
|
||||
|
||||
**Note:** When you leave some parts of the command out, you should also remove the dash (`-`).
|
||||
|
||||
As mentioned above, there are some shortcuts, when you are in a:
|
||||
|
||||
* `keyboard` folder, the command will automatically fill the `<keyboard>` part. So you only need to type `<subproject>-<keymap>-<target>`
|
||||
* `subproject` folder, it will fill in both `<keyboard>` and `<subproject>`
|
||||
* `keymap` folder, then `<keyboard>` and `<keymap>` will be filled in. If you need to specify the `<subproject>` use the following syntax `<subproject>-<target>`
|
||||
* Note in order to support this shortcut, the keymap needs its own Makefile
|
||||
* `keymap` folder of a `subproject`, then everything except the `<target>` will be filled in
|
||||
|
||||
The `<target>` means the following
|
||||
* If no target is given, then it's the same as `all` below
|
||||
* `all` compiles the keyboard and generates a `<keyboard>_<keymap>.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests.
|
||||
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for Infinity keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. **Note** that some operating systems needs root access for these commands to work, so in that case you need to run for example `sudo make dfu`.
|
||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck-rev4-default-all` will generate a single .hex, while `make planck-rev-all` will generate a hex for every keymap available to the planck.
|
||||
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck-rev4-default-dfu`.
|
||||
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
||||
|
||||
Some other targets are supported but, but not important enough to be documented here. Check the source code of the make files for more information.
|
||||
|
||||
You can also add extra options at the end of the make command line, after the target
|
||||
|
||||
* `make COLOR=false` - turns off color output
|
||||
@ -44,25 +31,10 @@ The make command itself also has some additional options, type `make --help` for
|
||||
Here are some examples commands
|
||||
|
||||
* `make allkb-allsp-allkm` builds everything (all keyboards, all subprojects, all keymaps). Running just `make` from the `root` will also run this.
|
||||
* `make` from within a `keyboard` directory, is the same as `make keyboard-allsp-allkm`, which compiles all subprojects and keymaps of the keyboard. **NOTE** that this behaviour has changed. Previously it compiled just the default keymap.
|
||||
* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard. This example uses the full syntax and can be run from any folder with a `Makefile`
|
||||
* `make dfu COLOR=false` from within a keymap folder, builds and uploads the keymap, but without color output.
|
||||
* `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard.
|
||||
* `make planck-rev4-default-dfu COLOR=false` builds and uploads the keymap without color output.
|
||||
|
||||
# The `Makefile`
|
||||
|
||||
There are 5 different `make` and `Makefile` locations:
|
||||
|
||||
* root (`/`)
|
||||
* keyboard (`/keyboards/<keyboard>/`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/`)
|
||||
* subproject (`/keyboards/<keyboard>/<subproject>`)
|
||||
* subproject keymap (`/keyboards/<keyboard>/<subproject>/keymaps/<keymap>`)
|
||||
|
||||
The root contains the code used to automatically figure out which keymap or keymaps to compile based on your current directory and commandline arguments. It's considered stable, and shouldn't be modified. The keyboard one will contain the MCU set-up and default settings for your keyboard, and shouldn't be modified unless you are the producer of that keyboard. The keymap Makefile can be modified by users, and is optional. It is included automatically if it exists. You can see an example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk) - the last few lines are the most important. The settings you set here will override any defaults set in the keyboard Makefile. **The file is required if you want to run `make` in the keymap folder.**
|
||||
|
||||
For keyboards and subprojects, the make files are split in two parts `Makefile` and `rules.mk`. All settings can be found in the `rules.mk` file, while the `Makefile` is just there for support and including the root `Makefile`. Keymaps contain just one `Makefile` for simplicity.
|
||||
|
||||
## Makefile options
|
||||
## `rules.mk` options
|
||||
|
||||
Set these variables to `no` to disable them, and `yes` to enable them.
|
||||
|
||||
@ -164,8 +136,6 @@ This enables [key lock](key_lock.md). This consumes an additional 260 bytes.
|
||||
|
||||
## Customizing Makefile options on a per-keymap basis
|
||||
|
||||
If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard.
|
||||
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
|
||||
|
||||
So let's say your keyboard's makefile has `BACKLIGHT_ENABLE = yes` (or maybe doesn't even list the `BACKLIGHT_ENABLE` option, which would cause it to be off). You want your particular keymap to not have the debug console, so you make a file called `Makefile` and specify `BACKLIGHT_ENABLE = no`.
|
||||
|
||||
You can use the `docs/keymap_makefile_example.md` as a template/starting point.
|
||||
So let's say your keyboard's `rules.mk` has `BACKLIGHT_ENABLE = yes`. You want your particular keyboard to not have the backlight, so you make a file called `rules.mk` and specify `BACKLIGHT_ENABLE = no`.
|
||||
|
441
docs/gitbook/images/color-wheel.svg
Normal file
441
docs/gitbook/images/color-wheel.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 17 KiB |
@ -271,9 +271,9 @@ This would require our `KEYMAP` definition to look like this:
|
||||
|
||||
Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
|
||||
|
||||
### keymaps/default.c
|
||||
### keymaps/<variant>/default.c
|
||||
|
||||
This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
|
||||
This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make handwired-<keyboard>-<variant>`, which will pull `keymaps/<variant>/keymap.c`.
|
||||
|
||||
The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
|
||||
|
||||
|
136
docs/macros.md
136
docs/macros.md
@ -1,12 +1,93 @@
|
||||
# Macros
|
||||
|
||||
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want- type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
|
||||
{% hint style='danger' %}
|
||||
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets ahold of your keyboard will be able to access that information by opening a text editor.
|
||||
{% endhint %}
|
||||
|
||||
# Macro Definitions
|
||||
## The new way: `SEND_STRING()` & `process_record_user`
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you. All ascii that is easily translated to a keycode is supported (eg `\n\t`).
|
||||
|
||||
For example:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
PRINT_TRUTH = SAFE_RANGE
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case PRINT_TRUTH:
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
return false; break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
```
|
||||
|
||||
### Tap/down/up
|
||||
|
||||
You can send arbitary keycodes by wrapping them in:
|
||||
|
||||
* `SS_TAP()`
|
||||
* `SS_DOWN()`
|
||||
* `SS_UP()`
|
||||
|
||||
For example:
|
||||
|
||||
SEND_STRING(SS_TAP(X_HOME));
|
||||
|
||||
Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can also combine this with other strings, like this:
|
||||
|
||||
SEND_STRING("VE"SS_TAP(X_HOME)"LO");
|
||||
|
||||
Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline).
|
||||
|
||||
There's also a couple of mod shortcuts you can use:
|
||||
|
||||
* `SS_LCTRL(string)`
|
||||
* `SS_LGUI(string)`
|
||||
* `SS_LALT(string)`
|
||||
|
||||
That can be used like this:
|
||||
|
||||
SEND_STRING(SS_LCTRL("a"));
|
||||
|
||||
Which would send LCTRL+a (LTRL down, a, LTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
|
||||
|
||||
### Alternative keymaps
|
||||
|
||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||
|
||||
#include <sendstring_colemak.h>
|
||||
|
||||
### Strings in memory
|
||||
|
||||
If for some reason you're manipulating strings and need to print out something you just generated (instead of being a literal, constant string), you can use `send_string()`, like this:
|
||||
|
||||
```c
|
||||
char my_str[4] = "ok.";
|
||||
send_string(my_str);
|
||||
```
|
||||
|
||||
The shortcuts defined above won't work with `send_string()`, but you can separate things out to different lines if needed:
|
||||
|
||||
```c
|
||||
char my_str[4] = "ok.";
|
||||
SEND_STRING("I said: ");
|
||||
send_string(my_str);
|
||||
SEND_STRING(".."SS_TAP(X_END));
|
||||
```
|
||||
|
||||
## The old way: `MACRO()` & `action_get_macro`
|
||||
|
||||
{% hint style='info' %}
|
||||
This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead.
|
||||
{% endhint %}
|
||||
|
||||
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
|
||||
|
||||
@ -26,11 +107,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement:
|
||||
|
||||
```c
|
||||
if (!record->event.pressed) {
|
||||
```
|
||||
|
||||
## Macro Commands
|
||||
### Macro Commands
|
||||
|
||||
A macro can include the following commands:
|
||||
|
||||
@ -41,32 +120,7 @@ A macro can include the following commands:
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
## Sending strings
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`.
|
||||
|
||||
For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||
|
||||
```
|
||||
#include <sendstring_colemak.h>
|
||||
```
|
||||
|
||||
## Mapping a Macro to a key
|
||||
### Mapping a Macro to a key
|
||||
|
||||
Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
|
||||
|
||||
@ -92,7 +146,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
|
||||
|
||||
## Naming your macros
|
||||
### Naming your macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
|
||||
|
||||
@ -107,11 +161,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
```
|
||||
|
||||
# Advanced macro functions
|
||||
## Advanced macro functions
|
||||
|
||||
While working within the `action_get_macro()` function block there are some functions you may find useful. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||
|
||||
#### `record->event.pressed`
|
||||
### `record->event.pressed`
|
||||
|
||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||
|
||||
@ -123,27 +177,27 @@ This is a boolean value that can be tested to see if the switch is being pressed
|
||||
}
|
||||
```
|
||||
|
||||
#### `register_code(<kc>);`
|
||||
### `register_code(<kc>);`
|
||||
|
||||
This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
|
||||
|
||||
#### `unregister_code(<kc>);`
|
||||
### `unregister_code(<kc>);`
|
||||
|
||||
Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
|
||||
|
||||
#### `clear_keyboard();`
|
||||
### `clear_keyboard();`
|
||||
|
||||
This will clear all mods and keys currently pressed.
|
||||
|
||||
#### `clear_mods();`
|
||||
### `clear_mods();`
|
||||
|
||||
This will clear all mods currently pressed.
|
||||
|
||||
#### `clear_keyboard_but_mods();`
|
||||
### `clear_keyboard_but_mods();`
|
||||
|
||||
This will clear all keys besides the mods currently pressed.
|
||||
|
||||
# Advanced Example: Single-key copy/paste
|
||||
## Advanced Example: Single-key copy/paste
|
||||
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
|
||||
|
@ -147,6 +147,7 @@ The `process_record()` function itself is deceptively simple, but hidden within
|
||||
* [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode.c#L22)
|
||||
* [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c#L91)
|
||||
* [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_printer.c#L77)
|
||||
* [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_auto_shift.c#L47)
|
||||
* [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47)
|
||||
* [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211)
|
||||
|
||||
|
@ -24,6 +24,7 @@ sort of like macro. Unfortunately, each OS has different ideas on how Unicode is
|
||||
This is the current list of Unicode input method in QMK:
|
||||
|
||||
* UC_OSX: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
|
||||
* UC_OSX_RALT: Same as UC_OSX, but sends the Rigt Alt key for unicode input
|
||||
* UC_LNX: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
|
||||
* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
|
||||
* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
|
||||
|
@ -28,23 +28,7 @@
|
||||
//#include "ws2812_config.h"
|
||||
//#include "i2cmaster.h"
|
||||
|
||||
#ifdef RGBW
|
||||
#define LED_TYPE struct cRGBW
|
||||
#else
|
||||
#define LED_TYPE struct cRGB
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Structure of the LED array
|
||||
*
|
||||
* cRGB: RGB for WS2812S/B/C/D, SK6812, SK6812Mini, SK6812WWA, APA104, APA106
|
||||
* cRGBW: RGBW for SK6812RGBW
|
||||
*/
|
||||
|
||||
struct cRGB { uint8_t g; uint8_t r; uint8_t b; };
|
||||
struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
|
||||
|
||||
#include "rgblight_types.h"
|
||||
|
||||
|
||||
/* User Interface
|
||||
|
@ -47,6 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 150
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
||||
|
@ -2,45 +2,63 @@
|
||||
|
||||
// Tap Dance Declarations
|
||||
enum {
|
||||
ENT_5 = 0
|
||||
ENT_5 = 0,
|
||||
ZERO_7
|
||||
};
|
||||
|
||||
// Macro Declarations
|
||||
enum {
|
||||
DBL_0 = 0
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* LAYER 0
|
||||
* ,-----------------.
|
||||
* | 1 | 2 | 3 |
|
||||
* |-----+-----+-----|
|
||||
* | 4 |5/ENT| 6 | Dbl Tap 5 for Enter
|
||||
* |-----+-----+-----|
|
||||
* | 7 | 8 | FN |
|
||||
* `-----------------'
|
||||
* ,-----------------------.
|
||||
* | 1 | 2 | 3 |
|
||||
* |-------+-------+-------|
|
||||
* | 4 | 5/ENT | 6 | Dbl Tap 5 for Enter
|
||||
* |-------+-------+-------|
|
||||
* | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN
|
||||
* `-----------------------'
|
||||
*/
|
||||
[0] = KEYMAP( \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_4, TD(ENT_5), KC_6, \
|
||||
KC_7, KC_8, MO(1) \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_4, TD(ENT_5), KC_6, \
|
||||
TD(ZERO_7), KC_8, LT(1, KC_9) \
|
||||
),
|
||||
|
||||
/* LAYER 1
|
||||
* ,-----------------.
|
||||
* | 9 | 0 | - |
|
||||
* |-----+-----+-----|
|
||||
* | + | * | / |
|
||||
* |-----+-----+-----|
|
||||
* | F1 | F2 | |
|
||||
* `-----------------'
|
||||
* ,-----------------------.
|
||||
* | ESC | + | - |
|
||||
* |-------+-------+-------|
|
||||
* | BSPC | * | / |
|
||||
* |-------+-------+-------|
|
||||
* | 00 | . | |
|
||||
* `-----------------------'
|
||||
*/
|
||||
[1] = KEYMAP( \
|
||||
KC_9, KC_0, KC_MINS, \
|
||||
KC_PLUS, KC_ASTR, KC_SLSH, \
|
||||
KC_F1, KC_F2, KC_TRNS \
|
||||
KC_ESC, KC_PLUS, KC_MINS, \
|
||||
KC_BSPC, KC_ASTR, KC_SLSH, \
|
||||
M(DBL_0), KC_DOT, KC_TRNS \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT)
|
||||
[ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
|
||||
[ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case DBL_0:
|
||||
SEND_STRING("00");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
3
keyboards/9key/keymaps/default/rules.mk
Normal file
3
keyboards/9key/keymaps/default/rules.mk
Normal file
@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@ -8,7 +8,7 @@ A compact minipad (3x3) keyboard made and sold by Bishop Keyboards.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: 9key PCB, Pro Micro ATmega32U4
|
||||
Hardware Availability: [BishopKeyboards.com](https://www.reddit.com/user/se7en9057) (BishopKeyboards.com under renovation)
|
||||
Hardware Availability: [BishopKeyboards.com](http://bishopkeyboards.com/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
27
keyboards/amj40/keymaps/default/rules.mk
Normal file
27
keyboards/amj40/keymaps/default/rules.mk
Normal file
@ -0,0 +1,27 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # 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
|
||||
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
27
keyboards/amj40/keymaps/fabian/rules.mk
Normal file
27
keyboards/amj40/keymaps/fabian/rules.mk
Normal file
@ -0,0 +1,27 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # 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
|
||||
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
23
keyboards/amj60/keymaps/iso_split_rshift/rules.mk
Normal file
23
keyboards/amj60/keymaps/iso_split_rshift/rules.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # 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
|
15
keyboards/atomic/keymaps/pvc/rules.mk
Normal file
15
keyboards/atomic/keymaps/pvc/rules.mk
Normal file
@ -0,0 +1,15 @@
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # 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
|
@ -22,9 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define VENDOR_ID 0x1209
|
||||
#define PRODUCT_ID 0xA1E5
|
||||
#define DEVICE_VER 0x0008
|
||||
#define MANUFACTURER Technomancy
|
||||
#define PRODUCT Atreus
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
||||
|
21
keyboards/atreus/keymaps/dvorak_42_key/README.md
Normal file
21
keyboards/atreus/keymaps/dvorak_42_key/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
Overview
|
||||
========
|
||||
|
||||
This is a dvorak based layout for the Atreus. Its basic key layout is similar to the ergodox_ez "dvorak_42_key" layout. In fact this layout was created for seamless switching between the Ergodox EZ and Atreus.
|
||||
|
||||
How to build and flash
|
||||
----------------------
|
||||
|
||||
to build;
|
||||
make atreus-dvorak_42_key
|
||||
|
||||
to flash:
|
||||
avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_dvorak_42_key.hex -P COM7
|
||||
|
||||
Layers
|
||||
------
|
||||
* BASE: basic dvorak layout
|
||||
* KEYNAV: arrow-key navigation. Momentary toggle held by thumb allows the right hand to navigate through text as well as copy/paste/cut, page up/page down
|
||||
* KEYSEL: similar to KEYNAV, except for shift-selection
|
||||
* COMBINED: this is a layer that combines numbers, brackets and special characters. !@#$%^&*( can be type by shift+COMBINED+1/2/3/etc..
|
||||
* MOUSE: mouse navigation, as well as browser tab-left/tab-right shortcuts
|
106
keyboards/atreus/keymaps/dvorak_42_key/config.h
Normal file
106
keyboards/atreus/keymaps/dvorak_42_key/config.h
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
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"
|
||||
|
||||
|
||||
// mouse speed
|
||||
|
||||
#define MOUSEKEY_INTERVAL 15
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_TIME_TO_MAX 100
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
|
||||
#define MOUSEKEY_WHEEL_DELAY 500
|
||||
#define MOUSEKEY_WHEEL_DELTA 1
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 1
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Technomancy
|
||||
#define PRODUCT Atreus
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 11
|
||||
|
||||
// Change this to how you wired your keyboard
|
||||
// COLS: Left to right, ROWS: Top to bottom
|
||||
#if defined(ATREUS_ASTAR)
|
||||
# define MATRIX_ROW_PINS { D0, D1, D3, D2 }
|
||||
#if defined(PCBDOWN)
|
||||
# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 }
|
||||
#else
|
||||
# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 }
|
||||
#endif
|
||||
# define UNUSED_PINS
|
||||
#elif defined(ATREUS_TEENSY2)
|
||||
# define MATRIX_ROW_PINS { D0, D1, D2, D3 }
|
||||
# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 }
|
||||
# define UNUSED_PINS
|
||||
#endif
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
93
keyboards/atreus/keymaps/dvorak_42_key/keymap.c
Normal file
93
keyboards/atreus/keymaps/dvorak_42_key/keymap.c
Normal file
@ -0,0 +1,93 @@
|
||||
|
||||
#include "atreus.h"
|
||||
|
||||
// layers
|
||||
#define BASE 0
|
||||
#define KEYNAV 1
|
||||
#define KEYSEL 2
|
||||
#define MOUSE 3
|
||||
#define COMBINED 4
|
||||
|
||||
// macros
|
||||
#define MOUSE_TOGGLE 1
|
||||
#define MOUSE_LOCK 2
|
||||
|
||||
static bool mouse_lock = false;
|
||||
|
||||
// building instructions:
|
||||
// make atreus-dvorak_42_key
|
||||
|
||||
// flashing instructions:
|
||||
// avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_dvorak_42_key.hex -P COM7
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = {
|
||||
{KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, },
|
||||
{KC_A, KC_O, KC_E, KC_U, KC_I, KC_TRNS, KC_D, KC_H, KC_T, KC_N, KC_S, },
|
||||
{KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(KEYNAV), KC_B, KC_M, KC_W, KC_V, KC_Z, },
|
||||
{OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL), MO(COMBINED), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT), }
|
||||
},
|
||||
|
||||
[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), }
|
||||
},
|
||||
|
||||
[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), }
|
||||
},
|
||||
|
||||
[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, }
|
||||
},
|
||||
|
||||
[MOUSE] = {
|
||||
{KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, },
|
||||
{KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), },
|
||||
{KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), }
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case MOUSE_TOGGLE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(MOUSE);
|
||||
} else {
|
||||
if(!mouse_lock)
|
||||
layer_off(MOUSE);
|
||||
}
|
||||
break;
|
||||
case MOUSE_LOCK:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
if(mouse_lock)
|
||||
{
|
||||
mouse_lock = false;
|
||||
layer_off(MOUSE);
|
||||
}
|
||||
else
|
||||
mouse_lock = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
6
keyboards/atreus/keymaps/henxing/Readme.md
Normal file
6
keyboards/atreus/keymaps/henxing/Readme.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Hugh's Atreus Keymap
|
||||
|
||||
This keymap is the same as the [default](../default) layout for the Atreus, but
|
||||
uses the programming style found in the Let's
|
||||
Split [default](../../../lets_split/keymaps/default) keymap. See
|
||||
[`keymap.c`](keymap.c) for the layout.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user