Skip to main content Skip to footer

How to use a hardware keyboard with FlexGrid

One of the largest additions to Xuni in 2016 v3 is the ability to use a hardware keyboard with our FlexGrid control. This oft requested feature allows you to connect a bluetooth keyboard to your iOS or Android device to navigate through and edit the data in your grid. The keystrokes are influenced by the mobile versions of Excel and Numbers so they should have a familiar feel. We've also improved our Clipboard support to make copying data between cells easier, and pasting it into other applications better. Using a keyboard with FlexGrid is easy and automatic. If your user has paired a keyboard with his or her device, he should automatically gain access to all of the keyboard functions without any additional code. A full list of keyboard commands is below.

Key List

Keystroke

Description/Purpose

Ctrl+C

Copies the selected text.

Ctrl+X

Cuts the selected text.

Ctrl+V

Pastes the copied text.

F2 (Android)

Enters the edit mode.

Option Enter (iOS)

Enters the edit mode.

Enter/Return

Leaves the edit mode.

Left

Navigates cell selection towards the left.

Right

Navigates cell selection towards the right.

Up

Navigates the cell selection upward.

Down

Navigates the cell selection downward.

Shift+Left

Expands column range towards the left or decreases column range based on the context. If range has already expanded to right, this will gradually decrease range selection down to one column. After this single column threshold is hit, it will then expand the selection to the left if it continues to be pressed after this.

Shift+Right

Expands column range towards the right or decreases column range based on the context. If range has already expanded to left, this will gradually decrease range selection down to one column. After this single column threshold is hit, it will then expand the selection to the right if it continues to be pressed after this.

Shift+Up

Expands row range upwards or decreases row range based on the context. If range has already expanded downwards, this will gradually decrease range selection to one row. After this single row threshold is hit, it will then expand the selection to the upwards if it continues to be pressed after this.

Shift+Down

Expands row range downwards or decreases row range based on the context. If range has already expanded upwards, this will gradually decrease range selection to one row. After this single row threshold is hit, it will then expand the selection to the downwards if it continues to be pressed after this.

Selection

In this first iteration of keyboard support, the selection mode dictates how the keyboard navigation and selection behaves. This means that setting SelectionMode = None will disable keyboard navigation for the grid. Cell, CellRange, Row, and RowRange all have slightly different behaviors. Cell Cell CellRange CellRange Row Row RowRange RowRange

Clipboard support

We've also improved our clipboard support so that it's easier to copy and paste multiple cells of data, whether a whole row or some type of cell range. This also makes it easier to copy data from your grid and paste it into other apps, which can be useful if you want to quickly share data in a text, email, or another app. The are some subtle enhancements to the previous control behavior such as the ability to copy a boolean checkbox from the grid and paste it elsewhere as a true or false value.

Future Plans

We'll likely expand on our keyboard support in future releases to gradually fill in some other keystrokes and generally improve editing and navigation. We'd like to eventually add a notion of currency to the grid to support the scenario where selection and current cell are two separate things.

MESCIUS inc.

comments powered by Disqus