|
|
|
@ -781,6 +781,10 @@ Defines where to show borders for the selection panel.</p>
|
|
|
|
|
<p>Set it to a file path to start fifo when xplr loads.
|
|
|
|
|
Generally it is used to integrate with external tools like previewers.</p>
|
|
|
|
|
<p>Type: nullable string</p>
|
|
|
|
|
<h4 id="xplrconfiggeneralglobal_key_bindings"><a class="header" href="#xplrconfiggeneralglobal_key_bindings">xplr.config.general.global_key_bindings</a></h4>
|
|
|
|
|
<p>Use it to define a set of key bindings that are available by default in
|
|
|
|
|
every <a href="https://xplr.dev/en/mode">mode</a>. They can be overwritten.</p>
|
|
|
|
|
<p>Type: <a href="https://xplr.dev/en/configure-key-bindings#key-bindings">Key Bindings</a></p>
|
|
|
|
|
<div style="break-before: page; page-break-before: always;"></div><h3 id="node-types"><a class="header" href="#node-types">Node Types</a></h3>
|
|
|
|
|
<p>This section defines how to deal with different kinds of nodes (files,
|
|
|
|
|
directories, symlinks etc.) based on their properties.</p>
|
|
|
|
@ -1409,51 +1413,62 @@ of <a href="modes.html">modes</a> and the key mappings for each mode.</p>
|
|
|
|
|
<p>If you need help debugging or understanding key bindings DYI way, you can
|
|
|
|
|
create a <code>test.lua</code> file with the following script, launch xplr with
|
|
|
|
|
<code>xplr --extra-config test.lua</code>, press <code>#</code> and play around.</p>
|
|
|
|
|
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
|
|
|
|
|
<pre><code class="language-lua">-- The global key bindings inherited by all the modes.
|
|
|
|
|
xplr.config.general.global_key_bindings = {
|
|
|
|
|
on_key = {
|
|
|
|
|
esc = {
|
|
|
|
|
help = "escape",
|
|
|
|
|
messages = {
|
|
|
|
|
{ LogInfo = "global on_key(esc) called" },
|
|
|
|
|
"PopMode",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
["ctrl-c"] = {
|
|
|
|
|
help = "terminate",
|
|
|
|
|
messages = {
|
|
|
|
|
"Terminate",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- Press `#` to enter the `debug key bindings` mode.
|
|
|
|
|
xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
|
|
|
|
|
help = "test",
|
|
|
|
|
messages = {
|
|
|
|
|
"PopMode",
|
|
|
|
|
{ SwitchModeCustom = "test" },
|
|
|
|
|
{ SwitchModeCustom = "debug_key_bindings" },
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xplr.config.modes.custom.test = {
|
|
|
|
|
name = "test",
|
|
|
|
|
-- The `debug key bindings` mode.
|
|
|
|
|
xplr.config.modes.custom.debug_key_bindings = {
|
|
|
|
|
name = "debug key bindings",
|
|
|
|
|
key_bindings = {
|
|
|
|
|
on_key = {
|
|
|
|
|
["1"] = {
|
|
|
|
|
messages = {
|
|
|
|
|
{ LogInfo = "on_key called" },
|
|
|
|
|
{ LogInfo = "on_key(1) called" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
a = {
|
|
|
|
|
messages = {
|
|
|
|
|
{ LogInfo = "on_key called" },
|
|
|
|
|
{ LogInfo = "on_key(a) called" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
["`"] = {
|
|
|
|
|
messages = {
|
|
|
|
|
{ LogInfo = "on_key called" },
|
|
|
|
|
{ LogInfo = "on_key(`) called" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
tab = {
|
|
|
|
|
messages = {
|
|
|
|
|
{ LogInfo = "on_key called" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
esc = {
|
|
|
|
|
messages = {
|
|
|
|
|
"PopMode",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
["ctrl-c"] = {
|
|
|
|
|
messages = {
|
|
|
|
|
"Terminate",
|
|
|
|
|
{ LogInfo = "on_key(tab) called" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
f1 = {
|
|
|
|
|
messages = {
|
|
|
|
|
{ LogInfo = "on_key called" },
|
|
|
|
|
{ LogInfo = "on_key(f1) called" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|