Sample Config File
# NOTE: A detailed description of this file format can
# be found at https://radica.gitbook.io/superkey/hotkey-config-file-format
#
# A list of all built-in modifier and literal keywords can
# be found at https://radica.gitbook.io/superkey/hotkey-config-file-format/list-of-modifiers-and-keywords
#
#
# A hotkey is written according to the following rules:
#
# hotkey = <mode> '<' <action> | <mode> @ '<' <action>
#
# mode = 'name of mode' | <mode> ',' <mode>
#
# @ = Superkey will continue running after the hotkey completes
#
# action = <keysym> ':' <action> | <keysym> '->' ':' <command>
# <keysym> ';' <mode> | <keysym> '->' ';' <mode>
#
# keysym = <mod> '-' <key> | <key>
#
# mod = 'modifier keyword' | <mod> '+' <mod>
#
# key = 'single letter or built-in keyword'
#
# action = <command> | <command> -> <parameters>
#
# command = 'eval' | 'exec' | 'viewport_shading' | 'switch_space' | 'cancel'
#
# parameters = for 'eval', any Python string, but typically a Blender operator.
# for 'exec', any Python string assigning a value with the = symbol.
# for 'viewport_shading', the active space must be the 3D Viewport.
# The following parameters are supported:
#
# 'WIREFRAME'
# 'SOLID'
# 'MATERIAL'
# 'RENDERED'
#
# The context changes afterward, so use of `@` is best avoided.
#
# for 'switch_space', one of the supported spaces:
#
# 'VIEW_3D'
# 'IMAGE_EDITOR'
# 'NODE_EDITOR'
# 'SEQUENCE_EDITOR'
# 'CLIP_EDITOR'
# 'DOPESHEET_EDITOR'
# 'GRAPH_EDITOR'
# 'NLA_EDITOR'
# 'TEXT_EDITOR'
# 'CONSOLE'
# 'INFO'
# 'OUTLINER'
# 'PROPERTIES'
# 'FILE_BROWSER'
# 'SPREADSHEET'
# 'PREFERENCES'
#
# for 'cancel', the `-> <parameters>` syntax is unsupported.
#
#
# A mode is declared according to the following rules:
#
# mode_decl = '::' <name> ':' <action> | '::' <name>
#
# name = desired name for this mode
#
# action = <command> -> <parameters>
#
# command = 'config'
#
# The command is run when the mode is made the active mode.
#
# parameters = for 'config', either or both of `border_color` and `border_width`.
# Colors can be in 3- or 6-digit hex RGB format (#fff or #ffffff),
# or one in the supported set of named colors:
#
# red, orange, yellow, green, blue, indigo, violet
#
# Red is the default color if no color is set.
# Give each mode a unique color to easily tell them apart.
#
# The border width is 10 pixels by default if not defined,
# with a minimum of 8 and a max of 50.
#
# Examples: 'border_color=red, border_width=20'
# 'border_color=#0f0, border_width=20'
# 'border_color=#00ff00, border_width=20'
# 'border_color=#00ff00'
# 'border_width=20'
#
#
# Create the 'default' mode (required) and configure it.
:: default : config -> border_color=red, border_width=10
# Create a mode named 'sculpt' with a thin yellow border.
:: sculpt : config -> border_color=#ff0, border_width=5
# From 'default' mode, activate mode 'sculpt'.
default < e ; sculpt
# Toggle X-ray.
default < x : eval -> bpy.ops.view3d.toggle_xray()
# Snap cursor to selected.
default < shift - s : eval -> bpy.ops.view3d.snap_cursor_to_selected()
# Switch 3D Viewport Shading in both default mode and sculpt mode.
default, sculpt < j : viewport_shading -> WIREFRAME
default, sculpt < k : viewport_shading -> SOLID
# Quit Superkey.
default < q : cancel
# Switch the current space to the Image Editor.
default < ctrl + shift - i : switch_space -> IMAGE_EDITOR
# Set object origin to its geometry.
default < o : eval -> bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
# Set object(s) parent.
default < p : eval -> bpy.ops.object.parent_set(type='OBJECT', keep_transform=False)
# Add a cube to the scene.
default < c : eval -> bpy.ops.mesh.primitive_cube_add()
# Activate the Crease brush.
sculpt < c : eval -> bpy.ops.wm.tool_set_by_id(name="builtin_brush.Crease")
# Subdivide and keep Superkey running.
# To subdivide again, tap the key again. Tap Escape to quit Superkey.
default @ < s : eval -> bpy.ops.mesh.subdivide()
# Set the view axis.
default < left : eval -> bpy.ops.view3d.view_axis(type='LEFT')
default < right : eval -> bpy.ops.view3d.view_axis(type='RIGHT')
default < up : eval -> bpy.ops.view3d.view_axis(type='TOP')
default < down : eval -> bpy.ops.view3d.view_axis(type='BOTTOM')
default < comma : eval -> bpy.ops.view3d.view_axis(type='FRONT')
default < slash : eval -> bpy.ops.view3d.view_axis(type='BACK')
default < period : eval -> bpy.ops.view3d.view_selected()
default < quote : eval -> bpy.ops.view3d.view_camera()
# Set Dynamic Topology Refine Method to "Subdivide Edges".
sculpt < a : exec -> bpy.context.tool_settings.sculpt.detail_refine_method = 'SUBDIVIDE'
# Set Dynamic Topology Refine Method to "Collapse Edges".
sculpt < s : exec -> bpy.context.tool_settings.sculpt.detail_refine_method = 'COLLAPSE'
# Set Dynamic Topology Refine Method to "Subdivide Collapse".
sculpt < d : exec -> bpy.context.tool_settings.sculpt.detail_refine_method = 'SUBDIVIDE_COLLAPSE'
# Set Dynamic Topology Detail Size in pixels.
sculpt < 1 : exec -> bpy.context.tool_settings.sculpt.detail_size = 5
sculpt < 2 : exec -> bpy.context.tool_settings.sculpt.detail_size = 7
sculpt < 3 : exec -> bpy.context.tool_settings.sculpt.detail_size = 10
sculpt < 4 : exec -> bpy.context.tool_settings.sculpt.detail_size = 12Last updated