# Using a Touch Keyboard

Understand how to use the AutoScrollWhenKeyboardShowing property to specify whether the cell being edited scrolls into view when the touch keyboard is displayed.

## Content

You can display a touch keyboard when editing a cell.
Use the [ShowTouchKeyboard](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowTouchKeyboard.html) method to display the keyboard as in the following image.
![Touch Keyboard](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/touchkeyboard.png)
You can also specify whether the cell being edited scrolls into view when the touch keyboard is displayed by setting the [AutoScrollWhenKeyboardShowing](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.AutoScrollWhenKeyboardShowing.html) property. FpSpread will scroll up as soon as possible, but if there is not enough space to scroll, the active cell may not be visible. For example, if the control is completely covered by the touch keyboard, the control scrolls the active cell to the first row (cell still hidden by keyboard).
FpSpread provides an [InputScope](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.InputScope.html) property that can be used to specify the touch keyboard's layout.
You can use the [ShowTouchKeyboard](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.ShowTouchKeyboard.html) and [HideTouchKeyboard](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.HideTouchKeyboard.html) methods in the [EditModeOn](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.EditModeOn.html) event to show the touch keyboard when the cell goes into edit mode.

## Using Code

The following example displays the touch keyboard when the cell is in edit mode and hides it when the cell is no longer in edit mode.

```csharp
private void Form1_Load(object sender, EventArgs e)
{
    fpSpread1.AutoScrollWhenKeyboardShowing = true;
}
private void fpSpread1_EditModeOn(object sender, EventArgs e)
{
    fpSpread1.ShowTouchKeyboard();
}
private void fpSpread1_EditModeOff(object sender, EventArgs e)
{
    fpSpread1.HideTouchKeyboard();
}
```

```vbnet
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    FpSpread1.AutoScrollWhenKeyboardShowing = True
End Sub
Private Sub FpSpread1_EditModeOn(sender As Object, e As System.EventArgs) Handles FpSpread1.EditModeOn
    FpSpread1.ShowTouchKeyboard()
End Sub
Private Sub FpSpread1_EditModeOff(sender As Object, e As System.EventArgs) Handles FpSpread1.EditModeOff
    FpSpread1.HideTouchKeyboard()
End Sub
```

## See Also

[Touch Support with the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/tsmain)
[Understanding Touch Messages](/spreadnet/docs/latest/online-win/overview/spwin-devguide/tsmain/tsmessages)
[Using the Touch Menu Bar](/spreadnet/docs/latest/online-win/overview/spwin-devguide/tsmain/tstouchmenu)
[Using Touch Support](/spreadnet/docs/latest/online-win/overview/spwin-devguide/tsmain/tsusing)