#cp.apple.commandeditor

Functions to control and manage Apple's Command Editor - used in Final Cut Pro, Motion and Compressor.


#API Overview

Constants - Useful values which cannot be changed

Functions - API calls offered directly by the extension


#API Documentation

#Constants

Signaturecp.apple.commandeditor.padKeys -> table
TypeConstant
DescriptionList of number keys on the number pad. Also mapped with the key name set to true for lookup purposes.
NotesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 25

Signaturecp.apple.commandeditor.supportedModifiers -> table
TypeConstant
DescriptionThe list of supported modifiers
NotesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 35

#Functions

Signaturecp.apple.commandeditor.characterStringToKeyCode() -> string
TypeFunction
DescriptionTranslate Keyboard Character Strings from Command Set Format into Hammerspoon Format.
Parameters
  • input - Character String
Returns
  • Keycode as String or ""
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 79

Signaturecp.apple.commandeditor.keypadCharacterToKeyCode() -> string
TypeFunction
DescriptionTranslate Keyboard Keypad Character Strings from Command Set Format into Hammerspoon Format.
Parameters
  • input - Character String
Returns
  • string or nil
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 93

Signaturecp.apple.commandeditor.modifierMaskToModifiers() -> table
TypeFunction
DescriptionTranslate Keyboard Modifiers from Apple's Property List Format into Hammerspoon Format.
Parameters
  • value - Modifiers String
Returns
  • A table of modifier strings.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 155

Signaturecp.apple.commandeditor.modifierMatch(inputA, inputB) -> boolean
TypeFunction
DescriptionCompares two modifier tables.
Parameters
  • inputA - table of modifiers
  • inputB - table of modifiers
Returns
  • true if there's a match otherwise false
Notes
  • This function only takes into account 'ctrl', 'alt', 'cmd', 'shift'.
ExamplesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 128

Signaturecp.apple.commandeditor.shortcutsFromCommandSet(id, commandSet) -> table
TypeFunction
DescriptionGets a specific command from a specified Command Set and returns a table of Shortcuts.
Parameters
  • id - The ID of the command you want to get.
  • commandSet - A table containing an entire Command Set.
Returns
  • A table of shortcuts for a specific command.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 187

Signaturecp.apple.commandeditor.translateModifiers() -> table
TypeFunction
DescriptionTranslate Keyboard Modifiers from Command Set Format into Hammerspoon Format.
Parameters
  • input - Modifiers String
Returns
  • table
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/commandeditor/init.lua line 110