diff options
| author | Tyler Grinn <tylergrinn@gmail.com> | 2022-04-19 02:16:06 -0400 |
|---|---|---|
| committer | Gabriele Bozzola <sbozzolator@gmail.com> | 2022-04-21 08:35:37 -0700 |
| commit | 8d7c8c593f528646bd3304e64f4ec47d52c40aec (patch) | |
| tree | 9db3a46860bc96b678f611eb0bc576dcb381dfbd /README.md | |
| parent | dccb6b23edb8c983eb2a3862fad3c9602c03b8df (diff) | |
Add send-next-key function
Read next input event and send it to the libvterm.
This is useful for controlling an emacs session within emacs-libvterm.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -455,6 +455,18 @@ or remove it from `vterm-mode-map`. By default, `vterm.el` binds most of the like `<backspace>` and `<return>`. Sending a keyboard interrupt is bound to `C-c C-c`. +In order to send a keypress that is already recognized by Emacs, such as `C-g`, +use the interactive function `vterm-send-next-key`. This can be bound to a key +in the `vterm-mode-map` like `C-q`, in which case pressing `C-q C-g` will send a +`C-g` key to the terminal, and so on for other modified keys: + +``` emacs +(define-key vterm-mode-map (kbd "C-q") #'vterm-send-next-key) +``` + +This can be useful for controlling an application running in the terminal, such +as Emacs or Nano. + ## Fonts You can change the font (the _face_) used in a vterm with the following code: |
