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

Change window focus with a keyboard #17

Open
barlik opened this issue Jan 21, 2018 · 1 comment
Open

Change window focus with a keyboard #17

barlik opened this issue Jan 21, 2018 · 1 comment

Comments

@barlik
Copy link

barlik commented Jan 21, 2018

There's an option to click into the Input JSON window or JMESPath Result window with a mouse so you can then scroll inside them. However, I cannot find a way to select the windows with a keyboard.
Also, the scrolling inside the windows only works with the arrow keys so it's weird that you cannot select the windows without the mouse.

@weibeld
Copy link

weibeld commented Jan 7, 2023

This feature would be extremely useful. There could be something simple like Tab for cycling between the panels/windows:

[Tab] > Expression [Tab] > Input [Tab] > Result [Tab] ...

Then for navigating in the input and result windows, there should be keyboard shortcuts, preferably the same ones used by the pagers less or more:

  • j: down one line
  • k: up one line
  • Ctrl-F: down one page
  • Ctrl-B: up one page
  • Ctrl-D: down half a page
  • Ctrl-U: up half a page
  • g: go to beginning of document
  • G: go to end of document

Also, search functionality would be useful:

  • /: search forward
  • ?: search backward
  • n: go to next search match
  • N: go to previous search match

The expression line should also accept a richer set of line editing commands. For example, similar ones as used in a typical Bash command line:

  • Ctrl-A: go to beginning of line
  • Ctrl-E: go to end of line
  • Ctrl-U: delete from cursor to beginning of line
  • Ctrl-K: delete from cursor to end of line
  • Ctrl-W: delete one word to the left of cursor
  • Alt-B: move cursor one word backward
  • Alt-F: move cursor one word forward
  • Alt-D: delete word to the right of cursor
  • Alt-Del: delete word to the left of cursor

Alternatively, there could also be a Vim mode for editing the expression line with Vim commands.

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

2 participants