MCPcopy Create free account
hub / github.com/VCVRack/Rack / onHoverKey

Method onHoverKey

src/ui/MenuOverlay.cpp:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47
48void MenuOverlay::onHoverKey(const HoverKeyEvent& e) {
49 OpaqueWidget::onHoverKey(e);
50 if (e.isConsumed())
51 return;
52
53 if (e.action == GLFW_PRESS && e.isKeyCommand(GLFW_KEY_ESCAPE)) {
54 ActionEvent eAction;
55 onAction(eAction);
56 }
57
58 // Consume all keys.
59 // Unfortunately this prevents MIDI computer keyboard from playing while a menu is open, but that might be a good thing for safety.
60 e.consume(this);
61}
62
63
64void MenuOverlay::onAction(const ActionEvent& e) {

Callers

nothing calls this directly

Calls 3

isConsumedMethod · 0.80
isKeyCommandMethod · 0.80
consumeMethod · 0.80

Tested by

no test coverage detected