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

Function getKeyCommandName

src/widget/event.cpp:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54std::string getKeyCommandName(int key, int mods) {
55 std::string modsName;
56 if (mods & RACK_MOD_CTRL) {
57#if defined ARCH_MAC
58 modsName += "⌘";
59#else
60 modsName += string::translate("key.ctrl");
61#endif
62 modsName += "+";
63 }
64 if (mods & GLFW_MOD_SHIFT) {
65 modsName += string::translate("key.shift");
66 modsName += "+";
67 }
68 if (mods & GLFW_MOD_ALT) {
69 modsName += string::translate("key.alt");
70 modsName += "+";
71 }
72 return modsName + getKeyName(key);
73}
74
75
76bool Widget::KeyBaseEvent::isKeyCommand(int key, int mods) const {

Callers 13

appendContextMenuMethod · 0.85
onActionMethod · 0.85
getTipInfosFunction · 0.85
createContextMenuMethod · 0.85
createContextMenuMethod · 0.85
createContextMenuMethod · 0.85
onActionMethod · 0.85
onActionMethod · 0.85
onActionMethod · 0.85
onActionMethod · 0.85
onActionMethod · 0.85

Calls 2

translateFunction · 0.85
getKeyNameFunction · 0.85

Tested by

no test coverage detected