@@ -4075,6 +4075,9 @@ enum ButtonEventType : u8
4075
4075
4076
4076
bool GUIFormSpecMenu::OnEvent (const SEvent& event)
4077
4077
{
4078
+ // WORKAROUND: event.MouseInput.Shift is not implemented for MacOS
4079
+ static thread_local bool is_shift_down = false ;
4080
+
4078
4081
if (event.EventType ==EET_KEY_INPUT_EVENT) {
4079
4082
KeyPress kp (event.KeyInput );
4080
4083
if (event.KeyInput .PressedDown && (
@@ -4084,6 +4087,8 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
4084
4087
return true ;
4085
4088
}
4086
4089
4090
+ is_shift_down = event.KeyInput .Shift ;
4091
+
4087
4092
if (m_client != NULL && event.KeyInput .PressedDown &&
4088
4093
(kp == getKeySetting (" keymap_screenshot" ))) {
4089
4094
m_client->makeScreenshot ();
@@ -4133,6 +4138,9 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
4133
4138
event.MouseInput .isRightPressed () &&
4134
4139
getItemAtPos (m_pointer).i != getItemAtPos (m_old_pointer).i ))) {
4135
4140
4141
+ // WORKAROUND: In case shift was pressed prior showing the formspec
4142
+ is_shift_down |= event.MouseInput .Shift ;
4143
+
4136
4144
// Get selected item and hovered/clicked item (s)
4137
4145
4138
4146
m_old_tooltip_id = -1 ;
@@ -4263,7 +4271,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
4263
4271
else // left
4264
4272
count = s_count;
4265
4273
4266
- if (!event. MouseInput . Shift ) {
4274
+ if (!is_shift_down ) {
4267
4275
// no shift: select item
4268
4276
m_selected_amount = count;
4269
4277
m_selected_dragging = button != BET_WHEEL_DOWN;
0 commit comments