Function: ghostel-char-mode
ghostel-char-mode is an interactive and natively compiled function
defined in ghostel.el.
Signature
(ghostel-char-mode)
Documentation
Switch to char mode — send all keys to the terminal.
Even keys listed in ghostel-keymap-exceptions (\C-c, \C-x,
\C-h, \M-x, …) are sent to the terminal.
The only way to exit is
M-RET (ghostel-semi-char-mode).
Key Bindings
ghostel-mode-map C-c M-d
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel-char-mode ()
"Switch to char mode — send all keys to the terminal.
Even keys listed in `ghostel-keymap-exceptions' (\\`C-c', \\`C-x',
\\`C-h', \\`M-x', …) are sent to the terminal.
\\<ghostel-char-mode-map>The only way to exit is
\\[ghostel-semi-char-mode]."
(interactive)
(ghostel--ensure-ghostel-buffer)
;; Manual mode switch — see `ghostel-semi-char-mode' for why.
(setq ghostel--line-mode-paused nil)
(unless (eq ghostel--input-mode 'char)
(pcase ghostel--input-mode
('copy (ghostel--leave-readonly-state))
('emacs (ghostel--leave-readonly-state))
('line (ghostel--line-mode-teardown)))
(setq ghostel--input-mode 'char)
(ghostel--sync-read-only)
;; Route char mode through `emulation-mode-map-alists' so it
;; overrides minor-mode keymaps (without this, a minor mode that
;; binds a prefix like \\`C-c' would steal those keys before
;; `ghostel-char-mode-map' got a chance).
(setq ghostel--char-mode-override-active t)
(use-local-map ghostel-char-mode-map)
(setq ghostel--mode-line-tag (ghostel--mode-line-tag-make 'char ":Char"))
(ghostel--mode-line-refresh)
(when ghostel--term
(deactivate-mark) ; A region left active would grow with point.
;; FORCE: a deliberate switch wins over any roaming veto.
(goto-char (point-max))
(ghostel--anchor-window nil t)
(setq ghostel--force-next-redraw t)
(ghostel--invalidate))
(message "Char mode (%s to exit)"
(substitute-command-keys
"\\<ghostel-char-mode-map>\\[ghostel-semi-char-mode]"))))