How do I get attached to s-up?

I'm trying to do it

(global-set-key (kbd "s-up") 'beginning-of-buffer)

and i get this error

error "s- must prefix a single character, not up"

How can I say that?

+5
source share
2 answers

Named keys must be written in angle brackets as follows:

(kbd "s-<up>")

Exceptions are RET, SPC, TAB, DEL, LFD, ESCand NUL, which must be in uppercase. See the Documentation for edmacro-mode( C-h f edmacro-mode) for a more complete explanation of the kbdaccepts syntax .

Also note that the prefix s-is for the super modifier, and s-for shifting.

+10
source
(global-set-key (kbd "S-<up>") 'beginning-of-buffer)
+6
source

All Articles