So for running in my game I set the keycode to ctrl and I wanted to also have it set to fn so its easier for macintosh players but a “fn” keycode is nowhere to be seen. How do I detect the player pressing the “fn” key if possible?
Do you want to do something when it is clicked? If yes then use ContextActionService
Is there any way you can detect it via userinputservice?
For UIS, I haven’t been able to find any ‘Fn’ on Enum.KeyCode
, you may just have to change it to a different key?
I dont think u can use that. Not every computer has a FN key.
You can’t use the fn key, it’s bound to the bios and doesn’t send a key input key code. When you use the fn key with another key, the computer sends the programs a different key code.
The fn key is a modifier, which just changes the key code returned by a key pressed.
What you could try doing is just using the left/right alt key instead Its right next the the function, I would see whats so wrong about using it either.
Dont know why you would want to use the function key in the first place though?
To fix your problem, just simply use another key.
local UIS = game:GetService('UserInputService')
UIS.InputBegan:Connect(function(k)
if k.KeyCode == Enum.KeyCode.Key then --'Key' should be your new key.
--Code Here
end
end)
I believe the Function key is
enum KeyCode {
// Skipping rest
Mode;
};