Skip to content

Commit

Permalink
rotary_pad: remove encoder callback and tidy readme
Browse files Browse the repository at this point in the history
Co-authored-by: Duncan Sutherland <[email protected]>
  • Loading branch information
RABijl and dunk2k committed Aug 14, 2023
1 parent 9030281 commit d49b579
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 40 deletions.
27 changes: 0 additions & 27 deletions keyboards/rotary_numpad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,4 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_DOWN, KC_UP), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT) },
[1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(KC_LEFT, KC_RIGHT), ENCODER_CCW_CW(_______, _______) },
};
#else

bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false; /* Don't process further events if user function exists and returns false */
}
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
} else if (index == 2) { /* Third encoder */
if (clockwise) {
tap_code(KC_RIGHT);
} else {
tap_code(KC_LEFT);
}
}
return true;
}
#endif
18 changes: 5 additions & 13 deletions keyboards/rotary_numpad/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@

![rotary_numpad](https://i.imgur.com/GwEH4WOh.jpeg)

*A short description of the keyboard/project*
This is a personal project of mine where I wanted a number pad that I can put on the left side of keyboard that doesn't have a numberpad. I fell in love with the feel of rotary encoders on my 3d printer, so added three to be able to play around with.

* Keyboard Maintainer: [rabijl](https://github.com/rabijl)
* Hardware Supported: Sparkfun Pro Micro 5V (atmega32u4)
* Hardware Availability: https://www.sparkfun.com/products/12640

This is a personal project of mine where I wanted a number pad that I can put on the left \
side of keyboard that doesn't have a numberpad. I fell in love with the feel of rotary encoders \
on my 3d printer, so added three to be able to play around with.

## How to build from scratch

I handsoldered gateron blue switches to a 3D printed case. The design is modified from the [Ultipad](https://www.thingiverse.com/thing:4248565). \
Expand Down Expand Up @@ -41,18 +37,14 @@ Due to the three rotary encoders, I had to use most of the available pins. Fortu

## Flashing

Make example for this keyboard (after setting up your build environment): \
**note:** you may need to run this in the root of the repository for this to work
Make example for this keyboard (after setting up your build environment):

```
qmk compile -kb rotary_numpad -km default
```
qmk compile -kb rotary_numpad -km default

Flashing example for this keyboard:

```
qmk flash -kb rotary_numpad -km default
```
qmk flash -kb rotary_numpad -km default


See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

Expand Down

0 comments on commit d49b579

Please sign in to comment.