Compare commits

..

123 Commits

Author SHA1 Message Date
Jack Humbert
8ec77eb620 remove STOP_FEATURE 2017-07-29 16:05:32 -04:00
Jack Humbert
151b7a4ae5 updates all keymaps, restricts to two options 2017-07-29 15:49:23 -04:00
Jack Humbert
98ac10fd74 introduces new format [broken] [skip ci] 2017-07-28 23:29:22 -04:00
unknown
6b2a3492b7 Removed un-needed protosplit directory and updated readme 2017-07-28 10:45:34 -04:00
unknown
dcd64062d2 Reverted changes 2017-07-28 10:45:34 -04:00
unknown
4148aeee19 Figured out that I didn't need to include both keymaps in both files 2017-07-28 10:45:34 -04:00
unknown
1f78b62cd6 Hopefully compile issues are gone, and updated files 2017-07-28 10:45:34 -04:00
unknown
9f82d14eb9 Fixed all things jack suggested. 2017-07-28 10:45:34 -04:00
unknown
b710e21efb Added to blank spaces at end of protosplit to make it compile under make v2 2017-07-28 10:45:34 -04:00
unknown
9334986bd9 Updated readme to show compile rules that won't throw an error 2017-07-28 10:45:34 -04:00
unknown
f2824bca02 Fixed typo in my layout and updated 2017-07-28 10:45:34 -04:00
unknown
5023f55856 Fixed some capitalization issues 2017-07-28 10:45:34 -04:00
unknown
6d15f5a5b7 Another typo fix 2017-07-28 10:45:34 -04:00
unknown
ea1fd96c84 Fixed typo in my layout 2017-07-28 10:45:34 -04:00
unknown
1eea91f5f8 Updated my makefile..again 2017-07-28 10:45:34 -04:00
unknown
9546b180b9 Updated my makefile 2017-07-28 10:45:34 -04:00
unknown
2265e4ce41 Removed old keymaps 2017-07-28 10:45:34 -04:00
unknown
cbc5a08c40 Removed old protosplit folder 2017-07-28 10:45:34 -04:00
unknown
78f79ca6cc Removed old folder 2017-07-28 10:45:34 -04:00
Donald
f1dbf72e09 Changed case of protosplit
Also updated readme to have correct capitalization.
2017-07-28 10:45:34 -04:00
Donald
c71b60c82a Changed case of deltasplit75 to be lowercase.
To follow convention.
2017-07-28 10:45:34 -04:00
unknown
47c6d201aa Add my layout 2017-07-28 10:45:34 -04:00
xyxjj
f6438e42af Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
242c1da2c2 Delete deltasplit build guide.pdf 2017-07-28 10:45:34 -04:00
xyxjj
be1876aa76 Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
1ef6777723 Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
d3b6552fb7 Delete MX RIGHT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
ce3ea49743 Delete ALPS+MX RIGHT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
811c583636 Delete ALPS RIGHT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
173d1b7571 Delete middle layers - RIGHT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
98f977e95c Delete bottom layers - RIGHT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
1832b59266 Delete MX LEFT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
1bfe5b5723 Delete ALPS+MX LEFT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
038c12d59a Delete ALPS LEFT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
3d23a80c83 Delete Middle layers - LEFT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
f56884b253 Delete Bottom Layer - LEFT B.dxf 2017-07-28 10:45:34 -04:00
xyxjj
d4e695a136 Delete top bezel - blocked corner.dxf 2017-07-28 10:45:34 -04:00
xyxjj
2013f4fb83 Delete top bezel - Winkeyless.dxf 2017-07-28 10:45:34 -04:00
xyxjj
508cc7e56b Delete top bezel - Standard.dxf 2017-07-28 10:45:34 -04:00
xyxjj
8958a4f78b Delete PCB Dimesnsion.dxf 2017-07-28 10:45:34 -04:00
xyxjj
429971997c Delete MX RIGHT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
e898a8ecc8 Delete ALPS+MX RIGHT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
b6e8516d6d Delete ALPS RIGHT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
2077226fc2 Delete middle layers - RIGHT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
cfafa97227 Delete bottom layers - RIGHT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
3d73110795 Delete readme.md 2017-07-28 10:45:34 -04:00
xyxjj
727707ef0b Delete PCB Dimesnsion.dwg 2017-07-28 10:45:34 -04:00
xyxjj
2a3af90d9f Delete MX LEFT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
73e5a7fafe Delete ALPS+MX LEFT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
eceb2a4810 Delete ALPS LEFT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
b34dfeecdf Delete Middle layers - LEFT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
01458037de Delete Bottom Layer - LEFT B.dwg 2017-07-28 10:45:34 -04:00
xyxjj
461f95ce0b Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
f4bc404aa2 Delete top bezel - blocked corner.dwg 2017-07-28 10:45:34 -04:00
xyxjj
b70e68ac5b Delete top bezel - Winkeyless.dwg 2017-07-28 10:45:34 -04:00
xyxjj
e4d849ed95 Delete top bezel - Standard.dwg 2017-07-28 10:45:34 -04:00
xyxjj
4f193d6dc2 Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
934d35ea3f Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
a76a607a2b Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
9aec284f42 Update 2017-07-28 10:45:34 -04:00
xyxjj
3a0f7865da Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
b11d770bea Update Makefile 2017-07-28 10:45:34 -04:00
xyxjj
5a63aa29a9 Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
ab63ff8d2e Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
00e4079d5a Delete top bezel - blocked corner.bak 2017-07-28 10:45:34 -04:00
xyxjj
4d88634f07 Delete top bezel - Standard.bak 2017-07-28 10:45:34 -04:00
xyxjj
5ea3b1ea4d Delete PCB Dimesnsion.dwl2 2017-07-28 10:45:34 -04:00
xyxjj
c497a19e7b Delete PCB Dimesnsion.dwl 2017-07-28 10:45:34 -04:00
xyxjj
7e07bdbde3 Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
60e5277a8f Delete PCB Dimesnsion.dwg 2017-07-28 10:45:34 -04:00
xyxjj
96ec98b1ad Create readme.md 2017-07-28 10:45:34 -04:00
xyxjj
7a31ef8284 Add files via upload 2017-07-28 10:45:34 -04:00
xyxjj
0c2b0c7cc1 Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
42ea9460fe Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
e9daf0606f Update readme.md 2017-07-28 10:45:34 -04:00
xyxjj
be2c7aac31 Add files via upload 2017-07-28 10:45:34 -04:00
Joe Wasson
c5780647d8 Fix typo in docs. 2017-07-27 16:10:36 -04:00
Joe Wasson
26fb063be3 Link to steno docs from summary page. 2017-07-27 16:10:36 -04:00
Joe Wasson
e81e75c147 Move steno keycodes due to conflict with another PR. 2017-07-27 16:10:36 -04:00
Joe Wasson
3e96e8a6a1 Add copyright to steno files. 2017-07-27 16:10:36 -04:00
Joe Wasson
c0f63ca9dc Add documentation for Steno. 2017-07-27 16:10:36 -04:00
Joe Wasson
f30f12ec81 Add support for GeminiPR steno protocol.
This protocol breaks out "duplicate" keys into their own entry in the packet so that more complicated logic can be done on the software side, including support for additional languages and alternative theories.
2017-07-27 16:10:36 -04:00
Joe Wasson
5987f67989 Add TX Bolt protocol support for Stenography
Requires virtser; Allows QMK to speak the TX BOlt protocol used by stenography machines and software (such as Plover). The upside is that Plover can be configured to listen only to TX Bolt allow the keyboard to switch layers without need to enable/disable the Plover software, or to have a second non-Steno keyboard work concurrently.
2017-07-27 16:10:36 -04:00
Jack Humbert
cefc09ae7d adds option for alt pitch standards 2017-07-24 12:45:34 -04:00
Joe Wasson
a543ad4c1d Fix minor formatting issue. 2017-07-23 15:10:27 -04:00
Jack Humbert
6bdf7482b1 update audio/music documentation 2017-07-23 14:59:29 -04:00
Jack Humbert
415d38ba9e adds music mode, music mode songs, music mask 2017-07-23 14:59:29 -04:00
Jack Humbert
9abbbe7089 update audio documentation 2017-07-23 14:59:29 -04:00
Jack Humbert
f407f3e8de remove unneccesary headers 2017-07-23 14:59:29 -04:00
Jack Humbert
92ccc9a7b8 use automatic rests with songs (no more rest styles) 2017-07-23 14:59:29 -04:00
Jack Humbert
f40ded7894 relocate keymap's useful tools 2017-07-23 14:59:29 -04:00
Jack Humbert
fd664fe85b escape song playing in music 2017-07-23 14:59:29 -04:00
Jack Humbert
fe113ebad5 start updating audio docs 2017-07-23 14:59:29 -04:00
Jack Humbert
6a3c66776c clean-up planck and preonic keymaps, move audio stuff around 2017-07-23 14:59:29 -04:00
Jack Humbert
8edb67b082 fix line-endings 2017-07-21 19:05:13 -04:00
rootuseralpha
e26283e9e5 Update keymap.c 2017-07-20 21:52:13 -04:00
rootuseralpha
8deb405292 Add files via upload 2017-07-20 21:52:13 -04:00
rootuseralpha
4d665a99ae Add files via upload 2017-07-20 21:52:13 -04:00
rootuseralpha
4627cab49d Delete test 2017-07-20 21:52:13 -04:00
rootuseralpha
e5f606558e Add files via upload 2017-07-20 21:52:13 -04:00
rootuseralpha
f379f05c1e Create test 2017-07-20 21:52:13 -04:00
Maarten Dekkers
1524d29cfb Added some user customization 2017-07-20 10:18:00 -04:00
Maarten Dekkers
30efce5584 Changes to own keymap 2017-07-20 10:18:00 -04:00
Fred Sundvik
a5b0f4de35 Add SRC and OPT_DEFS when building tests 2017-07-20 10:17:31 -04:00
Fred Sundvik
20696a9efe Fix building of multiple test directories 2017-07-20 10:17:31 -04:00
Jack Humbert
14c5160b1a Update _summary.md 2017-07-17 15:01:33 -04:00
Jack Humbert
000e749853 Rename docs/features/README.md to docs/features.md 2017-07-17 15:01:11 -04:00
Jack Humbert
7c0610b411 Merge pull request #1498 from That-Canadian/minidox
Minidox
2017-07-14 22:04:18 -04:00
That-Canadian
b6d74b9bb9 Fixed typo in readme 2017-07-14 21:58:59 -04:00
That-Canadian
5e8594db82 Updated MiniDox readme 2017-07-14 21:57:41 -04:00
That-Canadian
6c9b69a4b6 Merge branch 'master' into minidox 2017-07-14 21:35:50 -04:00
That-Canadian
5412229603 Merge remote-tracking branch 'upstream/master' 2017-07-14 21:34:37 -04:00
That-Canadian
e2e0f5d6d1 Merge branch 'minidox' of https://github.com/That-Canadian/qmk_firmware into minidox 2017-07-14 21:33:19 -04:00
That-Canadian
21b63d9243 Updated i2c and serial files to most recent from the lets split firmware. Also updated that_canadian keymap 2017-07-14 21:24:58 -04:00
That-Canadian
d73d30aa84 Merge remote-tracking branch 'upstream/master' 2017-07-10 21:24:20 -04:00
That-Canadian
a4958a532d Fixed RGB being enabled by default, now it must be turned on at the keymap level 2017-07-10 17:12:18 -04:00
That-Canadian
df50260300 cleaned up that_canadian keymap comments 2017-07-10 16:59:20 -04:00
That-Canadian
55ed97af1e Merge branch 'master' into minidox 2017-07-10 16:53:49 -04:00
That-Canadian
07bf8522ca Merge remote-tracking branch 'upstream/master' 2017-07-10 16:52:56 -04:00
That-Canadian
1fdf3c84fe Updated minidox rev1 config, and readme. Also updated that_canadian keymap to include RGB 2017-07-10 16:51:37 -04:00
That-Canadian
9312b9db6c Added MiniDox keyboard folder / configs / and some keymaps 2017-07-10 00:46:19 -04:00
That-Canadian
707f4efd99 line ending stuff 2017-07-10 00:30:40 -04:00
That-Canadian
e7a5fee1f3 merge 2017-07-10 00:21:38 -04:00
224 changed files with 3997 additions and 1241 deletions

