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.

53 lines
1.1 KiB

[Keymap] Adding my keymaps for ergodox_ez and kyria (#9365) * Trying to fix problems in my kyria steez * repeating last commit..... * repeating last commit on EDIT layer but swapping direction exit * moving the reversed desktop moves to the symbol layers on the same hand, for easier activation * adding mac desktop movement keys to Kyria layout * Adding readmes to my keymaps * Removing a png... * Update keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c removing EPRM case * Apply suggestions from code review Great updates to various old-school or outdated ways I was doing things, removing some commented out code, etc. * Apply suggestions from code review Additional improvements * Moving tapdances.cpp to userspace as tapdances.c * reindenting the Kyria keymap to follow four-spaces convention, turning off oled on my kyria, improving the led handling on the Ergodox. * updating led stuff on the other two versions of the keymap, removing EPRM key from main keymap * Apply suggestions from code review I'm adding these various removals to the config file because it seems that at this time those settings are in harmony with the ergodox_ez defaults. * Moving encoder functions into their own userspace file * Apply suggestions from code review Removing settings that are now defaults, clearing out placeholder custom keycodes (smh) * updating encoder functions. * Moving to LAYOUT_stack for all layers, adding end of file newlines, switching to some shorter keycode aliases * Okay, refactor is well underway. * refactored! Also improved led handling for ergodox and rgb handling for kyria * removing mac/windows swappable version because I don't feel like dealing with it when reflashing is so easy. * moving LAYOUT_stack into kyria.h * moving the alternate default layer down next to QWERTY
4 years ago
  1. // Encoder functions to mix and match!
  2. #include "encoder_functions.h"
  3. void enc_move_words(bool cw){ // Move whole words. Hold shift to select while moving.
  4. if (cw) {
  5. tap_code16(A(KC_RGHT));
  6. } else {
  7. tap_code16(A(KC_LEFT));
  8. }
  9. }
  10. void enc_history_scrubbing(bool cw){ // Undo/Redo.
  11. if (cw) {
  12. tap_code16(G(S(KC_Z)));
  13. } else {
  14. tap_code16(G(KC_Z));
  15. }
  16. }
  17. void enc_scrolling(bool cw){ // Scrolling.
  18. if (cw) {
  19. tap_code(KC_MS_WH_DOWN);
  20. } else {
  21. tap_code(KC_MS_WH_UP);
  22. }
  23. }
  24. void enc_scrolling_h(bool cw){ // Scrolling.
  25. if (cw) {
  26. tap_code(KC_MS_WH_RIGHT);
  27. } else {
  28. tap_code(KC_MS_WH_LEFT);
  29. }
  30. }
  31. void enc_volume_knob(bool cw){ // Volume control.
  32. if (cw) {
  33. tap_code(KC_VOLU);
  34. } else {
  35. tap_code(KC_VOLD);
  36. }
  37. }
  38. void enc_move_desktop(bool cw){ // Switch Desktops (Mac).
  39. if (cw) {
  40. tap_code16(C(KC_RIGHT));
  41. } else {
  42. tap_code16(C(KC_LEFT));
  43. }
  44. }
  45. void enc_zoom(bool cw){ // Zoom in/zoom out.
  46. if (cw) {
  47. tap_code16(G(KC_PLUS));
  48. } else {
  49. tap_code16(G(KC_MINUS));
  50. }
  51. }