MCPcopy Create free account
hub / github.com/dartsim/dart / keyboard

Method keyboard

tutorials/tutorial_biped/main.cpp:160–180  ·  view source on GitHub ↗

Handle keyboard input

Source from the content-addressed store, hash-verified

158
159 /// Handle keyboard input
160 void keyboard(unsigned char key, int x, int y) override
161 {
162 switch (key) {
163 case ',':
164 mForceCountDown = default_countdown;
165 mPositiveSign = false;
166 break;
167 case '.':
168 mForceCountDown = default_countdown;
169 mPositiveSign = true;
170 break;
171 case 'a':
172 mController->changeWheelSpeed(default_speed_increment);
173 break;
174 case 's':
175 mController->changeWheelSpeed(-default_speed_increment);
176 break;
177 default:
178 SimWindow::keyboard(key, x, y);
179 }
180 }
181
182 void timeStepping() override
183 {

Callers

nothing calls this directly

Calls 1

changeWheelSpeedMethod · 0.45

Tested by

no test coverage detected