Add Ctrl + 1 and Ctrl + 2 shortcuts for zoom

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-01-28 21:36:09 +00:00
parent 77ce5cc701
commit 377636fa7a
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -314,10 +314,14 @@ void Scene::onHoverKey(const HoverKeyEvent& e) {
APP->scene->rackScroll->setZoom(std::pow(2.f, zoom));
e.consume(this);
}
if ((e.keyName == "0") && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) {
if ((e.keyName == "0" || e.keyName == "1") && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) {
APP->scene->rackScroll->setZoom(1.f);
e.consume(this);
}
if (e.keyName == "2" && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) {
APP->scene->rackScroll->setZoom(2.f);
e.consume(this);
}
if (e.key == GLFW_KEY_F1 && (e.mods & RACK_MOD_MASK) == 0) {
system::openBrowser("https://vcvrack.com/manual/");
e.consume(this);