#2713 HistoryTableViewTest fires the platform copy shortcut (Cmd-C on macOS) (#2714)

The copy handler matches KeyCombination.SHORTCUT_DOWN, which is Meta on
macOS, but the test always fired Ctrl-C, so nothing was copied on the Mac
CI runner.

Co-authored-by: denny <dennis.sheirer@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Denny Sheirer
2026-11-20 02:43:38 -05:00
committed by GitHub
parent d3a9adc06f
commit 838e7708c0

View File

@@ -76,9 +76,11 @@ public class HistoryTableViewTest
table.getSelectionModel().select(0); table.getSelectionModel().select(0);
table.getSelectionModel().select(2); table.getSelectionModel().select(2);
//The copy shortcut is Cmd-C on macOS and Ctrl-C elsewhere
boolean mac = System.getProperty("os.name", "").toLowerCase().contains("mac");
Clipboard.getSystemClipboard().clear(); Clipboard.getSystemClipboard().clear();
Event.fireEvent(table, new KeyEvent(KeyEvent.KEY_PRESSED, "", "", KeyCode.C, false, Event.fireEvent(table, new KeyEvent(KeyEvent.KEY_PRESSED, "", "", KeyCode.C, false,
true, false, false)); !mac, false, mac));
copied.complete(Clipboard.getSystemClipboard().getString()); copied.complete(Clipboard.getSystemClipboard().getString());
} }
catch(Throwable t) catch(Throwable t)