help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Getting a key's read syntax as a string


From: Drew Adams
Subject: RE: Getting a key's read syntax as a string
Date: Fri, 27 Mar 2015 21:50:21 -0700 (PDT)

> Is there a programmatic way to get a string representing a
> key-with-modifier's read syntax, given its integer value?
> 
> Perhaps more clearly, I'm looking for something that would work like
> this:
>     (key-read-syntax ?\C-a) ;=> "?\C-a" or "C-a"
>     (key-read-syntax ?\M-f) ;=> "?\M-f" or "M-f"
> I checked the manual but didn't come across anything.

Not sure what you're asking, but does `single-key-description' or
`key-description' fit?

(single-key-description ?\C-a) ;=> "C-a"
etc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]