Main Content

Keyboard Read

Receive key presses from keyboard of host computer and output ASCII code

Add-On Required: This feature requires the Simulink Support Package for Parrot Minidrones add-on.

  • Keyboard Read block

Simulink Support Package for Parrot Minidrones


The Keyboard Read block receives the key presses for any basic character on the keyboard of the host computer, and outputs the corresponding ASCII code of the character.

This block can be used in a Simulink® model created using Simulink Support Package for Parrot® Minidrones, to perform real-time flight control of Parrot minidrone using the keyboard keys.


Only one Keyboard Read block is allowed in the entire Simulink model. Any number of connections can be derived from the output signal of this block.

In the Simulink model, you can connect multiple Compare to Constant blocks to the output of the Keyboard Read block to map the different ASCII codes.

After the Simulink model has started running on the drone, you can use the Keyboard Control Panel on the Flight Control Interface to type the basic characters that you have mapped to the control logic.



expand all

The supported basic characters include all printable characters – letters, numbers, punctuation marks, and common symbols present on the keyboard.

Data Types: uint8


expand all

Enter the time interval at which to receive data.

When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.

Version History

Introduced in R2019a