summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorMislav Čakarić <chax@users.noreply.github.com>2019-01-18 02:51:04 +0100
committerDrashna Jaelre <drashna@live.com>2019-01-18 02:51:04 +0100
commitcd819a7f7eb74e81780c19a656d0c3a6dc0f3b73 (patch)
tree85e5e43ca1f87f3a8c9bf4286492d2b518b7fe38 /quantum/process_keycode
parent94ba2e5a9f9c01b015b447554bfee99f5bcee032 (diff)
downloadqmk_firmware-cd819a7f7eb74e81780c19a656d0c3a6dc0f3b73.tar.gz
qmk_firmware-cd819a7f7eb74e81780c19a656d0c3a6dc0f3b73.tar.xz
Allows Terminal to use ModTap/LayerTap keys (#4586)
* fixes #4583 * #4583 - terminal also handles layer tap now
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_terminal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c
index 6998639f2..e791deffc 100644
--- a/quantum/process_keycode/process_terminal.c
+++ b/quantum/process_keycode/process_terminal.c
@@ -273,11 +273,17 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) {
disable_terminal();
return false;
}
+
+ if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
+ keycode = keycode & 0xFF;
+ }
+
if (keycode < 256) {
uint8_t str_len;
char char_to_add;
switch (keycode) {
case KC_ENTER:
+ case KC_KP_ENTER:
push_to_cmd_buffer();
current_cmd_buffer_pos = 0;
process_terminal_command();