Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: deleting a key combination #6843

Merged
merged 1 commit into from Nov 22, 2023

Conversation

gatzjames
Copy link
Contributor

@gatzjames gatzjames commented Nov 22, 2023

Deleting a key combination doesn't work.

This PR mutates the appropriate list of combinations that we pass to update the settings.

Next steps:

  • Mutating a list like we do is error prone and can lead to other issues like this one.
  • We should improve the api for adding/removing/updating a key combination in the hotkey registry

changelog(Fixes): Fixed an issue where removing an existing keyboard shortcut would not work as expected

@gatzjames gatzjames requested a review from a team November 22, 2023 10:03
@gatzjames gatzjames self-assigned this Nov 22, 2023
@gatzjames gatzjames enabled auto-merge (squash) November 22, 2023 10:07
if (areSameKeyCombinations(existingKeyComb, keyComb)) {
toBeRemovedIndex = index;
}
});
if (toBeRemovedIndex >= 0) {
keyCombosForThisPlatform.splice(toBeRemovedIndex, 1);
keyCombs.splice(toBeRemovedIndex, 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just out of curious, where is the keyCombs consumed?

@gatzjames gatzjames merged commit 7d0b1f8 into Kong:develop Nov 22, 2023
8 checks passed
@gatzjames gatzjames deleted the fix/remove-keyboard-shortcut branch November 22, 2023 10:20
jackkav pushed a commit to jackkav/insomnia that referenced this pull request Mar 13, 2024
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.

None yet

3 participants