Keybindings
Closed this issue ยท 7 comments
Hey there, found the tool just yet and it looks pretty nice. Would like to use it :)
I've some questions regarding keybindings?
- Are they documented somewhere? If not, it would be cool to have them in a complete table view in the README and either showing up with
--help
or inside the tool (?
orh
). Just ideas. - Functionality: I can list what I tried (and at the same time it would be cool if some of these were added)
- Arrow left (or
h
) to close - Arrow right (or
l
) to open - Jump to bottom (e.g.
G
like Vim) - Jump to top (e.g.
gg
like Vim) - Copy (e.g.
yy
like Vim) #10
- Arrow left (or
I know this ticket is too broad. Depending on the answer it could either be refined or split up into several issues.
Thanks for opening this issue!
The keys are currently the ones inherited from the FTXUI library default components. We use the arrow keys, tab, reverse-tab, pagedown and pageup. The vim keys are supported: h,j,k,l. We also support the mouse, including the mouse's wheel.
I believe I like all your ideas without exceptions. It just require someone to do the work.
If you wish to implement some of it, please met me know. Otherwise, I will do it at some point in time.
I started working on:
- Add some documentation about the keybinding.
- Add support for 'G' and 'gg"
That's cool. I'm wondering about h
and l
and left / right arrows. They don't seem to close and open nested structures, but are supposed to work/exist. Do they have different functionality or are they currently missing?
The arrow key left/right and the vim h/k keys are used to navigate left and right. This is useful when you have both the "button" to expand JSON and the button to display the array view.
See:
test-2022-09-27_23.02.42.mp4
I added '+' and '-' to expand/collapse all elements.
I think this issue has been fixed, outside of the copy/paste feature, which is tracked elsewhere.
ู ุฑุญุจูุงุ ููุฏ ูุฌุฏุช ุงูุฃุฏุงุฉ ุญุชู ุงูุขู ููู ุชุจุฏู ุฌู ููุฉ ุฌุฏูุง. ุฃุฑุบุจ ูู ุงุณุชุฎุฏุงู ู :)
ูุฏู ุจุนุถ ุงูุฃุณุฆูุฉ ุจุฎุตูุต ุฑูุงุจุท ุงูู ูุงุชูุญุ
ูู ุชู ุชูุซูููู ูู ู ูุงู ู ุงุ ุฅุฐุง ูู ููู ุงูุฃู ุฑ ูุฐููุ ูุณูููู ู ู ุงูุฑุงุฆุน ุนุฑุถูุง ูู ุนุฑุถ ุฌุฏูู ูุงู ู ูู ู ูู README ูุฅู ุง ุฃู ุชุธูุฑ ู ุน
--help
ุงูุฃุฏุงุฉ ุฃู ุฏุงุฎููุง (?
ุฃูh
). ู ุฌุฑุฏ ุฃููุงุฑ.ุงููุธููุฉ: ูู ูููู ุณุฑุฏ โโู ุง ุฌุฑุจุชู (ููู ููุณ ุงูููุช ุณูููู ุฑุงุฆุนูุง ุฅุฐุง ุชู ุช ุฅุถุงูุฉ ุจุนุถ ูุฐู ุงูุฃุดูุงุก)
- ุณูู ูููุณุงุฑ (ุฃู
h
) ููุฅุบูุงู- ุงูุณูู ูููู ูู (ุฃู
l
) ูููุชุญ- ุงูุชูู ุฅูู ุงูุฃุณูู (ุนูู ุณุจูู ุงูู ุซุงู
G
ู ุซู Vim)- ุงูุชูู ุฅูู ุงูุฃุนูู (ุนูู ุณุจูู ุงูู ุซุงูุ
gg
ู ุซู Vim)- ูุณุฎ (ุนูู ุณุจูู ุงูู ุซุงู
yy
ู ุซู Vim) ุทูุจ ุงูู ูุฒุฉ: ุงููุฏุฑุฉ ุนูู ูุณุฎ ููู ุฉ JSON ูู ู ูุถุน ุงูู ุคุดุฑ ุฑูู 10ุฃุนูู ุฃู ูุฐู ุงูุชุฐูุฑุฉ ูุงุณุนุฉ ุฌุฏูุง. ุงุนุชู ุงุฏูุง ุนูู ุงูุฅุฌุงุจุฉุ ูู ูู ุชูููุญูุง ุฃู ุชูุณูู ูุง ุฅูู ุนุฏุฉ ู ุดููุงุช.
The json-tui
help says you can use -k
, --key
, or --keybinding
to get the information:
json-tui -h
json-tui [file] {OPTIONS}
A JSON terminal UI
OPTIONS:
file A JSON file. Omit to read from stdin.
-h, --help Display this help menu.
-v, --version Print version.
-k, --key, --keybinding Display key binding.
-f, --fullscreen Display the JSON in fullscreen, in an
alternate buffer
"--" can be used to terminate flag options and force all following
arguments to be treated as positional options
If no file is given, json-tui reads JSON from the standard input
Please report bugs to:https://github.com/ArthurSonzogni/json-tui/issues
The keybinding are described by:
json-tui --keybinding
โโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โkeys โaction โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโค
โNavigate โโ โ โ โ โ
โ โh j k l โ
โ โMouse::WheelUp โ
โ โMouse::WheelDownโ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโค
โToggle โenter โ
โ โMouse::Left โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโค
โDeep โ โ
โ - Expand โ+ โ
โ - Collapseโ- โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโค
โExit โEscape โ
โ โq โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโค
โNavigate โ โ
โ - first โpage-up โ
โ - last โpage-down โ
โ - top โgg โ
โ - bottom โG โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