views:

54

answers:

3

Hello,

For the purpose of a game which must respect MS' TRC, I need to know if a phone has a physical keyboard to handle it.

How can I know it? Here is an integrated function which permit to know it?

Thanks,

KiTe

A: 

I thought the TRC requirements for WP7 was that an application or game cannot rely on a functionality of a physical keyboard, i.e., it has work with the on-screen keyboard.

Peter Torr on the WP7 forums has said that the OS will reacts to the hardware keyboard being slide-out, e.g., will hide the on-screen keyboard, however the event is not available to 3rd party developers.

I have quickly searched MSDN, specially the GamerServices namespace and cannot find any way that you could detect the hardware capabilities. Perhaps have a look at GamePad.GetCapabilities, not sure if you there is any useful information.

Question: I did not know there were devices with hardware keyboard available at the moment? How are testing this?

Dennis Roche
According to my boss, the TRC mention that if there is any physical keyboard, we have to be able to handle it even if we already handle the on-screen one.I don't know how they are testing it, may be MS has released some phone with physical keyboard?I'll have a look at GetCapabilities, may be it will do the tip.thanks
kite
@Kite: The WP7 TRCs have continually being revised through-out the CTP and have only recently became stable , e.g., the behaviour of the hardware back button has changed a number of times. I will check the latest TRC revision tomorrow with our QA - I would be interested to see this requirement. AFAIK there are no devices with physical keyboard available at the moment, even at Microsoft. However as WP7 was RTM today this could start appearing rapidly.
Dennis Roche
@Kite: Confirmed in the latest TRC for XNA and there is no requirement to handle a hardware keyboard.
Dennis Roche
+1  A: 

There is no way to detect if a phone has a physical keyboard. To an application, the physical and virtual keyboards are the same.

All devices will have a physical back button and you must handle this appropriately in your game. (i.e. show the menu at the appropriate times.)

Regarding the discussion about testing on hardware. There are a number of different hardware devices being used for early testing. Some (from Samsung) have physical keyboards.

Matt Lacey
the problem is that the virtual KB can be handled when you want (you decide it to appear in XNA), but not the physical one since it should be all-time accessible.Then, I thought the physical KB of the phone should be handled like a PC KB, with KeyboardState.Or maybe the physical KB is activated and handled only when we ask to handle the virtual one?
kite
A: 

Hi Kite,

I'm not sure what your needs are for this requirement, and I agree with Matt's observations.

Reading between the lines, I sense you are developing a game which can be controlled better by a hardware keyboard if present.

My suggestions if this is the case, and acknowledging Matt's obervsations, is to have a physical keyboard mode of play which the user can activate through a settings feature which you provide in your app.

Mick N