Bluetooth mouse support?

Subforum for discussion and help with ScummVM's Android port

Moderator: ScummVM Team

Bobbin Threadbare
Posts: 21
Joined: Sun May 20, 2007 12:42 pm

Bluetooth mouse support?

Post by Bobbin Threadbare »

Hi can anyone tell me what the bluetooth mouse support is like for scummvm on android?

I am thinking of getting a bluetooth mouse for my tablet and having scummvm support will sway me into getting one.

I'm guessing left click and movement work ok but what about right click and middle?
AchillesPDX
Posts: 22
Joined: Thu Jan 13, 2011 4:13 pm

Post by AchillesPDX »

I just got ICS running on my HP Touchpad and figured I'd try out a bluetooth mouse and keyboard hooked up to it. Amazingly, the ICS interface seems to be designed with mouse input in mind as you actually get a mouse cursor that functions just like a touching finger - it's quite cool.

ScummVM on the other hand doesn't handle it as well. The ScummVM cursor doesn't follow the built-in android cursor until you actually click the mouse button (and you've got two cursors on screen at the same time). The other issue is that right-mouse and middle mouse both function as left-mouse so unfortunately my dreams of a perfect ScummVM experience on the go are not quite there yet.

Can any of the Devs chime in on how difficult it would be to implement fully-functional mouse support to the Android port? I'd love you guys forever and possibly even ship you a case of Northwest microbrew if that's your thing.

Thanks!
fuzzie
ScummVM Developer
Posts: 178
Joined: Mon May 24, 2010 3:02 pm

Post by fuzzie »

AchillesPDX wrote:Can any of the Devs chime in on how difficult it would be to implement fully-functional mouse support to the Android port?
I haven't had coffee yet, but doesn't look too painful:

For the cursor, it might just be a question of implementing onGenericMotionEvent() to handle ACTION_HOVER_MOVE, which would be trivial.

I don't know if we can detect BUTTON_SECONDARY (right clicks) without getButtonState() which is Android 4.0+ specific, though, so that might involve some fiddling with reflection.
goetz
Posts: 120
Joined: Fri Dec 09, 2005 10:11 am

Post by goetz »

The double mouse cursor and the mouse cursor jumping on click only can already be changed to system mouse cursor only. Changing the input mode (via the Adlib-Option, see ScummVM WIKI, Android section for info) should do the trick.
AchillesPDX
Posts: 22
Joined: Thu Jan 13, 2011 4:13 pm

Post by AchillesPDX »

goetz wrote:The double mouse cursor and the mouse cursor jumping on click only can already be changed to system mouse cursor only. Changing the input mode (via the Adlib-Option, see ScummVM WIKI, Android section for info) should do the trick.
Thanks for the suggestion, but all that seems to do is switch between touchpad mode and direct input mode - the in-game cursor is always visible.
fuzzie
ScummVM Developer
Posts: 178
Joined: Mon May 24, 2010 3:02 pm

Post by fuzzie »

AchillesPDX wrote:Thanks for the suggestion, but all that seems to do is switch between touchpad mode and direct input mode - the in-game cursor is always visible.
Just to be sure: We need to disable the Android cursor, not the in-game ones, since the in-game cursors are often needed to see what you're doing..?
AchillesPDX
Posts: 22
Joined: Thu Jan 13, 2011 4:13 pm

Post by AchillesPDX »

fuzzie wrote:
AchillesPDX wrote:Thanks for the suggestion, but all that seems to do is switch between touchpad mode and direct input mode - the in-game cursor is always visible.
Just to be sure: We need to disable the Android cursor, not the in-game ones, since the in-game cursors are often needed to see what you're doing..?
Yes, that would be my suggestion. Disable the android cursor, make the in-game cursor update it's position upon mouse movement instead of click, and enable middle and right buttons.
ripper2020
Posts: 2
Joined: Sat Feb 25, 2012 6:05 pm

Post by ripper2020 »

AchillesPDX wrote:
fuzzie wrote:
AchillesPDX wrote:Thanks for the suggestion, but all that seems to do is switch between touchpad mode and direct input mode - the in-game cursor is always visible.
Just to be sure: We need to disable the Android cursor, not the in-game ones, since the in-game cursors are often needed to see what you're doing..?
Yes, that would be my suggestion. Disable the android cursor, make the in-game cursor update it's position upon mouse movement instead of click, and enable middle and right buttons.
Exactly! Basically make it function like a netbook. I too am running into this problem. I purchased an asus transformer and got the dock because I thought it would be great for scummvm adventure games. Everyone says just change to direct input mode but it's still not a good experience. It would be great if you could just use the trackpad as the actual scummvm mouse pointer, and also use the left and right clicks of a mouse / trakcpad. Does anyone know if anything like this is possible??
beano311
Posts: 5
Joined: Wed Feb 29, 2012 1:29 am

Post by beano311 »

I'd also like to comment that this would be a great addition. Mouse support has been in Android, AFAIK, since 3.0/3.1, if not before, so it's not like only a few people could benefit from it.
Is there any news/anyone working on adding it? Even just proper cursor tracking would be awesome/simple. I looked at the source myself and would probably be able add it if it was Java, but C++ is just different enough that I don't want to mess with it.

Edit: I'd like to further add that clicking will need tweaking. As it stands, clicking with the mouse in direct input mode doesn't trigger the click event until the button is released. This makes it so that clicking and dragging is broken (clicking and dragging simple drags the game cursor around). Example: I'm using a T-Mobile G2 (HTC Desire Z/Vision) In Curse of Monkey Island, in order to bring up the action buttons (Get/Use, Look At, Talk To) you have to click on the object and drag upwards to bring up the action window. This works fine without the mouse if you use your finger to point, then click and hold by pressing your device's trackball/trackpad, and then drag your finger upwards to bring up the actions while still holding down the trackpad button.
The workaround is that you have to double click and hold then drag to get it to come up.
benjymous
Posts: 1
Joined: Wed Feb 29, 2012 3:15 pm

Post by benjymous »

beano311 wrote:I'd also like to comment that this would be a great addition. Mouse support has been in Android, AFAIK, since 3.0/3.1, if not before, so it's not like only a few people could benefit from it.
Is there any news/anyone working on adding it? Even just proper cursor tracking would be awesome/simple. I looked at the source myself and would probably be able add it if it was Java, but C++ is just different enough that I don't want to mess with it.
It certainly exists in 2.3.4 - My phone (Xperia ray) accepts a USB mouse via the use of a cheap OTG adaptor, which causes a mouse pointer to appear on screen.

Sadly as other people have mentioned, in its current state the scummvm user experience using a native mouse is far worse than using touch controls.
fuzzie
ScummVM Developer
Posts: 178
Joined: Mon May 24, 2010 3:02 pm

Post by fuzzie »

benjymous wrote:It certainly exists in 2.3.4 - My phone (Xperia ray) accepts a USB mouse via the use of a cheap OTG adaptor, which causes a mouse pointer to appear on screen.

Sadly as other people have mentioned, in its current state the scummvm user experience using a native mouse is far worse than using touch controls.
The necessary bits are there in Android 2.3+. But I don't have a Bluetooth mouse nor an OTG adapter, so I can't easily try adding support myself at the moment.
beano311
Posts: 5
Joined: Wed Feb 29, 2012 1:29 am

Post by beano311 »

fuzzie wrote:
benjymous wrote:It certainly exists in 2.3.4 - My phone (Xperia ray) accepts a USB mouse via the use of a cheap OTG adaptor, which causes a mouse pointer to appear on screen.

Sadly as other people have mentioned, in its current state the scummvm user experience using a native mouse is far worse than using touch controls.
The necessary bits are there in Android 2.3+. But I don't have a Bluetooth mouse nor an OTG adapter, so I can't easily try adding support myself at the moment.
Sorry benjymous, I should have pointed out that I was using a Microsoft Bluetooth mouse... Anyway, isn't there a way to emulate USB mouse support in the Android SDK's emulator?
kblood
Posts: 19
Joined: Sun Oct 17, 2010 11:39 am
Location: Denmark

Post by kblood »

The only point and click adventure game I have found on Android market, made for Android, is Nephis Adventure 2. And i was very surprised when I found that the cursor follows the Android curser when I use my touchpad on my Android Transformer Prime.

I had to try this on ScummVM, but no go.

I do develop some Android stuff myself, although mostly playing around to see whats possible. I have found out how to make a custom key mapper. One of the things I want to do is making it possible to use a mouse in games. If i find out something more than this, I will probably come by and add some comments about it.

Oh, and it would be nice if the arrow keys actually moved the selection in ScummVM instead of just moving the cursor around. I guess it is needed sometimes for more precise movement, and I bet its great on my gaming tablet that has a controller stick using the same keys. But when you just want to browse the games, its just really annoying having to use the mouse cursor when you actually have a keyboard... but I guess its a minor problem. Not sure if I would need them in the actual games. Maybe for the ones where you have to write text for save games.

But mouse support for Android is something I have been hoping for, for a long time. And it finally seems to be coming, so I might be able to use remote desktop much easier.

I guess I should try to see how this works on my Galaxy S phone, since it has bluetooth mouse support. Just to see if its cursor works with Nephis Adventure as well.
raziel89
Posts: 2
Joined: Sun Jul 29, 2012 8:33 pm

Post by raziel89 »

I answer to this post just to make you know that I'm also interested in this feature...
Using the Adlib Option it's a great thing, but it could be improved with a fully support to mouse.

Ps: I'm using gs3, usb otg and a classic usb mouse.
Psygnosis
Posts: 13
Joined: Tue Feb 06, 2007 5:57 am

Post by Psygnosis »

For an interface designed around mouse input, I was surprised this wasn't supported yet :(
Post Reply