aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Stosberg <mark@rideamigos.com>2022-01-17 18:57:24 +0000
committerMark Stosberg <mark@rideamigos.com>2022-01-25 20:27:58 +0000
commit6d76bb0f3249c27111f921379d20ddbc408927e4 (patch)
tree2349760715e7ed85d752ab6d2249bd64e265a578
parentmeson: fix race build order of builtin terminfo (diff)
config: support Copy and Paste keycodes by default
These work as expected and don't interfere with anything else. They are useful on the increasing number of keyboards with custom firmware. The keycodes enable using the same key combination for terminals as other apps. For example: by holding down a layer-switching key with a thumb, the Copy and Paste key codes can be assigned to the C and V keys on a secondary layer, making for a natural universal copy/paste key combination.
-rw-r--r--config.c2
-rw-r--r--doc/foot.ini.5.scd5
-rw-r--r--foot.ini4
3 files changed, 7 insertions, 4 deletions
diff --git a/config.c b/config.c
index 94ac58d0..9004630d 100644
--- a/config.c
+++ b/config.c
@@ -2583,7 +2583,9 @@ add_default_key_bindings(struct config *conf)
{BIND_ACTION_SCROLLBACK_UP_PAGE, m_shift, {{XKB_KEY_Prior}}},
{BIND_ACTION_SCROLLBACK_DOWN_PAGE, m_shift, {{XKB_KEY_Next}}},
{BIND_ACTION_CLIPBOARD_COPY, m_ctrl_shift, {{XKB_KEY_c}}},
+ {BIND_ACTION_CLIPBOARD_COPY, m_none, {{XKB_KEY_XF86Copy}}},
{BIND_ACTION_CLIPBOARD_PASTE, m_ctrl_shift, {{XKB_KEY_v}}},
+ {BIND_ACTION_CLIPBOARD_PASTE, m_none, {{XKB_KEY_XF86Paste}}},
{BIND_ACTION_PRIMARY_PASTE, m_shift, {{XKB_KEY_Insert}}},
{BIND_ACTION_SEARCH_START, m_ctrl_shift, {{XKB_KEY_r}}},
{BIND_ACTION_FONT_SIZE_UP, m_ctrl, {{XKB_KEY_plus}}},
diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd
index 9bdd668a..b960aae3 100644
--- a/doc/foot.ini.5.scd
+++ b/doc/foot.ini.5.scd
@@ -682,10 +682,11 @@ e.g. *search-start=none*.
Scroll down/forward a single line in history. Default: _not bound_.
*clipboard-copy*
- Copies the current selection into the _clipboard_. Default: _Control+Shift+c_.
+ Copies the current selection into the _clipboard_. Default: _Control+Shift+c_
+ _XF86Copy_.
*clipboard-paste*
- Pastes from the _clipboard_. Default: _Control+Shift+v_.
+ Pastes from the _clipboard_. Default: _Control+Shift+v_ _XF86Paste_.
*primary-paste*
Pastes from the _primary selection_. Default: _Shift+Insert_ (also
diff --git a/foot.ini b/foot.ini
index 399becaa..e84c2bb2 100644
--- a/foot.ini
+++ b/foot.ini
@@ -126,8 +126,8 @@
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
-# clipboard-copy=Control+Shift+c
-# clipboard-paste=Control+Shift+v
+# clipboard-copy=Control+Shift+c XF86Copy
+# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add