Keyboard Shortcuts and Operation History
ts-chef does not claim any keyboard shortcut by default. Instead, it exposes normal commands and an open-ended named registry, leaving every key choice to the user.
Register operations and pipelines
Add tschef.shortcuts to user or workspace settings:
"tschef.shortcuts": {
"base64": "To Base64",
"decode-json": "From Base64 | JSON Beautify",
"decrypt-work": "pipeline:Work decrypt",
"repeat": "history:last",
"back": "history:previous",
"forward": "history:next",
"aes-again": "history:3"
}
Each property registers tschef.shortcut.<id> while the extension is active. IDs accept 1–64 letters, numbers, dots, underscores, and hyphens. Up to 1,000 entries are accepted as a safety bound.
Registry values support:
Value |
Meaning |
|---|---|
|
One operation with its normal defaults. |
|
An inline pipeline using standard pipe syntax and arguments. |
|
The current saved or bundled pipeline with that name. |
|
Repeat the newest session-history action. |
|
Move one action older, apply it, and wrap at the end. |
|
Move one action newer, apply it, and wrap at the start. |
|
Apply the third most recent action directly. |
For operations requiring keys or detailed arguments, configure a saved pipeline and reference it with pipeline:<name>, or use pipe argument syntax. Variables such as {{aes-key}} can still be resolved in the selected editor input.
Bind the generated commands
Open Preferences: Open Keyboard Shortcuts (JSON) and bind the generated command ID:
[
{
"key": "ctrl+alt+b",
"command": "tschef.shortcut.base64",
"when": "editorTextFocus",
},
{
"key": "ctrl+alt+left",
"command": "tschef.shortcut.back",
"when": "editorTextFocus",
},
{
"key": "ctrl+alt+right",
"command": "tschef.shortcut.forward",
"when": "editorTextFocus",
},
]
The tschef: Configure Keyboard Shortcuts command opens the relevant JSON files. Registry changes are reloaded without restarting VS Code. tschef.runShortcut can also receive an ID as its command argument or show all configured entries in a picker.
History behavior
Quick Convert, Operations-view actions, recipes, hover conversions, entered pipelines, saved pipelines, and registered shortcuts feed one shared history. The newest original action is offset 1. For example, after AES, DES, then Base64:
history:lastandhistory:1apply Base64;history:2applies DES;history:3applies AES;repeatedly invoking
history:previousstarts before the newest action and cycles DES → AES → Base64 → DES.
Replayed actions are not recorded again. Starting a new original action resets the cycle cursor to the newest entry.
The history is intentionally memory-only and disappears when the extension host stops. This prevents configured arguments such as passwords and encryption keys from being written to storage without explicit consent. Its capacity is controlled by tschef.shortcutHistorySize (default 100, maximum 10,000).
Direct history commands
These commands can be assigned without adding registry aliases:
tschef.repeatLastOperationtschef.cycleOperationHistoryBacktschef.cycleOperationHistoryForwardtschef.repeatOperationFromHistorytschef.clearOperationHistory
Shortcut execution replaces the current selection, or the whole active document when the selection is empty. The source range is snapshotted before asynchronous work; if it changes while the operation runs, replacement is refused.