chuntaro / emacs-keypression

Keystroke visualizer for GUI version Emacs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ENT is shown as C-m

takaxp opened this issue · comments

When I type "ENT", then "C-m" is displayed in keycaster.

I tried the following code in keycaster-pre-command,

(message "%s - %s - %s"
  (keycaster--keys-to-string (this-command-keys-vector))
  (key-description (this-command-keys))
  (this-command-keys))

and I received the following:

C-m - RET - ^M

I think key-description will help this issue.

Additionally, in case the following:

(message "%s - %s - %s"
  (keycaster--keys-to-string (this-command-keys-vector))
  (key-description (this-command-keys-vector))
  (this-command-keys-vector))

then,

C-m - RET - [13]

We can see similar issue on typing "delete", it shows:

^? - DEL - [127]

Best,
Takaaki

Modified to use `key-description' and committed code.
I was able to reduce unnecessary code! Thanks!

Good for me!