simulator:attribute catchup with real SCAN
What changed, and why it matters
This commit makes two small, unrelated tweaks to the Coldcard simulator. One adds copy-and-paste keyboard shortcuts to the simulator's terminal window. The other adds a missing 'busy_scanning' flag to the simulated QR-code scanner so it behaves more like the real hardware. Neither change affects real Coldcard devices or their security.
No security action needed. This is a routine simulator maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates unix/simulator.py to pass extra XTerm resource settings enabling CLIPBOARD-based selection and Ctrl+Shift+C/V bindings in the simulator’s REPL terminal. It also updates unix/variant/sim_scanner.py to initialize self.busy_scanning = False in the SimulatedQRScanner class, matching an attribute present in the real QRScanner implementation. Both changes are simulator-only and have no effect on firmware running on actual devices.
Changed components
unix/simulator.pyunix/variant/sim_scanner.pyInspect captured patch +13 / −1
diff --git a/unix/simulator.py b/unix/simulator.py
index 2852b83..7e8b7ca 100755
--- a/unix/simulator.py
+++ b/unix/simulator.py
@@ -947,7 +947,18 @@ Q1 specials:
child.kill()
return
- xterm_args = ['xterm', '-title', 'Coldcard Simulator REPL', '-geom', '132x40+650+40']
+ xterm_args = [
+ 'xterm',
+ '-title', 'Coldcard Simulator REPL',
+ '-geom', '132x40+650+40',
+ # Route selections to CLIPBOARD so pasting in other apps (Ctrl+V) works.
+ '-xrm', 'XTerm*selectToClipboard: true',
+ # Add Ctrl+Shift+C / Ctrl+Shift+V bindings (gnome-terminal style).
+ # Shift+<mouse select> still works, and middle-click still pastes PRIMARY.
+ '-xrm', 'XTerm.vt100.translations: #override\n'
+ ' Ctrl Shift <Key>C: copy-selection(CLIPBOARD)\n'
+ ' Ctrl Shift <Key>V: insert-selection(CLIPBOARD)',
+ ]
log = ("--log" in sys.argv)
if log:
diff --git a/unix/variant/sim_scanner.py b/unix/variant/sim_scanner.py
index aabc618..a3cd5fc 100644
--- a/unix/variant/sim_scanner.py
+++ b/unix/variant/sim_scanner.py
@@ -14,6 +14,7 @@ DATA_FILE = 'qrdata.txt'
class SimulatedQRScanner(QRScanner):
def __init__(self):
+ self.busy_scanning = False
self.setup_done = True
self.version = 'V2.3.420'
self.lock = asyncio.Lock()
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.