-
- {key === null
- ? shortcutInitialValue?.toUpperCase()
- : key.toUpperCase()}
+
+ {(key ?? shortcutInitialValue ?? "").split("+").map((k, i) => (
+
+ ))}
diff --git a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx
index d1940588fdde..04df1224e011 100644
--- a/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx
+++ b/src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx
@@ -1,9 +1,11 @@
+import { ColDef } from "ag-grid-community";
import { useEffect, useState } from "react";
import ForwardedIconComponent from "../../../../components/genericIconComponent";
import TableComponent from "../../../../components/tableComponent";
import { Button } from "../../../../components/ui/button";
import { defaultShortcuts } from "../../../../constants/constants";
import { useShortcutsStore } from "../../../../stores/shortcuts";
+import CellRenderShortcuts from "./CellRenderWrapper";
import EditShortcutButton from "./EditShortcutButton";
export default function ShortcutsPage() {
@@ -12,7 +14,7 @@ export default function ShortcutsPage() {
const setShortcuts = useShortcutsStore((state) => state.setShortcuts);
// Column Definitions: Defines the columns to be displayed.
- const colDefs = [
+ const colDefs: ColDef[] = [
{
headerName: "Functionality",
field: "name",
@@ -26,6 +28,7 @@ export default function ShortcutsPage() {
flex: 2,
editable: false,
resizable: false,
+ cellRenderer: CellRenderShortcuts,
},
];
@@ -73,7 +76,6 @@ export default function ShortcutsPage() {
{open && (
{
+ if (index === 0) return key;
+ if (
+ exceptions.includes(key.trim().toLocaleLowerCase()) ||
+ exceptions.includes(array[index - 1].trim().toLocaleLowerCase())
+ )
+ return key;
+
+ return "+" + key;
+ });
+}