ButtonDevice.SetKeyNumber
Skip to content
mnscript
ButtonDevice.SetKeyNumber(number) 

Description ​

Sets the buttons key number (See https://wiki.facepunch.com/gmod/Enums/KEY)

Arguments ​

number - The key number to set

Example ​

msc
using Device;

ButtonDevice device = Device.FindButton("MyButton");
device.SetNumpadKey(38); // 38 Is 'Numpad 1' keyboard button