Skip to content

Fix default bindings command string order - #3055

Merged
pjrobertson merged 1 commit into
mainfrom
bindingsFix
Jun 9, 2025
Merged

pjrobertson merged 1 commit into
mainfrom
bindingsFix

Conversation

@pjrobertson

Copy link
Copy Markdown
Member

Fixes #3054

@n8henrie

n8henrie commented Jun 4, 2025

Copy link
Copy Markdown
Member

Weird -- why does the order matter here, and how did you figure it out? Did you find some documentation somewhere?

@pjrobertson

Copy link
Copy Markdown
Member Author

I think probably at some point we (I) updated NDHotkey which maybe change the orders that hotkey strings get written (I have a vague memory). The place to go for all these key bindings is that DefaultBindings.qskeysfile. If you look at the top, the key is QSSearchObjectView which means they are key bindings for all QSSearchObjectView (i.e. they work for QSSearchObjectView views. So then you go to QSSearchObjectView.m and find:

- (BOOL)handleBoundKey:(NSEvent *)theEvent {

In there, there's a check for NSString *selectorString = [bindingsDict objectForKey:theEventString]; which is doing a string comparison with the keys (keyboard shortcut strings like ⌘C ). I debugged that and found theEventString was coming back in a different order, so I flipped it :)

@pjrobertson
pjrobertson merged commit bba9fb7 into main Jun 9, 2025
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.

Grab and Drop does not work as expected

2 participants