Make the welcome screen not include Alt in Ctrl+Alt+N on desktop

This commit is contained in:
Keavon Chambers
2025-11-17 14:27:15 -08:00
parent 85965c8b6a
commit 12453d2e61
13 changed files with 54 additions and 66 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import { createEventDispatcher } from "svelte";
import { platformIsMac } from "@graphite/utility-functions/platform";
import { operatingSystem } from "@graphite/utility-functions/platform";
import { preventEscapeClosingParentFloatingMenu } from "@graphite/components/layout/FloatingMenu.svelte";
import LayoutRow from "@graphite/components/layout/LayoutRow.svelte";
@@ -31,7 +31,7 @@
let inputOrTextarea: HTMLInputElement | HTMLTextAreaElement | undefined;
let id = String(Math.random()).substring(2);
let macKeyboardLayout = platformIsMac();
let macKeyboardLayout = operatingSystem() === "Mac";
$: dispatch("value", value);

View File

@@ -4,7 +4,7 @@
import { type KeyRaw, type LayoutKeysGroup, type Key, type MouseMotion } from "@graphite/messages";
import type { FullscreenState } from "@graphite/state-providers/fullscreen";
import type { IconName } from "@graphite/utility-functions/icons";
import { platformIsMac } from "@graphite/utility-functions/platform";
import { operatingSystem } from "@graphite/utility-functions/platform";
import LayoutRow from "@graphite/components/layout/LayoutRow.svelte";
import IconLabel from "@graphite/components/widgets/labels/IconLabel.svelte";
@@ -29,7 +29,7 @@
Enter: 2,
Tab: 2,
Space: 3,
...(platformIsMac() ? ICON_WIDTHS_MAC : {}),
...(operatingSystem() === "Mac" ? ICON_WIDTHS_MAC : {}),
};
const fullscreen = getContext<FullscreenState>("fullscreen");
@@ -65,7 +65,7 @@
const label = keyWithLabel.label;
// Replace Alt and Accel keys with their Mac-specific equivalents
if (platformIsMac()) {
if (operatingSystem() === "Mac") {
if (key === "Alt") key = "Option";
if (key === "Accel") key = "Command";
}