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

Accelerator keys (ESC and ENTER) don't close the rule editor dialog #11

Open
matthewhorridge opened this issue Feb 14, 2016 · 4 comments

Comments

@matthewhorridge
Copy link

Using a JOptionPane for the rule editor dialog would solve this.

@martinjoconnor
Copy link
Member

Escape cancels auto-complete and enter goes to a new line in the editor.

You mean the combination of both?

@csnyulas
Copy link
Member

csnyulas commented Mar 4, 2016

I don't think ENTER should close the rule editor. CTRL+ENTER would be nice, though.

@matthewhorridge
Copy link
Author

Escape should still cancel auto-complete if it's showing, and if it's not then it should close the dialog. If Enter prints a new line in the editor then the dialog should be closed with CTRL+Enter (this would be inline with the rest of the UI).

If you put the editor in a VerifyingOptionPane (or a regular JOptionPane if you don't need the verification aspect), then I think these buttons should work out of the box (providing your auto-completer consumes the KeyPressed event if it's showing).

@matthewhorridge
Copy link
Author

.... just checked this out and with a JOptionPane it works out of the box i.e. CTRL+Enter if a text area has the focus (and this also has the plus that the button arrangement will be standard for the platform/look&feel).

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

No branches or pull requests

3 participants