Okay yeah for a game, I think it often makes sense to allow the user to map
whatever keycodes their device can generate to your control inputs.  This
has nothing to do with a search key though...  in fact, trying to think
about it as a search key is just going to make your problem worse because,
since you aren't actually using it as a search key, this is semantically
meaningless, and the thing that does matter (where it is positioned in
relation to other keys and such) is going to vary widely between devices.

So just let your user press keys to set the control inputs for your game, so
they can use it with a dpad if their phone has that, or all other kinds of
inputs.

On Mon, Oct 3, 2011 at 6:02 AM, Latimerius <[email protected]>wrote:

>
>
> On Sat, Oct 1, 2011 at 8:42 AM, Dianne Hackborn <[email protected]>wrote:
>
>> What do you mean by go to settings and map their buttons?  There is a
>> well-defined keycode for search; you shouldn't need to ask the user to map
>> that to anything.
>
>
> Sure, but as I mentioned in a previous message I'm explicitly and
> intentionally *not* using the button to search.  I'm working on a game
> (well, entertainment software would be a more precise description but anyway
> ...) and to make it short, I'm just looking for a convenient way  to control
> the program during development.
>
> Note this is *not* meant for release controls, at least at the moment.  The
> problem is developers need to access more internal functionality directly
> (e.g. for testing) than will be exposed to the end user so I'm just looking
> for something reasonable to bind this to.
>
> In this case, it's much more convenient to operate the program using
> off-screen controls so I'm looking to leverage whatever the devices has.
>
> I already have a section in Preferences that lets people pick a control
> scheme based on what their device has so that's not a problem.  I just
> thought if I could detect it myself I could automatically select a good
> default for the user.
>
> If I can't check I have to set the default to the least convenient scheme
> that works everywhere and ask everybody with devices that support more to
> set their controls manually.
>
> What would be the problem with letting programmers check if there's
> something on the device that sends KEYCODE_SEARCH?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to