Skip to content

Fix Ctrl shortcuts in step 2/3 viewers (#546) - #550

Merged
JanuszBedkowski merged 2 commits into
MapsHD:mainfrom
michalpelka:mp/fix-ctrl-shortcuts
Sep 30, 2026
Merged

JanuszBedkowski merged 2 commits into
MapsHD:mainfrom
michalpelka:mp/fix-ctrl-shortcuts

Conversation

@michalpelka

@michalpelka michalpelka commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #546.

Step 2

  • Ctrl+R had no visible effect: it changed each cloud's color but left the color mode on the default intensity gradient, so the new colors were never drawn. It now switches the mode to "Random per segment", the same as the menu item.
  • View jumped after repeated Ctrl+R: after every Ctrl shortcut, the app faked a Ctrl release. rlImGui only reports Ctrl when it goes down or up, so while Ctrl was still held that fake release was never corrected. The next R counted as a plain R, which switches the camera to the "Right" view. I removed these fake releases from all Ctrl shortcuts in step 2 and step 3.
  • Ctrl+R and Ctrl+T now fire once per press instead of repeating while held.

Step 3

  • Ctrl+D now opens session removal (previously Ctrl+R). The menu label and shortcut list are updated.
  • Ctrl+R gives each session a random color and applies it to that session's clouds and trajectory.

Notes

  • In manual loop closure, source and target are still drawn red and blue by default, so Ctrl+R shows there only after that option is turned off.
  • The legacy step 3 app is unchanged and still uses Ctrl+R to remove sessions.

Test plan

  • Step 2 and step 3 build (macOS, release)
  • Step 2: hold Ctrl and tap R several times; colors change and the camera stays put
  • Step 3: Ctrl+D opens session removal, Ctrl+R randomizes session colors
  • After closing the file dialogs from Ctrl+O and Ctrl+S, plain view keys (R, T, ...) still work

🤖 Generated with Claude Code

michalpelka and others added 2 commits September 29, 2026 12:57
- Ctrl+R in step 2 now switches the point cloud color scheme to
  CS_RANDOM; before, it only changed render_color while the default
  intensity-gradient scheme kept drawing, so nothing visibly happened.
- Drop the synthetic key/Ctrl release "workaround" after Ctrl shortcuts.
  rlImGui only forwards modifier edges, so the faked Ctrl release was
  never undone while Ctrl stayed held; the next key press was treated as
  a plain key (Ctrl+R, R -> camera "Right" preset, i.e. the view jumping).
- Use non-repeating IsKeyPressed for Ctrl+R / Ctrl+T.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JanuszBedkowski
JanuszBedkowski merged commit badd2e0 into MapsHD:main Sep 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Step 2 - In version v104, the "random color" shortcut (Ctrl+R) doesn't work;

2 participants