Skip to content

Conversation

@nova3uk
Copy link

@nova3uk nova3uk commented Dec 2, 2025

Fix: Keyboard accelerators (Ctrl+C, Ctrl+A, etc.) not working

Problem
The keyboard shortcuts like Ctrl+C, Ctrl+A, Ctrl+X, Ctrl+V were not functioning in the application.

Cause
The accelerator table in retropad.rc was using incorrect syntax. It combined ASCII notation ("^N") with VIRTKEY, CONTROL flags:
"^N", IDM_FILE_NEW, VIRTKEY, CONTROL // WRONG
The ^ prefix is ASCII shorthand that already means "Ctrl+", so "^N" means Ctrl+N in ASCII mode. But the VIRTKEY flag tells Windows to interpret the first parameter as a virtual key code, not an ASCII character — and "^N" is not a valid virtual key.

Fix
Remove the ^ prefix and use just the key letter with VIRTKEY, CONTROL:
"N", IDM_FILE_NEW, VIRTKEY, CONTROL // CORRECT
This properly tells Windows: "When the user presses the 'N' virtual key while holding Ctrl, trigger IDM_FILE_NEW."
Alternative (also valid)
You could also use pure ASCII notation without VIRTKEY:
"^N", IDM_FILE_NEW // Also correct (ASCII mode)

But the VIRTKEY approach is more common and handles edge cases better (e.g., keyboard layouts).

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.

2 participants