MCPcopy Create free account
hub / github.com/DISTRHO/DPF / onKeyDown

Function onKeyDown

distrho/src/DistrhoUIVST3.cpp:262–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260 }
261
262 v3_result onKeyDown(const int16_t keychar, const int16_t keycode, const int16_t modifiers)
263 {
264 DISTRHO_SAFE_ASSERT_INT_RETURN(keychar >= 0 && keychar < 0x7f, keychar, V3_FALSE);
265
266 bool special;
267 const uint key = translateVstKeyCode(special, keychar, keycode);
268 d_debug("onKeyDown %d %d %x -> %d %d", keychar, keycode, modifiers, special, key);
269
270 return fUI.handlePluginKeyboardVST(true, special, key,
271 keycode >= 0 ? static_cast<uint>(keycode) : 0,
272 translateVST3Modifiers(modifiers)) ? V3_TRUE : V3_FALSE;
273 }
274
275 v3_result onKeyUp(const int16_t keychar, const int16_t keycode, const int16_t modifiers)
276 {

Callers

nothing calls this directly

Calls 3

translateVstKeyCodeFunction · 0.85
d_debugFunction · 0.85
translateVST3ModifiersFunction · 0.85

Tested by

no test coverage detected