mirror of
https://github.com/clockworkpi/uConsole.git
synced 2025-12-12 18:18:50 +01:00
add Fn+trackball to scroll change volume key logic ``` Fn+vol = mute shift+vol = vol up vol = vol down ```
This commit is contained in:
parent
c309e150e7
commit
18853c7666
Binary file not shown.
@ -67,7 +67,9 @@ static void interrupt( ) {
|
|||||||
void trackball_task(DEVTERM*dv) {
|
void trackball_task(DEVTERM*dv) {
|
||||||
int8_t x = 0, y = 0, w = 0;
|
int8_t x = 0, y = 0, w = 0;
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
const auto mode = dv->state->moveTrackball();
|
//const auto mode = dv->state->moveTrackball();
|
||||||
|
//https://forum.clockworkpi.com/t/uconsole-trackball-as-scrolling-wheel-temporary-solution/11032/3
|
||||||
|
const auto mode = dv->Keyboard_state.fn_on == 0 ? TrackballMode::Mouse : TrackballMode::Wheel;
|
||||||
if (lastMode != mode) {
|
if (lastMode != mode) {
|
||||||
rateMeter[AXIS_X].expire();
|
rateMeter[AXIS_X].expire();
|
||||||
rateMeter[AXIS_Y].expire();
|
rateMeter[AXIS_Y].expire();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user