add Fn+trackball to  scroll

change volume key logic
```
Fn+vol = mute
shift+vol = vol up
vol = vol down
```
This commit is contained in:
cuu 2023-11-21 17:00:06 +13:00
parent c309e150e7
commit 18853c7666
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -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();