View File

@@ -419,7 +419,7 @@ define BUILD_TEST
MAKE_TARGET := $2
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS)
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean)

View File

@@ -21,12 +21,13 @@ $(TEST)_SRC= \
$(TEST_PATH)/keymap.c \
$(TMK_COMMON_SRC) \
$(QUANTUM_SRC) \
$(SRC) \
tests/test_common/matrix.c \
tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \
tests/test_common/test_fixture.cpp
$(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
$(TEST)_DEFS=$(TMK_COMMON_DEFS)
$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS)
$(TEST)_CONFIG=$(TEST_PATH)/config.h
VPATH+=$(TOP_DIR)/tests/test_common

View File

@@ -54,6 +54,12 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
endif
ifeq ($(strip $(STENO_ENABLE)), yes)
OPT_DEFS += -DSTENO_ENABLE
VIRTSER_ENABLE := yes
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
endif
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
OPT_DEFS += -DVIRTSER_ENABLE
endif

View File

@@ -1,4 +1,4 @@
* [Getting started](README.md)
* [Getting started](README.md)
* [QMK Overview](qmk_overview.md)
* [Build Environment Setup](build_environment_setup.md)
* [Vagrant Guide](vagrant_guide.md)
@@ -7,7 +7,7 @@
* [FAQ: Compiling QMK](faq_build.md)
* [How to Github](how_to_github.md)
* [Features](features/README.md)
* [Features](features.md)
* [Layer switching](key_functions.md)
* [Leader Key](leader_key.md)
* [Macros](macros.md)
@@ -16,6 +16,7 @@
* [Tap Dance](tap_dance.md)
* [Mouse keys](mouse_keys.md)
* [Unicode](unicode.md)
* [Stenography](stenography.md)
* Reference
* [Glossary](glossary.md)
@@ -27,7 +28,7 @@
* [Customizing Functionality](custom_quantum_functions.md)
* [Documentation Best Practices](documentation_best_practices.md)
* [Unit Testing](unit_testing.md)
* For Makers and Modders
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
* [Adding features to QMK](adding_features_to_qmk.md)
@@ -39,7 +40,7 @@
* For a Deeper Understanding
* [How Keyboards Work](basic_how_keyboards_work.md)
* [Understanding QMK](understanding_qmk.md)
* Other Topics
* [General FAQ](faq.md)
* [Using Eclipse with QMK](eclipse.md)

View File

@@ -36,16 +36,16 @@ enum my_keycodes {
## Programming The Behavior Of Any Keycode
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()' and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_keyboard()` and `process_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
These function are called every time a key is pressed or released.
### Example `process_record_user()` implementation
### Example `process_user()` implementation
This example does two things. It defines the behavior for a custom keycode called `FOO`, and it supplements our Enter key by playing a tone whenever it is pressed.
```
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FOO:
if (record->event.pressed) {
@@ -53,21 +53,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
// Do something else when release
}
return false; // Skip all further processing of this key
return STOP_PROCESSING; // Skip all further processing of this key
case KC_ENTER:
// Play a tone when enter is pressed
if (record->event.pressed) {
PLAY_NOTE_ARRAY(tone_qwerty);
}
return true; // Let QMK send the enter press/release events
return CONTINUE_PROCESSING; // Let QMK send the enter press/release events
}
}
```
### `process_record_*` Function documentation
* Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
* Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
* Keyboard/Revision: `level_t process_kb(uint16_t keycode, keyrecord_t *record)`
* Keymap: `level_t process_user(uint16_t keycode, keyrecord_t *record)`
The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events.

View File

@@ -102,4 +102,4 @@ case MACRO_RAISED:
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
}
break;
```
```

View File

