Sublime Forum

Key Binding Help

#1

hi guys,

need help on this. i want to bind my F8 key to build also but targetting a specific build system, i dont know what arguments to pass.

{ “keys”: “f7”], “command”: “build” },
{ “keys”: “f8”], “command”: “build”, “args”: },

thanks,
carlos

0 Likes

#2

or is this not possible?

0 Likes

#3

{ “keys”: “ctrl+f7”], “command”: “set_setting”, “args”: {“setting”: “build_system”, “value”: “Packages/User/KioskCompile.sublime-build”} },
{ “keys”: “ctrl+f8”], “command”: “set_setting”, “args”: {“setting”: “build_system”, “value”: “Packages/User/KioskADL.sublime-build”} },

tried this one but doesnt work sob. :s

0 Likes

#4

With the build system that was introduced a few versions ago, you can create variants which can be accessed via the command palette. For more information: docs.sublimetext.info/en/latest/ … stems.html

Now, I haven’t tested this, but it looks like you should be able to bind keys to execute specific variants. For example, this is from the default keybindings:

{ "keys": "ctrl+shift+b"], "command": "build", "args": {"variant": "Run"} },

Hope this helps,
Alex

0 Likes