You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
614 B

  1. #pragma once
  2. #include QMK_KEYBOARD_H
  3. // Implements cmd-tab like behaviour on a single key. On first tap of trigger
  4. // cmdish is held and tabish is tapped -- cmdish then remains held until some
  5. // other key is hit or released. For example:
  6. //
  7. // trigger, trigger, a -> cmd down, tab, tab, cmd up, a
  8. // nav down, trigger, nav up -> nav down, cmd down, tab, cmd up, nav up
  9. //
  10. // This behaviour is useful for more than just cmd-tab, hence: cmdish, tabish.
  11. void update_swapper(
  12. bool *active,
  13. uint16_t cmdish,
  14. uint16_t tabish,
  15. uint16_t trigger,
  16. uint16_t keycode,
  17. keyrecord_t *record
  18. );