diff --git a/assets/icons/drag-vertical-dark.svg b/assets/icons/drag-vertical-dark.svg
new file mode 100644
index 0000000..a425050
--- /dev/null
+++ b/assets/icons/drag-vertical-dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/drag-vertical-light.svg b/assets/icons/drag-vertical-light.svg
new file mode 100644
index 0000000..3d785fa
--- /dev/null
+++ b/assets/icons/drag-vertical-light.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/electron/config.js b/electron/config.js
index a306131..0436060 100644
--- a/electron/config.js
+++ b/electron/config.js
@@ -25,12 +25,15 @@ const schema = {
"keymap": { "enum": ["default", "emacs"], default:"default" },
"emacsMetaKey": { "enum": [null, "alt", "meta"], default: null },
"keyBindings": {
- "type": "object",
- "propertyNames": {
- "type": "string"
- },
- "additionalProperties": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": ["key", "command"],
+ "properties": {
+ "key": { "type": "string" },
+ "command": { "type": "string" }
+ },
+ "additionalProperties": false
}
},
@@ -71,7 +74,7 @@ const defaults = {
settings: {
keymap: "default",
emacsMetaKey: isMac ? "meta" : "alt",
- keyBindings: {},
+ keyBindings: [],
showLineNumberGutter: true,
showFoldGutter: true,
autoUpdate: true,
diff --git a/package-lock.json b/package-lock.json
index 60cd913..d635f9a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,8 @@
"electron-log": "^5.0.1",
"fuzzysort": "^3.0.2",
"pinia": "^2.1.7",
- "semver": "^7.6.3"
+ "semver": "^7.6.3",
+ "vuedraggable": "^4.1.0"
},
"devDependencies": {
"@codemirror/autocomplete": "^6.11.1",
@@ -5565,6 +5566,12 @@
"npm": ">= 3.0.0"
}
},
+ "node_modules/sortablejs": {
+ "version": "1.14.0",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz",
+ "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==",
+ "license": "MIT"
+ },
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@@ -6472,6 +6479,18 @@
"typescript": "*"
}
},
+ "node_modules/vuedraggable": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-4.1.0.tgz",
+ "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
+ "license": "MIT",
+ "dependencies": {
+ "sortablejs": "1.14.0"
+ },
+ "peerDependencies": {
+ "vue": "^3.0.1"
+ }
+ },
"node_modules/w3c-keyname": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
diff --git a/package.json b/package.json
index e88ff2b..4a45b58 100644
--- a/package.json
+++ b/package.json
@@ -84,6 +84,7 @@
"electron-log": "^5.0.1",
"fuzzysort": "^3.0.2",
"pinia": "^2.1.7",
- "semver": "^7.6.3"
+ "semver": "^7.6.3",
+ "vuedraggable": "^4.1.0"
}
}
diff --git a/src/components/settings/KeyBindRow.vue b/src/components/settings/KeyBindRow.vue
index 64d8110..f4e304d 100644
--- a/src/components/settings/KeyBindRow.vue
+++ b/src/components/settings/KeyBindRow.vue
@@ -4,7 +4,7 @@
"keys",
"command",
"isDefault",
- "isOverridden",
+ "source",
],
computed: {
@@ -19,9 +19,9 @@
-
+
@@ -57,6 +60,19 @@
.unbound
font-style: italic
color: #999
+ &.drag-handle
+ width: 24px
+ padding: 0
+ cursor: ns-resize
+ background-color: rgba(0,0,0, 0.02)
+ background-size: 20px
+ background-repeat: no-repeat
+ background-position: center center
+ background-image: url(@/assets/icons/drag-vertical-light.svg)
+
+ +dark-mode
+ background-color: rgba(0,0,0, 0.08)
+ background-image: url(@/assets/icons/drag-vertical-dark.svg)
button
padding: 0 10px
height: 22px
diff --git a/src/components/settings/KeyboardBindings.vue b/src/components/settings/KeyboardBindings.vue
index a4a584e..81adfe8 100644
--- a/src/components/settings/KeyboardBindings.vue
+++ b/src/components/settings/KeyboardBindings.vue
@@ -1,5 +1,6 @@
@@ -82,19 +88,41 @@
- {{ isDefault ? "Heynote" : "User" }}
+ {{ source }}
@@ -37,6 +37,9 @@
+
+
+
Source | Key | Command |
---|