hi,
here’s the code I had in v1 for handle middle button on a Button’s widget:
void MyButton::onButton(const event::Button &e) {
if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) {
// fire!
} else if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_MIDDLE) {
// doesn't fire in v2!
}
}
but it seems middle button doesn’t fire anymore in v2? how should I do it in v2? or is it a bug to be reported?
thanks
Autinn
(Nikolai V. Chr.)
December 8, 2021, 8:59am
2
Rack 2 seem to use:
void onButton(const ButtonEvent& e) override {
The ButtonEvent is from ::rack::widget::Widget
nothing change.
is in fact the same class:
using Button = widget::Widget::ButtonEvent;
@Vortico ?
really no one got troubles with middle mouse click in Rack v2?
Middle mouse button (click and drag) does navigating in the Rack, so do not use it in my modules.
subsky
(Goktug Citci)
December 20, 2021, 4:27pm
7
in my case middle mouse button works only when holding CTRL
By Rack V2 nature or your design?
Also on Rack 1, but it did work there… maybe a implicit “deny” by Andrew?
I would say, the scroll event activated by the middle mouse button is now consumed and therefore not available for other events (but maybe I’m wrong here).
1 Like
subsky
(Goktug Citci)
December 22, 2021, 8:26am
11
by rack 2 nature i guess, on rack 1 middle mouse dragging works fine
1 Like
It seems that MIDDLE button is disabled everywhere?
What for example if I want to zoom in/out a envelope display? In 1.x, I just middle click the display e move the mouse. Here, it seems disabled.
Is there a way to enable it with some fancy parameter? else, dismissing this feature is a big lack…
[Strg] + [Mouse Wheel] does zoom … or [Strg] + [+] and [Strg] + [-]
On the German keyboard, the English CTRL (Control) key is labeled as STRG (Steuerung means Control).
2 Likes