转载自:http://msdn.microsoft.com/en-us/library/ff754352%28v=VS.92%29.aspx

Windows Phone

This topic describes the keyboard mapping in the Windows Phone Emulator and how to use the keyboard. The emulator supports mapping of the keyboard on your development computer to the hardware keyboard on a Windows Phone. By default, the keyboard is not enabled. This implementation is equivalent to a sliding keyboard that must be deployed before you can use it. Before you enable the keyboard, the emulator accepts key input only from the control keys such as F1.

NoteNote:

The emulator does not support orientation changes when the keyboard is enabled. You must disable the keyboard, and then rotate the emulator.

Important noteImportant Note:

Special characters on the keyboard of a localized version of a Windows development computer are not supported by Windows Phone Emulator in this release. To enter special characters that are present on a localized keyboard, use the Software Input Panel (SIP) instead.

Enabling and Disabling the Keyboard

To enable the keyboard in the emulator

  • Press the PAGE UP key.

    -or-

  • Press the PAUSE/BREAK key.

To disable the keyboard in the emulator

  • Press the PAGE DOWN key.

    -or-

  • Press the PAUSE/BREAK key.

Keyboard Mapping

The following table lists the keys on a development computer keyboard and their corresponding keys on a Windows Phone hardware keyboard.

 

Computer keyboard key

Windows Phone hardware key

Notes

ESC

Not applicable.

Disabled.

F1

BACK

 

F2

START

 

F3

SEARCH

 

F4

Not applicable.

Disabled.

F5

Not applicable.

Disabled.

F6

CAMERA HALF

A dedicated camera key that is pressed halfway. Not supported in Windows Phone Developer Tools.

F7

CAMERA FULL

A dedicated camera key. Not supported in Windows Phone Developer Tools.

F8

Not applicable.

Disabled.

F9

VOLUME UP

 

F10

VOLUME DOWN

 

   

F12

Not applicable.

Disabled.

PRINT SCREEN

POWER

Not supported in Windows Phone Developer Tools.

PAUSE/BREAK

Not applicable.

Enables the hardware keyboard.

PAGE UP

Not applicable.

Enables the hardware keyboard.

PAGE DOWN

Not applicable.

Disables the hardware keyboard.

TAB

Not applicable.

Disabled, except in a multiline text box, if the application supports tabbing.

CAPS LOCK

Not applicable.

Disabled.

   

Left CTRL

FN

 

Windows logo key

Not applicable.

Disabled. Shows the development computer Start menu.

Left ALT

ACCENT

The ACCENT key on the device has the ÄÉ symbol on it.

Right ALT

EMOTICON

The EMOTICON key on the device has a smiley face on it.

MENU

Not applicable.

Disabled.

Right CTRL

SYMBOL (SYM)

 

Using the Keyboard

This section describes how to use some of the keyboard keys on the Windows Phone Emulator. The behavior of the keys is the same as on a Windows Phone device.

Special Keys

The following table describes the behavior of special keys on the keyboard.

 

Key Name

Hardware button

Key usage

ENTER

Enter Key

Press to insert a new line. Press and hold to insert multiple lines.

BACKSPACE

Backspace Key

Press to delete a single character to the left of the cursor. Press and hold to delete multiple characters. Press and hold for a longer period to delete multiple words.

SPACE

Space Key

Press to insert a single space. Press and hold to insert multiple spaces.

 

SHIFT

Shift Key

Press to switch between Shift On and Shift Off. Shift On mode remains in effect until the next key press completes. Press and hold to switch between Shift Off and Shift Lock. When FN mode is FN On or FN Locked, press SHIFT to switch between Shift Off and Shift Lock.

 

FN

FN Key

Press to switch between FN On and FN Off. FN On mode remains in effect until the next key press completes. Press and hold to switch between FN Off and FN Lock.

SYM

Sym Key

Press to open the symbol picker. Press and hold to open the language picker. When FN mode is FN On or FN Locked, press SYM to switch to the next language.

 

ACCENT

Accent Key

Press to add an accent to the letter positioned to the left of the cursor. Press multiple times to cycle through the available accented forms of the letter. Press and hold to open the accent picker. When FN mode is FN On or FN Locked, press ACCENT to cycle in reverse order through the available accented forms of the letter.

 

EMOTICON

Emoticon Key

Press to open the emoticon picker.

Shift Mode

Use Shift mode to type uppercase letters.

If you switch between editable fields, the Shift mode resets to Shift Off.

The Shift mode state of the hardware keyboard is independent of the Shift mode state of the SIP. software input panel (SIP).

If you press the SHIFT key, and while holding the Shift key down press a second key, the second key is treated as if Shift mode is set to Shift On. This action is not treated as a press-and-hold action of the SHIFT key. After you release the SHIFT key, Shift mode is set to Shift Off.

The following table shows the supported Shift modes.

 

Mode

Symbol

Notes

Shift Off

Shift Off - FN Off

This is the default Shift mode.

Shift On

Shift On

Shift On mode remains in effect until the next key press completes, unless the next key pressed is FN or SYM, which do not reset the Shift mode.

Shift Lock (CAPS LOCK)

Shift Lock

Shift Lock locks the keyboard in Shift On mode.

FN Mode

The FN mode determines whether the primary or secondary actions of a key are enabled. In FN On mode, the secondary action is enabled.

If you switch between editable fields, the FN mode resets to FN Off.

If you press the FN key, and while holding the FN key down you press a second key, the second key is treated as if FN mode is set to FN On. This action is not treated as a press-and-hold action of the FN key. After you release the FN key, FN mode is set to FN Off.

The following table shows the supported FN modes.

 

Mode

Symbol

Notes

FN Off

Shift Off - FN Off

This is the default FN mode.

FN On

FN On

FN On mode remains in effect until the next key press completes, unless the next key pressed is SHIFT or SYM, which do not reset the FN mode.

FN Lock

FN Lock

FN Lock locks the keyboard in FN On mode.

Shift Mode and FN Mode Combinations

The following table shows the input result for various combinations of Shift mode and FN mode.

 

FN mode

Shift Off

Shift On

Shift Lock

FN Off

Primary action or character, lowercase characters.

Primary action or character, uppercase characters.

Primary action or character, consecutive uppercase characters. Used for acronyms or inserting words in all uppercase.

FN On

Secondary action or character, lowercase characters. Used for symbols or accented letters.

Secondary action or character, uppercase characters. Used for uppercase accented letters.

Secondary action or character, consecutive uppercase characters. Used for acronyms or inserting words with accents in all uppercase.

FN Lock

Secondary action or character, lowercase characters. Used for numeric values.

Not supported.

Not su