@@ -1,52 +1,52 @@
## Audio output from a speaker
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
The audio code lives in [quantum/audio/audio.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c). Here are the important bits:
If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration:
```
#include "audio.h"
STARTUP_SONG // plays when the keyboard starts up (audio.c)
GOODBYE_SONG // plays when you press the RESET key (quantum.c)
AG_NORM_SONG // plays when you press AG_NORM (quantum.c)
AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c)
MUSIC_ON_SONG // plays when music mode is activated (process_music.c)
MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c)
CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c)
GUITAR_SONG // plays when the guitar music mode is selected (process_music.c)
VIOLIN_SONG // plays when the violin music mode is selected (process_music.c)
MAJOR_SONG // plays when the major music mode is selected (process_music.c)
```
Then, lower down the file:
You can override the default songs by doing something like this in your `config.h`:
```
float tone_startup[][2] = {
ED_NOTE(_E7 ),
E__NOTE(_CS7),
E__NOTE(_E6 ),
E__NOTE(_A6 ),
M__NOTE(_CS7, 20)
};
```c
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(STARTUP_SOUND)
#endif
```
This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here.
A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h).
Then, we have this chunk:
To play a custom sound at a particular time, you can define a song like this (near the top of the file):
```
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
```c
float my_song[][2] = SONG(QWERTY_SOUND);
```
Wherein we bind predefined songs (from [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives.
And then play your song like this:
So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this:
```
PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style
```c
PLAY_SONG(my_song);
```
This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime.
Alternatively, you can play it in a loop like this:
"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes.
```c
PLAY_LOOP(my_song);
```
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
## Music mode
@@ -59,6 +59,11 @@ Keycodes available:
* `MU_ON` - Turn music mode on
* `MU_OFF` - Turn music mode off
* `MU_TOG` - Toggle music mode
* `MU_MOD` - Cycle through the music modes:
* `CHROMATIC_MODE` - Chromatic scale, row changes the octave
* `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st)
* `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st)
* `MAJOR_MODE` - Major scale
In music mode, the following keycodes work differently, and don't pass through:
@@ -68,6 +73,16 @@ In music mode, the following keycodes work differently, and don't pass through:
* `KC_UP` - speed-up playback
* `KC_DOWN` - slow-down playback
By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
#define MUSIC_MASK keycode != KC_NO
Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
#define PITCH_STANDARD_A 432.0f
## MIDI functionalty
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.

View File

@@ -337,10 +337,10 @@ enum my_keycodes {
};
```
You can then use `process_record_user()` to do something with your keycode:
You can then use `process_user()` to do something with your keycode:
```
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FOO:
// Do something here

108
docs/stenography.md Normal file
View File

@@ -0,0 +1,108 @@
# Stenography in QMK
[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy).
The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports
## Plover with QWERTY Keyboard
Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar.
To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys.
## Plover with Steno Protocol
Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiRP. An example layout can be found in `planck/keymaps/steno`.
When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover.
In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiRP; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart.
> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time.
### TX Bolt
TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets.
### GeminiRP
GeminiRP encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiRP opens up many more options, including supporting non-English theories.
## Configuring QMK for Steno
Firstly, enable steno in your keymap's Makefile. You should also diable mousekeys to prevent conflicts.
```Makefile
STENO_ENABLE = yes
MOUSEKEY_ENABLE = no
```
In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function:
```C
void matrix_init_user() {
steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
}
```
Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control).
On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno!
## Learning Stenography
* [Learn Plover!](https://sites.google.com/site/ploverdoc/)
* [QWERTY Steno](http://qwertysteno.com/Home/)
* [Steno Jig](https://joshuagrams.github.io/steno-jig/)
* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki
## Keycode Reference
As defined in `keymap_steno.h`.
> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiRP keys to the nearest TX Bolt key so that one key map will work for both.
|GeminiRP|TX Bolt|Steno Key|
|--------|-------|-----------|
|`STN_N1`|`STN_NUM`|Number bar #1|
|`STN_N2`|`STN_NUM`|Number bar #2|
|`STN_N3`|`STN_NUM`|Number bar #3|
|`STN_N4`|`STN_NUM`|Number bar #4|
|`STN_N5`|`STN_NUM`|Number bar #5|
|`STN_N6`|`STN_NUM`|Number bar #6|
|`STN_N7`|`STN_NUM`|Number bar #7|
|`STN_N8`|`STN_NUM`|Number bar #8|
|`STN_N9`|`STN_NUM`|Number bar #9|
|`STN_NA`|`STN_NUM`|Number bar #A|
|`STN_NB`|`STN_NUM`|Number bar #B|
|`STN_NC`|`STN_NUM`|Number bar #C|
|`STN_S1`|`STN_SL`| `S-` upper|
|`STN_S2`|`STN_SL`| `S-` lower|
|`STN_TL`|`STN_TL`| `T-`|
|`STN_KL`|`STN_KL`| `K-`|
|`STN_PL`|`STN_PL`| `P-`|
|`STN_WL`|`STN_WL`| `W-`|
|`STN_HL`|`STN_HL`| `H-`|
|`STN_RL`|`STN_RL`| `R-`|
|`STN_A`|`STN_A`| `A` vowel|
|`STN_O`|`STN_O`| `O` vowel|
|`STN_ST1`|`STN_STR`| `*` upper-left |
|`STN_ST2`|`STN_STR`| `*` lower-left|
|`STN_ST3`|`STN_STR`| `*` upper-right|
|`STN_ST4`|`STN_STR`| `*` lower-right|
|`STN_E`|`STN_E`| `E` vowel|
|`STN_U`|`STN_U`| `U` vowel|
|`STN_FR`|`STN_FR`| `-F`|
|`STN_PR`|`STN_PR`| `-P`|
|`STN_RR`|`STN_RR`| `-R`|
|`STN_BR`|`STN_BR`| `-B`|
|`STN_LR`|`STN_LR`| `-L`|
|`STN_GR`|`STN_GR`| `-G`|
|`STN_TR`|`STN_TR`| `-T`|
|`STN_SR`|`STN_SR`| `-S`|
|`STN_DR`|`STN_DR`| `-D`|
|`STN_ZR`|`STN_ZR`| `-Z`|
|`STN_FN`|| (GeminiRP only)|
|`STN_RES1`||(GeminiRP only)|
|`STN_RES2`||(GeminiRP only)|
|`STN_PWR`||(GeminiRP only)|

View File

@@ -135,8 +135,8 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L128)
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L140)
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L143)
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/cluecard.c#L20)
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/keymaps/default/keymap.c#L58)
* [`level_t process_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/cluecard.c#L20)
* [`level_t process_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/keymaps/default/keymap.c#L58)
* [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_midi.c#L102)
* [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_audio.c#L10)
* [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_music.c#L69)
@@ -150,7 +150,7 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`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)
At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing.
At any step during this chain of events a function (such as `process_kb()`) can `return false` to halt all further processing.
<!--
#### Mouse Handling

View File

@@ -173,31 +173,31 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORMAC:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORMAC);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -207,7 +207,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -217,8 +217,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
};

View File

@@ -78,7 +78,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
static uint8_t qw_dv_swap_state = 0;
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
level_t process_user (uint16_t keycode, keyrecord_t *record) {
if (keycode == KC_LGUI) {
if (record->event.pressed)
qw_dv_swap_state |= 0b00000001;
@@ -95,5 +95,5 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
if (qw_dv_swap_state == 0b00000011) {
layer_invert(DVORAK);
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -189,7 +189,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
};
// Custom keycodes
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
bool queue = true;
//Cancle one-shot mods.
@@ -201,7 +201,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
}
return queue;
return queue ? CONTINUE_PROCESSING : STOP_PROCESSING;
}
// TAP DANCE SETTINGS

View File

@@ -124,31 +124,31 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case WOW:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_WOW);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -158,7 +158,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -168,8 +168,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
};

View File

