### Keyboard Shortcuts

Go Home `H`
Go to GitHub `G`
Toggle theme `T`
Show shortcuts`?`
Press Esc or ? to close
// DEVLOG 003
2026

# CommandMove: Cut & Paste on Mac

macOS doesn't have Cmd+X for files. I fixed that. Global event taps, AppleScript, and a lot of Accessibility permissions.

Swift macOS

## The Frustration

If you've ever used a Mac and tried to move files in Finder, you know the pain. You select files, press Cmd+C, navigate to a new folder, press Cmd+V... and the files are copied, not moved. The originals stay where they were.

On Windows, Cmd+X (or Ctrl+X) cuts files, and Cmd+V moves them. It's been that way since the 90s. macOS only supports copy-paste for files. There is no cut. I don't know why Apple decided this was a good idea, but here we are.

Every time I had to move files on my Mac, I'd copy them, navigate to the destination, paste, go back to the original, select the originals, and delete them. Four steps instead of two. Multiply that by hundreds of file operations and you start to lose your mind.

## The Solution

CommandMove is a menu bar app that intercepts Cmd+X and Cmd+V in Finder and makes them do what they should have always done: cut and move files.

Press Cmd+X on selected files in Finder, navigate to any folder, press Cmd+V, and the files move. Just like Windows. Just like it should be.

## How It Works

Under the hood, CommandMove uses three macOS technologies:

- Global Event Tap: Intercepts Cmd+X and Cmd+V keystrokes while Finder is the frontmost app
- AppleScript: Queries Finder for the selected items and current folder
- FileManager: Performs the actual move operation using `FileManager.moveItem`

The event tap is the trickiest part. macOS is very protective about who can intercept keyboard events. You need Accessibility permissions, which means the user has to go into System Settings > Privacy & Security > Accessibility and manually enable CommandMove. macOS will prompt for this on first launch, but it's still a friction point.

## The Accessibility Hurdle

Building for macOS means respecting the security model. Global event taps are powerful but regulated for good reason — they can theoretically capture any keystroke. Apple's solution is the Accessibility permission system, which requires explicit user consent.

The first time you launch CommandMove, it pops up a dialog explaining why it needs Accessibility access. Some users are wary of this, and I don't blame them. The app is open source, so anyone can verify what it does. But "please give me permission to read your keyboard" is always going to be a hard sell.

## Extra Features

Once I had the core cut-and-paste working, I kept adding things:

- Right-click "Cut Files" action in Finder via a bundled Quick Action
- Menu bar controls for cutting, pasting, clearing the clipboard, and toggling login launch
- Auto-launch at login so it's always running
- Conflict handling — if a file with the same name exists at the destination, it creates a numbered copy automatically

## Lessons Learned

- Swift is a beautiful language once you get past the learning curve
- AppleScript is from 1993 and it shows, but it still works
- macOS Accessibility APIs are powerful but poorly documented
- The best utility apps solve one problem extremely well
- Open source builds trust, especially when you're asking for Accessibility permissions

> The simplest solutions are often the ones that should have existed from the start.

Back to Devlog