Downloads
release
dev builds
extras
themes
Documentation
manual
wiki
device status
Support
forums
mailing lists
IRC
Development
bugs
patches
dev guide
translations
Search
Donate
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Welcome to the Rockbox Technical Forums!
Rockbox Technical Forums
Support and General Use
User Interface and Voice
How to disable scroll wheel for Sansa Fuze
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to disable scroll wheel for Sansa Fuze (Read 2791 times)
meyertime
Member
Posts: 22
How to disable scroll wheel for Sansa Fuze
«
on:
April 07, 2023, 02:23:40 AM »
I apologize if this has already been covered somewhere, but I tried searching for a while and couldn't find an answer.
Basically, I used Rockbox on a Sansa Clip+ for a while, which does not have a rotary scroll wheel, but otherwise has the same buttons as the Fuze. It worked great. But I recently got a Fuze, and I don't like the scroll wheel. Plus the wheel itself is physically worn out and hard to turn. There doesn't appear to be a setting to disable it and have it work like the Clip+. Is there a setting that I'm missing?
If not, how hard would it be to make a custom build for the Fuze that would ignore the scroll wheel and have the buttons act like the Clip+? Could you point me in the right direction in the code? Thanks!
Logged
saratoga
Developer
Member
Posts: 9337
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #1 on:
April 07, 2023, 09:04:03 AM »
https://git.rockbox.org/cgit/rockbox.git/tree/apps/keymaps
You can edit the keymap to be more like on the clip or however you want and then compile your own custom build.
Logged
Bilgus
Developer
Member
Posts: 1023
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #2 on:
April 07, 2023, 01:40:45 PM »
The keyremap plugin should allow you to do what you want
Logged
meyertime
Member
Posts: 22
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #3 on:
April 10, 2023, 06:10:15 PM »
Thanks for the replies! It looks like the keyremap plugin wasn't added until 2022 and the latest release build is from 2019. Would you recommend using a daily build? Is it stable? Or maybe it's better to do a custom build based on v3.15?
Logged
Bilgus
Developer
Member
Posts: 1023
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #4 on:
April 11, 2023, 10:36:51 AM »
I would always recommend using the latest dev build if not for the features then for the bug fixes
if you do run into an issue with the latest dev build we can fix it and make the whole thing even better
Logged
Bilgus
Developer
Member
Posts: 1023
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #5 on:
April 11, 2023, 06:19:11 PM »
I hate to say it but after looking at the keymap for the fuze building from source is probably your better bet
as Saratoga suggested above because there are a bunch of places using the scroll wheel
the keyremap plugin would be fine for just a screen or two but if you have a bad scroll wheel I'd just remove it from all the keymaps in the source directly and compile my own version
Logged
meyertime
Member
Posts: 22
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #6 on:
April 20, 2023, 07:55:41 PM »
Thanks again for the replies! Unfortunately the latest daily build (on the day I tried it) FM was broken on the Fuze v1. I was able to compile v3.15 from source and started down that road, but then a wrench was thrown in my plan, because I found out I will need to receive FM frequencies between 72-76 MHz.
The SI4702 FM chip doesn't support that range. It appears that some Fuze v2 devices have a RDA5802 chip which does appear to support that range, but my Fuze v2 does not have that chip. I don't know how to acquire such a device. I've taken to asking eBay sellers who list Fuzes with Rockbox installed to check the FM chip, but so far no takers...
So this may be the end of the road for me for the Fuze. I have an idea for a different device, but I'll post a new thread about that.
Logged
meyertime
Member
Posts: 22
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #7 on:
June 17, 2023, 03:27:27 AM »
I got my hands on a Fuze with the RDA5802 FM chip, so I am picking this up again. I am attempting to modify keymap-fuze.c on the v3.15 branch.
I'm running into a problem where no matter what I do, I can't get the up and down buttons to go up and down in the main menu. There also doesn't seem to be any good documentation (unless I'm just really missing it?) about how the keymap actually works. For example, why do you sometimes put |BUTTON_REL and a prereq button code, and other times no |BUTTON_REL and BUTTON_NONE for the prereq button code? I've tried both, and nothing works...
I think I've figured out some things, like how get_context_mapping returns which mapping to use for a given context, and how a mapping appears to be able to fall back to another context if there's no match. But I can't seem to figure out exactly what BUTTON_REL, BUTTON_REPEAT, and the prereq button code do... Any help?
Logged
saratoga
Developer
Member
Posts: 9337
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #8 on:
June 17, 2023, 11:44:04 AM »
The prerequisite button is what you have to press before the main button, so if it's set to none, you can push the main button directly.
BUTTON_REL means that the action is when the button is released instead of when it is first pressed. BUTTON_REPEAT is the same thing but it means the action happens while the button is held down.
Logged
meyertime
Member
Posts: 22
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #9 on:
June 17, 2023, 07:15:33 PM »
I think I get it. Just to run through so I understand correctly:
Button: BUTTON_X, Prereq: BUTTON_NONE - matches any initial press of X, whether or not it ends up being a short or long press
Button: BUTTON_X|BUTTON_REL, Prereq: BUTTON_X - matches a short-press of X
Button: BUTTON_X|BUTTON_REPEAT, Prereq: BUTTON_X - matches a long-press of X
Button: BUTTON_X}BUTTON_REPEAT, Prereq: BUTTON_NONE - matches multiple repeats of X when X is held down
I still must be missing something, though. I don't see how it's not working. I tried a few different permutations. The up and down buttons don't move up and down the main menu, but the left, right, and home buttons seem to work right. I put the code in a fork. If you'd be willing to take a look, I'd appreciate it. There's probably something obvious I'm overlooking.
Diff:
https://github.com/meyertime/rockbox/compare/v3.15...meyertime:rockbox:b62f61a3191db2b9bc8fa1ff4c946a0497c923dc?expand=1
Code:
https://github.com/meyertime/rockbox/blob/b62f61a3191db2b9bc8fa1ff4c946a0497c923dc/apps/keymaps/keymap-fuze.c
Logged
meyertime
Member
Posts: 22
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #10 on:
July 06, 2023, 05:21:08 PM »
I finally figured this out. I had to disable
HAVE_WHEEL_ACCELERATION
in
firmware/export/config/sansafuzev2.h
. Apparently, there's some "advanced" wheel acceleration code (somewhere? or everywhere?) that assumes that the wheel controls certain actions and has an effect on those actions, such that they don't work at all unless the wheel is mapped to those actions.
As a professional software engineer, I would say that it would have been better to apply the "advanced" wheel acceleration logic to the incoming wheel events before they get mapped to actions, that way key mappings could continue to be customized freely. This is known as
protected variation
.
Separation of concerns
and the
principle of least surprise
also come to mind. But I digress, and perhaps this has been addressed since v3.15...
In any case, at least I'm unblocked now and can continue with key map customization. Whatever I do end up mapping the wheel to (most likely volume) just won't have "advanced" acceleration.
Logged
meyertime
Member
Posts: 22
Re: How to disable scroll wheel for Sansa Fuze
«
Reply #11 on:
July 08, 2023, 11:30:11 PM »
My fork of Rockbox is officially launched:
https://github.com/meyertime/rockbox
Custom keymap for Fuze and custom FM region for the RDA5802 chip.
Logged
Print
Pages: [
1
]
« previous
next »
Rockbox Technical Forums
Support and General Use
User Interface and Voice
How to disable scroll wheel for Sansa Fuze
SMF 2.0.19
|
SMF © 2021
,
Simple Machines
Rockbox Privacy Policy
XHTML
RSS
WAP2
Page created in 0.117 seconds with 21 queries.