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

Configurable shorcuts #8

Closed
ystrot opened this issue Jan 29, 2012 · 7 comments
Closed

Configurable shorcuts #8

ystrot opened this issue Jan 29, 2012 · 7 comments
Assignees

Comments

@ystrot
Copy link
Owner

ystrot commented Jan 29, 2012

Some shortcuts can't be configured, for example ENTER or SHIFT+ENTER. Need to define them in Eclipse-way.

@EugeneLoy
Copy link

I have a request related to shortcuts.

Please, add eclipse-way shortcut for "close Glance" and shortcut for "return focus to editor" or something like this.
When You start search from editor and want to go back to editing text You are forced to use mouse in order to go back and remain highlights.
Pressing "ESC" do returns focus to editor but Glance disappears(so do search highlights) and there is no way to configure this at the moment.

In my case things even worse - I have "ESC" mapped to "focus on editor" shortcut (borrowed from Qt Creator key mapping) and it conflicts with Glance's hardcoded shortcut.

My proposal is to add 2 shortcuts that can be configured in eclipse-way:

  1. "close Glance" - this should work both when focus is in "search box" and when focus is somewhere else(may be useful if You want to disable highlights during editing text without using mouse).
  2. add shortcut "return focus to editor(without closing Glance)" and/or make Glance play nice with default "Activate Editor" shortcut(maybe by adding adding "searching with Glance" context to avoid shortcut conflicts (I do not remember how this is actually called in eclipse internals terms. I mean the thing that You can pick in "when combobox" when setting shortcuts)).

Thanks.

@ghost ghost assigned zapletnev Feb 8, 2012
@zapletnev
Copy link
Collaborator

Implemented, now glance has configurable shortcuts (open/next,prev results/close).
Also, when using open shortcut in the search panel the focus goes back to the editor.

@ystrot
Copy link
Owner Author

ystrot commented Feb 25, 2012

@EugenyLoy I mostly agree with your points. The only thing I don't like is to have more than one shortcut in the global space. Close Glance shortcut can be useful, but not so often to define one more global key sequince. When you need it you still can use CTRL+ALT+F, ESC.

So what we have now are 1 global shortcut to open glance (CTRL+ALT+F) and 4 search panel shortcuts: next match (ENTER), prev match (SHIFT+ENTER), close (ESC), return focus back (CTRL+ALT+F). As you see, by default you can use the same shortcut to move focus to search panel and back to editor. While all shorcuts configurable you can simply bind close to another key sequence and use ESC for return focus back.

@EugeneLoy
Copy link

@ystrot Sounds pretty solid to me. Waiting for new release:)

@max99x
Copy link

max99x commented May 3, 2012

Somewhat late to the party, but I definitely think that most of the shortcuts should be global. The user can always limit them in the settings. My usage pattern is quite simple. I want to iterate over all matches and edit some of them. The best I can do with the current shortcuts is this:

  • Ctrl+F (Open Glance)
  • <type query>
  • Enter (Go to first match)
  • Esc (Return focus to editor)
  • <edit>
  • F3 (Open Glance, but really Return to Glance)
  • F3 (Find next instance, perhaps multiple times)
  • Esc (Return focus to editor)
  • <edit>
  • Repeat the last 4 steps N times.
  • F3 (Return to Glance, only so I can close it and remove highlights)
  • Ctrl+Esc (Close Glance)

If shortcuts were global, I could do this much more smoothly:

  • Ctrl+F (Open Glance)
  • <type query>
  • Enter (Go to first match)
  • Esc (Return focus to editor)
  • <edit>
  • F3 (Find next instance, perhaps multiple times)
  • <edit>
  • Repeat the last 2 steps N times.
  • Esc (Close Glance)

Here I avoided the extra trip to the glance bar and back to go to the next match, as well as another trip to it so I can close it, and I can reuse Esc to both return to glance and close glance, since I can configure one to work in the glance context, and one in the window context from the Eclipse preferences.

@ystrot
Copy link
Owner Author

ystrot commented May 4, 2012

@max99x This use case makes sense, but there are no useful available shortcuts in the global scope. Looks like you're using F3 for find next which is used by Java editor by default. So if you want to use global scope you need to configure shortcuts for your needs anyway.

I think we can try to allow using global scope for glance shortcuts. In this case you can change shortcut context in the Eclipse preferences. Currently our binding implementation is a bit tricky, that's why global scope doesn't work for glance shortucts. But we'll try to find another way to implement it.

@max99x
Copy link

max99x commented May 5, 2012

Thanks for the reply. I use Glance as replacement for the built-in Eclipse search, so it only makes sense to use the same shortcuts. Of course, not everyone does that, so the default shortcuts shouldn't conflict with Eclipse's. If Glance allowed shortcut scope to be configured in the preferences and was able to capture global keystrokes, I wouldn't care what the default is.

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

4 participants