aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanfel <33464477+Janfel@users.noreply.github.com>2021-02-08 13:47:01 +0100
committerjixiuf <jixiuf@qq.com>2021-02-09 11:54:03 +0800
commit787af4e32f69ddacb9703e933b5a03426aee2c3c (patch)
treef906ae0662d2d27913072349ab49bf208566ccbd
parent4c5a67bf43f80120f93604bd74bcca22213b9767 (diff)
Change last-input-event to last-command-event.
This makes keys translated using key-translation-map properly insert the translated character instead of trying to insert the original character. Fixes #202.
-rw-r--r--vterm.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/vterm.el b/vterm.el
index ab6352a..985fd34 100644
--- a/vterm.el
+++ b/vterm.el
@@ -788,11 +788,11 @@ will invert `vterm-copy-exclude-prompt' for that call."
"Send invoking key to libvterm."
(interactive)
(when vterm--term
- (let* ((modifiers (event-modifiers last-input-event))
+ (let* ((modifiers (event-modifiers last-command-event))
(shift (memq 'shift modifiers))
(meta (memq 'meta modifiers))
(ctrl (memq 'control modifiers))
- (raw-key (event-basic-type last-input-event))
+ (raw-key (event-basic-type last-command-event))
(ev-key (if input-method-function
(let ((inhibit-read-only t))
(funcall input-method-function raw-key))
@@ -806,7 +806,7 @@ will invert `vterm-copy-exclude-prompt' for that call."
(when vterm--term
(let ((inhibit-redisplay t)
(inhibit-read-only t))
- (when (and (not (symbolp last-input-event)) shift (not meta) (not ctrl))
+ (when (and (not (symbolp last-command-event)) shift (not meta) (not ctrl))
(setq key (upcase key)))
(vterm--update vterm--term key shift meta ctrl)
(setq vterm--redraw-immididately t)