Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
  2. index 3a3c401..35ffc7d 100644
  3. --- a/tmk_core/common/action.c
  4. +++ b/tmk_core/common/action.c
  5. @@ -66,6 +66,12 @@ void process_action(keyrecord_t *record)
  6. if (IS_NOEVENT(event)) { return; }
  7.  
  8. action_t action = layer_switch_get_action(event.key);
  9. + static action_t action_on_press[MATRIX_ROWS][MATRIX_COLS];
  10. + if (event.pressed) {
  11. + action_on_press[event.key.row][event.key.col] = action;
  12. + } else {
  13. + action = action_on_press[event.key.row][event.key.col];
  14. + }
  15. dprint("ACTION: "); debug_action(action);
  16. #ifndef NO_ACTION_LAYER
  17. dprint(" layer_state: "); layer_debug();
  18. diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
  19. index 6b5a7fd..963703c 100644
  20. --- a/tmk_core/common/action_layer.c
  21. +++ b/tmk_core/common/action_layer.c
  22. @@ -24,7 +24,6 @@ static void default_layer_state_set(uint32_t state)
  23. default_layer_state = state;
  24. hook_default_layer_change(default_layer_state);
  25. default_layer_debug(); debug("\n");
  26. - clear_keyboard_but_mods(); // To avoid stuck keys
  27. }
  28.  
  29. void default_layer_debug(void)
  30. @@ -66,7 +65,6 @@ static void layer_state_set(uint32_t state)
  31. layer_state = state;
  32. hook_layer_change(layer_state);
  33. layer_debug(); dprintln();
  34. - clear_keyboard_but_mods(); // To avoid stuck keys
  35. }
  36.  
  37. void layer_clear(void)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement