aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile21
-rw-r--r--build_keyboard.mk10
-rw-r--r--keyboards/M10A/M10A.c5
-rw-r--r--keyboards/M10A/M10A.h19
-rw-r--r--keyboards/M10A/Makefile3
-rw-r--r--keyboards/M10A/config.h82
-rw-r--r--keyboards/M10A/keymaps/default/Makefile3
-rw-r--r--keyboards/M10A/keymaps/default/keymap.c49
-rw-r--r--keyboards/M10A/rules.mk68
-rw-r--r--keyboards/amjpad/amjpad.h17
-rw-r--r--keyboards/amjpad/keymaps/max/keymap.c102
-rw-r--r--keyboards/amjpad/keymaps/ortho_left/keymap.c65
-rw-r--r--keyboards/amjpad/keymaps/ortho_right/keymap.c65
-rw-r--r--keyboards/clueboard/keymaps/serubin/Makefile4
-rw-r--r--keyboards/clueboard/keymaps/serubin/keymap.c103
-rw-r--r--keyboards/clueboard/keymaps/serubin/layout-base.pngbin0 -> 38703 bytes
-rw-r--r--keyboards/clueboard/keymaps/serubin/layout-fn.pngbin0 -> 35216 bytes
-rw-r--r--keyboards/clueboard/keymaps/serubin/layout-media.pngbin0 -> 28944 bytes
-rw-r--r--keyboards/clueboard/keymaps/serubin/readme.md23
-rw-r--r--keyboards/clueboard/keymaps/shift_fn/keymap.c6
-rw-r--r--keyboards/clueboard/keymaps/skully/keymap.c35
-rw-r--r--keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h2
-rw-r--r--keyboards/ergodox/infinity/matrix.c1
-rw-r--r--keyboards/ergodox/keymaps/dvorak_programmer/keymap.c6
-rw-r--r--keyboards/ergodox/keymaps/ordinary/keymap.c2
-rw-r--r--keyboards/ergodox/keymaps/siroken3/default.pngbin0 -> 193672 bytes
-rw-r--r--keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.pngbin0 -> 257921 bytes
-rw-r--r--keyboards/ergodox/keymaps/siroken3/default_highres.pngbin0 -> 1459389 bytes
-rw-r--r--keyboards/ergodox/keymaps/siroken3/keymap.c187
-rw-r--r--keyboards/ergodox/keymaps/siroken3/readme.md15
-rw-r--r--keyboards/ergodox/keymaps/yoruian/keymap.c4
-rw-r--r--keyboards/ergodox/keymaps/yoruian/yoruian.h56
-rw-r--r--keyboards/frosty_flake/matrix.c4
-rw-r--r--keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c1
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c1
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h (renamed from keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/Makefile (renamed from keyboards/handwired/MS-sculpt-mobile/Makefile)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/babblePaste.c (renamed from keyboards/handwired/MS-sculpt-mobile/babblePaste.c)7
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/babblePaste.h (renamed from keyboards/handwired/MS-sculpt-mobile/babblePaste.h)2
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/babblePaste.txt (renamed from keyboards/handwired/MS-sculpt-mobile/babblePaste.txt)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/config.h (renamed from keyboards/handwired/MS-sculpt-mobile/config.h)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h)2
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c)2
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h)2
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c)4
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md (renamed from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/readme.md (renamed from keyboards/handwired/MS-sculpt-mobile/readme.md)0
-rw-r--r--keyboards/handwired/MS_sculpt_mobile/rules.mk (renamed from keyboards/handwired/MS-sculpt-mobile/rules.mk)0
-rw-r--r--keyboards/handwired/atreus50/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/promethium/config.h37
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/Makefile2
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/README.md4
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c192
-rw-r--r--keyboards/handwired/promethium/matrix.c306
-rw-r--r--keyboards/handwired/promethium/promethium.c5
-rw-r--r--keyboards/handwired/promethium/rules.mk6
-rw-r--r--keyboards/kitten_paw/keymaps/ickerwx/config.h2
-rw-r--r--keyboards/kitten_paw/keymaps/ickerwx/keymap.c2
-rw-r--r--keyboards/mitosis/Makefile3
-rw-r--r--keyboards/mitosis/config.h87
-rw-r--r--keyboards/mitosis/keymaps/default/keymap.c221
-rw-r--r--keyboards/mitosis/matrix.c164
-rw-r--r--keyboards/mitosis/mitosis.c31
-rw-r--r--keyboards/mitosis/mitosis.h67
-rw-r--r--keyboards/mitosis/readme.md33
-rw-r--r--keyboards/mitosis/rules.mk81
-rw-r--r--keyboards/planck/keymaps/lae3/Makefile23
-rw-r--r--keyboards/planck/keymaps/lae3/config.h8
-rw-r--r--keyboards/planck/keymaps/lae3/keymap.c262
-rw-r--r--keyboards/planck/keymaps/lae3/readme.md1
-rw-r--r--keyboards/planck/keymaps/lucas/keymap.c6
-rw-r--r--keyboards/planck/keymaps/priyadi/config.h3
-rw-r--r--keyboards/preonic/keymaps/CMD-Preonic/keymap.c10
-rw-r--r--keyboards/tv44/keymaps/xyverz/keymap.c151
-rw-r--r--quantum/fauxclicky.c15
-rw-r--r--quantum/fauxclicky.h10
-rw-r--r--quantum/keymap_common.c7
-rw-r--r--quantum/keymap_extras/keymap_german_ch.h4
-rw-r--r--quantum/process_keycode/process_printer.c22
-rw-r--r--quantum/process_keycode/process_printer.h2
-rw-r--r--quantum/process_keycode/process_printer_bb.c4
-rw-r--r--quantum/process_keycode/process_unicode.c1
-rw-r--r--quantum/process_keycode/process_unicode_common.c1
-rw-r--r--quantum/visualizer/lcd_keyframes.c4
-rw-r--r--tmk_core/common/action.c2
-rw-r--r--tmk_core/common/avr/suspend.c1
-rw-r--r--tmk_core/common/mousekey.h13
-rw-r--r--tmk_core/rules.mk6
91 files changed, 2545 insertions, 234 deletions
diff --git a/Makefile b/Makefile
index 9d9c9629d..6a93692bf 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,8 @@ override SILENT := false
21 21
22ON_ERROR := error_occurred=1 22ON_ERROR := error_occurred=1
23 23
24BREAK_ON_ERRORS = no
25
24STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) 26STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST))
25ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) 27ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
26ROOT_DIR := $(dir $(ROOT_MAKEFILE)) 28ROOT_DIR := $(dir $(ROOT_MAKEFILE))
@@ -462,20 +464,25 @@ endef
462 464
463include $(ROOT_DIR)/message.mk 465include $(ROOT_DIR)/message.mk
464 466
467ifeq ($(strip $(BREAK_ON_ERRORS)), yes)
468HANDLE_ERROR = exit 1
469else
470HANDLE_ERROR = echo $$error_occurred > $(ERROR_FILE)
471endif
472
465# The empty line is important here, as it will force a new shell to be created for each command 473# The empty line is important here, as it will force a new shell to be created for each command
466# Otherwise the command line will become too long with a lot of keyboards and keymaps 474# Otherwise the command line will become too long with a lot of keyboards and keymaps
467define RUN_COMMAND 475define RUN_COMMAND
468+error_occurred=0;\ 476+error_occurred=0;\
469$(COMMAND_$(SILENT_MODE)_$(COMMAND))\ 477$(COMMAND_$(SILENT_MODE)_$(COMMAND))\
470if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; 478if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
471 479
472 480
473endef 481endef
474define RUN_TEST 482define RUN_TEST
475+error_occurred=0;\ 483+error_occurred=0;\
476$($(TEST)_COMMAND)\ 484$($(TEST)_COMMAND)\
477if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; 485if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
478
479endef 486endef
480 487
481# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps 488# Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps
@@ -527,14 +534,22 @@ test: test-all
527.PHONY: test-clean 534.PHONY: test-clean
528test-clean: test-all-clean 535test-clean: test-all-clean
529 536
537ifdef SKIP_VERSION
538SKIP_GIT := yes
539endif
540
530# Generate the version.h file 541# Generate the version.h file
531ifndef SKIP_GIT 542ifndef SKIP_GIT
532 GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") 543 GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
533else 544else
534 GIT_VERSION := NA 545 GIT_VERSION := NA
535endif 546endif
547ifndef SKIP_VERSION
536BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") 548BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
537$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) 549$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
538$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) 550$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
551else
552BUILD_DATE := NA
553endif
539 554
540include $(ROOT_DIR)/testlist.mk 555include $(ROOT_DIR)/testlist.mk
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 9da8277db..9fa8c3126 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -176,22 +176,26 @@ endif
176 176
177ifeq ($(strip $(UCIS_ENABLE)), yes) 177ifeq ($(strip $(UCIS_ENABLE)), yes)
178 OPT_DEFS += -DUCIS_ENABLE 178 OPT_DEFS += -DUCIS_ENABLE
179 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c 179 UNICODE_COMMON = yes
180 SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c 180 SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
181endif 181endif
182 182
183ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) 183ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
184 OPT_DEFS += -DUNICODEMAP_ENABLE 184 OPT_DEFS += -DUNICODEMAP_ENABLE
185 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c 185 UNICODE_COMMON = yes
186 SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c 186 SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
187endif 187endif
188 188
189ifeq ($(strip $(UNICODE_ENABLE)), yes) 189ifeq ($(strip $(UNICODE_ENABLE)), yes)
190 OPT_DEFS += -DUNICODE_ENABLE 190 OPT_DEFS += -DUNICODE_ENABLE
191 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c 191 UNICODE_COMMON = yes
192 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c 192 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
193endif 193endif
194 194
195ifeq ($(strip $(UNICODE_COMMON)), yes)
196 SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
197endif
198
195ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) 199ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
196 OPT_DEFS += -DRGBLIGHT_ENABLE 200 OPT_DEFS += -DRGBLIGHT_ENABLE
197 SRC += $(QUANTUM_DIR)/light_ws2812.c 201 SRC += $(QUANTUM_DIR)/light_ws2812.c
diff --git a/keyboards/M10A/M10A.c b/keyboards/M10A/M10A.c
new file mode 100644
index 000000000..9a3bd15e1
--- /dev/null
+++ b/keyboards/M10A/M10A.c
@@ -0,0 +1,5 @@
1#include "M10A.h"
2
3void matrix_init_kb(void) {
4 matrix_init_user();
5} \ No newline at end of file
diff --git a/keyboards/M10A/M10A.h b/keyboards/M10A/M10A.h
new file mode 100644
index 000000000..6ec334fb3
--- /dev/null
+++ b/keyboards/M10A/M10A.h
@@ -0,0 +1,19 @@
1#ifndef M10A_H
2#define M10A_H
3
4#include "quantum.h"
5
6#define M10A( \
7 k00, k01, k02, \
8 k10, k11, k12, \
9 k20, k21, k22, \
10 k30, k31, k32 \
11) \
12{ \
13 { k00, k01, k02 }, \
14 { k10, k11, k12 }, \
15 { k20, k21, k22 }, \
16 { k30, k31, k32 } \
17}
18
19#endif
diff --git a/keyboards/M10A/Makefile b/keyboards/M10A/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/M10A/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/M10A/config.h b/keyboards/M10A/config.h
new file mode 100644
index 000000000..f052ab629
--- /dev/null
+++ b/keyboards/M10A/config.h
@@ -0,0 +1,82 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x0007
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Machine Industries
28#define PRODUCT M10-A
29#define DESCRIPTION RAMA x Machine Industries M10-A
30
31/* key matrix size */
32#define MATRIX_ROWS 4
33#define MATRIX_COLS 3
34
35/* Planck PCB default pin-out */
36#define MATRIX_ROW_PINS { B6, F7, F6, D6 }
37#define MATRIX_COL_PINS { F5, F1, F0 }
38#define UNUSED_PINS
39
40#define BACKLIGHT_PIN B7
41
42/* COL2ROW or ROW2COL */
43#define DIODE_DIRECTION ROW2COL
44
45/* define if matrix has ghost */
46//#define MATRIX_HAS_GHOST
47
48/* number of backlight levels */
49#define BACKLIGHT_LEVELS 6
50
51/* Set 0 if debouncing isn't needed */
52#define DEBOUNCING_DELAY 5
53
54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
55#define LOCKING_SUPPORT_ENABLE
56/* Locking resynchronize hack */
57#define LOCKING_RESYNC_ENABLE
58
59/* key combination for command */
60#define IS_COMMAND() ( \
61 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
62)
63
64/*
65 * Feature disable options
66 * These options are also useful to firmware size reduction.
67 */
68
69/* disable debug print */
70//#define NO_DEBUG
71
72/* disable print */
73//#define NO_PRINT
74
75/* disable action features */
76//#define NO_ACTION_LAYER
77//#define NO_ACTION_TAPPING
78//#define NO_ACTION_ONESHOT
79//#define NO_ACTION_MACRO
80//#define NO_ACTION_FUNCTION
81
82#endif
diff --git a/keyboards/M10A/keymaps/default/Makefile b/keyboards/M10A/keymaps/default/Makefile
new file mode 100644
index 000000000..457a3d01d
--- /dev/null
+++ b/keyboards/M10A/keymaps/default/Makefile
@@ -0,0 +1,3 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
diff --git a/keyboards/M10A/keymaps/default/keymap.c b/keyboards/M10A/keymaps/default/keymap.c
new file mode 100644
index 000000000..75abeb5b7
--- /dev/null
+++ b/keyboards/M10A/keymaps/default/keymap.c
@@ -0,0 +1,49 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3
4#include "M10A.h"
5#include "action_layer.h"
6#include "eeconfig.h"
7
8extern keymap_config_t keymap_config;
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14
15enum layers {
16 _LAYER0,
17 _LAYER1,
18 _LAYER2,
19 _LAYER3,
20 _LAYER4,
21 _LAYER5,
22 _LAYER6,
23 _LAYER7,
24 _LAYER8,
25 _LAYER9
26};
27
28// // Fillers to make layering more clear
29// #define _______ KC_TRNS
30// #define XXXXXXX KC_NO
31
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33 [_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
34 [_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
35 [_LAYER2] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
36 [_LAYER3] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
37 [_LAYER4] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
38 [_LAYER5] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
39 [_LAYER6] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
40 [_LAYER7] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
41 [_LAYER8] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}},
42 [_LAYER9] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}
43};
44
45void matrix_init_user(void) {
46 #ifdef BACKLIGHT_ENABLE
47 backlight_level(0);
48 #endif
49}
diff --git a/keyboards/M10A/rules.mk b/keyboards/M10A/rules.mk
new file mode 100644
index 000000000..f5a785dbc
--- /dev/null
+++ b/keyboards/M10A/rules.mk
@@ -0,0 +1,68 @@
1# MCU name
2#MCU = at90usb1287
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Interrupt driven control endpoint task(+60)
38OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
39
40
41# Boot Section Size in *bytes*
42# Teensy halfKay 512
43# Teensy++ halfKay 1024
44# Atmel DFU loader 4096
45# LUFA bootloader 4096
46# USBaspLoader 2048
47OPT_DEFS += -DBOOTLOADER_SIZE=4096
48
49# Build Options
50# change to "no" to disable the options, or define them in the Makefile in
51# the appropriate keymap folder that will get included automatically
52#
53BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
54MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
55EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
56CONSOLE_ENABLE ?= no # Console for debug(+400)
57COMMAND_ENABLE ?= no # Commands for debug and configuration
58NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
59BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
60MIDI_ENABLE ?= no # MIDI controls
61AUDIO_ENABLE ?= no # Audio output on port C6
62UNICODE_ENABLE ?= yes # Unicode
63BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
64RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight.
65API_SYSEX_ENABLE = yes
66
67# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
68SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
diff --git a/keyboards/amjpad/amjpad.h b/keyboards/amjpad/amjpad.h
index b9b4d3686..ffba1c9b9 100644
--- a/keyboards/amjpad/amjpad.h
+++ b/keyboards/amjpad/amjpad.h
@@ -39,7 +39,22 @@
39 {k40, k41, k42, k43}, \ 39 {k40, k41, k42, k43}, \
40 {k50, XXX, k52, XXX} \ 40 {k50, XXX, k52, XXX} \
41} 41}
42 42#define MAXKEYMAP( \
43 k00, k01, k02, k03, \
44 k10, k11, k12, k13, \
45 k20, k21, k22, k23, \
46 k30, k31, k32, k33, \
47 k40, k41, k42, k43, \
48 k50, k51, k52, k53\
49) \
50{ \
51 {k00, k01, k02, k03}, \
52 {k10, k11, k12, k13}, \
53 {k20, k21, k22, k23}, \
54 {k30, k31, k32, k33}, \
55 {k40, k41, k42, k43}, \
56 {k50, k51, k52, k53} \
57}
43void matrix_init_user(void); 58void matrix_init_user(void);
44void matrix_scan_user(void); 59void matrix_scan_user(void);
45 60
diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c
new file mode 100644
index 000000000..926a494a9
--- /dev/null
+++ b/keyboards/amjpad/keymaps/max/keymap.c
@@ -0,0 +1,102 @@
1#include "amjpad.h"
2
3#ifdef RGBLIGHT_ENABLE
4#include "rgblight.h"
5#endif
6
7// Used for SHIFT_ESC
8#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14#define _BL 0
15#define _FL 1
16
17#define _______ KC_TRNS
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 /* Keymap _BL: (Base Layer) Default Layer
21 * ,-------------------.
22 * |Esc |Setp| - | = |
23 * |----|----|----|----|
24 * | F1 | F2 | F3 | F4 |
25 * |----|----|----|----|
26 * | 7 | 8 | 9 | - |
27 * |----|----|----|----|
28 * | 4 | 5 | 6 | LF |
29 * |----|----|----|----|
30 * | 1 | 2 | 3 | \ |
31 * |----|----|----|----|
32 * |Left|Down| Up |Rght|
33 * `-------------------'
34 */
35
36[_BL] = MAXKEYMAP(
37
38 KC_ESC, KC_TAB, KC_MINS,KC_EQL, \
39 KC_F1, KC_F2, KC_F3, KC_F4, \
40 KC_P7, KC_P8, KC_P9, KC_PMNS, \
41 KC_P4, KC_P5, KC_P6, KC_PENT, \
42 KC_P1, KC_P2, KC_P3, KC_BSLS, \
43 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
44
45 /* Keymap _FL: Function Layer
46 * ,-------------------.
47 * |Esc |TAB |BS | = |
48 * |----|----|----|----|
49 * | NL | / | * | - |
50 * |----|----|----|----|
51 * | 7 | 8 | 9 | |
52 * |----|----|----|RST |
53 * | 4 | 5 | 6 | |
54 * |----|----|----|----|
55 * | 1 | 2 | 3 | |
56 * |----|----|----| En |
57 * | 0 |./FN| |
58 * `-------------------'
59 */
60[_FL] = MAXKEYMAP(
61
62 KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \
63 KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
64 KC_P7, KC_P8, KC_P9, RESET, \
65 KC_P4, KC_P5, KC_P6, KC_PENT, \
66 KC_P1, KC_P2, KC_P3, KC_PENT, \
67 KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT),
68};
69
70enum function_id {
71 SHIFT_ESC,
72};
73
74const uint16_t PROGMEM fn_actions[] = {
75 [0] = ACTION_FUNCTION(SHIFT_ESC),
76};
77
78void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
79 static uint8_t shift_esc_shift_mask;
80 switch (id) {
81 case SHIFT_ESC:
82 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
83 if (record->event.pressed) {
84 if (shift_esc_shift_mask) {
85 add_key(KC_GRV);
86 send_keyboard_report();
87 } else {
88 add_key(KC_ESC);
89 send_keyboard_report();
90 }
91 } else {
92 if (shift_esc_shift_mask) {
93 del_key(KC_GRV);
94 send_keyboard_report();
95 } else {
96 del_key(KC_ESC);
97 send_keyboard_report();
98 }
99 }
100 break;
101 }
102}
diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c
new file mode 100644
index 000000000..d3e4d9944
--- /dev/null
+++ b/keyboards/amjpad/keymaps/ortho_left/keymap.c
@@ -0,0 +1,65 @@
1#include "amjpad.h"
2
3#ifdef RGBLIGHT_ENABLE
4#include "rgblight.h"
5#endif
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _BL 0
12#define _FL 1
13
14#define _______ KC_TRNS
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 /* Keymap _BL: (Base Layer) Default Layer
18 * ,-------------------.
19 * | T | G | B |Spac|
20 * |----|----|----|----|
21 * | R | F | V | Fn |
22 * |----|----|----|----|
23 * | E | D | C | OS |
24 * |----|----|----|----|
25 * | W | S | X | Alt|
26 * |----|----|----|----|
27 * | Q | A | Z | Ctl|
28 * |----|----|----|----|
29 * | Esc| Tab|Shft| Fn2|
30 * `-------------------'
31 */
32
33[_BL] = MAXKEYMAP(
34
35 KC_T, KC_G, KC_B, KC_SPACE,\
36 KC_R, KC_F, KC_V, MO(1), \
37 KC_E, KC_D, KC_C, KC_LGUI, \
38 KC_W, KC_S, KC_X, KC_LALT, \
39 KC_Q, KC_A, KC_Z, KC_LCTL, \
40 KC_TAB, KC_ESC, KC_LSHIFT, MO(1)),
41
42 /* Keymap _FL: Function Layer
43 * ,-------------------.
44 * | 5 | F5 | F11|Spac|
45 * |----|----|----|----|
46 * | 4 | F4 | F10| |
47 * |----|----|----|----|
48 * | 3 | F3 | F9 | OS |
49 * |----|----|----|----|
50 * | 2 | F2 | F8 | Alt|
51 * |----|----|----|----|
52 * | 1 | F1 | F7 | Ctl|
53 * |----|----|----|----|
54 * | ` | Del|Shft| |
55 * `-------------------'
56 */
57[_FL] = MAXKEYMAP(
58
59 KC_5, KC_F5, KC_F11, _______, \
60 KC_4, KC_F4, KC_F10, _______, \
61 KC_3, KC_F3, KC_F9, _______, \
62 KC_2, KC_F2, KC_F8, _______, \
63 KC_1, KC_F1, KC_F7, _______, \
64 KC_GRV,KC_DEL, _______, _______),
65};
diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c
new file mode 100644
index 000000000..33e599abd
--- /dev/null
+++ b/keyboards/amjpad/keymaps/ortho_right/keymap.c
@@ -0,0 +1,65 @@
1#include "amjpad.h"
2
3#ifdef RGBLIGHT_ENABLE
4#include "rgblight.h"
5#endif
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _BL 0
12#define _FL 1
13
14#define _______ KC_TRNS
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 /* Keymap _BL: (Base Layer) Default Layer
18 * ,-------------------.
19 * |Spac| N | H | Y |
20 * |----|----|----|----|
21 * | Fn | M | J | U |
22 * |----|----|----|----|
23 * |Left| , | K | I |
24 * |----|----|----|----|
25 * |Down| . | L | O |
26 * |----|----|----|----|
27 * | Up | / | ; | P |
28 * |----|----|----|----|
29 * |Rght| Ret| " |Bspc|
30 * `-------------------'
31 */
32
33[_BL] = MAXKEYMAP(
34
35 KC_SPACE, KC_N, KC_H, KC_Y, \
36 MO(1), KC_M, KC_J, KC_U, \
37 KC_LEFT, KC_COMM, KC_K, KC_I, \
38 KC_DOWN, KC_DOT, KC_L, KC_O, \
39 KC_UP, KC_SLASH, KC_SCLN, KC_P, \
40 KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC),
41
42 /* Keymap _FL: Function Layer
43 * ,-------------------.
44 * |Esc | F12| F6 | 6 |
45 * |----|----|----|----|
46 * | NL | M | - | 7 |
47 * |----|----|----|----|
48 * |Left| , | = | 8 |
49 * |----|----|----|----|
50 * |Down| . | [ | 9 |
51 * |----|----|----|----|
52 * | Up | / | ] | 0 |
53 * |----|----|----|----|
54 * |Rght| Ret| \ | Del|
55 * `-------------------'
56 */
57[_FL] = MAXKEYMAP(
58
59 _______, KC_F12, KC_F6, KC_6, \
60 _______, _______, KC_MINS, KC_7, \
61 _______, _______, KC_EQL, KC_8, \
62 _______, _______, KC_LBRC, KC_9, \
63 _______, _______, KC_RBRC, KC_0, \
64 _______, _______, KC_BSLS, KC_DEL),
65};
diff --git a/keyboards/clueboard/keymaps/serubin/Makefile b/keyboards/clueboard/keymaps/serubin/Makefile
new file mode 100644
index 000000000..ba997f869
--- /dev/null
+++ b/keyboards/clueboard/keymaps/serubin/Makefile
@@ -0,0 +1,4 @@
1
2MOUSEKEY_ENABLE = yes
3EXTRAKEY_ENABLE = yes
4
diff --git a/keyboards/clueboard/keymaps/serubin/keymap.c b/keyboards/clueboard/keymaps/serubin/keymap.c
new file mode 100644
index 000000000..18446eb31
--- /dev/null
+++ b/keyboards/clueboard/keymaps/serubin/keymap.c
@@ -0,0 +1,103 @@
1#include "clueboard.h"
2
3// Helpful defines
4#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
5#define _______ KC_TRNS
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _BL 0
12#define _FL 1
13#define _ME 2
14#define _CL 3
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 /* Keymap _BL: Base Layer (Default Layer)
18 */
19[_BL] = KEYMAP(
20 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_GRV, KC_BSPC, KC_PGUP, \
21 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_PGDN, \
22 F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
23 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
24 KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT),
25
26 /* Keymap _FL: Function Layer
27 */
28[_FL] = KEYMAP(
29 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_DEL, KC_HOME, \
30 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \
31 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
32 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
33 _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END),
34
35/* Keymap _FL: Function Layer
36 */
37[_ME] = KEYMAP(
38 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \
39 _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \
40 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
41 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \
42 _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT),
43
44
45 /* Keymap _CL: Control layer
46 */
47[_CL] = KEYMAP(
48 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
49 _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
50 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
51 MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \
52 _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
53};
54
55/* This is a list of user defined functions. F(N) corresponds to item N
56 of this list.
57 */
58const uint16_t PROGMEM fn_actions[] = {
59 [0] = ACTION_FUNCTION(0), // Calls action_function()
60 [1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
61};
62
63void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
64 static uint8_t mods_pressed;
65 static bool mod_flag;
66
67 switch (id) {
68 case 0:
69 /* Handle the combined Grave/Esc key
70 */
71 mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
72
73 if (record->event.pressed) {
74 /* The key is being pressed.
75 */
76 if (mods_pressed) {
77 mod_flag = true;
78 add_key(KC_GRV);
79 send_keyboard_report();
80 } else {
81 add_key(KC_ESC);
82 send_keyboard_report();
83 }
84 } else {
85 /* The key is being released.
86 */
87 if (mod_flag) {
88 mod_flag = false;
89 del_key(KC_GRV);
90 send_keyboard_report();
91 } else {
92 del_key(KC_ESC);
93 send_keyboard_report();
94 }
95 }
96 break;
97 case 1:
98 if(record->event.pressed) {
99 del_key(KC_ESC);
100 }
101 break;
102 }
103}
diff --git a/keyboards/clueboard/keymaps/serubin/layout-base.png b/keyboards/clueboard/keymaps/serubin/layout-base.png
new file mode 100644
index 000000000..8dcdc0643
--- /dev/null
+++ b/keyboards/clueboard/keymaps/serubin/layout-base.png
Binary files differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-fn.png b/keyboards/clueboard/keymaps/serubin/layout-fn.png
new file mode 100644
index 000000000..3cff46a72
--- /dev/null
+++ b/keyboards/clueboard/keymaps/serubin/layout-fn.png
Binary files differ
diff --git a/keyboards/clueboard/keymaps/serubin/layout-media.png b/keyboards/clueboard/keymaps/serubin/layout-media.png
new file mode 100644
index 000000000..753cb64fa
--- /dev/null
+++ b/keyboards/clueboard/keymaps/serubin/layout-media.png
Binary files differ
diff --git a/keyboards/clueboard/keymaps/serubin/readme.md b/keyboards/clueboard/keymaps/serubin/readme.md
new file mode 100644
index 000000000..e39adbb16
--- /dev/null
+++ b/keyboards/clueboard/keymaps/serubin/readme.md
@@ -0,0 +1,23 @@
1```
2 ___ _____ _ _ _ __ __ _ __
3|__ \ / ____| | | | | | / / / /(_) / /
4 ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
5 |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
6 |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
7 (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
8```
9
10# Serubin's Clueboard Layout
11
12This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim.
13
14#### Base Layer
15![Base Layout Image](layout-base.png)
16
17#### Fn Layer
18![Fn Layout Image](layout-fn.png)
19
20#### Media Layer
21![Media Layer Image](layout-media.png)
22
23
diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c
index c4fae0369..fdec37a54 100644
--- a/keyboards/clueboard/keymaps/shift_fn/keymap.c
+++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c
@@ -19,8 +19,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ 19 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
20 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_PGDN, \ 20 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_PGDN, \
21 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ 21 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
22 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ 22 MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
23 KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), 23 KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
24 24
25 /* Keymap _FL: Function Layer 25 /* Keymap _FL: Function Layer
26 */ 26 */
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ 29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ 30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ 31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
32 KC_LCTL, KC_LALT, KC_LGUI,MO(_FL), S(KC_SPC),S(KC_SPC), MO(_FL), KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), 32 KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END),
33 33
34 /* Keymap _CL: Control layer 34 /* Keymap _CL: Control layer
35 */ 35 */
diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c
index 077d214fa..df7757a92 100644
--- a/keyboards/clueboard/keymaps/skully/keymap.c
+++ b/keyboards/clueboard/keymaps/skully/keymap.c
@@ -16,33 +16,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16 /* Keymap _BL: Base Layer (Default Layer) 16 /* Keymap _BL: Base Layer (Default Layer)
17 */ 17 */
18[_BL] = KEYMAP( 18[_BL] = KEYMAP(
19 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ 19 F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \
20 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_PGDN, \ 20 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_PGDN, \
21 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_NUHS, KC_ENT, \ 21 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_NUHS, KC_ENT, \
22 KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ 22 MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
23 KC_LCTL,KC_LALT,KC_LGUI,MO(_FL), KC_SPC, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), 23 KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
24 24
25 /* Keymap _FL: Function Layer 25 /* Keymap _FL: Function Layer
26 */ 26 */
27[_FL] = KEYMAP( 27[_FL] = KEYMAP(
28 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, BL_STEP, \ 28 S(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \
29 _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, _______, \ 29 S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \
30 _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ 30 S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \
31 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ 31 MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \
32 _______,_______,_______,MO(_FL), _______,_______, MO(_FL),_______,_______,MO(_FL),KC_HOME,KC_PGDN,KC_END), 32 KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END),
33 33
34 /* Keymap _CL: Control layer 34 /* Keymap _CL: Control layer
35 */ 35 */
36[_CL] = KEYMAP( 36[_CL] = KEYMAP(
37 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ 37 _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
38 _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ 38 _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
39 _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ 39 _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
40 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ 40 MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
41 _______,_______,_______,_______, _______,_______, _______,_______,_______,MO(_FL),_______, _______, _______), 41 _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI),
42}; 42};
43 43
44/* This is a list of user defined functions. F(N) corresponds to item N
45 of this list.
46 */
44const uint16_t PROGMEM fn_actions[] = { 47const uint16_t PROGMEM fn_actions[] = {
45 [0] = ACTION_FUNCTION(0), 48 [0] = ACTION_FUNCTION(0), // Calls action_function()
46}; 49};
47 50
48void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { 51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h
index e8c17e6e3..9650ffb44 100644
--- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h
+++ b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h
@@ -75,7 +75,7 @@ static GFXINLINE void init_board(GDisplay *g) {
75 palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); 75 palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
76 palSetPadModeRaw(MOSI, ST7565_SPI_MODE); 76 palSetPadModeRaw(MOSI, ST7565_SPI_MODE);
77 palSetPadModeRaw(SLCK, ST7565_SPI_MODE); 77 palSetPadModeRaw(SLCK, ST7565_SPI_MODE);
78 palSetPadModeRaw(SS, PAL_MODE_OUTPUT_PUSHPULL); 78 palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL);
79 79
80 spiInit(); 80 spiInit();
81 spiStart(&SPID1, &spi1config); 81 spiStart(&SPID1, &spi1config);
diff --git a/keyboards/ergodox/infinity/matrix.c b/keyboards/ergodox/infinity/matrix.c
index 1fda90484..3364f8c90 100644
--- a/keyboards/ergodox/infinity/matrix.c
+++ b/keyboards/ergodox/infinity/matrix.c
@@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
24#include "print.h" 24#include "print.h"
25#include "debug.h" 25#include "debug.h"
26#include "matrix.h" 26#include "matrix.h"
27#include "serial_link/system/serial_link.h"
27 28
28 29
29/* 30/*
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
index ae4fd444d..d299d02c3 100644
--- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
+++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c
@@ -311,12 +311,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
311 break; 311 break;
312 case SWITCH_NDS: 312 case SWITCH_NDS:
313 if (record->event.pressed) { 313 if (record->event.pressed) {
314 return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END); 314 return MACRO( D(LSFT), T(F11), U(LSFT), W(255), D(LALT), T(TAB), U(LALT), END);
315 } 315 }
316 break; 316 break;
317 case OPEN_CLOSE_PAREN: 317 case OPEN_CLOSE_PAREN:
318 if (record->event.pressed) { 318 if (record->event.pressed) {
319 return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END); 319 return MACRO( D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END);
320 } 320 }
321 break; 321 break;
322 case OPEN_CLOSE_BRACKET: 322 case OPEN_CLOSE_BRACKET:
@@ -326,7 +326,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
326 break; 326 break;
327 case OPEN_CLOSE_CURLY: 327 case OPEN_CLOSE_CURLY:
328 if (record->event.pressed) { 328 if (record->event.pressed) {
329 return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END); 329 return MACRO( D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END);
330 } 330 }
331 break; 331 break;
332 case OPEN_CLOSE_SINGLE_QUOTE: 332 case OPEN_CLOSE_SINGLE_QUOTE:
diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c
index 1dfdf7e62..ac84df570 100644
--- a/keyboards/ergodox/keymaps/ordinary/keymap.c
+++ b/keyboards/ergodox/keymaps/ordinary/keymap.c
@@ -392,7 +392,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
392 392
393 case NotEq: 393 case NotEq:
394 if (record->event.pressed) { 394 if (record->event.pressed) {
395 return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END ); // != 395 return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END ); // !=
396 } 396 }
397 break; 397 break;
398 398
diff --git a/keyboards/ergodox/keymaps/siroken3/default.png b/keyboards/ergodox/keymaps/siroken3/default.png
new file mode 100644
index 000000000..6575f7b5e
--- /dev/null
+++ b/keyboards/ergodox/keymaps/siroken3/default.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png b/keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png
new file mode 100644
index 000000000..e3c321cc0
--- /dev/null
+++ b/keyboards/ergodox/keymaps/siroken3/default_firmware_v1.2-2.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/siroken3/default_highres.png b/keyboards/ergodox/keymaps/siroken3/default_highres.png
new file mode 100644
index 000000000..7d9f045f4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/siroken3/default_highres.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/siroken3/keymap.c b/keyboards/ergodox/keymaps/siroken3/keymap.c
new file mode 100644
index 000000000..258f122b4
--- /dev/null
+++ b/keyboards/ergodox/keymaps/siroken3/keymap.c
@@ -0,0 +1,187 @@
1// Netable differences vs. the default firmware for the ErgoDox EZ:
2// 1. The Cmd key is now on the right side, making Cmd+Space easier.
3// 2. The media keys work on OSX (But not on Windows).
4#include "ergodox.h"
5#include "debug.h"
6#include "action_layer.h"
7
8#define BASE 0 // default layer
9#define SYMB 1 // symbols
10#define MDIA 2 // media keys
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13/* Keymap 0: Basic layer
14 *
15 * ,--------------------------------------------------. ,--------------------------------------------------.
16 * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
17 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
18 * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
19 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
20 * | LCtl | A | S | D | F | G |------| |------| H | J | K | L |; / L2| LGui |
21 * |--------+------+------+------+------+------| BkSp | | Meh |------+------+------+------+------+--------|
22 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
23 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
24 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
25 * `----------------------------------' `----------------------------------'
26 * ,-------------. ,---------------.
27 * | BkSp | LGui | | Alt |Ctrl/Esc|
28 * ,------|------|------| |------+--------+------.
29 * | | | Home | | PgUp | | |
30 * | Space|LANG1 |------| |------|LANG2 |Enter |
31 * | /LGui| | End | | PgDn | | |
32 * `--------------------' `----------------------'
33 */
34// If it accepts an argument (i.e, is a function), it doesn't need KC_.
35// Otherwise, it needs KC_*
36[BASE] = KEYMAP( // layer 0 : default
37 // left hand
38 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
39 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
40 KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G,
41 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_BSPC,
42 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
43 KC_BSPC, KC_LGUI,
44 KC_HOME,
45 MT(MOD_LGUI, KC_SPC),KC_LANG1,KC_END,
46 // right hand
47 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
48 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
49 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI,
50 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
51 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
52 KC_LALT, CTL_T(KC_ESC),
53 KC_PGUP,
54 KC_PGDN,KC_LANG2, KC_ENT
55 ),
56/* Keymap 1: Symbol Layer
57 *
58 * ,--------------------------------------------------. ,--------------------------------------------------.
59 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
60 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
61 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
62 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
63 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
64 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
65 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
66 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
67 * | | | | | | | | . | 0 | = | |
68 * `----------------------------------' `----------------------------------'
69 * ,-------------. ,-------------.
70 * | | | | | |
71 * ,------|------|------| |------+------+------.
72 * | | | | | | | |
73 * | | |------| |------| | |
74 * | | | | | | | |
75 * `--------------------' `--------------------'
76 */
77// SYMBOLS
78[SYMB] = KEYMAP(
79 // left hand
80 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
81 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
82 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
83 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
84 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
85 KC_TRNS,KC_TRNS,
86 KC_TRNS,
87 KC_TRNS,KC_TRNS,KC_TRNS,
88 // right hand
89 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
90 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
91 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
92 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
93 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
94 KC_TRNS, KC_TRNS,
95 KC_TRNS,
96 KC_TRNS, KC_TRNS, KC_TRNS
97),
98/* Keymap 2: Media and mouse keys
99 *
100 * ,--------------------------------------------------. ,--------------------------------------------------.
101 * | | | | | | | | | | | | | | | |
102 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
103 * | | | | MsUp | | | | | | | | | | | |
104 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
105 * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
106 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
107 * | | | | | | | | | | | | Prev | Next | | |
108 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
109 * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
110 * `----------------------------------' `----------------------------------'
111 * ,-------------. ,-------------.
112 * | | | | | |
113 * ,------|------|------| |------+------+------.
114 * | | | | | | |Brwser|
115 * | | |------| |------| |Back |
116 * | | | | | | | |
117 * `--------------------' `--------------------'
118 */
119// MEDIA AND MOUSE
120[MDIA] = KEYMAP(
121 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
122 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
123 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
124 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
126 KC_TRNS, KC_TRNS,
127 KC_TRNS,
128 KC_TRNS, KC_TRNS, KC_TRNS,
129 // right hand
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
131 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
132 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
133 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
134 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
135 KC_TRNS, KC_TRNS,
136 KC_TRNS,
137 KC_TRNS, KC_TRNS, KC_WBAK
138),
139};
140
141const uint16_t PROGMEM fn_actions[] = {
142 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
143};
144
145const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
146{
147 // MACRODOWN only works in this function
148 switch(id) {
149 case 0:
150 if (record->event.pressed) {
151 register_code(KC_RSFT);
152 } else {
153 unregister_code(KC_RSFT);
154 }
155 break;
156 }
157 return MACRO_NONE;
158};
159
160// Runs just one time when the keyboard initializes.
161void matrix_init_user(void) {
162
163};
164
165// Runs constantly in the background, in a loop.
166void matrix_scan_user(void) {
167
168 uint8_t layer = biton32(layer_state);
169
170 ergodox_board_led_off();
171 ergodox_right_led_1_off();
172 ergodox_right_led_2_off();
173 ergodox_right_led_3_off();
174 switch (layer) {
175 // TODO: Make this relevant to the ErgoDox EZ.
176 case 1:
177 ergodox_right_led_1_on();
178 break;
179 case 2:
180 ergodox_right_led_2_on();
181 break;
182 default:
183 // none
184 break;
185 }
186
187};
diff --git a/keyboards/ergodox/keymaps/siroken3/readme.md b/keyboards/ergodox/keymaps/siroken3/readme.md
new file mode 100644
index 000000000..979ce0f5b
--- /dev/null
+++ b/keyboards/ergodox/keymaps/siroken3/readme.md
@@ -0,0 +1,15 @@
1# ErgoDox EZ Default Configuration
2
3## Changelog
4
5* Dec 2016:
6 * Added LED keys
7 * Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
8* Sep 22, 2016:
9 * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
10* Feb 2, 2016 (V1.1):
11 * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
12
13This is what we ship with out of the factory. :) The image says it all:
14
15![Default](default_firmware_v1.2-2.png)
diff --git a/keyboards/ergodox/keymaps/yoruian/keymap.c b/keyboards/ergodox/keymaps/yoruian/keymap.c
index d3635ddf3..41dfda3c6 100644
--- a/keyboards/ergodox/keymaps/yoruian/keymap.c
+++ b/keyboards/ergodox/keymaps/yoruian/keymap.c
@@ -17,7 +17,7 @@
17#include "yoruian.h" 17#include "yoruian.h"
18 18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20[0] = KEYMAP\ 20[0] = KEYMAP_YORUIAN\
21(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, 21(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8,
22 ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, 22 ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q,
23 LC, U, I, A, N, SCLN, M, H, T, S, C, RC, 23 LC, U, I, A, N, SCLN, M, H, T, S, C, RC,
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 BSPC, RALT, P2, TAB, 26 BSPC, RALT, P2, TAB,
27 NO, NO, 27 NO, NO,
28 E, LSFT, NO, NO, ENT, SPC), 28 E, LSFT, NO, NO, ENT, SPC),
29[1] = KEYMAP\ 29[1] = KEYMAP_YORUIAN\
30(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, 30(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9,
31 TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, 31 TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT,
32 TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, 32 TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE,
diff --git a/keyboards/ergodox/keymaps/yoruian/yoruian.h b/keyboards/ergodox/keymaps/yoruian/yoruian.h
index 1adcb7fd3..b5aaf74b1 100644
--- a/keyboards/ergodox/keymaps/yoruian/yoruian.h
+++ b/keyboards/ergodox/keymaps/yoruian/yoruian.h
@@ -18,36 +18,32 @@
18#include "debug.h" 18#include "debug.h"
19#include "action_layer.h" 19#include "action_layer.h"
20 20
21#undef KEYMAP 21#define KEYMAP_YORUIAN( \
22#define KEYMAP\ 22 /* Spacial positions. */ \
23( \ 23 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \
24 /* Spacial positions. */ \ 24 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \
25 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ 25 k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \
26 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ 26 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
27 k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \ 27 k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \
28 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ 28 k55, k56, k57, k58, \
29 k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \ 29 k54, k59, \
30 k55, k56, k57, k58, \ 30 k53, k52, k51, k5C, k5B, k5A) \
31 k54, k59, \ 31 KEYMAP(KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, \
32 k53, k52, k51, k5C, k5B, k5A) \ 32 KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, \
33 \ 33 KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, \
34 /* Matrix positions. */ \ 34 KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, \
35 { \ 35 KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, \
36 { KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \ 36 KC_##k55, KC_##k56, \
37 { KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \ 37 KC_##k54, \
38 { KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \ 38 KC_##k53, KC_##k52, KC_##k51, \
39 { KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \ 39 KC_##k07, KC_##k08, KC_##k09, KC_##k0A, KC_##k0B, KC_##k0C, KC_##k0D, \
40 { KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \ 40 KC_##k17, KC_##k18, KC_##k19, KC_##k1A, KC_##k1B, KC_##k1C, KC_##k1D, \
41 { KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \ 41 KC_##k28, KC_##k29, KC_##k2A, KC_##k2B, KC_##k2C, KC_##k2D, \
42 { KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \ 42 KC_##k37, KC_##k38, KC_##k39, KC_##k3A, KC_##k3B, KC_##k3C, KC_##k3D, \
43 { KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \ 43 KC_##k49, KC_##k4A, KC_##k4B, KC_##k4C, KC_##k4D, \
44 { KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \ 44 KC_##k57, KC_##k58, \
45 { KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \ 45 KC_##k59, \
46 { KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \ 46 KC_##k5C, KC_##k5B, KC_##k5A)
47 { KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \
48 { KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \
49 { KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \
50 }
51 47
52#define KC_ES KC_ESC 48#define KC_ES KC_ESC
53#define KC_LC KC_LCTL 49#define KC_LC KC_LCTL
diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c
index 05dffdb64..cde7f63b9 100644
--- a/keyboards/frosty_flake/matrix.c
+++ b/keyboards/frosty_flake/matrix.c
@@ -115,6 +115,7 @@ inline matrix_row_t matrix_get_row(uint8_t row) {
115} 115}
116 116
117void matrix_print(void) { 117void matrix_print(void) {
118#ifndef NO_PRINT
118 print("\nr\\c ABCDEFGHIJKLMNOPQR\n"); 119 print("\nr\\c ABCDEFGHIJKLMNOPQR\n");
119 for (uint8_t row = 0; row < MATRIX_ROWS; row++) { 120 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
120 matrix_row_t matrix_row = matrix_get_row(row); 121 matrix_row_t matrix_row = matrix_get_row(row);
@@ -125,6 +126,7 @@ void matrix_print(void) {
125 } 126 }
126 print("\n"); 127 print("\n");
127 } 128 }
129#endif
128} 130}
129 131
130uint8_t matrix_key_count(void) { 132uint8_t matrix_key_count(void) {
@@ -132,4 +134,4 @@ uint8_t matrix_key_count(void) {
132 for (uint8_t row = 0; row < MATRIX_ROWS; row++) 134 for (uint8_t row = 0; row < MATRIX_ROWS; row++)
133 count += bitpop32(matrix[row]); 135 count += bitpop32(matrix[row]);
134 return count; 136 return count;
135} \ No newline at end of file 137}
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
deleted file mode 100644
index 4c735a6c2..000000000
--- a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c
+++ /dev/null
@@ -1 +0,0 @@
1#include "MS-sculpt-mobile.h"
diff --git a/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c
new file mode 100644
index 000000000..64982fb62
--- /dev/null
+++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c
@@ -0,0 +1 @@
#include "MS_sculpt_mobile.h"
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h
index 1583dea6e..1583dea6e 100644
--- a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h
+++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h
diff --git a/keyboards/handwired/MS-sculpt-mobile/Makefile b/keyboards/handwired/MS_sculpt_mobile/Makefile
index bd09e5885..bd09e5885 100644
--- a/keyboards/handwired/MS-sculpt-mobile/Makefile
+++ b/keyboards/handwired/MS_sculpt_mobile/Makefile
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c
index 3a9b86997..22394cc7d 100644
--- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c
+++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c
@@ -7,7 +7,8 @@ Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
7and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c 7and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
8*/ 8*/
9 9
10#include "babblePaste.h" 10#include "../MS_sculpt_mobile/babblePaste.h"
11
11#include "action_macro.h" 12#include "action_macro.h"
12 13
13#ifdef USE_BABLPASTE 14#ifdef USE_BABLPASTE
@@ -27,7 +28,7 @@ macro_t* switch_babble_mode( uint8_t id) {
27// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 28// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
28#define BABLM(ent, macro...) \ 29#define BABLM(ent, macro...) \
29 if ( ent == shortcut ) \ 30 if ( ent == shortcut ) \
30 { action_macro_play( MACRO(macro)); return MACRO_NONE; } 31 { action_macro_play( MACRO(macro)); return MACRO_NONE; }
31 32
32 33
33/* this function runs the appropriate babblepaste macro, given 34/* this function runs the appropriate babblepaste macro, given
@@ -456,4 +457,4 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
456} 457}
457 458
458 459
459#endif \ No newline at end of file 460#endif
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h
index 3067c854d..cedd7d92b 100644
--- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h
+++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h
@@ -9,9 +9,9 @@ and jeebak & algernon's keymap
9*/ 9*/
10#ifndef _babblePaste_h_included__ 10#ifndef _babblePaste_h_included__
11#define _babblePaste_h_included__ 11#define _babblePaste_h_included__
12#include "../MS_sculpt_mobile/config.h"
12#include "action_layer.h" 13#include "action_layer.h"
13#include "quantum_keycodes.h" 14#include "quantum_keycodes.h"
14#include "config.h"
15 15
16#ifdef USE_BABLPASTE 16#ifdef USE_BABLPASTE
17 17
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt
index cf75e153e..cf75e153e 100644
--- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt
+++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt
diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS_sculpt_mobile/config.h
index f89514278..f89514278 100644
--- a/keyboards/handwired/MS-sculpt-mobile/config.h
+++ b/keyboards/handwired/MS_sculpt_mobile/config.h
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile
index 8b829218b..8b829218b 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h
index 8893d122e..4f3a425b7 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h
@@ -1,7 +1,7 @@
1#ifndef CONFIG_USER_H 1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H 2#define CONFIG_USER_H
3 3
4#include "../../config.h" 4#include "../../../MS_sculpt_mobile/config.h"
5 5
6// place overrides here 6// place overrides here
7 7
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c
index ab09dcdd1..a8802c99a 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
1#include "MS-sculpt-mobile.h" 1#include "../../MS_sculpt_mobile.h"
2 2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4/* 4/*
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md
index e67ddc6fe..e67ddc6fe 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile
index 1209ad781..1209ad781 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h
index 8cf4202cd..5c04f647c 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h
@@ -1,7 +1,7 @@
1#ifndef CONFIG_USER_H 1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H 2#define CONFIG_USER_H
3 3
4#include "../../config.h" 4#include "../../../MS_sculpt_mobile/config.h"
5 5
6#define USE_BABLPASTE 6#define USE_BABLPASTE
7 7
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c
index 395a9fb47..c9a8ccdb6 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c
@@ -1,7 +1,7 @@
1#include "MS-sculpt-mobile.h" 1#include "../../../MS_sculpt_mobile/babblePaste.h"
2#include "../../MS_sculpt_mobile.h"
2#include "action_layer.h" 3#include "action_layer.h"
3#include "action_util.h" 4#include "action_util.h"
4#include "babblePaste.h"
5 5
6#ifdef AUDIO_ENABLE 6#ifdef AUDIO_ENABLE
7 #include "audio.h" 7 #include "audio.h"
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md
index 96ee0e77a..96ee0e77a 100644
--- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md
+++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md
diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS_sculpt_mobile/readme.md
index d435b449f..d435b449f 100644
--- a/keyboards/handwired/MS-sculpt-mobile/readme.md
+++ b/keyboards/handwired/MS_sculpt_mobile/readme.md
diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk
index 680389c84..680389c84 100644
--- a/keyboards/handwired/MS-sculpt-mobile/rules.mk
+++ b/keyboards/handwired/MS_sculpt_mobile/rules.mk
diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c
index 415405ec2..77cf942c3 100644
--- a/keyboards/handwired/atreus50/keymaps/default/keymap.c
+++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
66 //,----+----+----+----+----+----. ,----+----+----+----+----+----. 66 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
67 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, 67 TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
68 //|----+----+----+----+----+----| |----+----+----+----+----+----| 68 //|----+----+----+----+----+----| |----+----+----+----+----+----|
69 X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, 69 X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
70 //|----+----+----+----+----+----| |----+----+----+----+----+----| 70 //|----+----+----+----+----+----| |----+----+----+----+----+----|
71 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , 71 LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
72 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| 72 //|----+----+----+----+----+----|----+----|----+----+----+----+----+----|
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h
index 24f02993f..a13406b0d 100644
--- a/keyboards/handwired/promethium/config.h
+++ b/keyboards/handwired/promethium/config.h
@@ -35,12 +35,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
35#define DESCRIPTION 35#define DESCRIPTION
36 36
37/* key matrix size */ 37/* key matrix size */
38#define MATRIX_ROWS 8
39#define MATRIX_COLS 6 38#define MATRIX_COLS 6
39#define MATRIX_ROWS 9
40 40
41/* default pin-out */ 41/* default pin-out */
42#define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 } 42#define MATRIX_COL_PINS { F4, F1, F0, D6, D0, D1 }
43#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } 43#define MATRIX_ROW_PINS { F5, F6, F7 }
44#define TRACKPOINT_PINS { B7, B6, D7 }
44#define UNUSED_PINS 45#define UNUSED_PINS
45 46
46/* 47/*
@@ -152,17 +153,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
152//#define NO_ACTION_MACRO 153//#define NO_ACTION_MACRO
153//#define NO_ACTION_FUNCTION 154//#define NO_ACTION_FUNCTION
154 155
155#define PS2_INIT_DELAY 2000 156#define PS2_INIT_DELAY 3000
156#define BATTERY_PIN 9 157#define BATTERY_PIN 9
157#define BATTERY_POLL 30000 158#define BATTERY_POLL 30000
158#define MAX_VOLTAGE 4.2 159#define MAX_VOLTAGE 4.2
159#define MIN_VOLTAGE 3.2 160#define MIN_VOLTAGE 3.2
160 161
162#define ___ KC_NO
163
161#define KEYMAP( \ 164#define KEYMAP( \
162 k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ 165 k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
163 k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ 166 k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
164 k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ 167 k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
165 k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ 168 k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
169 tp1, tp2, tp3 \
166) \ 170) \
167{ \ 171{ \
168 {k11, k12, k13, k14, k15, k16}, \ 172 {k11, k12, k13, k14, k15, k16}, \
@@ -172,18 +176,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
172 {k17, k18, k19, k1a, k1b, k1c}, \ 176 {k17, k18, k19, k1a, k1b, k1c}, \
173 {k27, k28, k29, k2a, k2b, k2c}, \ 177 {k27, k28, k29, k2a, k2b, k2c}, \
174 {k37, k38, k39, k3a, k3b, k3c}, \ 178 {k37, k38, k39, k3a, k3b, k3c}, \
175 {k47, k48, k49, k4a, k4b, k4c} \ 179 {k47, k48, k49, k4a, k4b, k4c}, \
180 {tp1, tp2, tp3, ___, ___, ___} \
176} 181}
177 182
178#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file 183#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file
179enum led_sequence { 184enum led_sequence {
185 LED_IND_LINUX,
186 LED_IND_APPLE,
187 LED_IND_WINDOWS,
188 LED_IND_QWERTY,
189 LED_IND_ALT,
190 LED_IND_AUDIO,
180 LED_IND_BLUETOOTH, 191 LED_IND_BLUETOOTH,
181 LED_IND_USB, 192 LED_IND_USB,
182 LED_IND_BATTERY,
183 193
194 LED_IND_BATTERY,
195 LED_IND_CAPSLOCK,
196 LED_IND_GUI,
184 LED_IND_FUN, 197 LED_IND_FUN,
185 LED_IND_NUM, 198 LED_IND_NUM,
199 LED_IND_PUNC,
186 LED_IND_EMOJI, 200 LED_IND_EMOJI,
201 LED_IND_GREEK,
187 202
188 LED_BKSP, 203 LED_BKSP,
189 LED_ENT, 204 LED_ENT,
@@ -261,7 +276,7 @@ enum led_sequence {
261# define PS2_CLOCK_PORT PORTD 276# define PS2_CLOCK_PORT PORTD
262# define PS2_CLOCK_PIN PIND 277# define PS2_CLOCK_PIN PIND
263# define PS2_CLOCK_DDR DDRD 278# define PS2_CLOCK_DDR DDRD
264# define PS2_CLOCK_BIT 1 279# define PS2_CLOCK_BIT 3
265# define PS2_DATA_PORT PORTD 280# define PS2_DATA_PORT PORTD
266# define PS2_DATA_PIN PIND 281# define PS2_DATA_PIN PIND
267# define PS2_DATA_DDR DDRD 282# define PS2_DATA_DDR DDRD
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile
index 46fdfa011..bd1a06734 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/Makefile
+++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile
@@ -19,6 +19,8 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
19RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. 19RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
20PS2_MOUSE_ENABLE = yes 20PS2_MOUSE_ENABLE = yes
21PS2_USE_INT = yes 21PS2_USE_INT = yes
22FAUXCLICKY_ENABLE = yes
23BLUETOOTH = AdafruitBLE
22 24
23# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 25# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
24SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 26SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md
index ddeaed939..48824b9f7 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/README.md
+++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md
@@ -37,8 +37,8 @@ On Promethium, USB or Bluetooth output is detected on startup. If USB is connect
37 37
38SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively. 38SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively.
39 39
40On Planck, SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. 40SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases.
41 41
42On Promethium there are 6 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 57 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. 42On Promethium there are 16 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 67 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes.
43 43
44On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file 44On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index cf7c67339..efa5d9756 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -38,6 +38,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
38#endif 38#endif
39#ifdef FAUXCLICKY_ENABLE 39#ifdef FAUXCLICKY_ENABLE
40#include "fauxclicky.h" 40#include "fauxclicky.h"
41#ifdef RGBSPS_ENABLE
42#undef FAUXCLICKY_OFF
43#define FAUXCLICKY_OFF do { \
44 fauxclicky_enabled = false; \
45 rgbsps_set(LED_AUDIO, 0, 0, 0); \
46 fauxclicky_stop(); \
47} while (0)
48#undef FAUXCLICKY_ON
49#define FAUXCLICKY_ON do { \
50 fauxclicky_enabled = true; \
51 rgbsps_set(LED_AUDIO, 8, 0, 8); \
52} while (0)
53#endif
41#endif 54#endif
42#include "outputselect.h" 55#include "outputselect.h"
43#include "led.h" 56#include "led.h"
@@ -128,8 +141,8 @@ enum planck_keycodes {
128#ifndef FAUXCLICKY_ENABLE 141#ifndef FAUXCLICKY_ENABLE
129 FC_TOG, 142 FC_TOG,
130#endif 143#endif
131#ifndef ADAFRUIT_BLE_ENABLE 144#ifndef MODULE_ADAFRUIT_BLE
132 OUT_BLE, 145 OUT_BT,
133#endif 146#endif
134 KEYCODE_END 147 KEYCODE_END
135}; 148};
@@ -428,12 +441,23 @@ const uint8_t PROGMEM LED_FN[] = {
428}; 441};
429 442
430const uint8_t PROGMEM LED_INDICATORS[] = { 443const uint8_t PROGMEM LED_INDICATORS[] = {
431 LED_IND_EMOJI, 444 LED_IND_LINUX,
432 LED_IND_NUM, 445 LED_IND_APPLE,
433 LED_IND_FUN, 446 LED_IND_WINDOWS,
434 LED_IND_BATTERY, 447 LED_IND_QWERTY,
435 LED_IND_USB, 448 LED_IND_ALT,
449 LED_IND_AUDIO,
436 LED_IND_BLUETOOTH, 450 LED_IND_BLUETOOTH,
451 LED_IND_USB,
452
453 LED_IND_BATTERY,
454 LED_IND_CAPSLOCK,
455 LED_IND_GUI,
456 LED_IND_FUN,
457 LED_IND_NUM,
458 LED_IND_PUNC,
459 LED_IND_EMOJI,
460 LED_IND_GREEK,
437}; 461};
438 462
439const uint8_t PROGMEM LED_TRACKPOINT[] = { 463const uint8_t PROGMEM LED_TRACKPOINT[] = {
@@ -486,15 +510,31 @@ void led_reset(void) {
486 } 510 }
487} 511}
488 512
513void led_set_default_layer_indicator(void) {
514 uint8_t default_layer = biton32(default_layer_state);
515 if (default_layer == _QWERTY) {
516 rgbsps_set(LED_IND_QWERTY, 15, 10, 0);
517 rgbsps_set(LED_IND_ALT, 0, 0, 0);
518 } else {
519 rgbsps_set(LED_IND_QWERTY, 0, 0, 0);
520 rgbsps_set(LED_IND_ALT, 15, 10, 0);
521 }
522 rgbsps_send();
523 return;
524}
525
489void led_set_layer_indicator(void) { 526void led_set_layer_indicator(void) {
490 static uint8_t oldlayer = 255; 527 static uint8_t oldlayer = 255;
491 528
529 led_reset();
530
531 rgbsps_set(LED_IND_GUI, 0, 0, 0);
492 rgbsps_set(LED_IND_FUN, 0, 0, 0); 532 rgbsps_set(LED_IND_FUN, 0, 0, 0);
493 // rgbsps_set(LED_IND_NUM, 0, 0, 0); 533 rgbsps_set(LED_IND_NUM, 0, 0, 0);
534 rgbsps_set(LED_IND_PUNC, 0, 0, 0);
535 rgbsps_set(LED_IND_GREEK, 0, 0, 0);
494 rgbsps_set(LED_IND_EMOJI, 0, 0, 0); 536 rgbsps_set(LED_IND_EMOJI, 0, 0, 0);
495 537
496 led_reset();
497
498 uint8_t layer = biton32(layer_state); 538 uint8_t layer = biton32(layer_state);
499 if (oldlayer == layer) { 539 if (oldlayer == layer) {
500 return; 540 return;
@@ -508,24 +548,57 @@ void led_set_layer_indicator(void) {
508 } 548 }
509 549
510 switch(layer) { 550 switch(layer) {
551 case _GUI:
552 rgbsps_set(LED_IND_GUI, 15, 0, 15);
553 break;
511 case _FUN: 554 case _FUN:
512 rgbsps_set(LED_IND_FUN, 15, 0, 0); 555 rgbsps_set(LED_IND_FUN, 15, 0, 0);
513 break; 556 break;
514 // case _NUM: 557 case _NUM:
515 // rgbsps_set(LED_IND_NUM, 0, 0, 15); 558 rgbsps_set(LED_IND_NUM, 0, 0, 15);
516 // break; 559 break;
560 case _PUNC:
561 rgbsps_set(LED_IND_PUNC, 0, 15, 0);
562 break;
563 case _GREEKL:
564 case _GREEKU:
565 rgbsps_set(LED_IND_GREEK, 0, 15, 15);
566 break;
517 case _EMOJI: 567 case _EMOJI:
518 rgbsps_set(LED_IND_EMOJI, 15, 15, 0); 568 rgbsps_set(LED_IND_EMOJI, 15, 15, 0);
519 break; 569 break;
520 default: 570 default:
571 rgbsps_set(LED_IND_GUI, 3, 3, 3);
521 rgbsps_set(LED_IND_FUN, 3, 3, 3); 572 rgbsps_set(LED_IND_FUN, 3, 3, 3);
522 // rgbsps_set(LED_IND_NUM, 3, 3, 3); 573 rgbsps_set(LED_IND_NUM, 3, 3, 3);
574 rgbsps_set(LED_IND_PUNC, 3, 3, 3);
575 rgbsps_set(LED_IND_GREEK, 3, 3, 3);
523 rgbsps_set(LED_IND_EMOJI, 3, 3, 3); 576 rgbsps_set(LED_IND_EMOJI, 3, 3, 3);
524 } 577 }
525 578
526 rgbsps_send(); 579 rgbsps_send();
527} 580}
528 581
582void led_set_unicode_input_mode(void) {
583 rgbsps_set(LED_IND_LINUX, 0, 0, 0);
584 rgbsps_set(LED_IND_APPLE, 0, 0, 0);
585 rgbsps_set(LED_IND_WINDOWS, 0, 0, 0);
586
587 switch (get_unicode_input_mode()) {
588 case UC_LNX:
589 rgbsps_set(LED_IND_LINUX, 15, 15, 15);
590 break;
591 case UC_OSX:
592 rgbsps_set(LED_IND_APPLE, 15, 15, 15);
593 break;
594 case UC_WIN:
595 case UC_WINC:
596 rgbsps_set(LED_IND_WINDOWS, 15, 15, 15);
597 break;
598 }
599 rgbsps_send();
600}
601
529void led_set_output_ble(void) { 602void led_set_output_ble(void) {
530 rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); 603 rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15);
531 rgbsps_set(LED_IND_USB, 0, 0, 0); 604 rgbsps_set(LED_IND_USB, 0, 0, 0);
@@ -552,7 +625,16 @@ void led_init(void) {
552 rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); 625 rgbsps_set(LED_TRACKPOINT1, 15, 0, 0);
553 rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); 626 rgbsps_set(LED_TRACKPOINT2, 0, 0, 15);
554 rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); 627 rgbsps_set(LED_TRACKPOINT3, 15, 0, 0);
628
629 // unicode input mode
630 led_set_unicode_input_mode();
631
632 // layer indicator
633 led_set_layer_indicator();
634 led_set_default_layer_indicator();
555} 635}
636
637
556#endif // RGBSPS_ENABLE 638#endif // RGBSPS_ENABLE
557 639
558// keymaps 640// keymaps
@@ -574,7 +656,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
574 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, 656 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
575 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , 657 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT ,
576 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, 658 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
577 KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL 659 KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL,
660 _______, _______, _______
578), 661),
579 662
580/* Dvorak 663/* Dvorak
@@ -593,7 +676,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
593 _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, 676 _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
594 _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, 677 _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______,
595 _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, 678 _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
596 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 679 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
680 _______, _______, _______
597), 681),
598#endif 682#endif
599 683
@@ -614,7 +698,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
614 _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, 698 _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______,
615 _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, 699 _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______,
616 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, 700 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
617 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 701 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
702 _______, _______, _______
618), 703),
619#endif 704#endif
620 705
@@ -635,7 +720,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
635 _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, 720 _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______,
636 _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, 721 _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______,
637 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, 722 _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
638 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 723 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
724 _______, _______, _______
639), 725),
640#endif 726#endif
641 727
@@ -656,7 +742,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
656 _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, 742 _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______,
657 _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, 743 _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______,
658 _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, 744 _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______,
659 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 745 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
746 _______, _______, _______
660), 747),
661#endif 748#endif
662 749
@@ -675,7 +762,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
675 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, 762 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______,
676 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, 763 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______,
677 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, 764 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______,
678 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______ 765 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______,
766 _______, _______, _______
679), 767),
680 768
681/* Num 769/* Num
@@ -690,10 +778,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
690 * `-----------------------------------------------------------------------------------' 778 * `-----------------------------------------------------------------------------------'
691 */ 779 */
692[_NUM] = KEYMAP( 780[_NUM] = KEYMAP(
693 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, 781 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______,
694 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, 782 KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______,
695 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), _______, 783 KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______,
696 _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______ 784 _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______,
785 _______, _______, _______
697), 786),
698 787
699/* Func 788/* Func
@@ -711,7 +800,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
711 XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, 800 XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL,
712 KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, 801 KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______,
713 _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, 802 _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______,
714 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 803 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
804 _______, _______, _______
715), 805),
716 806
717/* Uppercase Greek 807/* Uppercase Greek
@@ -729,7 +819,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
729 _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, 819 _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______,
730 _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, 820 _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______,
731 _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, 821 _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______,
732 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 822 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
823 _______, _______, _______
733), 824),
734 825
735/* Lowercase Greek 826/* Lowercase Greek
@@ -747,7 +838,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
747 _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, 838 _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______,
748 _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, 839 _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______,
749 _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, 840 _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______,
750 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 841 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
842 _______, _______, _______
751), 843),
752 844
753/* Empty 845/* Empty
@@ -765,7 +857,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
765 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 857 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
766 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 858 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
767 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 859 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
768 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 860 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
861 _______, _______, _______
769), 862),
770 863
771/* Emoji 864/* Emoji
@@ -783,7 +876,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
783 X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), 876 X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW),
784 X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), 877 X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS),
785 X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), 878 X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH),
786 X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK) 879 X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK),
880 _______, _______, _______
787), 881),
788 882
789/* GUI 883/* GUI
@@ -801,7 +895,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
801 XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, 895 XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX,
802 KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, 896 KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX,
803 XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, 897 XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
804 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX 898 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
899 _______, _______, _______
805), 900),
806 901
807/* Sys 902/* Sys
@@ -816,10 +911,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
816 * `-----------------------------------------------------------------------------------' 911 * `-----------------------------------------------------------------------------------'
817 */ 912 */
818[_SYS] = KEYMAP( 913[_SYS] = KEYMAP(
819 XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 914 DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
820 XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, 915 XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX,
821 XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 916 XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
822 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ 917 _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
918 _______, _______, _______
823), 919),
824 920
825 921
@@ -828,6 +924,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
828void persistant_default_layer_set(uint16_t default_layer) { 924void persistant_default_layer_set(uint16_t default_layer) {
829 eeconfig_update_default_layer(default_layer); 925 eeconfig_update_default_layer(default_layer);
830 default_layer_set(default_layer); 926 default_layer_set(default_layer);
927#ifdef RGBSPS_ENABLE
928 led_set_default_layer_indicator();
929#endif
831} 930}
832 931
833#ifdef DOUBLESPACE_LAYER_ENABLE 932#ifdef DOUBLESPACE_LAYER_ENABLE
@@ -1072,14 +1171,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1072 // OS switchers 1171 // OS switchers
1073 case LINUX: 1172 case LINUX:
1074 set_unicode_input_mode(UC_LNX); 1173 set_unicode_input_mode(UC_LNX);
1174#ifdef RGBSPS_ENABLE
1175 led_set_unicode_input_mode();
1176#endif
1075 return false; 1177 return false;
1076 break; 1178 break;
1077 case WIN: 1179 case WIN:
1078 set_unicode_input_mode(UC_WINC); 1180 set_unicode_input_mode(UC_WINC);
1181#ifdef RGBSPS_ENABLE
1182 led_set_unicode_input_mode();
1183#endif
1079 return false; 1184 return false;
1080 break; 1185 break;
1081 case OSX: 1186 case OSX:
1082 set_unicode_input_mode(UC_OSX); 1187 set_unicode_input_mode(UC_OSX);
1188#ifdef RGBSPS_ENABLE
1189 led_set_unicode_input_mode();
1190#endif
1083 return false; 1191 return false;
1084 break; 1192 break;
1085 1193
@@ -1101,6 +1209,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1101 // faux clicky indicator 1209 // faux clicky indicator
1102#ifdef FAUXCLICKY_ENABLE 1210#ifdef FAUXCLICKY_ENABLE
1103 case FC_TOG: 1211 case FC_TOG:
1212#ifdef RGBSPS_ENABLE
1213 if (fauxclicky_enabled) {
1214 rgbsps_set(LED_IND_AUDIO, 0, 0, 0);
1215 } else {
1216 rgbsps_set(LED_IND_AUDIO, 5, 11, 13);
1217 }
1218 rgbsps_send();
1219#endif
1104 return true; 1220 return true;
1105 break; 1221 break;
1106#endif 1222#endif
@@ -1109,12 +1225,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
1109} 1225}
1110 1226
1111void set_output_user(uint8_t output) { 1227void set_output_user(uint8_t output) {
1112#ifdef ADAFRUIT_BLE_ENABLE 1228#ifdef MODULE_ADAFRUIT_BLE
1113 switch(output) { 1229 switch(output) {
1114 case OUTPUT_USB: 1230 case OUTPUT_USB:
1115 led_set_output_usb(); 1231 led_set_output_usb();
1116 break; 1232 break;
1117 case OUTPUT_ADAFRUIT_BLE: 1233 case OUTPUT_BLUETOOTH:
1118 led_set_output_ble(); 1234 led_set_output_ble();
1119 break; 1235 break;
1120 default: 1236 default:
@@ -1133,12 +1249,12 @@ void matrix_init_user() {
1133#endif 1249#endif
1134 1250
1135 // auto detect output on init 1251 // auto detect output on init
1136#ifdef ADAFRUIT_BLE_ENABLE 1252#ifdef MODULE_ADAFRUIT_BLE
1137 uint8_t output = auto_detect_output(); 1253 uint8_t output = auto_detect_output();
1138 if (output == OUTPUT_USB) { 1254 if (output == OUTPUT_USB) {
1139 set_output(OUTPUT_USB); 1255 set_output(OUTPUT_USB);
1140 } else { 1256 } else {
1141 set_output(OUTPUT_ADAFRUIT_BLE); 1257 set_output(OUTPUT_BLUETOOTH);
1142 } 1258 }
1143#endif 1259#endif
1144} 1260}
@@ -1164,9 +1280,9 @@ void turn_off_capslock() {
1164 bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK); 1280 bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK);
1165 if (new_capslock ^ capslock) { // capslock state is different 1281 if (new_capslock ^ capslock) { // capslock state is different
1166 if ((capslock = new_capslock)) { 1282 if ((capslock = new_capslock)) {
1167 rgbsps_set(LED_IND_NUM, 15, 0, 0); 1283 rgbsps_set(LED_IND_CAPSLOCK, 15, 0, 0);
1168 } else { 1284 } else {
1169 rgbsps_set(LED_IND_NUM, 0, 0, 0); 1285 rgbsps_set(LED_IND_CAPSLOCK, 0, 0, 0);
1170 } 1286 }
1171 rgbsps_send(); 1287 rgbsps_send();
1172 } 1288 }
diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c
new file mode 100644
index 000000000..2b7ce2bf5
--- /dev/null
+++ b/keyboards/handwired/promethium/matrix.c
@@ -0,0 +1,306 @@
1/*
2Copyright 2012 Jun Wako
3Copyright 2014 Jack Humbert
4Copyright 2017 Priyadi Iman Nurcahyo
5
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include <stdint.h>
20#include <stdbool.h>
21#if defined(__AVR__)
22#include <avr/io.h>
23#endif
24#include "wait.h"
25#include "print.h"
26#include "debug.h"
27#include "util.h"
28#include "matrix.h"
29#include "timer.h"
30
31
32/* Set 0 if debouncing isn't needed */
33
34#ifndef DEBOUNCING_DELAY
35# define DEBOUNCING_DELAY 5
36#endif
37
38#if (DEBOUNCING_DELAY > 0)
39 static uint16_t debouncing_time;
40 static bool debouncing = false;
41#endif
42
43#if (MATRIX_COLS <= 8)
44# define print_matrix_header() print("\nr/c 01234567\n")
45# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
46# define matrix_bitpop(i) bitpop(matrix[i])
47# define ROW_SHIFTER ((uint8_t)1)
48#elif (MATRIX_COLS <= 16)
49# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
50# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
51# define matrix_bitpop(i) bitpop16(matrix[i])
52# define ROW_SHIFTER ((uint16_t)1)
53#elif (MATRIX_COLS <= 32)
54# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
55# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
56# define matrix_bitpop(i) bitpop32(matrix[i])
57# define ROW_SHIFTER ((uint32_t)1)
58#endif
59
60#ifdef MATRIX_MASKED
61 extern const matrix_row_t matrix_mask[];
62#endif
63
64static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
65static const uint8_t tp_pins[3] = TRACKPOINT_PINS;
66
67/* matrix state(1:on, 0:off) */
68static matrix_row_t matrix[MATRIX_ROWS];
69static matrix_row_t matrix_debouncing[MATRIX_ROWS];
70
71static void init_cols(void);
72static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
73static void unselect_rows(void);
74static void select_row(uint8_t row);
75static void unselect_row(uint8_t row);
76
77__attribute__ ((weak))
78void matrix_init_quantum(void) {
79 matrix_init_kb();
80}
81
82__attribute__ ((weak))
83void matrix_scan_quantum(void) {
84 matrix_scan_kb();
85}
86
87__attribute__ ((weak))
88void matrix_init_kb(void) {
89 matrix_init_user();
90}
91
92__attribute__ ((weak))
93void matrix_scan_kb(void) {
94 matrix_scan_user();
95}
96
97__attribute__ ((weak))
98void matrix_init_user(void) {
99}
100
101__attribute__ ((weak))
102void matrix_scan_user(void) {
103}
104
105inline
106uint8_t matrix_rows(void) {
107 return MATRIX_ROWS;
108}
109
110inline
111uint8_t matrix_cols(void) {
112 return MATRIX_COLS;
113}
114
115void matrix_init(void) {
116
117 // To use PORTF disable JTAG with writing JTD bit twice within four cycles.
118 #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
119 MCUCR |= _BV(JTD);
120 MCUCR |= _BV(JTD);
121 #endif
122
123 // initialize row and col
124 unselect_rows();
125 init_cols();
126
127 // initialize matrix state: all keys off
128 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
129 matrix[i] = 0;
130 matrix_debouncing[i] = 0;
131 }
132
133 matrix_init_quantum();
134}
135
136uint8_t matrix_scan(void
137){
138 // Set row, read cols
139 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
140# if (DEBOUNCING_DELAY > 0)
141 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
142
143 if (matrix_changed) {
144 debouncing = true;
145 debouncing_time = timer_read();
146 }
147
148# else
149 read_cols_on_row(matrix, current_row);
150# endif
151
152 }
153
154# if (DEBOUNCING_DELAY > 0)
155 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
156 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
157 matrix[i] = matrix_debouncing[i];
158 }
159 debouncing = false;
160 }
161# endif
162
163 matrix_scan_quantum();
164 return 1;
165}
166
167bool matrix_is_modified(void)
168{
169#if (DEBOUNCING_DELAY > 0)
170 if (debouncing) return false;
171#endif
172 return true;
173}
174
175inline
176bool matrix_is_on(uint8_t row, uint8_t col)
177
178{
179 return (matrix[row] & ((matrix_row_t)1<col));
180}
181
182inline
183matrix_row_t matrix_get_row(uint8_t row)
184{
185 // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a
186 // switch blocker installed and the switch is always pressed.
187#ifdef MATRIX_MASKED
188 return matrix[row] & matrix_mask[row];
189#else
190 return matrix[row];
191#endif
192}
193
194void matrix_print(void)
195{
196 print_matrix_header();
197
198 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
199 phex(row); print(": ");
200 print_matrix_row(row);
201 print("\n");
202 }
203}
204
205uint8_t matrix_key_count(void)
206{
207 uint8_t count = 0;
208 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
209 count += matrix_bitpop(i);
210 }
211 return count;
212}
213
214
215#define ROW_MASK 0b11100000
216
217static const uint8_t row_bit[MATRIX_ROWS] = {
218 // 76543210
219 0b00000000,
220 0b00100000,
221 0b01000000,
222 0b01100000,
223 0b10000000,
224 0b10100000,
225 0b11000000,
226 0b11100000,
227};
228
229static void init_cols(void)
230{
231 // columns
232 for(uint8_t x = 0; x < MATRIX_COLS; x++) {
233 uint8_t pin = col_pins[x];
234 _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
235 _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
236 }
237
238 // rows
239 DDRF |= ROW_MASK;
240 PORTF &= ~ROW_MASK;
241
242 // trackpoint
243 for(uint8_t x = 0; x < 3; x++) {
244 uint8_t pin = tp_pins[x];
245 _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
246 _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
247 }
248}
249
250static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
251 {
252 // Store last value of row prior to reading
253 matrix_row_t last_row_value = current_matrix[current_row];
254
255 // Clear data in matrix row
256 current_matrix[current_row] = 0;
257
258 // special case for trackpoint
259 if (current_row == 8) {
260 for(uint8_t tp_index = 0; tp_index < 3; tp_index++) {
261
262 // Select the TP pin to read (active low)
263 uint8_t pin = tp_pins[tp_index];
264 uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
265
266 // Populate the matrix row with the state of the col pin
267 current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << tp_index);
268 }
269 return (last_row_value != current_matrix[current_row]);
270 }
271
272 // Select row and wait for row selecton to stabilize
273 select_row(current_row);
274 _delay_us(5); // without this wait it won't read stable value.
275 // wait_us(50);
276
277 // For each col...
278 for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
279
280 // Select the col pin to read (active low)
281 uint8_t pin = col_pins[col_index];
282 uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
283
284 // Populate the matrix row with the state of the col pin
285 current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
286 }
287
288 // Unselect row
289 unselect_row(current_row);
290
291 return (last_row_value != current_matrix[current_row]);
292}
293
294static void select_row(uint8_t row)
295{
296 PORTF = row_bit[row] | (PORTF & ~ROW_MASK);
297}
298
299static void unselect_row(uint8_t row)
300{
301}
302
303static void unselect_rows(void)
304{
305}
306
diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c
index 4943f8c9f..8b1a0c71f 100644
--- a/keyboards/handwired/promethium/promethium.c
+++ b/keyboards/handwired/promethium/promethium.c
@@ -2,6 +2,11 @@
2#include "analog.h" 2#include "analog.h"
3#include "timer.h" 3#include "timer.h"
4#include "matrix.h" 4#include "matrix.h"
5#include "musical_notes.h"
6
7float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, .03125);
8float fauxclicky_released_note[2] = MUSICAL_NOTE(_C3, .03125);
9float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, .03125);
5 10
6// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100} 11// cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100}
7 12
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk
index e75cf4dde..a6dd43b85 100644
--- a/keyboards/handwired/promethium/rules.mk
+++ b/keyboards/handwired/promethium/rules.mk
@@ -65,12 +65,14 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
65RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. 65RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
66PS2_MOUSE_ENABLE ?= yes 66PS2_MOUSE_ENABLE ?= yes
67PS2_USE_INT ?= yes 67PS2_USE_INT ?= yes
68ADAFRUIT_BLE_ENABLE ?= yes
69API_SYSEX_ENABLE ?= no 68API_SYSEX_ENABLE ?= no
69CUSTOM_MATRIX ?= yes
70BLUETOOTH ?= AdafruitBLE
70 71
71# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 72# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
72SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
73 74
74SRC += $(QUANTUM_DIR)/light_ws2812.c 75SRC += $(QUANTUM_DIR)/light_ws2812.c
75SRC += rgbsps.c 76SRC += rgbsps.c
76SRC += $(QUANTUM_DIR)/analog.c \ No newline at end of file 77SRC += $(QUANTUM_DIR)/analog.c
78SRC += matrix.c
diff --git a/keyboards/kitten_paw/keymaps/ickerwx/config.h b/keyboards/kitten_paw/keymaps/ickerwx/config.h
index 04a2d253c..142aba890 100644
--- a/keyboards/kitten_paw/keymaps/ickerwx/config.h
+++ b/keyboards/kitten_paw/keymaps/ickerwx/config.h
@@ -22,7 +22,7 @@
22#undef MOUSEKEY_WHEEL_MAX_SPEED 22#undef MOUSEKEY_WHEEL_MAX_SPEED
23#define MOUSEKEY_WHEEL_MAX_SPEED 3 23#define MOUSEKEY_WHEEL_MAX_SPEED 3
24#undef MOUSEKEY_WHEEL_TIME_TO_MAX 24#undef MOUSEKEY_WHEEL_TIME_TO_MAX
25#define MOUSEKEY_WHEEL_TIME_TO_MAX 1000 25#define MOUSEKEY_WHEEL_TIME_TO_MAX 255
26#undef ONESHOT_TIMEOUT 26#undef ONESHOT_TIMEOUT
27#define ONESHOT_TIMEOUT 500 27#define ONESHOT_TIMEOUT 500
28#undef TAPPING_TOGGLE 28#undef TAPPING_TOGGLE
diff --git a/keyboards/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/kitten_paw/keymaps/ickerwx/keymap.c
index 9a00c80dc..9dffbb272 100644
--- a/keyboards/kitten_paw/keymaps/ickerwx/keymap.c
+++ b/keyboards/kitten_paw/keymaps/ickerwx/keymap.c
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
64 _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \ 64 _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \
65 _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______), 65 _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______),
66 /* Layer 3: media layer */ 66 /* Layer 3: media layer */
67 [MEDIA] = KEYMAP(\ 67 [MEDIA] = KEYMAP(\
68 KC_PWR,KC_SLEP,KC_WAKE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, \ 68 KC_PWR,KC_SLEP,KC_WAKE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, \
69 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_MPRV,KC_MPLY,KC_MNXT, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ 69 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_MPRV,KC_MPLY,KC_MNXT, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \
70 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_VOLD,KC_MUTE,KC_VOLU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ 70 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_VOLD,KC_MUTE,KC_VOLU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \
diff --git a/keyboards/mitosis/Makefile b/keyboards/mitosis/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/mitosis/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h
new file mode 100644
index 000000000..cb6378ab4
--- /dev/null
+++ b/keyboards/mitosis/config.h
@@ -0,0 +1,87 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24
25#define VENDOR_ID 0xFEED
26#define PRODUCT_ID 0x6060
27#define DEVICE_VER 0x0001
28#define MANUFACTURER unknown
29#define PRODUCT Mitosis
30#define DESCRIPTION q.m.k. keyboard firmware for Mitosis
31
32/* key matrix size */
33#define MATRIX_ROWS 5
34#define MATRIX_COLS 10
35
36/* define if matrix has ghost */
37//#define MATRIX_HAS_GHOST
38
39/* number of backlight levels */
40//#define BACKLIGHT_LEVELS 3
41
42#define ONESHOT_TIMEOUT 500
43
44
45/* key combination for command */
46#define IS_COMMAND() ( \
47 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
48)
49
50/*
51 * Feature disable options
52 * These options are also useful to firmware size reduction.
53 */
54
55#define PREVENT_STUCK_MODIFIERS
56
57/* disable debug print */
58//#define NO_DEBUG
59
60/* disable print */
61//#define NO_PRINT
62
63/* disable action features */
64//#define NO_ACTION_LAYER
65//#define NO_ACTION_TAPPING
66//#define NO_ACTION_ONESHOT
67//#define NO_ACTION_MACRO
68//#define NO_ACTION_FUNCTION
69
70//UART settings for communication with the RF microcontroller
71#define SERIAL_UART_BAUD 1000000
72#define SERIAL_UART_DATA UDR1
73#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
74#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
75#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
76#define SERIAL_UART_INIT() do { \
77 /* baud rate */ \
78 UBRR1L = SERIAL_UART_UBRR; \
79 /* baud rate */ \
80 UBRR1H = SERIAL_UART_UBRR >> 8; \
81 /* enable TX and RX */ \
82 UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
83 /* 8-bit data */ \
84 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
85 } while(0)
86
87#endif
diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c
new file mode 100644
index 000000000..320d33db6
--- /dev/null
+++ b/keyboards/mitosis/keymaps/default/keymap.c
@@ -0,0 +1,221 @@
1// this is the style you want to emulate.
2// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
3
4#include "mitosis.h"
5
6// Each layer gets a name for readability, which is then used in the keymap matrix below.
7// The underscores don't mean anything - you can have a layer called STUFF or any other name.
8// Layer names don't all need to be of the same length, obviously, and you can also skip them
9// entirely and just use numbers.
10enum mitosis_layers
11{
12 _MALT,
13 _SHIFTED,
14 _FUNCTION,
15 _FUNCSHIFT
16};
17
18enum mitosis_keycodes
19{
20 FNKEY = SAFE_RANGE,
21 SHIFT
22};
23
24
25// Macro definitions for readability
26enum mitosis_macros
27{
28 VOLU,
29 VOLD,
30 ESCM
31};
32
33#define LONGPRESS_DELAY 150
34#define LAYER_TOGGLE_DELAY 300
35
36// Fillers to make layering more clear
37#define _______ KC_TRNS
38#define XXXXXXX KC_NO
39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41[_MALT] = { /* Malt Layout, customised for reduced columns (ex: quote and shift locations) */
42 {KC_Q, KC_P, KC_Y, KC_C, KC_B, KC_V, KC_M, KC_U, KC_Z, KC_L },
43 {KC_A, KC_N, KC_I, KC_S, KC_F, KC_D, KC_T, KC_H, KC_O, KC_R },
44 {KC_COMM, KC_DOT, KC_J, KC_G, KC_SLSH, KC_SCLN, KC_W, KC_K, KC_QUOT, KC_X },
45 {XXXXXXX, M(VOLU), M(ESCM), KC_TAB, KC_LCTL, KC_LALT, KC_ENT, KC_DEL, KC_PGUP, XXXXXXX },
46 {XXXXXXX, M(VOLD), KC_LGUI, KC_E, FNKEY, SHIFT, KC_SPC, KC_BSPC, KC_PGDN, XXXXXXX }
47},
48
49
50[_SHIFTED] = { /* Shifted Layer, layered so that tri_layer can be used, or selectively
51 able to modify individual key's shifted behaviour */
52 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
53 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
54 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
55 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX },
56 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX }
57},
58
59
60
61[_FUNCTION] = { /* Function Layer, primary alternative layer featuring numpad on right hand,
62 cursor keys on left hand, and all symbols*/
63 {KC_AMPR, KC_PERC, KC_UP, KC_CIRC, KC_PIPE, KC_LBRC, KC_7, KC_8, KC_9, KC_MINS },
64 {KC_AT, KC_LEFT, KC_DOWN, KC_RGHT, KC_HASH, KC_LPRN, KC_4, KC_5, KC_6, KC_PLUS },
65 {KC_ASTR, KC_UNDS, KC_EXLM, KC_DLR, KC_BSLS, KC_LCBR, KC_1, KC_2, KC_3, KC_ENT },
66 {XXXXXXX, KC_HOME, KC_GRV, KC_PWR, _______, _______, KC_EQL, KC_TILD, KC_DOT, XXXXXXX },
67 {XXXXXXX, KC_END, _______, _______, _______, _______, KC_0, _______, KC_PSCR, XXXXXXX }
68},
69
70
71[_FUNCSHIFT] = { /* Function Shifted Layer, secondary alternative layer with closing brackets,
72 and F-keys under their numpad equivalents*/
73 {_______, _______, _______, _______, _______, KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10 },
74 {_______, _______, _______, _______, _______, KC_RPRN, KC_F4, KC_F5, KC_F6, KC_F11 },
75 {_______, _______, _______, _______, _______, KC_RCBR, KC_F1, KC_F2, KC_F3, KC_F12 },
76 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX },
77 {XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX }
78}
79
80};
81
82
83const uint16_t PROGMEM fn_actions[] = {
84
85};
86
87static uint16_t key_timer;
88
89const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
90{
91 // MACRODOWN only works in this function
92 switch(id) {
93
94 //switch multiplexing for media, short tap for volume up, long press for play/pause
95 case VOLU:
96 if (record->event.pressed) {
97 key_timer = timer_read(); // if the key is being pressed, we start the timer.
98 } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
99 if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap.
100 return MACRO(T(MPLY), END);
101 } else {
102 return MACRO(T(VOLU), END);
103 }
104 }
105 break;
106
107 //switch multiplexing for media, short tap for volume down, long press for next track
108 case VOLD:
109 if (record->event.pressed) {
110 key_timer = timer_read();
111 } else {
112 if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
113 return MACRO(T(MNXT), END);
114 } else {
115 return MACRO(T(VOLD), END);
116 }
117 }
118 break;
119
120 //switch multiplexing for escape, short tap for escape, long press for context menu
121 case ESCM:
122 if (record->event.pressed) {
123 key_timer = timer_read();
124 } else {
125 if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
126 return MACRO(T(APP), END);
127 } else {
128 return MACRO(T(ESC), END);
129 }
130 }
131 break;
132
133 break;
134 }
135 return MACRO_NONE;
136};
137
138static bool singular_key = false;
139
140bool process_record_user(uint16_t keycode, keyrecord_t *record) {
141
142 uint8_t layer;
143 layer = biton32(layer_state); // get the current layer
144
145 //custom layer handling for tri_layer,
146 switch (keycode) {
147 case FNKEY:
148 if (record->event.pressed) {
149 key_timer = timer_read();
150 singular_key = true;
151 layer_on(_FUNCTION);
152 } else {
153 if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
154 layer_off(_FUNCTION);
155 }
156 }
157 update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT);
158 return false;
159 break;
160 //SHIFT is handled as LSHIFT in the general case
161 case SHIFT:
162 if (record->event.pressed) {
163 key_timer = timer_read();
164 singular_key = true;
165 layer_on(_SHIFTED);
166 register_code(KC_LSFT);
167 } else {
168 if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
169 layer_off(_SHIFTED);
170 unregister_code(KC_LSFT);
171 }
172 }
173 update_tri_layer(_FUNCTION, _SHIFTED, _FUNCSHIFT);
174 return false;
175 break;
176
177 //If any other key was pressed during the layer mod hold period,
178 //then the layer mod was used momentarily, and should block latching
179 default:
180 singular_key = false;
181 break;
182 }
183
184 //FUNCSHIFT has been shifted by the SHIFT handling, some keys need to be excluded
185 if (layer == _FUNCSHIFT) {
186 //F1-F12 should be sent as unshifted keycodes,
187 //and ] needs to be unshifted or it is sent as }
188 if ( (keycode >= KC_F1 && keycode <= KC_F12)
189 || keycode == KC_RBRC ) {
190 if (record->event.pressed) {
191 unregister_mods(MOD_LSFT);
192 } else {
193 register_mods(MOD_LSFT);
194 }
195 }
196 }
197
198 return true;
199};
200
201void matrix_scan_user(void) {
202 uint8_t layer = biton32(layer_state);
203
204 switch (layer) {
205 case _MALT:
206 set_led_off;
207 break;
208 case _FUNCTION:
209 set_led_blue;
210 break;
211 case _SHIFTED:
212 set_led_red;
213 break;
214 case _FUNCSHIFT:
215 set_led_green;
216 break;
217 default:
218 break;
219 }
220};
221
diff --git a/keyboards/mitosis/matrix.c b/keyboards/mitosis/matrix.c
new file mode 100644
index 000000000..0d046339e
--- /dev/null
+++ b/keyboards/mitosis/matrix.c
@@ -0,0 +1,164 @@
1/*
2Copyright 2012 Jun Wako
3Copyright 2014 Jack Humbert
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include <stdint.h>
19#include <stdbool.h>
20#if defined(__AVR__)
21#include <avr/io.h>
22#endif
23#include "wait.h"
24#include "print.h"
25#include "debug.h"
26#include "util.h"
27#include "matrix.h"
28#include "timer.h"
29
30#if (MATRIX_COLS <= 8)
31# define print_matrix_header() print("\nr/c 01234567\n")
32# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
33# define matrix_bitpop(i) bitpop(matrix[i])
34# define ROW_SHIFTER ((uint8_t)1)
35#elif (MATRIX_COLS <= 16)
36# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
37# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
38# define matrix_bitpop(i) bitpop16(matrix[i])
39# define ROW_SHIFTER ((uint16_t)1)
40#elif (MATRIX_COLS <= 32)
41# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
42# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
43# define matrix_bitpop(i) bitpop32(matrix[i])
44# define ROW_SHIFTER ((uint32_t)1)
45#endif
46
47/* matrix state(1:on, 0:off) */
48static matrix_row_t matrix[MATRIX_ROWS];
49
50__attribute__ ((weak))
51void matrix_init_quantum(void) {
52 matrix_init_kb();
53}
54
55__attribute__ ((weak))
56void matrix_scan_quantum(void) {
57 matrix_scan_kb();
58}
59
60__attribute__ ((weak))
61void matrix_init_kb(void) {
62 matrix_init_user();
63}
64
65__attribute__ ((weak))
66void matrix_scan_kb(void) {
67 matrix_scan_user();
68}
69
70__attribute__ ((weak))
71void matrix_init_user(void) {
72}
73
74__attribute__ ((weak))
75void matrix_scan_user(void) {
76}
77
78inline
79uint8_t matrix_rows(void) {
80 return MATRIX_ROWS;
81}
82
83inline
84uint8_t matrix_cols(void) {
85 return MATRIX_COLS;
86}
87
88void matrix_init(void) {
89
90 matrix_init_quantum();
91}
92
93uint8_t matrix_scan(void)
94{
95 SERIAL_UART_INIT();
96
97 uint32_t timeout = 0;
98
99 //the s character requests the RF slave to send the matrix
100 SERIAL_UART_DATA = 's';
101
102 //trust the external keystates entirely, erase the last data
103 uint8_t uart_data[11] = {0};
104
105 //there are 10 bytes corresponding to 10 columns, and an end byte
106 for (uint8_t i = 0; i < 11; i++) {
107 //wait for the serial data, timeout if it's been too long
108 //this only happened in testing with a loose wire, but does no
109 //harm to leave it in here
110 while(!SERIAL_UART_RXD_PRESENT){
111 timeout++;
112 if (timeout > 10000){
113 break;
114 }
115 }
116 uart_data[i] = SERIAL_UART_DATA;
117 }
118
119 //check for the end packet, the key state bytes use the LSBs, so 0xE0
120 //will only show up here if the correct bytes were recieved
121 if (uart_data[10] == 0xE0)
122 {
123 //shifting and transferring the keystates to the QMK matrix variable
124 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
125 matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5;
126 }
127 }
128
129
130 matrix_scan_quantum();
131 return 1;
132}
133
134inline
135bool matrix_is_on(uint8_t row, uint8_t col)
136{
137 return (matrix[row] & ((matrix_row_t)1<col));
138}
139
140inline
141matrix_row_t matrix_get_row(uint8_t row)
142{
143 return matrix[row];
144}
145
146void matrix_print(void)
147{
148 print_matrix_header();
149
150 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
151 phex(row); print(": ");
152 print_matrix_row(row);
153 print("\n");
154 }
155}
156
157uint8_t matrix_key_count(void)
158{
159 uint8_t count = 0;
160 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
161 count += matrix_bitpop(i);
162 }
163 return count;
164}
diff --git a/keyboards/mitosis/mitosis.c b/keyboards/mitosis/mitosis.c
new file mode 100644
index 000000000..24de82724
--- /dev/null
+++ b/keyboards/mitosis/mitosis.c
@@ -0,0 +1,31 @@
1#include "mitosis.h"
2
3void uart_init(void) {
4 SERIAL_UART_INIT();
5}
6
7void led_init(void) {
8 DDRD |= (1<<1);
9 PORTD |= (1<<1);
10 DDRF |= (1<<4) | (1<<5);
11 PORTF |= (1<<4) | (1<<5);
12}
13
14
15void matrix_init_kb(void) {
16 // put your keyboard start-up code here
17 // runs once when the firmware starts up
18 matrix_init_user();
19 uart_init();
20 led_init();
21}
22
23void matrix_scan_kb(void) {
24 // put your looping keyboard code here
25 // runs every cycle (a lot)
26 matrix_scan_user();
27}
28
29void led_set_kb(uint8_t usb_led) {
30
31} \ No newline at end of file
diff --git a/keyboards/mitosis/mitosis.h b/keyboards/mitosis/mitosis.h
new file mode 100644
index 000000000..1b04600e8
--- /dev/null
+++ b/keyboards/mitosis/mitosis.h
@@ -0,0 +1,67 @@
1#ifndef MITOSIS_H
2#define MITOSIS_H
3
4#include "quantum.h"
5#include "matrix.h"
6#include "backlight.h"
7#include <stddef.h>
8
9#define red_led_off PORTF |= (1<<5)
10#define red_led_on PORTF &= ~(1<<5)
11#define blu_led_off PORTF |= (1<<4)
12#define blu_led_on PORTF &= ~(1<<4)
13#define grn_led_off PORTD |= (1<<1)
14#define grn_led_on PORTD &= ~(1<<1)
15
16#define set_led_off red_led_off; grn_led_off; blu_led_off
17#define set_led_red red_led_on; grn_led_off; blu_led_off
18#define set_led_blue red_led_off; grn_led_off; blu_led_on
19#define set_led_green red_led_off; grn_led_on; blu_led_off
20#define set_led_yellow red_led_on; grn_led_on; blu_led_off
21#define set_led_magenta red_led_on; grn_led_off; blu_led_on
22#define set_led_cyan red_led_off; grn_led_on; blu_led_on
23#define set_led_white red_led_on; grn_led_on; blu_led_on
24
25/*
26#define LED_B 5
27#define LED_R 6
28#define LED_G 7
29
30#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
31
32#define red_led_on PORTF |= (1<<LED_R)
33#define red_led_off PORTF &= ~(1<<LED_R)
34#define grn_led_on PORTF |= (1<<LED_G)
35#define grn_led_off PORTF &= ~(1<<LED_G)
36#define blu_led_on PORTF |= (1<<LED_B)
37#define blu_led_off PORTF &= ~(1<<LED_B)
38
39#define set_led_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
40#define set_led_red PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
41#define set_led_blue PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
42#define set_led_green PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
43#define set_led_yellow PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
44#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
45#define set_led_cyan PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
46#define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
47*/
48
49// This a shortcut to help you visually see your layout.
50// The first section contains all of the arguements
51// The second converts the arguments into a two-dimensional array
52#define KEYMAP( \
53 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
54 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
55 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
56 k31, k32, k33, k34, k35, k36, k37, k38, \
57 k41, k42, k43, k44, k45, k46, k47, k48 \
58) \
59{ \
60 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \
61 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \
62 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \
63 { KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO } \
64 { KC_NO, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO }, \
65}
66
67#endif
diff --git a/keyboards/mitosis/readme.md b/keyboards/mitosis/readme.md
new file mode 100644
index 000000000..70755e32a
--- /dev/null
+++ b/keyboards/mitosis/readme.md
@@ -0,0 +1,33 @@
1Mitosis Keyboard Firmware
2======================
3
4These configuration files were based off the Atreus keyboard. It assumes a Pro Micro is being used, however retains the 'make upload' feature from the Atreus branch. This keyboard uses a completely different 'matrix scan' system to other keyboards, it relies on an external nRF51822 microcontroller maintaining a matrix of keystates received from the keyboard halves. The matrix.c file contains the code to poll the external microcontroller for the key matrix. As long as this file is not changed, all other QMK features are supported.
5
6Build log of the keyboard can be found [here](https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/)
7
8Hardware design files can be found [here](https://github.com/reversebias/mitosis-hardware)
9
10Firmware for the nordic MCUs can be found [here](https://github.com/reversebias/mitosis)
11
12## Quantum MK Firmware
13
14For the full Quantum feature list, see [the parent readme](/).
15
16## Building
17
18Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
19
20Depending on which keymap you would like to use, you will have to compile slightly differently.
21
22### Default
23To build with the default keymap, simply run `make default`.
24
25### Other Keymaps
26Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
27
28To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
29
30```
31$ make [default|jack|<name>]
32```
33Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk
new file mode 100644
index 000000000..4e4eba82b
--- /dev/null
+++ b/keyboards/mitosis/rules.mk
@@ -0,0 +1,81 @@
1
2OPT_DEFS += -DMITOSIS_PROMICRO
3OPT_DEFS += -DCATERINA_BOOTLOADER
4MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
5 avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
6
7# # project specific files
8SRC = matrix.c
9
10
11# MCU name
12#MCU = at90usb1287
13MCU = atmega32u4
14
15# Processor frequency.
16# This will define a symbol, F_CPU, in all source code files equal to the
17# processor frequency in Hz. You can then use this symbol in your source code to
18# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
19# automatically to create a 32-bit value in your source code.
20#
21# This will be an integer division of F_USB below, as it is sourced by
22# F_USB after it has run through any CPU prescalers. Note that this value
23# does not *change* the processor frequency - it should merely be updated to
24# reflect the processor speed set externally so that the code can use accurate
25# software delays.
26F_CPU = 16000000
27
28
29#
30# LUFA specific
31#
32# Target architecture (see library "Board Types" documentation).
33ARCH = AVR8
34
35# Input clock frequency.
36# This will define a symbol, F_USB, in all source code files equal to the
37# input clock frequency (before any prescaling is performed) in Hz. This value may
38# differ from F_CPU if prescaling is used on the latter, and is required as the
39# raw input clock is fed directly to the PLL sections of the AVR for high speed
40# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
41# at the end, this will be done automatically to create a 32-bit value in your
42# source code.
43#
44# If no clock division is performed on the input clock inside the AVR (via the
45# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
46F_USB = $(F_CPU)
47
48# Interrupt driven control endpoint task(+60)
49OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
50
51
52# Boot Section Size in *bytes*
53# Teensy halfKay 512
54# Teensy++ halfKay 1024
55# Atmel DFU loader 4096
56# LUFA bootloader 4096
57# USBaspLoader 2048
58OPT_DEFS += -DBOOTLOADER_SIZE=4096
59
60
61# Build Options
62# comment out to disable the options.
63#
64#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
65MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
66EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
67CONSOLE_ENABLE ?= yes # Console for debug(+400)
68COMMAND_ENABLE ?= yes # Commands for debug and configuration
69CUSTOM_MATRIX ?= yes # Remote matrix from the wireless bridge
70# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
71# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
72NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA
73# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
74# MIDI_ENABLE ?= YES # MIDI controls
75UNICODE_ENABLE ?= YES # Unicode
76# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
77
78USB ?= /dev/ttyACM0
79
80upload: build
81 $(MITOSIS_UPLOAD_COMMAND)
diff --git a/keyboards/planck/keymaps/lae3/Makefile b/keyboards/planck/keymaps/lae3/Makefile
new file mode 100644
index 000000000..595803e32
--- /dev/null
+++ b/keyboards/planck/keymaps/lae3/Makefile
@@ -0,0 +1,23 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = yes # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17
18# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
19SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
20
21ifndef QUANTUM_DIR
22 include ../../../../Makefile
23endif
diff --git a/keyboards/planck/keymaps/lae3/config.h b/keyboards/planck/keymaps/lae3/config.h
new file mode 100644
index 000000000..a28634e69
--- /dev/null
+++ b/keyboards/planck/keymaps/lae3/config.h
@@ -0,0 +1,8 @@
1#ifndef LAE3_KEYMAP_H
2#define LAE3_KEYMAP_H
3
4#include "../../config.h"
5
6#define PREVENT_STUCK_MODIFIERS
7
8#endif
diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c
new file mode 100644
index 000000000..81f94ccd6
--- /dev/null
+++ b/keyboards/planck/keymaps/lae3/keymap.c
@@ -0,0 +1,262 @@
1#include "planck.h"
2#include "action_layer.h"
3#ifdef AUDIO_ENABLE
4#include "audio.h"
5#endif
6#include "eeconfig.h"
7
8extern keymap_config_t keymap_config;
9
10// Each layer gets a name for readability, which is then used in the keymap matrix below.
11// The underscores don't mean anything - you can have a layer called STUFF or any other name.
12// Layer names don't all need to be of the same length, obviously, and you can also skip them
13// entirely and just use numbers.
14enum planck_layers {
15 _QWERTY,
16 _ARROW,
17 _NUMPAD,
18 _MOVEMENT,
19 _LOWER,
20 _RAISE,
21 _ADJUST
22};
23
24#define _MV _MOVEMENT
25
26enum planck_keycodes {
27 QWERTY = SAFE_RANGE,
28 ARROW,
29 NUMPAD,
30 LOWER,
31 RAISE,
32};
33
34// Fillers to make layering more clear
35#define _______ KC_TRNS
36#define XXXXXXX KC_NO
37
38#define KC_MUP KC_MS_UP
39#define KC_MDN KC_MS_DOWN
40#define KC_MLFT KC_MS_LEFT
41#define KC_MRGT KC_MS_RIGHT
42#define KC_MB1 KC_MS_BTN1
43#define KC_MB2 KC_MS_BTN2
44#define KC_MB3 KC_MS_BTN3
45#define KC_MB4 KC_MS_BTN4
46#define KC_MB5 KC_MS_BTN5
47#define KC_MWUP KC_MS_WH_UP
48#define KC_MWDN KC_MS_WH_DOWN
49
50const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
51
52 /* Qwerty
53 * ,-----------------------------------------------------------------------------------.
54 * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
55 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | Tab | A | S | D | F | G | H | J | K | L | ; |Enter |
57 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * |Shift | Z | X | C | V | B | N | M | , | . | / |Shift |
59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * | Ctrl | GUI | Alt | Move |Lower | Space |Raise | Move | Alt | GUI | Ctrl |
61 * `-----------------------------------------------------------------------------------'
62 */
63 [_QWERTY] = {
64 {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
65 {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
66 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
67 {KC_LCTL, KC_LGUI, KC_LALT, MO(_MV), LOWER, KC_SPC, KC_SPC, RAISE, MO(_MV), KC_RALT, KC_RGUI, KC_RCTL}
68 },
69
70 /* Arrow
71 * ,-----------------------------------------------------------------------------------.
72 * | | | | | | | | | | | | |
73 * |------+------+------+------+------+------+------+------+------+------+------+------|
74 * | | | | | | | | | | | | |
75 * |------+------+------+------+------+------+------+------+------+------+------+------|
76 * | | | | | | | | | | | Up | |
77 * |------+------+------+------+------+-------------+------+------+------+------+------|
78 * | | | | | | | | | Left | Down | Right|
79 * `-----------------------------------------------------------------------------------'
80 */
81 [_ARROW] = {
82 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
83 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
84 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______},
85 {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT}
86 },
87
88 /* Numpad
89 * ,-----------------------------------------------------------------------------------.
90 * | | | | | | |NumLck| 7 | 8 | 9 | / | |
91 * |------+------+------+------+------+------+------+------+------+------+------+------|
92 * | | | | | | |Enter | 4 | 5 | 6 | * | |
93 * |------+------+------+------+------+------+------+------+------+------+------+------|
94 * | | | | | | | | 3 | 2 | 1 | - | |
95 * |------+------+------+------+------+-------------+------+------+------+------+------|
96 * | | | | | | | | 0 | = | + | |
97 * `-----------------------------------------------------------------------------------'
98 */
99 [_NUMPAD] = {
100 {_______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______},
101 {_______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST, _______},
102 {_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______},
103 {_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS, _______}
104 },
105
106 /* Movement
107 * ,-----------------------------------------------------------------------------------.
108 * | |MsBut2|Ms Up |MsBut1|MsWhUp| | Home | PgDn | PgUp | End | | |
109 * |------+------+------+------+------+------+------+------+------+------+------+------|
110 * | |Ms Lft|Ms Dn |Ms Rgt|MsWhDn| | Left | Down | Up | Right| | |
111 * |------+------+------+------+------+------+------+------+------+------+------+------|
112 * | | | | | | | | | | | | |
113 * |------+------+------+------+------+-------------+------+------+------+------+------|
114 * | | | | | | | | | | | |
115 * `-----------------------------------------------------------------------------------'
116 */
117 [_MOVEMENT] = {
118 {_______, KC_MB2, KC_MUP, KC_MB1, KC_MWUP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______},
119 {_______, KC_MLFT, KC_MDN, KC_MRGT, KC_MWDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______},
120 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
121 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
122 },
123
124 /* Lower
125 * ,-----------------------------------------------------------------------------------.
126 * | ` | 1 | 2 | 3 | 4 | 5 | - | = | Del | End | PgDn | |
127 * |------+------+------+------+------+-------------+------+------+------+------+------|
128 * | Caps | 6 | 7 | 8 | 9 | 0 | [ | ] | \ | ' | | |
129 * |------+------+------+------+------+------|------+------+------+------+------+------|
130 * | | F1 | F2 | F3 | F4 | | | F5 | F6 | F7 | F8 | |
131 * |------+------+------+------+------+------+------+------+------+------+------+------|
132 * | | | | | | | | | | | |
133 * `-----------------------------------------------------------------------------------'
134 */
135 [_LOWER] = {
136 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, _______},
137 {KC_CAPS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, XXXXXXX, _______},
138 {_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______},
139 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
140 },
141
142 /* Raise
143 * ,-----------------------------------------------------------------------------------.
144 * | ~ | ! | @ | # | $ | % | _ | + | Ins | Home | PgUp | |
145 * |------+------+------+------+------+-------------+------+------+------+------+------|
146 * | Caps | ^ | & | * | ( | ) | { | } | | | " | | |
147 * |------+------+------+------+------+------|------+------+------+------+------+------|
148 * | | F9 | F10 | F11 | F12 | | | | | | | |
149 * |------+------+------+------+------+------+------+------+------+------+------+------|
150 * | | | | | | | | | | | |
151 * `-----------------------------------------------------------------------------------'
152 */
153 [_RAISE] = {
154 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_INS, KC_HOME, KC_PGUP, _______},
155 {KC_CAPS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, XXXXXXX, _______},
156 {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
157 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
158 },
159
160 /* Adjust (Lower + Raise)
161 * ,-----------------------------------------------------------------------------------.
162 * |Reset | | | | | | | | | | | |
163 * |------+------+------+------+------+------+------+------+------+------+------+------|
164 * | |Bcklgt| Mute |Vol Dn|Vol Up| | |Qwerty|Arrow |Numpad| | |
165 * |------+------+------+------+------+------+------+------+------+------+------+------|
166 * | | | | | | | | | | | | |
167 * |------+------+------+------+------+-------------+------+------+------+------+------|
168 * | | | | | | | | | | | |
169 * `-----------------------------------------------------------------------------------'
170 */
171 [_ADJUST] = {
172 {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
173 {_______, BL_STEP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QWERTY, ARROW, NUMPAD, _______, _______},
174 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
175 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
176 }
177
178};
179
180#ifdef AUDIO_ENABLE
181
182float tone_startup[][2] = SONG(STARTUP_SOUND);
183float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
184
185float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
186
187#endif
188
189bool process_record_user(uint16_t keycode, keyrecord_t *record)
190{
191 switch (keycode) {
192 case LOWER:
193 if (record->event.pressed) {
194 layer_on(_LOWER);
195 } else {
196 layer_off(_LOWER);
197 }
198 update_tri_layer(_LOWER, _RAISE, _ADJUST);
199 return false;
200 case RAISE:
201 if (record->event.pressed) {
202 layer_on(_RAISE);
203 } else {
204 layer_off(_RAISE);
205 }
206 update_tri_layer(_LOWER, _RAISE, _ADJUST);
207 return false;
208 case QWERTY:
209 if (record->event.pressed) {
210 layer_off(_ARROW);
211 layer_off(_NUMPAD);
212 }
213 return false;
214 case ARROW:
215 if (record->event.pressed) {
216 layer_off(_NUMPAD);
217 layer_on(_ARROW);
218 }
219 return false;
220 case NUMPAD:
221 if (record->event.pressed) {
222 layer_off(_ARROW);
223 layer_on(_NUMPAD);
224 }
225 return false;
226 }
227 return true;
228}
229
230void matrix_init_user(void)
231{
232#ifdef AUDIO_ENABLE
233 startup_user();
234#endif
235}
236
237#ifdef AUDIO_ENABLE
238
239void startup_user()
240{
241 _delay_ms(100); // gets rid of tick
242 PLAY_NOTE_ARRAY(tone_startup, false, 0);
243}
244
245void shutdown_user()
246{
247 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
248 _delay_ms(150);
249 stop_all_notes();
250}
251
252void music_on_user(void)
253{
254 music_scale_user();
255}
256
257void music_scale_user(void)
258{
259 PLAY_NOTE_ARRAY(music_scale, false, 0);
260}
261
262#endif
diff --git a/keyboards/planck/keymaps/lae3/readme.md b/keyboards/planck/keymaps/lae3/readme.md
new file mode 100644
index 000000000..429b51456
--- /dev/null
+++ b/keyboards/planck/keymaps/lae3/readme.md
@@ -0,0 +1 @@
Keymap based around mode-switching for extended functionality
diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c
index 2208780b1..491cd1d07 100644
--- a/keyboards/planck/keymaps/lucas/keymap.c
+++ b/keyboards/planck/keymaps/lucas/keymap.c
@@ -153,12 +153,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
153 case 1: // M(1) 153 case 1: // M(1)
154 if (record->event.pressed) { 154 if (record->event.pressed) {
155 unregister_code(KC_LSFT); 155 unregister_code(KC_LSFT);
156 register_code(DE_MORE); 156 register_code(DE_LESS);
157 } else { 157 } else {
158 unregister_code(DE_MORE); 158 unregister_code(DE_LESS);
159 } 159 }
160 break; 160 break;
161 } 161 }
162 return MACRO_NONE; 162 return MACRO_NONE;
163 163
164}; \ No newline at end of file 164};
diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h
index 82e4a25c6..adc1c69aa 100644
--- a/keyboards/planck/keymaps/priyadi/config.h
+++ b/keyboards/planck/keymaps/priyadi/config.h
@@ -27,7 +27,8 @@
27 k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ 27 k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
28 k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ 28 k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
29 k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ 29 k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
30 k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ 30 k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \
31 tp1, tp2, tp3 \
31) \ 32) \
32{ \ 33{ \
33 {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c}, \ 34 {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c}, \
diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c
index 5d217e261..a500a3649 100644
--- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c
+++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c
@@ -212,10 +212,10 @@ const uint16_t PROGMEM fn_actions[] = {
212 212
213#ifdef AUDIO_ENABLE 213#ifdef AUDIO_ENABLE
214float start_up[][2] = { 214float start_up[][2] = {
215 {440.0*pow(2.0,(14)/12.0), 20}, 215 MUSICAL_NOTE(_B5, 20),
216 {440.0*pow(2.0,(26)/12.0), 8}, 216 MUSICAL_NOTE(_B6, 8),
217 {440.0*pow(2.0,(18)/12.0), 20}, 217 MUSICAL_NOTE(_DS6, 20),
218 {440.0*pow(2.0,(26)/12.0), 8} 218 MUSICAL_NOTE(_B6, 8),
219}; 219};
220 220
221float tone_qwerty[][2] = SONG(QWERTY_SOUND); 221float tone_qwerty[][2] = SONG(QWERTY_SOUND);
@@ -323,7 +323,7 @@ void matrix_init_user(void) {
323 323
324#ifdef AUDIO_ENABLE 324#ifdef AUDIO_ENABLE
325 325
326void play_goodbye_tone() 326void play_goodbye_tone(void)
327{ 327{
328 PLAY_NOTE_ARRAY(goodbye, false, 0); 328 PLAY_NOTE_ARRAY(goodbye, false, 0);
329 _delay_ms(150); 329 _delay_ms(150);
diff --git a/keyboards/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c
index 00347b019..3ff16de35 100644
--- a/keyboards/tv44/keymaps/xyverz/keymap.c
+++ b/keyboards/tv44/keymaps/xyverz/keymap.c
@@ -4,16 +4,23 @@
4 4
5extern keymap_config_t keymap_config; 5extern keymap_config_t keymap_config;
6 6
7#define _DV 0 7enum planck_layers {
8#define _QW 1 8 _QWERTY,
9#define _CM 2 9 _COLEMAK,
10#define _L1 3 10 _DVORAK,
11#define _L2 4 11 _LOWER,
12 _RAISE,
13 _ADJUST
14};
12 15
13// Macro name shortcuts 16enum planck_keycodes {
14#define DVORAK M(_DV) 17 DVORAK = SAFE_RANGE,
15#define QWERTY M(_QW) 18 QWERTY,
16#define COLEMAK M(_CM) 19 COLEMAK,
20 LOWER,
21 RAISE,
22 ADJUST
23};
17 24
18// Fillers to make layering more clear 25// Fillers to make layering more clear
19#define _______ KC_TRNS 26#define _______ KC_TRNS
@@ -21,45 +28,47 @@ extern keymap_config_t keymap_config;
21 28
22 29
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24 [_DV] = { /* 0: Dvorak */ 31 [_DVORAK] = { /* 0: Dvorak */
25 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, 32 {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH},
26 {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, LT(_L2, KC_MINS)}, 33 {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
27 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, 34 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
28 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_BSLS, KC_EQL, XXXXXXX, KC_ENT } 35 {KC_LCTL, KC_LALT, LOWER, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, RAISE, KC_LGUI, XXXXXXX, KC_ENT }
29 }, 36 },
30 37
31 [_QW] = { /* 1: Qwerty */ 38 [_QWERTY] = { /* 1: Qwerty */
32 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, 39 {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
33 {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_L2, KC_QUOT)}, 40 {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
34 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, 41 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
35 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, KC_ENT } 42 {KC_LCTL, KC_LALT, LOWER, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, RAISE, KC_LGUI, XXXXXXX, KC_ENT }
36 }, 43 },
37 44
38 [_CM] = { /* 2: Colemak */ 45 [_COLEMAK] = { /* 2: Colemak */
39 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, 46 {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
40 {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, LT(_L2, KC_QUOT)}, 47 {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
41 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, 48 {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
42 {KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SLSH, KC_MINS, XXXXXXX, KC_ENT } 49 {KC_LCTL, KC_LALT, LOWER, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, RAISE, KC_LGUI, XXXXXXX, KC_ENT }
43 }, 50 },
44 51
45 [_L1] = {/* 1: FN 1 */ 52 [_LOWER] = {/* 1: FN 1 */
46 {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, 53 {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE},
47 {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, 54 {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
48 {_______, _______, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, 55 {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______},
49 {KC_ESC, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_EQL, _______, _______ } 56 {KC_LEFT, KC_RGHT, _______, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, _______, KC_UP, XXXXXXX, KC_DOWN}
50 }, 57 },
51 58
52 [_L2] = { /* 2: FN 2 */ 59 [_RAISE] = { /* 2: FN 2 */
53 {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC }, 60 {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS},
54 {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, KC_VOLU, _______ }, 61 {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
55 {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, KC_VOLD, _______ }, 62 {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______},
56 {QWERTY, DVORAK, COLEMAK, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PLUS, _______, _______ } 63 {KC_LEFT, KC_RGHT, _______, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, _______, KC_UP, XXXXXXX, KC_DOWN}
57 } 64 },
58
59};
60
61const uint16_t PROGMEM fn_actions[] = {
62 65
66 [_ADJUST] = {
67 {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
68 {_______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______},
69 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
70 {KC_HOME, KC_END, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PGUP, XXXXXXX, KC_PGDN}
71 }
63}; 72};
64 73
65void persistant_default_layer_set(uint16_t default_layer) { 74void persistant_default_layer_set(uint16_t default_layer) {
@@ -67,26 +76,46 @@ void persistant_default_layer_set(uint16_t default_layer) {
67 default_layer_set(default_layer); 76 default_layer_set(default_layer);
68} 77}
69 78
70const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 79bool process_record_user(uint16_t keycode, keyrecord_t *record) {
71{ 80 switch (keycode) {
72 switch(id) { 81 case QWERTY:
73 case _DV: 82 if (record->event.pressed) {
74 if (record->event.pressed) { 83 persistant_default_layer_set(1UL<<_QWERTY);
75 persistant_default_layer_set(1UL<<_DV);
76 }
77 break;
78 case _QW:
79 if (record->event.pressed) {
80 persistant_default_layer_set(1UL<<_QW);
81 }
82 break;
83 case _CM:
84 if (record->event.pressed) {
85 persistant_default_layer_set(1UL<<_CM);
86 }
87 break;
88 } 84 }
89 return MACRO_NONE; 85 return false;
90}; 86 break;
91 87 case COLEMAK:
92 88 if (record->event.pressed) {
89 persistant_default_layer_set(1UL<<_COLEMAK);
90 }
91 return false;
92 break;
93 case DVORAK:
94 if (record->event.pressed) {
95 persistant_default_layer_set(1UL<<_DVORAK);
96 }
97 return false;
98 break;
99 case LOWER:
100 if (record->event.pressed) {
101 layer_on(_LOWER);
102 update_tri_layer(_LOWER, _RAISE, _ADJUST);
103 } else {
104 layer_off(_LOWER);
105 update_tri_layer(_LOWER, _RAISE, _ADJUST);
106 }
107 return false;
108 break;
109 case RAISE:
110 if (record->event.pressed) {
111 layer_on(_RAISE);
112 update_tri_layer(_LOWER, _RAISE, _ADJUST);
113 } else {
114 layer_off(_RAISE);
115 update_tri_layer(_LOWER, _RAISE, _ADJUST);
116 }
117 return false;
118 break;
119 }
120 return true;
121}
diff --git a/quantum/fauxclicky.c b/quantum/fauxclicky.c
index 13273e705..c3341ca33 100644
--- a/quantum/fauxclicky.c
+++ b/quantum/fauxclicky.c
@@ -20,13 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include <stdbool.h> 20#include <stdbool.h>
21#include <musical_notes.h> 21#include <musical_notes.h>
22 22
23__attribute__ ((weak))
24float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, 2);
25__attribute__ ((weak))
26float fauxclicky_released_note[2] = MUSICAL_NOTE(_A3, 2);
27__attribute__ ((weak))
28float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, 2);
29
30bool fauxclicky_enabled = true; 23bool fauxclicky_enabled = true;
31uint16_t note_start = 0; 24uint16_t note_start = 0;
32bool note_playing = false; 25bool note_playing = false;
@@ -48,13 +41,13 @@ void fauxclicky_stop()
48 note_playing = false; 41 note_playing = false;
49} 42}
50 43
51void fauxclicky_play(float note[2]) { 44void fauxclicky_play(float note[]) {
52 if (!fauxclicky_enabled) return; 45 if (!fauxclicky_enabled) return;
53 if (note_playing) fauxclicky_stop(); 46 if (note_playing) fauxclicky_stop();
54 FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)); 47 FAUXCLICKY_TIMER_PERIOD = (uint16_t)(((float)F_CPU) / (note[0] * (float)FAUXCLICKY_CPU_PRESCALER));
55 FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * FAUXCLICKY_CPU_PRESCALER)) / 2); 48 FAUXCLICKY_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (note[0] * (float)FAUXCLICKY_CPU_PRESCALER)) / (float)2);
56 note_playing = true; 49 note_playing = true;
57 note_period = (note[1] / 16) * (60 / (float)FAUXCLICKY_TEMPO) * 100; // check this 50 note_period = (note[1] / (float)16) * ((float)60 / (float)FAUXCLICKY_TEMPO) * 1000;
58 note_start = timer_read(); 51 note_start = timer_read();
59 FAUXCLICKY_ENABLE_OUTPUT; 52 FAUXCLICKY_ENABLE_OUTPUT;
60} 53}
diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h
index 109bd0d83..1a8e188dd 100644
--- a/quantum/fauxclicky.h
+++ b/quantum/fauxclicky.h
@@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21#include "stdbool.h" 21#include "stdbool.h"
22 22
23__attribute__ ((weak)) 23__attribute__ ((weak))
24float fauxclicky_pressed_note[2]; 24float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_D4, 0.25);
25__attribute__ ((weak)) 25__attribute__ ((weak))
26float fauxclicky_released_note[2]; 26float fauxclicky_released_note[2] = MUSICAL_NOTE(_C4, 0.125);
27__attribute__ ((weak)) 27__attribute__ ((weak))
28float fauxclicky_beep_note[2]; 28float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C4, 0.25);
29 29
30bool fauxclicky_enabled; 30bool fauxclicky_enabled;
31 31
@@ -73,11 +73,11 @@ bool fauxclicky_enabled;
73#endif 73#endif
74 74
75#ifndef FAUXCLICKY_ENABLE_OUTPUT 75#ifndef FAUXCLICKY_ENABLE_OUTPUT
76#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1); 76#define FAUXCLICKY_ENABLE_OUTPUT TCCR3A |= _BV(COM3A1)
77#endif 77#endif
78 78
79#ifndef FAUXCLICKY_DISABLE_OUTPUT 79#ifndef FAUXCLICKY_DISABLE_OUTPUT
80#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0)); 80#define FAUXCLICKY_DISABLE_OUTPUT TCCR3A &= ~(_BV(COM3A1) | _BV(COM3A0))
81#endif 81#endif
82 82
83#ifndef FAUXCLICKY_TIMER_PERIOD 83#ifndef FAUXCLICKY_TIMER_PERIOD
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 6cf4f031f..9dafc8b51 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -179,5 +179,12 @@ uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
179__attribute__ ((weak)) 179__attribute__ ((weak))
180uint16_t keymap_function_id_to_action( uint16_t function_id ) 180uint16_t keymap_function_id_to_action( uint16_t function_id )
181{ 181{
182 // The compiler sees the empty (weak) fn_actions and generates a warning
183 // This function should not be called in that case, so the warning is too strict
184 // If this function is called however, the keymap should have overridden fn_actions, and then the compile
185 // is comparing against the wrong array
186 #pragma GCC diagnostic push
187 #pragma GCC diagnostic ignored "-Warray-bounds"
182 return pgm_read_word(&fn_actions[function_id]); 188 return pgm_read_word(&fn_actions[function_id]);
189 #pragma GCC diagnostic pop
183} 190}
diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h
index 8332e00af..67350d660 100644
--- a/quantum/keymap_extras/keymap_german_ch.h
+++ b/quantum/keymap_extras/keymap_german_ch.h
@@ -33,6 +33,10 @@
33#define CH_E KC_E 33#define CH_E KC_E
34#define CH_F KC_F 34#define CH_F KC_F
35#define CH_G KC_G 35#define CH_G KC_G
36#ifdef CH_H
37// The ChibiOS ch.h file defines this...
38#undef CH_H
39#endif
36#define CH_H KC_H 40#define CH_H KC_H
37#define CH_I KC_I 41#define CH_I KC_I
38#define CH_J KC_J 42#define CH_J KC_J
diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c
index 807f7a0b9..613af7018 100644
--- a/quantum/process_keycode/process_printer.c
+++ b/quantum/process_keycode/process_printer.c
@@ -20,12 +20,12 @@
20bool printing_enabled = false; 20bool printing_enabled = false;
21uint8_t character_shift = 0; 21uint8_t character_shift = 0;
22 22
23void enabled_printing() { 23void enable_printing(void) {
24 printing_enabled = true; 24 printing_enabled = true;
25 serial_init(); 25 serial_init();
26} 26}
27 27
28void disable_printing() { 28void disable_printing(void) {
29 printing_enabled = false; 29 printing_enabled = false;
30} 30}
31 31
@@ -41,9 +41,14 @@ void print_char(char c) {
41 USB_Init(); 41 USB_Init();
42} 42}
43 43
44void print_box_string(uint8_t text[]) { 44void print_string(char c[]) {
45 uint8_t len = strlen(text); 45 for(uint8_t i = 0; i < strlen(c); i++)
46 uint8_t out[len * 3 + 8]; 46 print_char(c[i]);
47}
48
49void print_box_string(const char text[]) {
50 size_t len = strlen(text);
51 char out[len * 3 + 8];
47 out[0] = 0xDA; 52 out[0] = 0xDA;
48 for (uint8_t i = 0; i < len; i++) { 53 for (uint8_t i = 0; i < len; i++) {
49 out[i+1] = 0xC4; 54 out[i+1] = 0xC4;
@@ -69,14 +74,9 @@ void print_box_string(uint8_t text[]) {
69 print_string(out); 74 print_string(out);
70} 75}
71 76
72void print_string(char c[]) {
73 for(uint8_t i = 0; i < strlen(c); i++)
74 print_char(c[i]);
75}
76
77bool process_printer(uint16_t keycode, keyrecord_t *record) { 77bool process_printer(uint16_t keycode, keyrecord_t *record) {
78 if (keycode == PRINT_ON) { 78 if (keycode == PRINT_ON) {
79 enabled_printing(); 79 enable_printing();
80 return false; 80 return false;
81 } 81 }
82 if (keycode == PRINT_OFF) { 82 if (keycode == PRINT_OFF) {
diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h
index aa494ac8a..71d3a4b56 100644
--- a/quantum/process_keycode/process_printer.h
+++ b/quantum/process_keycode/process_printer.h
@@ -21,4 +21,6 @@
21 21
22#include "protocol/serial.h" 22#include "protocol/serial.h"
23 23
24bool process_printer(uint16_t keycode, keyrecord_t *record);
25
24#endif 26#endif
diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c
index 55d3b552b..3a00f169d 100644
--- a/quantum/process_keycode/process_printer_bb.c
+++ b/quantum/process_keycode/process_printer_bb.c
@@ -46,7 +46,7 @@ void serial_output(void) {
46} 46}
47 47
48 48
49void enabled_printing() { 49void enable_printing() {
50 printing_enabled = true; 50 printing_enabled = true;
51 serial_output(); 51 serial_output();
52 serial_high(); 52 serial_high();
@@ -82,7 +82,7 @@ void print_string(char c[]) {
82 82
83bool process_printer(uint16_t keycode, keyrecord_t *record) { 83bool process_printer(uint16_t keycode, keyrecord_t *record) {
84 if (keycode == PRINT_ON) { 84 if (keycode == PRINT_ON) {
85 enabled_printing(); 85 enable_printing();
86 return false; 86 return false;
87 } 87 }
88 if (keycode == PRINT_OFF) { 88 if (keycode == PRINT_OFF) {
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index 678a15234..fd008eca1 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -15,6 +15,7 @@
15 */ 15 */
16#include "process_unicode.h" 16#include "process_unicode.h"
17#include "action_util.h" 17#include "action_util.h"
18#include "eeprom.h"
18 19
19static uint8_t first_flag = 0; 20static uint8_t first_flag = 0;
20 21
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c
index 1dbdec3e7..84b5d673d 100644
--- a/quantum/process_keycode/process_unicode_common.c
+++ b/quantum/process_keycode/process_unicode_common.c
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include "process_unicode_common.h" 17#include "process_unicode_common.h"
18#include "eeprom.h"
18 19
19static uint8_t input_mode; 20static uint8_t input_mode;
20uint8_t mods; 21uint8_t mods;
diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c
index df11861dd..82e4184d2 100644
--- a/quantum/visualizer/lcd_keyframes.c
+++ b/quantum/visualizer/lcd_keyframes.c
@@ -125,8 +125,8 @@ static void get_led_state_string(char* output, visualizer_state_t* state) {
125 pos += 5; 125 pos += 5;
126 } 126 }
127 if (state->status.leds & (1u << USB_LED_KANA)) { 127 if (state->status.leds & (1u << USB_LED_KANA)) {
128 memcpy(output + pos, "KANA ", 5); 128 memcpy(output + pos, "KANA", 4);
129 pos += 5; 129 pos += 4;
130 } 130 }
131 output[pos] = 0; 131 output[pos] = 0;
132} 132}
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 94de36918..4ba1cc251 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -140,7 +140,6 @@ void process_record(keyrecord_t *record)
140 140
141void process_action(keyrecord_t *record, action_t action) 141void process_action(keyrecord_t *record, action_t action)
142{ 142{
143 bool do_release_oneshot = false;
144 keyevent_t event = record->event; 143 keyevent_t event = record->event;
145#ifndef NO_ACTION_TAPPING 144#ifndef NO_ACTION_TAPPING
146 uint8_t tap_count = record->tap.count; 145 uint8_t tap_count = record->tap.count;
@@ -152,6 +151,7 @@ void process_action(keyrecord_t *record, action_t action)
152 } 151 }
153 152
154#ifndef NO_ACTION_ONESHOT 153#ifndef NO_ACTION_ONESHOT
154 bool do_release_oneshot = false;
155 // notice we only clear the one shot layer if the pressed key is not a modifier. 155 // notice we only clear the one shot layer if the pressed key is not a modifier.
156 if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) { 156 if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) {
157 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); 157 clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 0c81e8361..1c7618ff5 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -9,6 +9,7 @@
9#include "suspend.h" 9#include "suspend.h"
10#include "timer.h" 10#include "timer.h"
11#include "led.h" 11#include "led.h"
12#include "host.h"
12 13
13#ifdef PROTOCOL_LUFA 14#ifdef PROTOCOL_LUFA
14 #include "lufa.h" 15 #include "lufa.h"
diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h
index 6eede06b4..9338d0af7 100644
--- a/tmk_core/common/mousekey.h
+++ b/tmk_core/common/mousekey.h
@@ -23,8 +23,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
23 23
24 24
25/* max value on report descriptor */ 25/* max value on report descriptor */
26#define MOUSEKEY_MOVE_MAX 127 26#ifndef MOUSEKEY_MOVE_MAX
27#define MOUSEKEY_WHEEL_MAX 127 27 #define MOUSEKEY_MOVE_MAX 127
28#elif MOUSEKEY_MOVE_MAX > 127
29 #error MOUSEKEY_MOVE_MAX needs to be smaller than 127
30#endif
31
32#ifndef MOUSEKEY_WHEEL_MAX
33 #define MOUSEKEY_WHEEL_MAX 127
34#elif MOUSEKEY_WHEEL_MAX > 127
35 #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127
36#endif
28 37
29#ifndef MOUSEKEY_MOVE_DELTA 38#ifndef MOUSEKEY_MOVE_DELTA
30#define MOUSEKEY_MOVE_DELTA 5 39#define MOUSEKEY_MOVE_DELTA 5
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index e4c8aecb2..b7cb0a559 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -92,6 +92,9 @@ endif
92endif 92endif
93CFLAGS += -Wall 93CFLAGS += -Wall
94CFLAGS += -Wstrict-prototypes 94CFLAGS += -Wstrict-prototypes
95ifneq ($(strip $(ALLOW_WARNINGS)), yes)
96 CFLAGS += -Werror
97endif
95#CFLAGS += -mshort-calls 98#CFLAGS += -mshort-calls
96#CFLAGS += -fno-unit-at-a-time 99#CFLAGS += -fno-unit-at-a-time
97#CFLAGS += -Wundef 100#CFLAGS += -Wundef
@@ -115,6 +118,9 @@ CPPFLAGS += -O$(OPT)
115CPPFLAGS += -w 118CPPFLAGS += -w
116CPPFLAGS += -Wall 119CPPFLAGS += -Wall
117CPPFLAGS += -Wundef 120CPPFLAGS += -Wundef
121ifneq ($(strip $(ALLOW_WARNINGS)), yes)
122 CPPFLAGS += -Werror
123endif
118#CPPFLAGS += -mshort-calls 124#CPPFLAGS += -mshort-calls
119#CPPFLAGS += -fno-unit-at-a-time 125#CPPFLAGS += -fno-unit-at-a-time
120#CPPFLAGS += -Wstrict-prototypes 126#CPPFLAGS += -Wstrict-prototypes