I'm trying to do this
(global-set-key (kbd "s-up") 'beginning-of-buffer)
and I get this error
error "s- must prefix a single character, not up"
How do I tell it to do this?
Named keys should be written in angle brackets like this:
(kbd "s-<up>")
The exceptions to this are RET
, SPC
, TAB
, DEL
, LFD
, ESC
, and NUL
, which must be in uppercase. See the documentation for edmacro-mode
(C-h f edmacro-mode) for a more complete explanation of the syntax kbd
accepts.
Also note that the s-
prefix is for the super modifier, and S-
is for shift.
(global-set-key (kbd "S-<up>") 'beginning-of-buffer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With