Sublime Forum

How to define self define keybinds with some no predefine command?


I want to define a keybinding to
Open in containing folder
Browse Package
and so on so forth.
but do not know how to add it in keybind file.
Is there someone how to define?Thanks!
here is an example define word_wrap to F4.

        "keys": ["f4"],
        "command": "toggle_setting",
                "setting": "word_wrap"

OK,I define a new command and bind it to a hotkey solve it.

import sublime
import sublime_plugin
import os
class opencontainCommand(sublime_plugin.TextCommand):
	def run(self,edit):
		# window = self.window
		dir_path = os.path.dirname(file_name)
        # sublime.set_clipboard(dir_path)


{ "keys": ["shift+alt+f12"], "command": "opencontain"},