Skip to content

Commit

Permalink
Allows Terminal to use ModTap/LayerTap keys (#4586)
Browse files Browse the repository at this point in the history
* fixes #4583

* #4583 - terminal also handles layer tap now
  • Loading branch information
chax authored and drashna committed Jan 18, 2019
1 parent 94ba2e5 commit cd819a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quantum/process_keycode/process_terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cd819a7

Please sign in to comment.