2013-08-26 14:20:01 +00:00
|
|
|
.. _hotkeys:
|
|
|
|
|
2013-07-26 03:41:42 +00:00
|
|
|
Hotkey Reference
|
|
|
|
================
|
|
|
|
|
2014-03-28 13:55:24 +00:00
|
|
|
This reference covers the keys used to control **lnav**. Consult the `built-in
|
|
|
|
help <https://github.com/tstack/lnav/blob/master/src/help.txt>`_ in **lnav** for
|
|
|
|
a more detailed explanation of each key.
|
2013-08-26 14:20:01 +00:00
|
|
|
|
2023-07-20 04:37:40 +00:00
|
|
|
Global
|
|
|
|
------
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 6 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
- Command
|
|
|
|
|
|
|
|
* - :kbd:`Ctrl` + :kbd:`C`
|
|
|
|
- If the focused line is from a file connected to an open pipe (the "↻"
|
|
|
|
icon will be next to the file name), a SIGINT will be sent to the
|
|
|
|
child process. Otherwise, **lnav** will quickly exit. If **lnav**
|
|
|
|
seems to be stuck in a loop, pressing :kbd:`Ctrl` + :kbd:`C` three
|
|
|
|
times will trigger an abort exit.
|
|
|
|
|
2013-07-26 15:23:45 +00:00
|
|
|
Spatial Navigation
|
|
|
|
------------------
|
2013-07-26 03:41:42 +00:00
|
|
|
|
2022-08-09 06:14:02 +00:00
|
|
|
The majority of these hotkeys should be available in all views.
|
|
|
|
|
2013-07-26 03:41:42 +00:00
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
2020-05-07 14:08:59 +00:00
|
|
|
:widths: 6 6 6 20
|
2013-07-26 03:41:42 +00:00
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- Command
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Space`
|
|
|
|
- :kbd:`PgDn`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Down a page
|
2022-12-21 23:45:59 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`d`
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- Down by half a page
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`b`
|
|
|
|
- :kbd:`Backspace`
|
|
|
|
- :kbd:`PgUp`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Up a page
|
2022-12-21 23:45:59 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`u`
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- Up by half a page
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`j`
|
|
|
|
- :kbd:`↓`
|
2022-08-09 06:14:02 +00:00
|
|
|
-
|
2013-07-26 03:41:42 +00:00
|
|
|
- Down a line
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`k`
|
|
|
|
- :kbd:`↑`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Up a line
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`h`
|
|
|
|
- :kbd:`←`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
2018-03-28 05:11:57 +00:00
|
|
|
- Left half a page. In the log view, pressing left while at the start of
|
2023-03-04 03:14:53 +00:00
|
|
|
the message text will reveal the shortened source file name for each line.
|
2018-03-28 05:11:57 +00:00
|
|
|
Pressing again will reveal the full path.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`h`
|
|
|
|
- :kbd:`Shift` + :kbd:`←`
|
2015-05-12 13:37:41 +00:00
|
|
|
-
|
|
|
|
- Left ten columns
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`l`
|
|
|
|
- :kbd:`→`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Right half a page
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`l`
|
|
|
|
- :kbd:`Shift` + :kbd:`→`
|
2015-05-12 13:37:41 +00:00
|
|
|
-
|
|
|
|
- Right ten columns
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Home`
|
|
|
|
- :kbd:`g`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Top of the view
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`End`
|
|
|
|
- :kbd:`G`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Bottom of the view
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`e`
|
|
|
|
- :kbd:`Shift` + :kbd:`e`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Next/previous error
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`w`
|
|
|
|
- :kbd:`Shift` + :kbd:`w`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Next/previous warning
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`n`
|
|
|
|
- :kbd:`Shift` + :kbd:`n`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Next/previous search hit
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`>`
|
|
|
|
- :kbd:`<`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Next/previous search hit (horizontal)
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`f`
|
|
|
|
- :kbd:`Shift` + :kbd:`f`
|
2013-07-26 03:41:42 +00:00
|
|
|
-
|
|
|
|
- Next/previous file
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`u`
|
|
|
|
- :kbd:`Shift` + :kbd:`u`
|
2021-08-25 11:21:07 +00:00
|
|
|
-
|
2013-07-26 03:41:42 +00:00
|
|
|
- Next/previous bookmark
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`o`
|
|
|
|
- :kbd:`Shift` + :kbd:`o`
|
2015-12-19 06:39:27 +00:00
|
|
|
-
|
2015-11-25 04:59:24 +00:00
|
|
|
- Forward/backward through log messages with a matching "opid" field
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`s`
|
|
|
|
- :kbd:`Shift` + :kbd:`s`
|
2014-03-28 13:55:24 +00:00
|
|
|
-
|
2021-02-13 20:41:48 +00:00
|
|
|
- Next/previous slow down in the log message rate
|
|
|
|
* - :kbd:`{`
|
|
|
|
- :kbd:`}`
|
2018-12-14 14:18:31 +00:00
|
|
|
-
|
|
|
|
- Previous/next location in history
|
2013-07-26 15:23:45 +00:00
|
|
|
|
|
|
|
Chronological Navigation
|
|
|
|
------------------------
|
|
|
|
|
2022-08-09 06:14:02 +00:00
|
|
|
These hotkeys are only functional on views that are time-based, like the log
|
|
|
|
view or the histogram view.
|
|
|
|
|
2013-07-26 15:23:45 +00:00
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 5 5 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
-
|
|
|
|
- Command
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`d`
|
|
|
|
- :kbd:`Shift` + :kbd:`d`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Forward/backward 24 hours
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`1` - :kbd:`6`
|
|
|
|
- :kbd:`Shift` + :kbd:`1` - :kbd:`6`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Next/previous n'th ten minute of the hour
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`7`
|
|
|
|
- :kbd:`8`
|
2019-01-25 15:45:17 +00:00
|
|
|
- Previous/next minute
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`0`
|
|
|
|
- :kbd:`Shift` + :kbd:`0`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Next/previous day
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`r`
|
|
|
|
- :kbd:`Shift` + :kbd:`r`
|
2015-09-14 15:56:42 +00:00
|
|
|
- Forward/backward by the relative time that was last used with the goto command.
|
2013-07-26 03:41:42 +00:00
|
|
|
|
2022-08-09 06:14:02 +00:00
|
|
|
Breadcrumb Navigation
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
The following hotkeys are related to the breadcrumb bar that is below the top
|
|
|
|
status bar.
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 5 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
- Description
|
2023-08-29 05:43:33 +00:00
|
|
|
* - :kbd:`\``
|
|
|
|
- Focus on the breadcrumb bar.
|
2022-08-09 06:14:02 +00:00
|
|
|
* - :kbd:`ENTER`
|
2023-08-29 05:43:33 +00:00
|
|
|
- If the bar is currently focused, accept the selected value and drop focus.
|
2022-08-09 06:14:02 +00:00
|
|
|
* - :kbd:`Escape`
|
|
|
|
- Drop focus on the breadcrumb bar.
|
|
|
|
* - :kbd:`←`
|
|
|
|
- Select the crumb to the left. If the first crumb is selected, the
|
|
|
|
selection will wrap around to the last crumb.
|
|
|
|
* - :kbd:`→`
|
|
|
|
- Accept the current value, which might mean navigating to the value in
|
|
|
|
the view, then selecting the crumb to the right.
|
|
|
|
* - :kbd:`Ctrl` + :kbd:`a`
|
|
|
|
- Select the first crumb.
|
|
|
|
* - :kbd:`Ctrl` + :kbd:`e`
|
|
|
|
- Select the last crumb.
|
|
|
|
* - :kbd:`↓`
|
|
|
|
- Select the next value in the crumb dropdown.
|
|
|
|
* - :kbd:`↑`
|
|
|
|
- Select the previous value in the crumb dropdown.
|
|
|
|
* - :kbd:`Home`
|
|
|
|
- Select the first value in the crumb dropdown.
|
|
|
|
* - :kbd:`End`
|
|
|
|
- Select the last value in the crumb dropdown.
|
|
|
|
|
|
|
|
While a crumb is selected, you can perform a fuzzy search on the possible
|
|
|
|
values by typing in the value you are interested in.
|
2021-02-13 20:41:48 +00:00
|
|
|
|
|
|
|
.. _hotkeys_bookmarks:
|
|
|
|
|
2013-07-26 03:41:42 +00:00
|
|
|
Bookmarks
|
|
|
|
---------
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 5 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
- Command
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`m`
|
2023-06-21 04:11:27 +00:00
|
|
|
- Mark/unmark the top line or focused line when in cursor mode
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`m`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Mark/unmark the range of lines from the last marked to the top
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`j`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Mark/unmark the next line after the previously marked
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`k`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Mark/unmark the previous line
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`c`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Copy marked lines to the clipboard
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`c`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Clear marked lines
|
|
|
|
|
2022-08-07 17:00:34 +00:00
|
|
|
.. _hotkeys_display:
|
|
|
|
|
2013-07-26 03:41:42 +00:00
|
|
|
Display
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 5 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
- Command
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`?`
|
2013-07-26 03:41:42 +00:00
|
|
|
- View/leave builtin help
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`q`
|
2013-07-26 03:41:42 +00:00
|
|
|
- Return to the previous view/quit
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`q`
|
2016-03-20 22:15:50 +00:00
|
|
|
- Return to the previous view/quit while matching the top times of the two views
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`a`
|
2016-03-20 22:15:50 +00:00
|
|
|
- Restore the view that was previously popped with 'q/Q'
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`a`
|
2016-03-20 22:15:50 +00:00
|
|
|
- Restore the view that was previously popped with 'q/Q' and match the top times of the views
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`p`
|
2015-08-19 03:58:20 +00:00
|
|
|
- Switch to/from the pretty-printed view of the displayed log or text files
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`t`
|
2023-07-07 03:05:30 +00:00
|
|
|
- Display the elapsed time from a bookmark to a given line. In the TEXT view,
|
|
|
|
this only works for content that was captured from stdin or a :code:`:sh`
|
|
|
|
command.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`t`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Switch to/from the text file view
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`i`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Switch to/from the histogram view
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`i`
|
2021-08-25 11:21:07 +00:00
|
|
|
- Switch to/from the histogram view
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`v`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Switch to/from the SQL result view
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Shift` + :kbd:`v`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Switch to/from the SQL result view and move to the corresponding in the
|
|
|
|
log_line column
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`p`
|
2013-07-26 15:23:45 +00:00
|
|
|
- Toggle the display of the log parser results
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Tab`
|
2021-01-24 22:35:14 +00:00
|
|
|
- In the log/text views, focus on the configuration panel for editing
|
|
|
|
filters and examining the list of loaded files. In the SQL result view,
|
|
|
|
cycle through columns to display as bar graphs
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`l`
|
2014-11-11 16:44:44 +00:00
|
|
|
- Switch to lo-fi mode. The displayed log lines will be dumped to the
|
|
|
|
terminal without any decorations so they can be copied easily.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`w`
|
2016-11-07 06:39:02 +00:00
|
|
|
- Toggle word-wrap.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`p`
|
2017-04-09 08:57:19 +00:00
|
|
|
- Show/hide the data preview panel that may be opened when entering
|
|
|
|
commands or SQL queries.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`f`
|
2019-01-27 16:05:44 +00:00
|
|
|
- Toggle the enabled/disabled state of all filters in the current view.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`x`
|
2017-02-23 14:15:44 +00:00
|
|
|
- Toggle the hiding of log message fields. The hidden fields will be
|
|
|
|
replaced with three bullets and highlighted in yellow.
|
2022-11-01 20:08:32 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`x`
|
2023-06-17 04:38:19 +00:00
|
|
|
- Toggle the cursor mode. Allows moving the focused line instead of
|
2022-11-01 20:08:32 +00:00
|
|
|
keeping it fixed at the top of the current screen.
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`=`
|
2019-07-30 13:28:42 +00:00
|
|
|
- Pause/unpause loading of new file data.
|
2013-07-26 15:23:45 +00:00
|
|
|
|
2016-02-24 22:54:01 +00:00
|
|
|
Session
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 5 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
- Command
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`Ctrl` + :kbd:`R`
|
2022-08-10 17:39:25 +00:00
|
|
|
- Reset the current :ref:`session<sessions>` state. The session state
|
|
|
|
includes things like filters, bookmarks, and hidden fields.
|
2016-02-24 22:54:01 +00:00
|
|
|
|
2021-02-13 20:41:48 +00:00
|
|
|
Query Prompts
|
|
|
|
-------------
|
2013-07-26 15:23:45 +00:00
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
:header-rows: 1
|
|
|
|
:widths: 5 20
|
|
|
|
|
|
|
|
* - Keypress
|
|
|
|
- Command
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`/`
|
2018-03-28 14:25:10 +00:00
|
|
|
- Search for lines matching a regular expression
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`;`
|
|
|
|
- Open the :ref:`sql-ext` to execute SQL statements/queries
|
|
|
|
* - :kbd:`:`
|
2014-03-28 13:55:24 +00:00
|
|
|
- Execute an internal command, see :ref:`commands` for more information
|
2021-02-13 20:41:48 +00:00
|
|
|
* - :kbd:`\|`
|
|
|
|
- Execute an lnav script located in a format directory
|
|
|
|
* - :kbd:`Ctrl` + :kbd:`]`
|
2018-11-15 14:43:28 +00:00
|
|
|
- Abort the prompt
|
2020-05-13 16:38:41 +00:00
|
|
|
|
|
|
|
Customizing
|
|
|
|
-----------
|
|
|
|
|
2020-09-14 06:03:23 +00:00
|
|
|
You can customize the behavior of hotkeys by defining your own keymaps.
|
|
|
|
Consult the :ref:`Keymaps<keymaps>` configuration section for more information.
|