summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorErez Zukerman <ezuk@madmimi.com>2015-10-28 04:07:15 +0200
committerErez Zukerman <ezuk@madmimi.com>2015-10-28 04:07:15 +0200
commitd3db8d62f6fc6a7dee43978ddc8356579b502b37 (patch)
tree6d9445482ff1fd7d564fbc8494344056a120461e /quantum
parent2739aa8d780a8210eac30a284786d60dedc671bc (diff)
More work on ErgoDox EZ default keymap
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap_common.c7
-rw-r--r--quantum/keymap_common.h7
2 files changed, 6 insertions, 8 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index fc889a3082..6cc7adf51f 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "report.h"
#include "keycode.h"
#include "action_layer.h"
+#include <util/delay.h>
#include "action.h"
#include "action_macro.h"
#include "debug.h"
@@ -71,6 +72,8 @@ action_t action_for_key(uint8_t layer, keypos_t key)
return action;
#endif
} else if (keycode == RESET) { // RESET is 0x5000, which is why this is here
+ clear_keyboard();
+ _delay_ms(250);
bootloader_jump();
return;
} else if (keycode == DEBUG) { // DEBUG is 0x5001
@@ -78,7 +81,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
print("\nDEBUG: enabled.\n");
debug_enable = true;
return;
- } else if (keycode >= 0x5000 && keycode < 0x6000) {
+ } else if (keycode >= 0x5000 && keycode < 0x6000) {
// Layer movement shortcuts
// See .h to see constraints/usage
int type = (keycode >> 0x8) & 0xF;
@@ -107,7 +110,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
action_t action;
action.code = ACTION_LAYER_TOGGLE(layer);
return action;
- }
+ }
#ifdef MIDI_ENABLE
} else if (keycode >= 0x6000 && keycode < 0x7000) {
action_t action;
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index 5735631d95..2da01251d6 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -190,12 +190,7 @@ extern const uint16_t fn_actions[];
#define GUI_T(kc) MT(0x8, kc)
// L-ayer, T-ap - 256 keycode max, 16 layer max
-#define LT(layer, kc) (kc | 0x7000 | ((layer & 0xF) << 8))
-
-// For sending unicode codes.
-// You may not send codes over 1FFF -- this supports most of UTF8.
-// To have a key that sends out Œ, go UC(0x0152)
-#define UNICODE(n) (n | 0x8000)
+#define LT(layer, kc) (kc | 0x8000 | ((layer & 0xF) << 8))
#define UC(n) UNICODE(n)