Hotkey Reference#

This reference covers the keys used to control lnav. Consult the built-in help in lnav for a more detailed explanation of each key.

Global#

Keypress

Command

Ctrl + 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 Ctrl + C three times will trigger an abort exit.

Spatial Navigation#

The majority of these hotkeys should be available in all views.

Keypress

Command

Space

PgDn

Down a page

Ctrl + d

Down by half a page

b

Backspace

PgUp

Up a page

Ctrl + u

Up by half a page

j

Down a line

k

Up a line

h

Left half a page. In the log view, pressing left while at the start of the message text will reveal the shortened source file name for each line. Pressing again will reveal the full path.

Shift + h

Shift +

Left ten columns

l

Right half a page

Shift + l

Shift +

Right ten columns

Home

g

Top of the view

End

G

Bottom of the view

e

Shift + e

Next/previous error

w

Shift + w

Next/previous warning

n

Shift + n

Next/previous search hit

>

<

Next/previous search hit (horizontal)

f

Shift + f

Next/previous file

u

Shift + u

Next/previous bookmark

o

Shift + o

Forward/backward through log messages with a matching “opid” field

s

Shift + s

Next/previous slow down in the log message rate

{

}

Previous/next location in history

Chronological Navigation#

These hotkeys are only functional on views that are time-based, like the log view or the histogram view.

Keypress

Command

d

Shift + d

Forward/backward 24 hours

1 - 6

Shift + 1 - 6

Next/previous n’th ten minute of the hour

7

8

Previous/next minute

0

Shift + 0

Next/previous day

r

Shift + r

Forward/backward by the relative time that was last used with the goto command.

Bookmarks#

Keypress

Command

m

Mark/unmark the top line or focused line when in cursor mode

Shift + m

Mark/unmark the range of lines from the last marked to the top

Shift + j

Mark/unmark the next line after the previously marked

Shift + k

Mark/unmark the previous line

c

Copy marked lines to the clipboard

Shift + c

Clear marked lines

Display#

Keypress

Command

?

View/leave builtin help

q

Return to the previous view/quit

Shift + q

Return to the previous view/quit while matching the top times of the two views

a

Restore the view that was previously popped with ‘q/Q’

Shift + a

Restore the view that was previously popped with ‘q/Q’ and match the top times of the views

Shift + p

Switch to/from the pretty-printed view of the displayed log or text files

Shift + t

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 :sh command.

t

Switch to/from the text file view

i

Switch to/from the histogram view

Shift + i

Switch to/from the histogram view

v

Switch to/from the SQL result view

Shift + v

Switch to/from the SQL result view and move to the corresponding in the log_line column

p

Toggle the display of the log parser results

Tab

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

Ctrl + l

Switch to lo-fi mode. The displayed log lines will be dumped to the terminal without any decorations so they can be copied easily.

Ctrl + w

Toggle word-wrap.

Ctrl + p

Show/hide the data preview panel that may be opened when entering commands or SQL queries.

Ctrl + f

Toggle the enabled/disabled state of all filters in the current view.

x

Toggle the hiding of log message fields. The hidden fields will be replaced with three bullets and highlighted in yellow.

Ctrl + x

Toggle the cursor mode. Allows moving the focused line instead of keeping it fixed at the top of the current screen.

=

Pause/unpause loading of new file data.

Session#

Keypress

Command

Ctrl + R

Reset the current session state. The session state includes things like filters, bookmarks, and hidden fields.

Query Prompts#

Keypress

Command

/

Search for lines matching a regular expression

;

Open the SQLite Interface to execute SQL statements/queries

:

Execute an internal command, see Commands for more information

|

Execute an lnav script located in a format directory

Ctrl + ]

Abort the prompt

Customizing#

You can customize the behavior of hotkeys by defining your own keymaps. Consult the Keymaps configuration section for more information.