Skip to content

Commit cc66b8b

Browse files
committed
Add extensions/keys page
1 parent 2ccd6df commit cc66b8b

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

customization.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ some file (extensions or script) and installing it from *Edit >
1010
Preferences > Extensions* or *File > Scripts > Open Scripts Folder*:
1111

1212
* [Extensions](extensions.md)
13-
* [Language](language.md)
14-
* [Themes](themes.md)
13+
* [Keys](extensions/keys.md)
14+
* [Language](extensions/language.md)
15+
* [Themes](extensions/themes.md)
1516
* [Scripting](scripting.md)
1617

1718
---

extensions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ file inside: the `package.json` file.
2727

2828
The structure of a `.aseprite-extension` file depends on the kind of extension:
2929

30+
* [Keys](extensions/keys.md)
3031
* [Palettes](extensions/palettes.md)
3132
* [Languages](extensions/languages.md)
3233
* [Themes](extensions/themes.md)

extensions/keys.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Keys
2+
3+
Since **Aseprite v1.2.35** you can create extensions with keyboard
4+
shortcuts. The content of a `.aseprite-extension` file for an
5+
extension with keyboard shorcuts should be something like this:
6+
7+
```
8+
keys-example.aseprite-extension
9+
|
10+
+-- package.json
11+
|
12+
+-- my-keys.aseprite-keys
13+
```
14+
15+
Content of `package.json`:
16+
17+
```
18+
{
19+
"name": "my-keys-example",
20+
"displayName": "My Keys Example",
21+
"description": "Keys to do something",
22+
"version": "1.0",
23+
"author": { "name": "Full Name", "url": "https://twitter.com/your_username_or_homepage_url" },
24+
"categories": [
25+
"Keys"
26+
],
27+
"contributes": {
28+
"keys": [
29+
{ "id": "my-keys", "path": "./my-keys.aseprite-keys" }
30+
]
31+
}
32+
}
33+
```
34+
35+
**Example** content of `my-keys.aseprite-keys` (a file similar to
36+
[user.aseprite-keys](https://www.aseprite.org/docs/files/#useraseprite-keys)
37+
in the [Preferences folder](https://www.aseprite.org/docs/preferences/) that
38+
can be created / exported from [Edit > Keyboard Shortcuts](keyboard-shortcuts.md)):
39+
40+
```
41+
<?xml version="1.0" encoding="utf-8" ?>
42+
<keyboard version="1">
43+
<commands>
44+
<key command="Options" shortcut="J" />
45+
<key command="KeyboardShortcuts" shortcut="K" />
46+
</commands>
47+
</keyboard>
48+
```
49+
50+
---
51+
52+
**SEE ALSO**
53+
54+
[Extensions](extensions.md)

0 commit comments

Comments
 (0)