| 1 |
{ |
| 2 |
"apiVersion": 3, |
| 3 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 4 |
"name": "blockenberg/keyboard-shortcut", |
| 5 |
"version": "1.0.0", |
| 6 |
"title": "Keyboard Shortcuts", |
| 7 |
"category": "bkbg-dev", |
| 8 |
"icon": "editor-code", |
| 9 |
"description": "Display a keyboard shortcut reference sheet with Mac and Windows variants, categories, and rich styling.", |
| 10 |
"keywords": [ |
| 11 |
"keyboard", |
| 12 |
"shortcut", |
| 13 |
"hotkey", |
| 14 |
"keys", |
| 15 |
"cheat sheet", |
| 16 |
"reference" |
| 17 |
], |
| 18 |
"textdomain": "blockenberg", |
| 19 |
"editorScript": "bkbg-keyboard-shortcut-editor", |
| 20 |
"editorStyle": "bkbg-keyboard-shortcut-style", |
| 21 |
"style": "bkbg-keyboard-shortcut-style", |
| 22 |
"viewScript": "bkbg-keyboard-shortcut-frontend", |
| 23 |
"supports": { |
| 24 |
"html": false, |
| 25 |
"anchor": true, |
| 26 |
"className": true, |
| 27 |
"align": [ |
| 28 |
"wide", |
| 29 |
"full" |
| 30 |
] |
| 31 |
}, |
| 32 |
"attributes": { |
| 33 |
"sheetTitle": { |
| 34 |
"type": "string", |
| 35 |
"default": "Keyboard Shortcuts" |
| 36 |
}, |
| 37 |
"showTitle": { |
| 38 |
"type": "boolean", |
| 39 |
"default": true |
| 40 |
}, |
| 41 |
"platform": { |
| 42 |
"type": "string", |
| 43 |
"default": "both" |
| 44 |
}, |
| 45 |
"sections": { |
| 46 |
"type": "array", |
| 47 |
"default": [ |
| 48 |
{ |
| 49 |
"heading": "General", |
| 50 |
"shortcuts": [ |
| 51 |
{ |
| 52 |
"description": "Save file", |
| 53 |
"macKeys": "⌘ S", |
| 54 |
"winKeys": "Ctrl S" |
| 55 |
}, |
| 56 |
{ |
| 57 |
"description": "Undo", |
| 58 |
"macKeys": "⌘ Z", |
| 59 |
"winKeys": "Ctrl Z" |
| 60 |
}, |
| 61 |
{ |
| 62 |
"description": "Redo", |
| 63 |
"macKeys": "⌘ ⇧ Z", |
| 64 |
"winKeys": "Ctrl Y" |
| 65 |
}, |
| 66 |
{ |
| 67 |
"description": "Cut", |
| 68 |
"macKeys": "⌘ X", |
| 69 |
"winKeys": "Ctrl X" |
| 70 |
}, |
| 71 |
{ |
| 72 |
"description": "Copy", |
| 73 |
"macKeys": "⌘ C", |
| 74 |
"winKeys": "Ctrl C" |
| 75 |
}, |
| 76 |
{ |
| 77 |
"description": "Paste", |
| 78 |
"macKeys": "⌘ V", |
| 79 |
"winKeys": "Ctrl V" |
| 80 |
}, |
| 81 |
{ |
| 82 |
"description": "Select all", |
| 83 |
"macKeys": "⌘ A", |
| 84 |
"winKeys": "Ctrl A" |
| 85 |
} |
| 86 |
] |
| 87 |
}, |
| 88 |
{ |
| 89 |
"heading": "Navigation", |
| 90 |
"shortcuts": [ |
| 91 |
{ |
| 92 |
"description": "Go to file", |
| 93 |
"macKeys": "⌘ P", |
| 94 |
"winKeys": "Ctrl P" |
| 95 |
}, |
| 96 |
{ |
| 97 |
"description": "Command palette", |
| 98 |
"macKeys": "⌘ ⇧ P", |
| 99 |
"winKeys": "Ctrl ⇧ P" |
| 100 |
}, |
| 101 |
{ |
| 102 |
"description": "Toggle sidebar", |
| 103 |
"macKeys": "⌘ B", |
| 104 |
"winKeys": "Ctrl B" |
| 105 |
}, |
| 106 |
{ |
| 107 |
"description": "Toggle terminal", |
| 108 |
"macKeys": "⌃ `", |
| 109 |
"winKeys": "Ctrl `" |
| 110 |
}, |
| 111 |
{ |
| 112 |
"description": "Split editor", |
| 113 |
"macKeys": "⌘ \\", |
| 114 |
"winKeys": "Ctrl \\" |
| 115 |
} |
| 116 |
] |
| 117 |
}, |
| 118 |
{ |
| 119 |
"heading": "Editing", |
| 120 |
"shortcuts": [ |
| 121 |
{ |
| 122 |
"description": "Move line up / down", |
| 123 |
"macKeys": "⌥ ↑ / ↓", |
| 124 |
"winKeys": "Alt ↑ / ↓" |
| 125 |
}, |
| 126 |
{ |
| 127 |
"description": "Copy line up / down", |
| 128 |
"macKeys": "⇧ ⌥ ↑ / ↓", |
| 129 |
"winKeys": "⇧ Alt ↑ / ↓" |
| 130 |
}, |
| 131 |
{ |
| 132 |
"description": "Delete line", |
| 133 |
"macKeys": "⌘ ⇧ K", |
| 134 |
"winKeys": "Ctrl ⇧ K" |
| 135 |
}, |
| 136 |
{ |
| 137 |
"description": "Add cursor above / below", |
| 138 |
"macKeys": "⌥ ⌘ ↑ / ↓", |
| 139 |
"winKeys": "Ctrl Alt ↑ / ↓" |
| 140 |
}, |
| 141 |
{ |
| 142 |
"description": "Quick fix", |
| 143 |
"macKeys": "⌘ .", |
| 144 |
"winKeys": "Ctrl ." |
| 145 |
} |
| 146 |
] |
| 147 |
} |
| 148 |
] |
| 149 |
}, |
| 150 |
"fontSize": { |
| 151 |
"type": "number", |
| 152 |
"default": 14 |
| 153 |
}, |
| 154 |
"titleTypo": { |
| 155 |
"type": "object", |
| 156 |
"default": {} |
| 157 |
}, |
| 158 |
"headingFontSize": { |
| 159 |
"type": "number", |
| 160 |
"default": 12 |
| 161 |
}, |
| 162 |
"keyFontSize": { |
| 163 |
"type": "number", |
| 164 |
"default": 12 |
| 165 |
}, |
| 166 |
"lineHeight": { |
| 167 |
"type": "number", |
| 168 |
"default": 160 |
| 169 |
}, |
| 170 |
"borderRadius": { |
| 171 |
"type": "number", |
| 172 |
"default": 12 |
| 173 |
}, |
| 174 |
"keyRadius": { |
| 175 |
"type": "number", |
| 176 |
"default": 6 |
| 177 |
}, |
| 178 |
"bgColor": { |
| 179 |
"type": "string", |
| 180 |
"default": "#ffffff" |
| 181 |
}, |
| 182 |
"borderColor": { |
| 183 |
"type": "string", |
| 184 |
"default": "#e5e7eb" |
| 185 |
}, |
| 186 |
"titleColor": { |
| 187 |
"type": "string", |
| 188 |
"default": "#111827" |
| 189 |
}, |
| 190 |
"headingBg": { |
| 191 |
"type": "string", |
| 192 |
"default": "#f8fafc" |
| 193 |
}, |
| 194 |
"headingColor": { |
| 195 |
"type": "string", |
| 196 |
"default": "#374151" |
| 197 |
}, |
| 198 |
"headingBorderColor": { |
| 199 |
"type": "string", |
| 200 |
"default": "#e5e7eb" |
| 201 |
}, |
| 202 |
"descColor": { |
| 203 |
"type": "string", |
| 204 |
"default": "#374151" |
| 205 |
}, |
| 206 |
"keyBg": { |
| 207 |
"type": "string", |
| 208 |
"default": "#f1f5f9" |
| 209 |
}, |
| 210 |
"keyBorderColor": { |
| 211 |
"type": "string", |
| 212 |
"default": "#cbd5e1" |
| 213 |
}, |
| 214 |
"keyColor": { |
| 215 |
"type": "string", |
| 216 |
"default": "#1e293b" |
| 217 |
}, |
| 218 |
"macAccentColor": { |
| 219 |
"type": "string", |
| 220 |
"default": "#6366f1" |
| 221 |
}, |
| 222 |
"winAccentColor": { |
| 223 |
"type": "string", |
| 224 |
"default": "#0ea5e9" |
| 225 |
}, |
| 226 |
"separatorColor": { |
| 227 |
"type": "string", |
| 228 |
"default": "#f1f5f9" |
| 229 |
} |
| 230 |
} |
| 231 |
} |
| 232 |
|