@@ -156,26 +156,26 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -17,11 +17,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -55,8 +55,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -20,8 +20,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -261,50 +261,50 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
/* layout switcher */
case LAY_QWE:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<QWE);
}
return false;
return STOP_PROCESSING;
break;
case LAY_COL:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<COL);
}
return false;
return STOP_PROCESSING;
break;
case LAY_WOR:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<WOR);
}
return false;
return STOP_PROCESSING;
break;
case LAY_DVO:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<DVO);
}
return false;
return STOP_PROCESSING;
break;
/* os switcher */
case OS_LIN:
set_unicode_input_mode(UC_LNX);
return false;
return STOP_PROCESSING;
break;
case OS_WIN:
set_unicode_input_mode(UC_WINC);
return false;
return STOP_PROCESSING;
break;
case OS_MAC:
set_unicode_input_mode(UC_OSX);
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
void matrix_init_user() {

View File

@@ -0,0 +1,5 @@
SUBPROJECT_DEFAULT = v2
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

View File

@@ -0,0 +1,29 @@
/*
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"
#ifdef SUBPROJECT_protosplit
#include "protosplit/config.h"
#endif
#ifdef SUBPROJECT_v2
#include "v2/config.h"
#endif
#endif

View File

@@ -0,0 +1 @@
#include "deltasplit75.h"

View File

@@ -0,0 +1,13 @@
#ifndef DELTASPLIT75_H
#define DELTASPLIT75_H
#ifdef SUBPROJECT_v2
#include "v2.h"
#endif
#ifdef SUBPROJECT_protosplit
#include "protosplit.h"
#endif
#include "quantum.h"
#endif

View File

@@ -0,0 +1,2 @@
:0B0000000000000000000000000001F4
:00000001FF

View File

@@ -0,0 +1,2 @@
:0B0000000000000000000000000000F5
:00000001FF

View File

@@ -0,0 +1,162 @@
#include <util/twi.h>
#include <avr/io.h>
#include <stdlib.h>
#include <avr/interrupt.h>
#include <util/twi.h>
#include <stdbool.h>
#include "i2c.h"
#ifdef USE_I2C
// Limits the amount of we wait for any one i2c transaction.
// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
// 9 bits, a single transaction will take around 90μs to complete.
//
// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit
// poll loop takes at least 8 clock cycles to execute
#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8
#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE)
volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
static volatile uint8_t slave_buffer_pos;
static volatile bool slave_has_register_set = false;
// Wait for an i2c operation to finish
inline static
void i2c_delay(void) {
uint16_t lim = 0;
while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT)
lim++;
// easier way, but will wait slightly longer
// _delay_us(100);
}
// Setup twi to run at 100kHz
void i2c_master_init(void) {
// no prescaler
TWSR = 0;
// Set TWI clock frequency to SCL_CLOCK. Need TWBR>10.
// Check datasheets for more info.
TWBR = ((F_CPU/SCL_CLOCK)-16)/2;
}
// Start a transaction with the given i2c slave address. The direction of the
// transfer is set with I2C_READ and I2C_WRITE.
// returns: 0 => success
// 1 => error
uint8_t i2c_master_start(uint8_t address) {
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA);
i2c_delay();
// check that we started successfully
if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START))
return 1;
TWDR = address;
TWCR = (1<<TWINT) | (1<<TWEN);
i2c_delay();
if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) )
return 1; // slave did not acknowledge
else
return 0; // success
}
// Finish the i2c transaction.
void i2c_master_stop(void) {
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
uint16_t lim = 0;
while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT)
lim++;
}
// Write one byte to the i2c slave.
// returns 0 => slave ACK
// 1 => slave NACK
uint8_t i2c_master_write(uint8_t data) {
TWDR = data;
TWCR = (1<<TWINT) | (1<<TWEN);
i2c_delay();
// check if the slave acknowledged us
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
}
// Read one byte from the i2c slave. If ack=1 the slave is acknowledged,
// if ack=0 the acknowledge bit is not set.
// returns: byte read from i2c device
uint8_t i2c_master_read(int ack) {
TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA);
i2c_delay();
return TWDR;
}
void i2c_reset_state(void) {
TWCR = 0;
}
void i2c_slave_init(uint8_t address) {
TWAR = address << 0; // slave i2c address
// TWEN - twi enable
// TWEA - enable address acknowledgement
// TWINT - twi interrupt flag
// TWIE - enable the twi interrupt
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
}
ISR(TWI_vect);
ISR(TWI_vect) {
uint8_t ack = 1;
switch(TW_STATUS) {
case TW_SR_SLA_ACK:
// this device has been addressed as a slave receiver
slave_has_register_set = false;
break;
case TW_SR_DATA_ACK:
// this device has received data as a slave receiver
// The first byte that we receive in this transaction sets the location
// of the read/write location of the slaves memory that it exposes over
// i2c. After that, bytes will be written at slave_buffer_pos, incrementing
// slave_buffer_pos after each write.
if(!slave_has_register_set) {
slave_buffer_pos = TWDR;
// don't acknowledge the master if this memory loctaion is out of bounds
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
ack = 0;
slave_buffer_pos = 0;
}
slave_has_register_set = true;
} else {
i2c_slave_buffer[slave_buffer_pos] = TWDR;
BUFFER_POS_INC();
}
break;
case TW_ST_SLA_ACK:
case TW_ST_DATA_ACK:
// master has addressed this device as a slave transmitter and is
// requesting data.
TWDR = i2c_slave_buffer[slave_buffer_pos];
BUFFER_POS_INC();
break;
case TW_BUS_ERROR: // something went wrong, reset twi state
TWCR = 0;
default:
break;
}
// Reset everything, so we are ready for the next TWI interrupt
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
}
#endif

View File

@@ -0,0 +1,31 @@
#ifndef I2C_H
#define I2C_H
#include <stdint.h>
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#define I2C_READ 1
#define I2C_WRITE 0
#define I2C_ACK 1
#define I2C_NACK 0
#define SLAVE_BUFFER_SIZE 0x10
// i2c SCL clock frequency
#define SCL_CLOCK 100000L
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
void i2c_master_init(void);
uint8_t i2c_master_start(uint8_t address);
void i2c_master_stop(void);
uint8_t i2c_master_write(uint8_t data);
uint8_t i2c_master_read(int);
void i2c_reset_state(void);
void i2c_slave_init(uint8_t address);
#endif

View File

@@ -0,0 +1,31 @@
/*
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/>.
*/
#define USE_SERIAL
#define MASTER_LEFT
// #define _MASTER_RIGHT
// #define EE_HANDS
#ifdef SUBPROJECT_v2
#include "../../v2/config.h"
#endif
#ifdef SUBPROJECT_protosplit
#include "../../protosplit/config.h"
#endif

View File

@@ -0,0 +1,31 @@
#include "deltasplit75.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.
// Fillers to make layering more clear
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_V2(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_SLCK,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PAUS, //modify KC_TRNS to enable ISO Support
KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, //modify KC_TRNS to enable ISO Support
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
KEYMAP_V2(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

View File

@@ -0,0 +1,7 @@
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
AUDIO_ENABLE = no # Audio disabled while using RGB underlight.
EXTRAKEY_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -0,0 +1,31 @@
/*
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/>.
*/
#define USE_SERIAL
#define MASTER_LEFT
// #define _MASTER_RIGHT
// #define EE_HANDS
#ifdef SUBPROJECT_v2
#include "../../v2/config.h"
#endif
#ifdef SUBPROJECT_protosplit
#include "../../protosplit/config.h"
#endif

View File

@@ -0,0 +1,46 @@
#include "deltasplit75.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.
// Fillers to make layering more clear
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
*,-----------------------------------------------------------------------.
* |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Prnt|Ins|Del|
* |----------------------------------------------------------------------|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backspace| Home|
* |----------------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| PgUp|
* |----------------------------------------------------------------------|
* |Ctrl| A| S| D| F| G| H| J| K| L| ;| '|Enter | PgDown|
* |----------------------------------------------------------------------|
* |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End|
* |----------------------------------------------------------------------|
* |CapsLo|Gui |Alt |Sp |Mod | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig|
* `----------------------------------------------------------------------'
*/
KEYMAP_V2(
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_INS, KC_DEL,
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_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace.
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is unneeded ISO enter key.
KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, // KC_TRNS is uneeded ISO layout key.
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
KEYMAP_V2(
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_STOP, KC_MNXT),
};

View File

@@ -0,0 +1,31 @@
/*
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/>.
*/
#define USE_SERIAL
#define MASTER_LEFT
// #define _MASTER_RIGHT
// #define EE_HANDS
#ifdef SUBPROJECT_v2
#include "../../v2/config.h"
#endif
#ifdef SUBPROJECT_protosplit
#include "../../protosplit/config.h"
#endif

View File

@@ -0,0 +1,32 @@
#include "deltasplit75.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.
// Fillers to make layering more clear
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_PROTOSPLIT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_SLCK,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PAUS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
KEYMAP_PROTOSPLIT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

View File

@@ -0,0 +1,318 @@
/*
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/>.
*/
/*
* scan matrix
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "split_util.h"
#include "pro_micro.h"
#include "config.h"
#ifdef USE_I2C
# include "i2c.h"
#else // USE_SERIAL
# include "serial.h"
#endif
#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
#define ERROR_DISCONNECT_COUNT 5
static uint8_t debouncing = DEBOUNCE;
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
static uint8_t error_count = 0;
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
__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)
{
debug_enable = true;
debug_matrix = true;
debug_mouse = true;
// initialize row and col
unselect_rows();
init_cols();
TX_RX_LED_INIT;
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
matrix_init_quantum();
}
uint8_t _matrix_scan(void)
{
// Right hand is stored after the left in the matirx so, we need to offset it
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
select_row(i);
_delay_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols();
if (matrix_debouncing[i+offset] != cols) {
matrix_debouncing[i+offset] = cols;
debouncing = DEBOUNCE;
}
unselect_rows();
}
if (debouncing) {
if (--debouncing) {
_delay_ms(1);
} else {
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
matrix[i+offset] = matrix_debouncing[i+offset];
}
}
}
return 1;
}
#ifdef USE_I2C
// Get rows from other half over i2c
int i2c_transaction(void) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
if (err) goto i2c_error;
// start of matrix stored at 0x00
err = i2c_master_write(0x00);
if (err) goto i2c_error;
// Start read
err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
if (err) goto i2c_error;
if (!err) {
int i;
for (i = 0; i < ROWS_PER_HAND-1; ++i) {
matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
}
matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
i2c_master_stop();
} else {
i2c_error: // the cable is disconnceted, or something else went wrong
i2c_reset_state();
return err;
}
return 0;
}
#else // USE_SERIAL
int serial_transaction(void) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
if (serial_update_buffers()) {
return 1;
}
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[slaveOffset+i] = serial_slave_buffer[i];
}
return 0;
}
#endif
uint8_t matrix_scan(void)
{
int ret = _matrix_scan();
#ifdef USE_I2C
if( i2c_transaction() ) {
#else // USE_SERIAL
if( serial_transaction() ) {
#endif
// turn on the indicator led when halves are disconnected
TXLED1;
error_count++;
if (error_count > ERROR_DISCONNECT_COUNT) {
// reset other half if disconnected
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[slaveOffset+i] = 0;
}
}
} else {
// turn off the indicator led on no error
TXLED0;
error_count = 0;
}
matrix_scan_quantum();
return ret;
}
void matrix_slave_scan(void) {
_matrix_scan();
int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);
#ifdef USE_I2C
for (int i = 0; i < ROWS_PER_HAND; ++i) {
/* i2c_slave_buffer[i] = matrix[offset+i]; */
i2c_slave_buffer[i] = matrix[offset+i];
}
#else // USE_SERIAL
for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_slave_buffer[i] = matrix[offset+i];
}
#endif
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix[row] & ((matrix_row_t)1<<col));
}
inline
matrix_row_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
void matrix_print(void)
{
print("\nr/c 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
phex(row); print(": ");
pbin_reverse16(matrix_get_row(row));
print("\n");
}
}
uint8_t matrix_key_count(void)
{
uint8_t count = 0;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
count += bitpop16(matrix[i]);
}
return count;
}
static void init_cols(void)
{
for(int x = 0; x < MATRIX_COLS; x++) {
_SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
_SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
}
}
static matrix_row_t read_cols(void)
{
matrix_row_t result = 0;
for(int x = 0; x < MATRIX_COLS; x++) {
result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
}
return result;
}
static void unselect_rows(void)
{
for(int x = 0; x < ROWS_PER_HAND; x++) {
_SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
_SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
}
}
static void select_row(uint8_t row)
{
_SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
_SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
}

View File

@@ -0,0 +1,137 @@
DeltaSplit75
======
This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ and https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split
Credit to ahtn and wootpatoot for work on the split keyboard firmware
Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
based boards.
## Case Files
Files are available here: https://github.com/xyxjj/DeltaSplit75-Case-files
#Build Guide
The build guide should be found at https://qmk.fm/deltasplit75
## First Time Setup
Download or clone the whole firmware and navigate to the keyboards/deltasplit75 directory. Once your dev env is setup, you'll be able to generate the .hex using:
```
make v2
or
make v2-YOUR_KEYMAP_NAME (if you make a folder for your keymap)
or
make protosplit (if you have one of the prototype PCBs)
```
You will see a lot of output and if everything worked correctly you will see the built hex files:
```
deltasplit75_v2_protosplit.hex
or
deltasplit74_v2_YOUR_KEYMAP_NAME.hex
or
deltasplit75_v2_default.hex
```
For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
### DeltaSplit75 V2
The PCBs available in groupbuy are all v2, if you've bought one of my prototype PCBs (it says DeltaSplit65 on the silkscreen instead of 75), use the code make protosplit instead
Features
--------
For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
Some features supported by the firmware:
* Either half can connect to the computer via USB, or both halves can be used
independently.
* 75% formfactor
* Support for multiple Bottom Rows
* RGB underglow support
* Split Backspace and ISO support
Flashing
-------
I personally use xLoader to upload my hex files to the keyboard, though any other working software is fine too
Choosing which board to plug the USB cable into (choosing Master)
--------
Because the two boards are identical, the firmware has logic to differentiate the left and right board.
It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
### Setting the left hand as master
If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
### Setting the right hand as master
If you always plug the usb cable into the right board, add an extra flag to your `config.h`
```
#define MASTER_RIGHT
```
### Setting EE_hands to use either hands as master
If you define `EE_HANDS` in your `config.h`, you will need to set the
EEPROM for the left and right halves.
The EEPROM is used to store whether the
half is left handed or right handed. This makes it so that the same firmware
file will run on both hands instead of having to flash left and right handed
versions of the firmware to each half. To flash the EEPROM file for the left
half run:
```
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
// or the equivalent in dfu-programmer
```
and similarly for right half
```
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
// or the equivalent in dfu-programmer
```
NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
Note that you need to program both halves, but you have the option of using
different keymaps for each half. You could program the left half with a QWERTY
layout and the right half with a Colemak layout using bootmagic's default layout option.
Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
right half is connected.
Notes on Using Pro Micro 3.3V
-----------------------------
Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
the frequency on the 3.3V board.
Also, if the slave board is producing weird characters in certain columns,
update the following line in `matrix.c` to the following:
```
// _delay_us(30); // without this wait read unstable value.
_delay_us(300); // without this wait read unstable value.
```

View File

@@ -0,0 +1,87 @@
SRC += matrix.c \
i2c.c \
split_util.c \
serial.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
# 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 ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI controls
AUDIO_ENABLE ?= no # Audio output on port C6
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SUBPROJECT_rev1 ?= yes
USE_I2C ?= yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
CUSTOM_MATRIX = yes
avrdude: build
ls /dev/tty* > /tmp/1; \
echo "Reset your Pro Micro now"; \
while [[ -z $$USB ]]; do \
sleep 1; \
ls /dev/tty* > /tmp/2; \
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
done; \
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
.PHONY: avrdude

View File

@@ -0,0 +1,228 @@
/*
* WARNING: be careful changing this code, it is very timing dependent
*/
#ifndef F_CPU
#define F_CPU 16000000
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdbool.h>
#include "serial.h"
#ifdef USE_SERIAL
// Serial pulse period in microseconds. Its probably a bad idea to lower this
// value.
#define SERIAL_DELAY 24
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
#define SLAVE_DATA_CORRUPT (1<<0)
volatile uint8_t status = 0;
inline static
void serial_delay(void) {
_delay_us(SERIAL_DELAY);
}
inline static
void serial_output(void) {
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
}
// make the serial pin an input with pull-up resistor
inline static
void serial_input(void) {
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
}
inline static
uint8_t serial_read_pin(void) {
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
}
inline static
void serial_low(void) {
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
}
inline static
void serial_high(void) {
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
}
void serial_master_init(void) {
serial_output();
serial_high();
}
void serial_slave_init(void) {
serial_input();
// Enable INT0
EIMSK |= _BV(INT0);
// Trigger on falling edge of INT0
EICRA &= ~(_BV(ISC00) | _BV(ISC01));
}
// Used by the master to synchronize timing with the slave.
static
void sync_recv(void) {
serial_input();
// This shouldn't hang if the slave disconnects because the
// serial line will float to high if the slave does disconnect.
while (!serial_read_pin());
serial_delay();
}
// Used by the slave to send a synchronization signal to the master.
static
void sync_send(void) {
serial_output();
serial_low();
serial_delay();
serial_high();
}
// Reads a byte from the serial line
static
uint8_t serial_read_byte(void) {
uint8_t byte = 0;
serial_input();
for ( uint8_t i = 0; i < 8; ++i) {
byte = (byte << 1) | serial_read_pin();
serial_delay();
_delay_us(1);
}
return byte;
}
// Sends a byte with MSB ordering
static
void serial_write_byte(uint8_t data) {
uint8_t b = 8;
serial_output();
while( b-- ) {
if(data & (1 << b)) {
serial_high();
} else {
serial_low();
}
serial_delay();
}
}
// interrupt handle to be used by the slave device
ISR(SERIAL_PIN_INTERRUPT) {
sync_send();
uint8_t checksum = 0;
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
serial_write_byte(serial_slave_buffer[i]);
sync_send();
checksum += serial_slave_buffer[i];
}
serial_write_byte(checksum);
sync_send();
// wait for the sync to finish sending
serial_delay();
// read the middle of pulses
_delay_us(SERIAL_DELAY/2);
uint8_t checksum_computed = 0;
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
serial_master_buffer[i] = serial_read_byte();
sync_send();
checksum_computed += serial_master_buffer[i];
}
uint8_t checksum_received = serial_read_byte();
sync_send();
serial_input(); // end transaction
if ( checksum_computed != checksum_received ) {
status |= SLAVE_DATA_CORRUPT;
} else {
status &= ~SLAVE_DATA_CORRUPT;
}
}
inline
bool serial_slave_DATA_CORRUPT(void) {
return status & SLAVE_DATA_CORRUPT;
}
// Copies the serial_slave_buffer to the master and sends the
// serial_master_buffer to the slave.
//
// Returns:
// 0 => no error
// 1 => slave did not respond
int serial_update_buffers(void) {
// this code is very time dependent, so we need to disable interrupts
cli();
// signal to the slave that we want to start a transaction
serial_output();
serial_low();
_delay_us(1);
// wait for the slaves response
serial_input();
serial_high();
_delay_us(SERIAL_DELAY);
// check if the slave is present
if (serial_read_pin()) {
// slave failed to pull the line low, assume not present
sei();
return 1;
}
// if the slave is present syncronize with it
sync_recv();
uint8_t checksum_computed = 0;
// receive data from the slave
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
serial_slave_buffer[i] = serial_read_byte();
sync_recv();
checksum_computed += serial_slave_buffer[i];
}
uint8_t checksum_received = serial_read_byte();
sync_recv();
if (checksum_computed != checksum_received) {
sei();
return 1;
}
uint8_t checksum = 0;
// send data to the slave
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
serial_write_byte(serial_master_buffer[i]);
sync_recv();
checksum += serial_master_buffer[i];
}
serial_write_byte(checksum);
sync_recv();
// always, release the line when not in use
serial_output();
serial_high();
sei();
return 0;
}
#endif

View File

@@ -0,0 +1,26 @@
#ifndef MY_SERIAL_H
#define MY_SERIAL_H
#include "config.h"
#include <stdbool.h>
/* TODO: some defines for interrupt setup */
#define SERIAL_PIN_DDR DDRD
#define SERIAL_PIN_PORT PORTD
#define SERIAL_PIN_INPUT PIND
#define SERIAL_PIN_MASK _BV(PD0)
#define SERIAL_PIN_INTERRUPT INT0_vect
#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_COLS+7)/8 *MATRIX_ROWS/2)
#define SERIAL_MASTER_BUFFER_LENGTH 1
// Buffers for master - slave communication
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
void serial_master_init(void);
void serial_slave_init(void);
int serial_update_buffers(void);
bool serial_slave_data_corrupt(void);
#endif

View File

@@ -0,0 +1,81 @@
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
#include "config.h"
#ifdef USE_I2C
# include "i2c.h"
#else
# include "serial.h"
#endif
volatile bool isLeftHand = true;
static void setup_handedness(void) {
#ifdef EE_HANDS
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
#else
// I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
isLeftHand = !has_usb();
#else
isLeftHand = has_usb();
#endif
#endif
}
static void keyboard_master_setup(void) {
#ifdef USE_I2C
i2c_master_init();
#else
serial_master_init();
#endif
}
static void keyboard_slave_setup(void) {
#ifdef USE_I2C
i2c_slave_init(SLAVE_I2C_ADDRESS);
#else
serial_slave_init();
#endif
}
bool has_usb(void) {
USBCON |= (1 << OTGPADE); //enables VBUS pad
_delay_us(5);
return (USBSTA & (1<<VBUS)); //checks state of VBUS
}
void split_keyboard_setup(void) {
setup_handedness();
if (has_usb()) {
keyboard_master_setup();
} else {
keyboard_slave_setup();
}
sei();
}
void keyboard_slave_loop(void) {
matrix_init();
while (1) {
matrix_slave_scan();
}
}
// this code runs before the usb and keyboard is initialized
void matrix_setup(void) {
split_keyboard_setup();
if (!has_usb()) {
keyboard_slave_loop();
}
}

View File

@@ -0,0 +1,22 @@
#ifndef SPLIT_KEYBOARD_UTIL_H
#define SPLIT_KEYBOARD_UTIL_H
#include <stdbool.h>
#ifdef EE_HANDS
#define EECONFIG_BOOTMAGIC_END (uint8_t *)10
#define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END
#endif
#define SLAVE_I2C_ADDRESS 0x32
extern volatile bool isLeftHand;
// slave version of matix scan, defined in matrix.c
void matrix_slave_scan(void);
void split_keyboard_setup(void);
bool has_usb(void);
void keyboard_slave_loop(void);
#endif

View File

@@ -0,0 +1,3 @@
ifndef MAKEFILE_INCLUDED
include ../../Makefile
endif

View File

@@ -0,0 +1,90 @@
/*
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 0x3060
#define DEVICE_VER 0x0001
#define MANUFACTURER xyxjj
#define PRODUCT DeltaSplit75
#define DESCRIPTION 75% split keyboard
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 14
#define MATRIX_COLS 8
// wiring of each half
#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 }
#define MATRIX_COL_PINS { B6, B5, B4, E6, D7, C6, D4, D1}
#define CATERINA_BOOTLOADER
/* 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)) \
)
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_TIMER
#define RGBLED_NUM 12 // Number of LEDs
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
/*
* 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

View File

@@ -0,0 +1,5 @@
BACKLIGHT_ENABLE = no
ifndef QUANTUM_DIR
include ../../../Makefile
endif

View File

@@ -0,0 +1,14 @@
#include "deltasplit75.h"
void matrix_init_kb(void) {
// // green led on
// DDRD |= (1<<5);
// PORTD &= ~(1<<5);
// // orange led on
// DDRB |= (1<<0);
// PORTB &= ~(1<<0);
matrix_init_user();
};

View File

@@ -0,0 +1,62 @@
#ifndef V2_H
#define V2_H
#include "deltasplit75.h"
//void promicro_bootloader_jmp(bool program);
#include "quantum.h"
//void promicro_bootloader_jmp(bool program);
//matrix is defined in a weird way here; the layout on both sides are asymmetrical, but the "matrix" is symmetrical but with empty gaps
//the last column is defined as a separate row because the firmware currently doesnt support more than 8 columns (this layout has 9 columns per side) K45 and K110 are the Bs on both sides; K53 and K106 are extra keys for ISO
#define KEYMAP_V2( \
K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \
K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \
K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \
K30, K31, K32, K33, K34, K35, K100, K101, K102, K103, K104, K105, K106, K107, K135, \
K40, K53, K41, K42, K43, K44, K45, K110, K111, K112, K113, K114, K115, K116, K117, K136, \
K50, K51, K52, K54, K55, K120, K121, K122, K123, K126, K127, K137 \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, KC_NO}, \
{ K10, K11, K12, K13, K14, K15, K16, KC_NO}, \
{ K20, K21, K22, K23, K24, K25, KC_NO, KC_NO}, \
{ K30, K31, K32, K33, K34, K35, KC_NO, KC_NO}, \
{ K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \
{ K50, K51, K52, K53, K54, K55, KC_NO, KC_NO}, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \
{ K70 , K71, K72, K73, K74, K75, K76, K77}, \
{ K80, K81, K82, K83, K84, K85, K86, K87}, \
{ K90, K91, K92, K93, K94, K95, K96, K97}, \
{ K100, K101, K102, K103, K104, K105, K106, K107}, \
{ K110, K111, K112, K113, K114, K115, K116, K117}, \
{ K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \
{ KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \
}
#define KEYMAP_PROTOSPLIT( \
K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \
K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \
K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \
K30, K31, K32, K33, K34, K35, K100, K101, K102, K103, K104, K105, K107, K135, \
K40, K41, K42, K43, K44, K45, K110, K111, K112, K113, K114, K115, K116, K117, K136, \
K50, K51, K52, K54, K55, K120, K121, K122, K123, K126, K127, K137 \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, KC_NO}, \
{ K10, K11, K12, K13, K14, K15, K16, KC_NO}, \
{ K20, K21, K22, K23, K24, K25, KC_NO, KC_NO}, \
{ K30, K31, K32, K33, K34, K35, KC_NO, KC_NO}, \
{ K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \
{ K50, K51, K52, KC_NO, K54, K55, KC_NO, KC_NO}, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \
{ K70 , K71, K72, K73, K74, K75, K76, K77}, \
{ K80, K81, K82, K83, K84, K85, K86, K87}, \
{ K90, K91, K92, K93, K94, K95, K96, K97}, \
{ K100, K101, K102, K103, K104, K105, KC_NO, K107}, \
{ K110, K111, K112, K113, K114, K115, K116, K117}, \
{ K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \
{ KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \
}
#endif

View File

@@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FN:
if (record->event.pressed) {
@@ -73,8 +73,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_FN);
dk60_esc_led_off();
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -148,7 +148,7 @@ void persistant_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -177,10 +177,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
void matrix_init_user(void) {

View File

@@ -258,10 +258,10 @@ void matrix_scan_user(void) {
}
};
//bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//level_t process_user(uint16_t keycode, keyrecord_t *record) {
// switch (keycode) {
// case QWERTY:
// return false
// return STOP_PROCESSING
// break;
// case LOWER:
// if (record->event.pressed) {
@@ -271,7 +271,7 @@ void matrix_scan_user(void) {
// layer_off(_LOWER);
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
// }
// return false;
// return STOP_PROCESSING;
// break;
// case RAISE:
// if (record->event.pressed) {
@@ -281,9 +281,9 @@ void matrix_scan_user(void) {
// layer_off(_RAISE);
// update_tri_layer(_LOWER, _RAISE, _ADJUST);
// }
// return false;
// return STOP_PROCESSING;
// break;
// }
// return true;
// return CONTINUE_PROCESSING;
//}

View File

@@ -267,7 +267,7 @@ void send_chord(void)
virtser_send(0);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record)
level_t process_user(uint16_t keycode, keyrecord_t *record)
{
// We need to track keypresses in all modes, in case the user
// changes mode whilst pressing other keys.
@@ -275,7 +275,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
pressed_count++;
else
pressed_count--;
return true;
return CONTINUE_PROCESSING;
}
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)

View File

@@ -357,23 +357,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
return STOP_PROCESSING;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -1043,7 +1043,7 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
UCIS_SYM("tm", 0x2122)
);
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
level_t process_user (uint16_t keycode, keyrecord_t *record) {
#if KEYLOGGER_ENABLE
if (log_enable) {
uint8_t layer = biton32(layer_state);
@@ -1086,11 +1086,11 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
ang_tap (KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0);
return false;
return STOP_PROCESSING;
}
}
return true;
return CONTINUE_PROCESSING;
}
void qk_ucis_symbol_fallback (void) {

View File

@@ -247,7 +247,7 @@ void matrix_scan_user(void) {
}
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BEL_F0:
if(record->event.pressed){
@@ -260,7 +260,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(SWPH);
}
return false;
return STOP_PROCESSING;
}
break;
case BEL_F1:
@@ -268,7 +268,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(SYMB);
layer_off(NUMP);
return false;
return STOP_PROCESSING;
}
break;
case E_SHRUG: // ¯\_(ツ)_/¯
@@ -287,7 +287,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
tap(KC_SLSH); // Arm
process_unicode((0x00AF|QK_UNICODE), record); // Hand
}
return false;
return STOP_PROCESSING;
break;
case E_TFLIP: // (╯°□°)╯ ︵ ┻━┻
if (record->event.pressed) {
@@ -309,7 +309,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
process_unicode((0x2501|QK_UNICODE), record); // Table
process_unicode((0x253B|QK_UNICODE), record); // Table
}
return false;
return STOP_PROCESSING;
break;
case E_TSET: // ┬──┬ ( ゜-゜ノ)
if (record->event.pressed) {
@@ -331,11 +331,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
tap(KC_0);
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
void belak_td_each(qk_tap_dance_state_t *state, void *user_data) {

View File

@@ -168,20 +168,20 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
return STOP_PROCESSING;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
return STOP_PROCESSING;
break;
case RGB_SLD:
if (record->event.pressed) {
@@ -189,10 +189,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_mode(1);
#endif
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -165,20 +165,20 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
return STOP_PROCESSING;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
return STOP_PROCESSING;
break;
case RGB_SLD:
if (record->event.pressed) {
@@ -186,10 +186,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_mode(1);
#endif
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -159,7 +159,7 @@ void matrix_init_user(void) {
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case RGB_FF00BB:
@@ -170,10 +170,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_setrgb(0xff,0x00,0xbb);
#endif
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
LEADER_EXTERNS();

View File

@@ -165,20 +165,20 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
return STOP_PROCESSING;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
return STOP_PROCESSING;
break;
case RGB_SLD:
if (record->event.pressed) {
@@ -186,10 +186,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_mode(1);
#endif
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -82,20 +82,20 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
return STOP_PROCESSING;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
return STOP_PROCESSING;
break;
case RGB_SLD:
if (record->event.pressed) {
@@ -103,10 +103,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_mode(1);
#endif
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -62,7 +62,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
};
bool status_led1_on = false, status_led2_on = false, status_led3_on = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case RGB_FF0000:
@@ -72,7 +72,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(KC_1); unregister_code(KC_1);
#endif
}
return false;
return STOP_PROCESSING;
break;
case RGB_00FF00:
if (record->event.pressed) {
@@ -81,7 +81,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(KC_2); unregister_code(KC_2);
#endif
}
return false;
return STOP_PROCESSING;
break;
case RGB_0000FF:
if (record->event.pressed) {
@@ -90,7 +90,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(KC_3); unregister_code(KC_3);
#endif
}
return false;
return STOP_PROCESSING;
break;
case RGB_FFFFFF:
if (record->event.pressed) {
@@ -99,7 +99,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(KC_4); unregister_code(KC_4);
#endif
}
return false;
return STOP_PROCESSING;
break;
case RGB_TOGGLE:
if (record->event.pressed) {
@@ -108,7 +108,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(KC_EQL); unregister_code(KC_EQL);
#endif
}
return false;
return STOP_PROCESSING;
break;
case LED1:
if (record->event.pressed) {
@@ -120,7 +120,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
status_led1_on = true;
}
}
return false;
return STOP_PROCESSING;
break;
case LED2:
if (record->event.pressed) {
@@ -132,7 +132,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
status_led2_on = true;
}
}
return false;
return STOP_PROCESSING;
break;
case LED3:
if (record->event.pressed) {
@@ -144,8 +144,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
status_led3_on = true;
}
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -189,20 +189,20 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
return MACRO_NONE;
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
return STOP_PROCESSING;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
return STOP_PROCESSING;
break;
case RGB_SLD:
if (record->event.pressed) {
@@ -210,10 +210,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_mode(1);
#endif
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -14,11 +14,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {
@@ -54,8 +54,8 @@ void matrix_scan_user(void) {
}
__attribute__ ((weak))
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
__attribute__ ((weak))

View File

@@ -132,8 +132,8 @@ void matrix_init_user(void) {
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -12,11 +12,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -250,7 +250,7 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -259,7 +259,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -268,7 +268,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -291,7 +291,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -314,7 +314,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
TOG_STATUS = false;
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case BACKLIT:
if (record->event.pressed) {
@@ -325,7 +325,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
case RGB_MOD:
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
@@ -334,10 +334,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_step();
RGB_current_mode = rgblight_config.mode;
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
void matrix_init_user(void) {

View File

@@ -252,7 +252,7 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -284,7 +284,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -307,7 +307,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
TOG_STATUS = false;
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case BACKLIT:
if (record->event.pressed) {
@@ -318,7 +318,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
//my attempt for RGB layer lock indication via changing the mode, still have to figure out how to not have other keypress not override this mode
case TG_NUMLAY:
@@ -335,7 +335,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_mode(RGB_current_mode);
layer_off(_NUMLAY); }
}
return false;
return STOP_PROCESSING;
break;
case RGB_MOD:
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
@@ -344,10 +344,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_step();
RGB_current_mode = rgblight_config.mode;
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
void matrix_init_user(void) {

View File

@@ -55,8 +55,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -150,7 +150,7 @@ float tone_colemak[][2] = SONG(COLEMAK_SOUND);
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWR:
if (record->event.pressed) {
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
layer_off(_CDH);
}
return false;
return STOP_PROCESSING;
break;
case CDH:
@@ -169,7 +169,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
layer_on(_CDH);
}
return false;
return STOP_PROCESSING;
break;
case SYM:
@@ -178,11 +178,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
layer_off(_SYM);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -152,7 +152,7 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -179,7 +179,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -199,7 +199,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case BACKLIT:
if (record->event.pressed) {
@@ -210,10 +210,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
};
void matrix_init_user(void) {

View File

@@ -393,8 +393,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -45,7 +45,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
};
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
level_t process_user (uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case KC_FN0:
if (record->event.pressed) {
@@ -64,5 +64,5 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) {
}
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -14,11 +14,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -191,7 +191,7 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -209,7 +209,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -218,7 +218,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -228,7 +228,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -238,7 +238,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case BACKLIT:
if (record->event.pressed) {
@@ -249,10 +249,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
};
void matrix_init_user(void) {

View File

@@ -79,8 +79,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -14,11 +14,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -1012,7 +1012,7 @@ uint32_t layer_state_set_kb(uint32_t state)
return state;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
static bool lshift = false;
static bool rshift = false;
static uint8_t layer = 0;
@@ -1059,11 +1059,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// double-space enter space layer
case LSPACE:
process_doublespace(record->event.pressed, &lspace_active, &rspace_active, &lspace_emitted);
return false;
return STOP_PROCESSING;
break;
case RSPACE:
process_doublespace(record->event.pressed, &rspace_active, &lspace_active, &rspace_emitted);
return false;
return STOP_PROCESSING;
break;
#endif
@@ -1116,7 +1116,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
unregister_code(KC_COMM);
}
}
return false;
return STOP_PROCESSING;
break;
case KC_DOT:
if (record->event.pressed) {
@@ -1128,7 +1128,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
unregister_code(KC_DOT);
}
}
return false;
return STOP_PROCESSING;
break;
// layout switchers
@@ -1136,14 +1136,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
#ifdef LAYOUT_DVORAK
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
#endif
#ifdef LAYOUT_COLEMAK
@@ -1151,7 +1151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
#endif
#ifdef LAYOUT_WORKMAN
@@ -1159,7 +1159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_WORKMAN);
}
return false;
return STOP_PROCESSING;
break;
#endif
#ifdef LAYOUT_NORMAN
@@ -1167,7 +1167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_NORMAN);
}
return false;
return STOP_PROCESSING;
break;
#endif
@@ -1181,7 +1181,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_code(keycode);
unregister_code(keycode);
}
return false;
return STOP_PROCESSING;
break;
// layer switcher
@@ -1199,7 +1199,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_GREEKU);
layer_off(_GREEKL);
}
return false;
return STOP_PROCESSING;
break;
// OS switchers
@@ -1208,21 +1208,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBSPS_ENABLE
led_set_unicode_input_mode();
#endif
return false;
return STOP_PROCESSING;
break;
case WIN:
set_unicode_input_mode(UC_WINC);
#ifdef RGBSPS_ENABLE
led_set_unicode_input_mode();
#endif
return false;
return STOP_PROCESSING;
break;
case OSX:
set_unicode_input_mode(UC_OSX);
#ifdef RGBSPS_ENABLE
led_set_unicode_input_mode();
#endif
return false;
return STOP_PROCESSING;
break;
// glow mode changer
@@ -1236,7 +1236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
led_reset();
rgbsps_send();
}
return false;
return STOP_PROCESSING;
break;
#endif
@@ -1258,11 +1258,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBSPS_DEMO_ENABLE
case RGBDEMO:
led_demo();
return false;
return STOP_PROCESSING;
break;
#endif
}
return true;
return CONTINUE_PROCESSING;
}
void set_output_user(uint8_t output) {

View File

@@ -294,8 +294,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -45,11 +45,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -178,9 +178,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
};
// For Dynamic Macros.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
return STOP_PROCESSING;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -151,26 +151,26 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -241,8 +241,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
};
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user (uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
// Runs just one time when the keyboard initializes.

View File

@@ -251,13 +251,13 @@ void persistant_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -267,7 +267,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -277,10 +277,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
/*

View File

@@ -288,25 +288,25 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -316,7 +316,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -326,7 +326,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case BACKLIT:
if (record->event.pressed) {
@@ -337,7 +337,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
case PLOVER:
if (record->event.pressed) {
@@ -352,16 +352,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
keymap_config.nkro = 1;
eeconfig_update_keymap(keymap_config.raw);
}
return false;
return STOP_PROCESSING;
break;
case EXT_PLV:
if (record->event.pressed) {
layer_off(_PLOVER);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
/*

View File

@@ -147,8 +147,8 @@ void matrix_init_user(void) {
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -6,9 +6,6 @@
#define _FUN 3
#define _MS 4
#define _______ KC_NO
#define XXXXXXX KC_TRNS
#define _DK_ACT 0
#define _DK_REL 1
#define _KC_COMS 2

View File

@@ -78,11 +78,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -81,8 +81,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -84,8 +84,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -375,8 +375,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -14,11 +14,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -42,8 +42,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -219,7 +219,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
uint8_t layer;
layer = biton32(layer_state);
if (layer == PROG2) {
@@ -238,5 +238,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -14,11 +14,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_set_kb(uint8_t usb_led) {

View File

@@ -88,8 +88,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -88,8 +88,8 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
level_t process_user(uint16_t keycode, keyrecord_t *record) {
return CONTINUE_PROCESSING;
}
void led_set_user(uint8_t usb_led) {

View File

@@ -29,11 +29,11 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
level_t process_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
return CONTINUE_PROCESSING;
}
void led_init_ports(void) {

View File

@@ -201,7 +201,7 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -219,7 +219,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -228,7 +228,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -266,7 +266,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
TOG_STATUS = false;
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case BACKLIT:
if (record->event.pressed) {
@@ -277,7 +277,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
unregister_code(KC_RSFT);
}
return false;
return STOP_PROCESSING;
break;
//led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
case RGB_MOD:
@@ -286,10 +286,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgblight_step();
RGB_current_mode = rgblight_config.mode;
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}
void matrix_init_user(void) {

View File

@@ -152,7 +152,7 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -179,7 +179,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -199,7 +199,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case ADJUST:
if (record->event.pressed) {
@@ -207,8 +207,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
layer_off(_ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -152,7 +152,7 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -179,7 +179,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -199,7 +199,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case ADJUST:
if (record->event.pressed) {
@@ -207,8 +207,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
layer_off(_ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -143,7 +143,7 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -152,7 +152,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -180,7 +180,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -190,7 +190,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case ADJUST:
if (record->event.pressed) {
@@ -198,8 +198,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
layer_off(_ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

View File

@@ -173,7 +173,7 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
level_t process_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
return STOP_PROCESSING;
break;
case COLEMAK:
if (record->event.pressed) {
@@ -191,7 +191,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_COLEMAK);
}
return false;
return STOP_PROCESSING;
break;
case DVORAK:
if (record->event.pressed) {
@@ -200,7 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
persistent_default_layer_set(1UL<<_DVORAK);
}
return false;
return STOP_PROCESSING;
break;
case LOWER:
if (record->event.pressed) {
@@ -210,7 +210,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case RAISE:
if (record->event.pressed) {
@@ -220,7 +220,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
return false;
return STOP_PROCESSING;
break;
case ADJUST:
if (record->event.pressed) {
@@ -228,8 +228,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
layer_off(_ADJUST);
}
return false;
return STOP_PROCESSING;
break;
}
return true;
return CONTINUE_PROCESSING;
}

Some files were not shown because too many files have changed in this diff Show More