Skip to main content

IMPORTS

The <IMPORTS> section is where you import the Importable functions. To learn how the import system works, visit this page, and for more about what Importable functions are and how to define them.

Here's an example of an Importable function and importing and using it:

dir
├── setHoldToSum.js
└── test.simkey
function setHoldToSum(INFO, first, second) {
// Setting hold delay to the sum of first and second
INFO.DEF[0] = first + second
}

module.exports = { FUNCTION: setHoldToSum, TAKES: { PARAMS: "[NUM, NUM]" }}
<IMPORTS>
@set_hold_to_sum ./setHoldToSum # Imports function above #

<MACRO>
@set_hold_to_sum [5, 4] # Sets hold delay to 5 + 4 = 9 #