|
From: Michal S. <hra...@ce...> - 2010-07-27 08:17:25
|
On 27 July 2010 10:07, Michal Suchanek <hra...@ce...> wrote: > On 24 July 2010 00:55, Ping Cheng <pin...@gm...> wrote: >> On Fri, Jul 23, 2010 at 10:13 AM, Michal Suchanek <hra...@ce...> wrote: >>> Hello >>> >>> On 22 July 2010 16:40, Ping Cheng <pin...@gm...> wrote: >>>> On Thu, Jul 22, 2010 at 2:45 AM, Michal Suchanek <hra...@ce...> wrote: >>> >>>>> Is there any plan to make the default button assignments sensible or >>>>> are they going to be just random with no use for the button unless >>>>> everyone reassigns them on their tablets? >>>> >>>> Can you submit a patch here? We will merge the patch once it is >>>> reviewed and tested. >>> >>> I skimmed through the source and I cannot find the place where the >>> buttons are actually assigned. >> >> The buttons (expresskeys are considered as special buttons) are >> initialized in wcmConfig.c >> (http://linuxwacom.cvs.sourceforge.net/viewvc/linuxwacom/linuxwacom-dev/src/xdrv/wcmConfig.c?revision=1.59&view=markup), >> lines 143 and 144. This is where you need to make your changes. >> >> The actual place that we process the expresskeys is in wcmUSB.c >> (http://linuxwacom.cvs.sourceforge.net/viewvc/linuxwacom/linuxwacom-dev/src/xdrv/wcmUSB.c?revision=1.64&view=markup), >> lines 1177 to 1183. >> >>> I could only find several places where it seems the buttons are passed >>> through unchanged. >>> >>> Still I somewhat doubt that the original assignment is 1 2 3 8 so I >>> guess I missed something. Or is there really need for a new button >>> remap table to make the buttons return something sane? >> >> From the wcmConfig.c code you can see that by default 1 2 3 4 should >> be the your expresskeys values (I am not sure why they are not). If >> you want to assign them to different ones, you will need (take 5 6 7 8 >> as example): >> >> priv->button[i] = (AC_BUTTON | (i + 6)); > > That's what I am talking about. The value is not transformed, only offset. > > So a per-model lookup table would be required here. > > >> >> which would assign expresskeys1 2 3 4 to buttons 5 6 7 8. Do the >> match the way you'd like them to be. You should get the keys default >> to the button events that you want. >> >> However, if you want your code get into the repository, please keep in >> mind that Bamboo series are not the only models that we support here. >> Even within Bamboo series, if a user has a Bamboo touch-only, that is >> he doesn't have stylus, he might want 1 2 3 4 as 1 2 3 4. Other models >> would have other preference.... >> > > AFAICT xev reports 1238 on both Bamboo tablets I tried (with release, > not git) so a lookup would be required, changing the offset is > insufficient. Actually the pad buttons cannot return buttons 4 5 and some zoom buttons, whatever those are because these are supposed to be generated by the pad ring and you could not distinguish pad events from button events if the button number returned was the same. Thanks Michal |