summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger
diff options
context:
space:
mode:
author Matt Furniss <furniss@gmail.com>2026-03-22 17:52:05 -0700
committer GitHub <noreply@github.com>2026-03-22 20:52:05 -0400
commitf58b01030eb21e7e0a34904e5ab5134716339fce (patch)
tree19e1e52a0db4f9ebd43f784f854a8afe82a2b017 /src/osd/modules/debugger
parent726eac336a2b8c414a932388f19d578b7da94573 (diff)
debugger/osx: add Edit menu with clipboard shortcuts (#15134)
The macOS Cocoa debugger only adds Debug and Run menus to the menu bar, so standard Cmd+X/C/V shortcuts are never routed through the responder chain to the command input NSTextField. Add an Edit menu with Cut, Copy, and Paste items to enable clipboard operations.
Diffstat (limited to 'src/osd/modules/debugger')
-rw-r--r--src/osd/modules/debugger/debugosx.mm11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/osd/modules/debugger/debugosx.mm b/src/osd/modules/debugger/debugosx.mm
index a4721e4d292..db04b641afa 100644
--- a/src/osd/modules/debugger/debugosx.mm
+++ b/src/osd/modules/debugger/debugosx.mm
@@ -206,8 +206,17 @@ void debugger_osx::build_menus()
{
NSMenuItem *item;
+ NSMenu *const editMenu = [[NSMenu alloc] initWithTitle:@"Edit"];
+ item = [[NSApp mainMenu] insertItemWithTitle:@"Edit" action:NULL keyEquivalent:@"" atIndex:1];
+ [item setSubmenu:editMenu];
+ [editMenu release];
+
+ [editMenu addItemWithTitle:@"Cut" action:@selector(cut:) keyEquivalent:@"x"];
+ [editMenu addItemWithTitle:@"Copy" action:@selector(copy:) keyEquivalent:@"c"];
+ [editMenu addItemWithTitle:@"Paste" action:@selector(paste:) keyEquivalent:@"v"];
+
NSMenu *const debugMenu = [[NSMenu alloc] initWithTitle:@"Debug"];
- item = [[NSApp mainMenu] insertItemWithTitle:@"Debug" action:NULL keyEquivalent:@"" atIndex:1];
+ item = [[NSApp mainMenu] insertItemWithTitle:@"Debug" action:NULL keyEquivalent:@"" atIndex:2];
[item setSubmenu:debugMenu];
[debugMenu release];