feat/fix(ui): Mac keyboard shortcuts (#2430)

This commit is contained in:
Logan Moseley
2025-05-05 11:57:54 -04:00
committed by GitHub
parent df37b294b8
commit ab870e9b70
5 changed files with 279 additions and 113 deletions

View File

@@ -425,7 +425,8 @@ export default function App() {
useEffect(() => {
console.log('Setting up keyboard shortcuts');
const handleKeyDown = (event: KeyboardEvent) => {
if ((event.metaKey || event.ctrlKey) && event.key === 'n') {
const isMac = window.electron.platform === 'darwin';
if ((isMac ? event.metaKey : event.ctrlKey) && event.key === 'n') {
event.preventDefault();
try {
const workingDir = window.appConfig.get('GOOSE_WORKING_DIR');