Function: ghostel--send-encoded

ghostel--send-encoded is a natively compiled function defined in ghostel.el.

Signature

(ghostel--send-encoded KEY-NAME MODS &optional UTF8)

Documentation

Encode KEY-NAME with MODS via the terminal's key encoder and send.

KEY-NAME is a string like "a", "return", "up". MODS is a string like "ctrl", "shift,ctrl", or "". UTF8 is optional text generated by the key. Falls back to raw escape sequences if the encoder doesn't produce output.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--send-encoded (key-name mods &optional utf8)
  "Encode KEY-NAME with MODS via the terminal's key encoder and send.
KEY-NAME is a string like \"a\", \"return\", \"up\".
MODS is a string like \"ctrl\", \"shift,ctrl\", or \"\".
UTF8 is optional text generated by the key.
Falls back to raw escape sequences if the encoder doesn't produce output."
  (when ghostel--term
    (if (ghostel--encode-key ghostel--term key-name mods utf8)
        (setq ghostel--last-send-time (current-time))
      (let ((seq (ghostel--raw-key-sequence key-name mods)))
        (when seq (ghostel--send-string seq))))))