@@ -34,9 +34,9 @@
selected:
isSelected && currentIndex === getActionIndex(index, 'top'),
}" :ref="(el) => {
- if (currentIndex === getActionIndex(index, 'top'))
- setSelectedElement(el);
- }
+ if (currentIndex === getActionIndex(index, 'top'))
+ setSelectedElement(el);
+ }
">
@@ -60,9 +60,9 @@
isSelected &&
currentIndex === getActionIndex(index, 'specific'),
}" :ref="(el) => {
- if (currentIndex === getActionIndex(index, 'specific'))
- setSelectedElement(el);
- }
+ if (currentIndex === getActionIndex(index, 'specific'))
+ setSelectedElement(el);
+ }
">
@@ -85,9 +85,9 @@
selected:
isSelected && currentIndex === getActionIndex(index, 'bottom'),
}" :ref="(el) => {
- if (currentIndex === getActionIndex(index, 'bottom'))
- setSelectedElement(el);
- }
+ if (currentIndex === getActionIndex(index, 'bottom'))
+ setSelectedElement(el);
+ }
" :style="action.color ? { color: action.color } : {}">
@@ -124,7 +124,6 @@ import Bin from "./Icons/Bin.vue";
import Pen from "./Icons/Pen.vue";
import T from "./Icons/T.vue";
import Board from "./Icons/Board.vue";
-import Cube from "./Icons/Cube.vue";
import Open from "./Icons/Open.vue";
import Globe from "./Icons/Globe.vue";
import Zip from "./Icons/Zip.vue";
@@ -149,7 +148,7 @@ const menuRef = ref
(null);
const scrollbarsRef = ref | null>(null);
-const { handleAction, isProcessing } = useActions();
+const { handleAction } = useActions();
const SCROLL_PADDING = 8;
@@ -177,6 +176,7 @@ const props = defineProps<{
const emit = defineEmits<{
(e: "close"): void;
+ (e: "toggle"): void;
(e: "action", action: string, item?: HistoryItem): void;
}>();
@@ -206,7 +206,7 @@ const topActions = computed((): ActionItem[] => [
}
});
}
- } : Cube,
+ } : undefined,
},
{
title: "Copy to Clipboard",
@@ -502,6 +502,46 @@ const setupKeyboardHandlers = () => {
},
{ priority: $keyboard.PRIORITY.HIGH }
);
+
+ $keyboard.on(
+ "actionsMenu",
+ [$keyboard.Key.LeftControl, $keyboard.Key.K],
+ (event) => {
+ event.preventDefault();
+ emit("toggle");
+ },
+ { priority: $keyboard.PRIORITY.HIGH }
+ );
+
+ $keyboard.on(
+ "actionsMenu",
+ [$keyboard.Key.RightControl, $keyboard.Key.K],
+ (event) => {
+ event.preventDefault();
+ emit("toggle");
+ },
+ { priority: $keyboard.PRIORITY.HIGH }
+ );
+
+ $keyboard.on(
+ "actionsMenu",
+ [$keyboard.Key.MetaLeft, $keyboard.Key.K],
+ (event) => {
+ event.preventDefault();
+ emit("toggle");
+ },
+ { priority: $keyboard.PRIORITY.HIGH }
+ );
+
+ $keyboard.on(
+ "actionsMenu",
+ [$keyboard.Key.MetaRight, $keyboard.Key.K],
+ (event) => {
+ event.preventDefault();
+ emit("toggle");
+ },
+ { priority: $keyboard.PRIORITY.HIGH }
+ );
};
const selectNext = () => {
@@ -586,6 +626,13 @@ const handleSearchKeydown = (event: KeyboardEvent) => {
) {
return;
}
+
+ if (event.key.toLowerCase() === "k" && (event.ctrlKey || event.metaKey)) {
+ event.preventDefault();
+ event.stopPropagation();
+ emit("toggle");
+ return;
+ }
event.stopPropagation();
};
diff --git a/components/Icons/Cube.vue b/components/Icons/Cube.vue
deleted file mode 100644
index b987711..0000000
--- a/components/Icons/Cube.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
\ No newline at end of file