Keyboard

Navigation:  Library > Signal > Sources >

Keyboard

Previous pageReturn to chapter overviewNext page

Library

Signal\Sources

Use

Domains: Discrete, Continuous. Size: 1-D. Allowed in: Block Diagrams.

Description

This model uses the keyboard.dll function to get a keyboard input. The keyboard input is an integer number and displayed by the output signal keycode. The default model has four additional output signals with a default value of zero and a value of 1 when the keyboard arrows are pressed.

Tips

Inspect the contents of the model and change it to read other keyboard inputs.
Open the Example model Examples/2D mechanics/ScaraRobotKeyboard to see a demonstration of the keyboard input.
Use attempting real-time simulation when using keyboard inputs to prevent the simulation from being calculated to quickly.

Interface

Outputs

Description

left

right

up

down

keycode

left keyboard arrow pressed

right keyboard arrow pressed

up keyboard arrow pressed

down keyboard arrow pressed

number of the keyboard input

Parameters

 

Scale

Various scaling parameters