none
Tab key in windows phone 8

    Question

  • While handling a KeyDown event in a TextBlock in WP8 like this:

    <TextBox x:Name="txtUserId" KeyUp="txtUserId_KeyDown_1"/>

    I noticed that when I press the "Tab" key, the value being passed to the handler method is "Enter" (PlatformKeyCode is set to 13):

    private void txtUserId_KeyDown_1(object sender, KeyEventArgs e) {
    	// always true when tab is pressed
    	Debug.WriteLine(e.Key == Key.Enter);
    }

    The same Key value is passed when I press Enter. This seems like a bug to me.

    Thanks.

    Ruben


    R

    Tuesday, November 13, 2012 11:15 AM

Answers

All replies

  • Hi rsrvr_dog,

    Is there a "Tab" key in Windows Phone 8? Can you show an image here to better explain?

    Best Regards.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, November 15, 2012 8:25 AM
  • I could have easily added a bit more detail to my cryptic question :-)

    This is only an issue when using the OS keyboard while running the WP8 emulator (after clicking page down), not the actual keyboard on the emulator as it doesn't have a tab key (not the default keyboard at least).

    I have a form with 2 TextBoxes and essentially I want to switch from one to the other using the TAB key on my desktop computer (the SIP is disabled with the page down key).

    When I do this using the code above I always get "Enter" as the value for the TAB key.

    Thanks


    R

    Thursday, November 15, 2012 5:03 PM
  • Hi,

    You can find a list of the keys on a hardware keyboard that you can use to emulate the buttons and other controls on a Windows Phone device in below document, Tab key is not included.

    http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff754352(v=vs.105).aspx

    Best Regards.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by rsrvr_dog Saturday, November 17, 2012 10:00 AM
    Friday, November 16, 2012 3:11 AM
  • Thanks for the info Haixia. I wasn't aware of these mappings.


    R

    Saturday, November 17, 2012 10:02 AM