aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap_common.h10
-rw-r--r--quantum/matrix.c6
-rw-r--r--quantum/quantum.c13
-rw-r--r--quantum/quantum.h4
-rw-r--r--quantum/quantum.mk4
-rw-r--r--quantum/template/Makefile2
6 files changed, 27 insertions, 12 deletions
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index db14e7d8a..c72c0bc29 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -88,10 +88,8 @@ extern const uint16_t fn_actions[];
88 88
89#define KC_AT LSFT(KC_2) // @ 89#define KC_AT LSFT(KC_2) // @
90 90
91
92#define KC_HASH LSFT(KC_3) // # 91#define KC_HASH LSFT(KC_3) // #
93 92
94
95#define KC_DLR LSFT(KC_4) // $ 93#define KC_DLR LSFT(KC_4) // $
96#define KC_DOLLAR KC_DLR 94#define KC_DOLLAR KC_DLR
97 95
@@ -113,15 +111,11 @@ extern const uint16_t fn_actions[];
113#define KC_RPRN LSFT(KC_0) // ) 111#define KC_RPRN LSFT(KC_0) // )
114#define KC_RIGHT_PAREN KC_RPRN 112#define KC_RIGHT_PAREN KC_RPRN
115 113
116
117#define KC_UNDS LSFT(KC_MINS) // _ 114#define KC_UNDS LSFT(KC_MINS) // _
118#define KC_UNDERSCORE KC_UNDS 115#define KC_UNDERSCORE KC_UNDS
119 116
120#define KC_PLUS LSFT(KC_EQL) // + 117#define KC_PLUS LSFT(KC_EQL) // +
121 118
122#define KC_DQUO LSFT(KC_QUOT) // "
123#define KC_DOUBLE_QUOTE KC_DQUO
124
125#define KC_LCBR LSFT(KC_LBRC) // { 119#define KC_LCBR LSFT(KC_LBRC) // {
126#define KC_LEFT_CURLY_BRACE KC_LCBR 120#define KC_LEFT_CURLY_BRACE KC_LCBR
127 121
@@ -141,16 +135,14 @@ extern const uint16_t fn_actions[];
141 135
142#define KC_LT LSFT(KC_COMM) // < 136#define KC_LT LSFT(KC_COMM) // <
143 137
144
145#define KC_GT LSFT(KC_DOT) // > 138#define KC_GT LSFT(KC_DOT) // >
146 139
147
148#define KC_QUES LSFT(KC_SLSH) // ? 140#define KC_QUES LSFT(KC_SLSH) // ?
149#define KC_QUESTION KC_QUES 141#define KC_QUESTION KC_QUES
150 142
151
152#define KC_DQT LSFT(KC_QUOT) // " 143#define KC_DQT LSFT(KC_QUOT) // "
153#define KC_DOUBLE_QUOTE KC_DQT 144#define KC_DOUBLE_QUOTE KC_DQT
145#define KC_DQUO KC_DQT
154 146
155#define KC_DELT KC_DELETE // Del key (four letter code) 147#define KC_DELT KC_DELETE // Del key (four letter code)
156 148
diff --git a/quantum/matrix.c b/quantum/matrix.c
index d5fd7def8..412662a79 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -68,8 +68,10 @@ uint8_t matrix_cols(void) {
68 68
69void matrix_init(void) { 69void matrix_init(void) {
70 /* frees PORTF by setting the JTD bit twice within four cycles */ 70 /* frees PORTF by setting the JTD bit twice within four cycles */
71 MCUCR |= _BV(JTD); 71 #ifdef __AVR_ATmega32U4__
72 MCUCR |= _BV(JTD); 72 MCUCR |= _BV(JTD);
73 MCUCR |= _BV(JTD);
74 #endif
73 /* initializes the I/O pins */ 75 /* initializes the I/O pins */
74#if DIODE_DIRECTION == COL2ROW 76#if DIODE_DIRECTION == COL2ROW
75 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { 77 for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
diff --git a/quantum/quantum.c b/quantum/quantum.c
index c53fb19b4..d9aaafd61 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -13,6 +13,16 @@ bool process_action_kb(keyrecord_t *record) {
13} 13}
14 14
15__attribute__ ((weak)) 15__attribute__ ((weak))
16bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
17 return process_record_user(keycode, record);
18}
19
20__attribute__ ((weak))
21bool process_record_user(uint16_t keycode, keyrecord_t *record) {
22 return true;
23}
24
25__attribute__ ((weak))
16void leader_start(void) {} 26void leader_start(void) {}
17 27
18__attribute__ ((weak)) 28__attribute__ ((weak))
@@ -124,6 +134,9 @@ bool process_record_quantum(keyrecord_t *record) {
124 keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key); 134 keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
125 #endif 135 #endif
126 136
137 if (!process_record_kb(keycode, record))
138 return false;
139
127 // This is how you use actions here 140 // This is how you use actions here
128 // if (keycode == KC_LEAD) { 141 // if (keycode == KC_LEAD) {
129 // action_t action; 142 // action_t action;
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 69a0d8126..3ce940895 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -23,6 +23,7 @@
23#include "eeconfig.h" 23#include "eeconfig.h"
24#include <stddef.h> 24#include <stddef.h>
25#include <avr/io.h> 25#include <avr/io.h>
26#include <util/delay.h>
26 27
27extern uint32_t default_layer_state; 28extern uint32_t default_layer_state;
28 29
@@ -61,6 +62,9 @@ extern uint32_t default_layer_state;
61void matrix_init_kb(void); 62void matrix_init_kb(void);
62void matrix_scan_kb(void); 63void matrix_scan_kb(void);
63bool process_action_kb(keyrecord_t *record); 64bool process_action_kb(keyrecord_t *record);
65bool process_record_kb(uint16_t keycode, keyrecord_t *record);
66bool process_record_user(uint16_t keycode, keyrecord_t *record);
67
64 68
65bool is_music_on(void); 69bool is_music_on(void);
66void music_toggle(void); 70void music_toggle(void);
diff --git a/quantum/quantum.mk b/quantum/quantum.mk
index c099d6793..00d3e8114 100644
--- a/quantum/quantum.mk
+++ b/quantum/quantum.mk
@@ -1,5 +1,9 @@
1QUANTUM_DIR = quantum 1QUANTUM_DIR = quantum
2 2
3ifndef VERBOSE
4.SILENT:
5endif
6
3# # project specific files 7# # project specific files
4SRC += $(QUANTUM_DIR)/quantum.c \ 8SRC += $(QUANTUM_DIR)/quantum.c \
5 $(QUANTUM_DIR)/keymap_common.c \ 9 $(QUANTUM_DIR)/keymap_common.c \
diff --git a/quantum/template/Makefile b/quantum/template/Makefile
index 1a535ef2c..f101eb7a6 100644
--- a/quantum/template/Makefile
+++ b/quantum/template/Makefile
@@ -123,7 +123,7 @@ KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
123SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 123SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
124# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 124# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
125NKRO_ENABLE = no # USB Nkey Rollover 125NKRO_ENABLE = no # USB Nkey Rollover
126BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 126BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
127MIDI_ENABLE = no # MIDI controls 127MIDI_ENABLE = no # MIDI controls
128UNICODE_ENABLE = no # Unicode 128UNICODE_ENABLE = no # Unicode
129BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 129BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID