Subject: Re: bug#27470: 26.0.50; this-command-keys and interactive input

From: Stefan Monnier <[email-masked]>
Date: Sat, 24 Jun 2017 09:15:04 -0400

> (defun test (arg)
>   (interactive (list (read-from-minibuffer "Input: ")))
>   (message "%S" (cons this-command (this-command-keys)))
>   arg)

Whether it's a bug or not is hard to say (the quirk is described in the
doctring).  But you can get the behavior you want with:

    (defun sm-test (arg &optional keys)
      (interactive
        (let ((keys (this-command-keys-vector)))
          (list (read-from-minibuffer "Input: ") keys)))
      (message "%S" (cons this-command keys))
      arg)

-- Stefan