[Feature] Migrate component copy/paste to OS system clipboard
Context
Currently, Logisim-evolution uses an internal clipboard for copying and pasting components, restricting these operations to the same project space. This also occasionally causes conflicts with the OS clipboard (e.g., the issue where pasting stale OS images overrides internal component pasting).
Short-term Mitigation
For the upcoming 4.2.0 release, a lightweight hotfix was provided in PR #2976 to explicitly clear the OS clipboard when components are copied. This prevents the stale image bug without risking major architectural regressions right before the release.
Proposed Long-Term Solution
As discussed with @BFH-ktt1 in PR #2976 and previously mentioned in #1050, the ultimate goal is to abandon the internal clipboard and fully migrate to using the OS system clipboard for all copy/paste actions.
This will enable cross-project copy and paste.
The functionality was already implemented by @kevinawalsh in his Holy Cross version. The migration plan for the 4.3.0 release (or later) would involve:
- Cherry-picking and adapting Kevin's implementation (starting from commit
17390b8and subsequent updates). - Testing cross-project component copy/paste functionality.
- Removing legacy internal clipboard logic and workarounds.
Source: logisim-evolution/logisim-evolution