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

[bug]: Fix pasting issues in Command Box #218

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

gauravuj
Copy link

This fixes the issues previously faced.

@gauravuj gauravuj self-assigned this Apr 15, 2024
@gauravuj gauravuj added the bug Something isn't working label Apr 15, 2024
@gauravuj
Copy link
Author

hopefully, this solves the issues

Copy link

@cyqjoseph cyqjoseph left a comment

Choose a reason for hiding this comment

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

Great fix!

Comment on lines +58 to +66
commandTextField.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
KeyCodeCombination pasteCombination = new KeyCodeCombination(KeyCode.V, KeyCombination.CONTROL_ANY);
KeyCodeCombination pasteCombinationMac = new KeyCodeCombination(KeyCode.V, KeyCombination.META_ANY);
if (pasteCombination.match(event) || pasteCombinationMac.match(event)) {
pasteTextFromClipboard();
event.consume();
}
});

Choose a reason for hiding this comment

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

Great!

@cyqjoseph cyqjoseph merged commit a93b033 into AY2324S2-CS2103T-W11-3:master Apr 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants