Studio on Mac loses modifier key input when something is selected in explorer

I’m using studio on a MacBook Pro. There are two bugs that I’ve noticed, and they happen with complete consistency on this computer, but never on my windows desktop.

The first bug is that the command keys, which are supposed to be mapped to Enum.KeyCode.[Left/Right]Super, actually trigger Enum.KeyCode.LeftControl ONLY. Even the right command key triggers the LeftControl enum. These are the values sent to UserInputService.InputBegan and ContextActionService.BindAction.

The second bug is that all input to modifier keys is stopped when anything is selected in explorer. These are the alt, shift, control, and command keys. To reproduce this, all I am doing is opening up a new place file on a fresh install of studio with only this plugin script in the local plugins folder.

Input listener plugin

print("Listener listening")

local UIS = game:GetService("UserInputService")

local gui = Instance.new("ScreenGui", game:GetService("CoreGui"))
local label = Instance.new("TextLabel", gui)
label.Position = UDim2.new(.5, 0, .5, 0)
label.Size = UDim2.new(0, 0, 0, 0)
label.BackgroundTransparency = 1
label.FontSize = Enum.FontSize.Size36

game:GetService("RunService").RenderStepped:connect(function()
	label.Text = tostring(UIS:IsKeyDown(Enum.KeyCode.LeftShift))
end)

Simply change the key code in the render step code to any modifier (shift, alt, control) and open up a brand new place file in Studio. Test out the key that was placed in the render step code with nothing selected in the explorer, and it properly displays true when the key is held down. Once something is selected and the game window is refocused, it ceases to work, always displaying false even when the key is held down.

This only happens to me on my MacBook Pro, not on my windows desktop.

Specs

The reason this is such a big issue is because it removes the functionality of any plugins to listen to modifier keys while objects are selected. HUGE BUMMER

I am happy to provide more info if needed. Cheers!

out of curiosity, do the key issues carry over to when you play a game via the client on Mac?

The keys not showing up when the window is not focused is on purpose. UserInputService does have the ability to track window focus events fyi.

It’s not an issue with the client because it only occurs when I select something in explorer, and there’s no explorer on the client.

Maybe you misread? I know that the keys don’t register when the game window is not focused, but this issue occurs while the window is focused :slight_smile:

how about the key codes in the Mac client? Are they also messed up like studio?

the other issue is a bit harder to solve, I guess maybe we could stop the window from being defocused…