[Ohrrpgce] SVN: james/10250 Add optional right-drag scrolling support to plankmenus, and use it for

Ralph Versteegen teeemcee at gmail.com
Fri Mar 30 20:31:14 PDT 2018


On 31 March 2018 at 13:50, James Paige <Bob at hamsterrepublic.com> wrote:

>
>
> On Friday, March 30, 2018, Ralph Versteegen <teeemcee at gmail.com> wrote:
>
>>
>>
>> On 31 March 2018 at 03:48, James Paige <Bob at hamsterrepublic.com> wrote:
>>
>>>
>>>
>>> On Thu, Mar 29, 2018 at 7:59 PM, Ralph Versteegen <teeemcee at gmail.com>
>>> wrote:
>>>
>>>> Actually, maybe what you're seeing are actually multitouch gestures. I
>>>> had assumed they were only enabled if AppUsesMultitouch=y is set in the
>>>> .cfg file, but if you look at DemoGLSurfaceView_nativeMotionEvent in
>>>> src/video/android/SDL_androidinput.c, it appears they are always
>>>> enabled and send normal scancodes, and AppUsesMultitouch only makes them
>>>> additionally send joystick and SDL 1.3/2 multitouch events.
>>>>
>>>> The four multitouch gestures send these scancodes:
>>>> static int multitouchGestureKeycode[MAX_MULTITOUCH_GESTURES] = {
>>>> SDL_KEY(SDL_KEY_VAL(SDL_ANDROID_SCREENKB_KEYCODE_6)),
>>>> SDL_KEY(SDL_KEY_VAL(SDL_ANDROID_SCREENKB_KEYCODE_7)),
>>>> SDL_KEY(SDL_KEY_VAL(SDL_ANDROID_SCREENKB_KEYCODE_8)),
>>>> SDL_KEY(SDL_KEY_VAL(SDL_ANDROID_SCREENKB_KEYCODE_9))
>>>> };
>>>>
>>>>
>>> Interesting...
>>>
>>> In androidinputtest.rpg I can see that 3-finger touch definitely sends
>>> the key that is defined for "MENU" which in that case is "m" and 4-finger
>>> touch sends what is configured for "BACK" which in that case is "K"
>>>
>>
>> So did disabling multitouch gestures also stop those phantom 3- and
>> 4-finger touch keys?
>>
>>
>
> Yes, exactly so.
>
> After I made the multitouch gestures remappable, I set each one to
> something unique and tested on my phone with androidinputtest.rpg and and
> time I would rapidly drag with two fingers, all four of them would light up
> like a Christmas tree. They don't seem to work as intended.
>
> Disabling them makes two-finger drag in the inventory screen work much
> better.
>

I just had a look at the upstream commandergenius repo, and I see that
pelya made two-finger drags emulate the mouse wheel, in 49b3987 (2014).  We
forked in 2013. There were some other tweaks to the multitouch gesture code.

I also notice that the documentation for RedefinedKeysScreenKb was improved:
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4
multitouch gestures (zoom in/out and rotate left/right)
RedefinedKeysScreenKb="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS
KP_MINUS UNDO HELP"



>
>
>>
>>>
>>>> On 30 March 2018 at 15:41, Ralph Versteegen <teeemcee at gmail.com> wrote:
>>>>
>>>>> I had a look at the code, and couldn't figure out where this is
>>>>> implemented.
>>>>>
>>>>> But I was reminded that there is a settings menu, which we hide (using
>>>>> StartupMenuButtonTimeout in the .cfg) , which has a bunch of settings for
>>>>> touch and emulating right clicks and so forth. That might be the fastest
>>>>> way to explore the settings.
>>>>>
>>>>> On 30 March 2018 at 11:47, James Paige <Bob at hamsterrepublic.com>
>>>>> wrote:
>>>>>
>>>>>> I also learned something odd about the android port. Apparently a
>>>>>> three-finger tap triggers the "Menu" button, and a four-finger tap triggers
>>>>>> the "Back" button. The ohrrpgce interprets both of these as ESC.
>>>>>>
>>>>>> Unfortunately, the detection of three and four finger touches is not
>>>>>> great, and a rapid two-finger drag (such as scrolling) can sometimes be
>>>>>> interpreted as one of them.
>>>>>>
>>>>>> I puzzled over why my two-finger scrolling kept exiting out of them
>>>>>> menu at seemingly random times until I understood this.
>>>>>>
>>>>>> Hopefully I can figure out how to disable it in AndroidAppSettings.cfg
>>>>>>
>>>>>> ---
>>>>>> James
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Mar 29, 2018 at 2:28 PM, James Paige <Bob at hamsterrepublic.com
>>>>>> > wrote:
>>>>>>
>>>>>>> I have tested this on my phone in the android port, and it very
>>>>>>> nearly works the way I want it to, but I am sure it will still need more
>>>>>>> tuning.
>>>>>>>
>>>>>>> sdl-android's two-finger right mouse support is pretty good.
>>>>>>>
>>>>>>> I am pleased how easy it is for me to accurately click inventory
>>>>>>> slots on my 5-inch phone screen. Your mileage may vary, depending on screen
>>>>>>> size, and perhaps on the physics of your fingertips ;)
>>>>>>>
>>>>>>> I also tested without turning off the virtual gamepad, and I am
>>>>>>> pleased that the touch controls I have implemented so far work pretty
>>>>>>> decently even when the virtual gamepad is obstructing parts of the
>>>>>>> touchable screen.
>>>>>>>
>>>>>>> For now I am not disabling the android virtual gamepad based on
>>>>>>> mouse controls being enabled (although I probably will do so some extend
>>>>>>> later)
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Mar 29, 2018 at 2:14 PM, <subversion at hamsterrepublic.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> james
>>>>>>>> 2018-03-29 14:14:01 -0700 (Thu, 29 Mar 2018)
>>>>>>>> 92
>>>>>>>> Add optional right-drag scrolling support to plankmenus, and use it
>>>>>>>> for the inventory screen
>>>>>>>> ---
>>>>>>>> U   wip/menustuf.rbas
>>>>>>>> U   wip/plankmenu.bas
>>>>>>>> U   wip/plankmenu.bi
>>>>>>>> _______________________________________________
>>>>>>>> Ohrrpgce mailing list
>>>>>>>> ohrrpgce at lists.motherhamster.org
>>>>>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherh
>>>>>>>> amster.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Ohrrpgce mailing list
>>>>>> ohrrpgce at lists.motherhamster.org
>>>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherh
>>>>>> amster.org
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>
>>>
>>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20180331/c1254745/attachment.html>


More information about the Ohrrpgce mailing list