Skip to content

Commit d333ca6

Browse files
committed
fix(web): update keyboard shortcut for event conversion
1 parent 7b3a72d commit d333ca6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/web/src/views/Forms/EventForm/EventForm.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test("start date picker opens and then closes when clicking the end input", asyn
4343
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
4444
});
4545

46-
test("should call onConvert when meta+shift+< keyboard shortcut is used", async () => {
46+
test("should call onConvert when meta+< keyboard shortcut is used", async () => {
4747
const sampleEvent: Schema_Event = {
4848
_id: "event123",
4949
title: "Test Event for Hotkey",
@@ -74,8 +74,8 @@ test("should call onConvert when meta+shift+< keyboard shortcut is used", async
7474
expect(screen.getByRole("form")).toBeInTheDocument();
7575

7676
await act(async () => {
77-
// Simulate pressing Meta, then 'K', then releasing them
78-
await userEvent.keyboard("{Meta>}{K}{/Meta}");
77+
// Simulate pressing Meta, then '<', then releasing them
78+
await userEvent.keyboard("{Meta>}{<}{/Meta}");
7979
});
8080

8181
expect(mockOnConvert).toHaveBeenCalledTimes(1);

packages/web/src/views/Forms/EventForm/EventForm.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const EventForm: React.FC<FormProps> = ({
141141
e.stopPropagation();
142142
}
143143

144-
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k") {
144+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "<") {
145145
e.preventDefault();
146146
}
147147
};
@@ -208,7 +208,7 @@ export const EventForm: React.FC<FormProps> = ({
208208
};
209209

210210
useHotkeys(
211-
"meta+k",
211+
"meta+<",
212212
() => {
213213
if (isDraft) {
214214
return;

packages/web/src/views/Forms/EventForm/MoveToSidebarButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const MoveToSidebarButton = ({ onClick }: { onClick: () => void }) => {
1616

1717
return (
1818
<Text size="m" style={{ display: "flex", alignItems: "center" }}>
19-
{isMacOS ? <Command size={16} /> : <WindowsLogo size={16} />} +{"K"}
19+
{isMacOS ? <Command size={16} /> : <WindowsLogo size={16} />} +{"<"}
2020
</Text>
2121
);
2222
};

0 commit comments

Comments
 (0)