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

Description ​

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

Arguments ​

number - The key number to set

Example ​

msc
using Device;

// Finds a numpad trigger with the name "My Numpad Trigger" and sets the key to 38 (See https://wiki.facepunch.com/gmod/Enums/KEY)
NumpadTriggerDevice device = Device.FindNumpadTrigger("My Numpad Trigger");
device.SetKeyNumber(38); // 38 Is 'Numpad 1' keyboard button