[Keyboard] Palette1202 fix encoder rotate direction (#8489)
* revised hardware availability - URL * fixed encoder rotate direction (reversed)
This commit is contained in:
parent
d96380e654
commit
c6b667623a
@ -41,6 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Encoders */
|
/* Encoders */
|
||||||
#define ENCODERS_PAD_A { F4, F6 }
|
#define ENCODERS_PAD_A { F4, F6 }
|
||||||
#define ENCODERS_PAD_B { F5, F7 }
|
#define ENCODERS_PAD_B { F5, F7 }
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
|
// if you want to reverse encoder direction
|
||||||
|
// #define ENCODER_DIRECTION_FLIP
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
@ -116,55 +116,55 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? G(KC_EQL) : G(KC_MINS));
|
tap_code16(!clockwise ? G(KC_MINS) : G(KC_EQL));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_QUOT : KC_MINS);
|
tap_code(!clockwise ? KC_MINS : KC_QUOT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MAC_PS_1:
|
case MAC_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? G(KC_EQL) : G(KC_MINS));
|
tap_code16(!clockwise ? G(KC_MINS) : G(KC_EQL));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// undo / redo
|
// undo / redo
|
||||||
tap_code16(!clockwise ? S(G(KC_Z)) : G(KC_Z));
|
tap_code16(!clockwise ? G(KC_Z) : S(G(KC_Z)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_CS_1:
|
case WIN_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? C(KC_EQL) : C(KC_MINS));
|
tap_code16(!clockwise ? C(KC_MINS) : C(KC_EQL));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_QUOT : KC_MINS);
|
tap_code(!clockwise ? KC_MINS : KC_QUOT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_PS_1:
|
case WIN_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? C(KC_SCLN) : C(KC_MINS));
|
tap_code16(!clockwise ? C(KC_MINS) : C(KC_SCLN));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// undo / redo
|
// undo / redo
|
||||||
tap_code16(!clockwise ? C(S(KC_Z)) : C(KC_Z));
|
tap_code16(!clockwise ? C(KC_Z) : C(S(KC_Z)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IOS_CS_1:
|
case IOS_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? G(KC_SCLN) : G(KC_MINS));
|
tap_code16(!clockwise ? G(KC_MINS) : G(KC_SCLN));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_EQL : KC_MINS);
|
tap_code(!clockwise ? KC_MINS : KC_EQL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -176,55 +176,55 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// size of brush
|
// size of brush
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? G(KC_RBRC) : G(KC_LBRC));
|
tap_code16(!clockwise ? G(KC_LBRC) : G(KC_RBRC));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MAC_PS_1:
|
case MAC_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// size of brush
|
// size of brush
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? KC_RCBR : KC_LCBR);
|
tap_code16(!clockwise ? KC_LCBR : KC_RCBR);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_CS_1:
|
case WIN_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? C(KC_RBRC) : C(KC_LBRC));
|
tap_code16(!clockwise ? C(KC_LBRC) : C(KC_RBRC));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_PS_1:
|
case WIN_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? KC_RCBR : KC_LCBR);
|
tap_code16(!clockwise ? KC_LCBR : KC_RCBR);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IOS_CS_1:
|
case IOS_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// size of brush
|
// size of brush
|
||||||
tap_code(!clockwise ? KC_BSLS : KC_RBRC);
|
tap_code(!clockwise ? KC_RBRC : KC_BSLS);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? G(KC_BSLS) : G(KC_RBRC));
|
tap_code16(!clockwise ? G(KC_RBRC) : G(KC_BSLS));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -6,7 +6,7 @@ A left hand device with rotary encoder, for artists.
|
|||||||
|
|
||||||
* Keyboard Maintainer: [niltea](https://github.com/niltea)
|
* Keyboard Maintainer: [niltea](https://github.com/niltea)
|
||||||
* Hardware Supported: Palette1202
|
* Hardware Supported: Palette1202
|
||||||
* Hardware Availability: [Pixiv Booth](https://booth.pm/)
|
* Hardware Availability: [Pixiv Booth](https://niltea.booth.pm/)
|
||||||
* [PCB & Case](https://github.com/niltea/Palette1202)
|
* [PCB & Case](https://github.com/niltea/Palette1202)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
Loading…
Reference in New Issue
Block a user