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

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

Rule of thumb for the choice of key notation?


From: Alexander Shukaev
Subject: Rule of thumb for the choice of key notation?
Date: Sat, 25 Jul 2015 14:38:31 +0200

Hello,

I'm still confused about which key notation to prefer when doing
personal configurations as well as when remapping defaults.  In
particular, should I prefer <return> to RET or vice versa (the same
about <tab> vs. TAB, etc.)?   Similarly, should I prefer <backtab> or
S-TAB for personal configurations?

Let me give you an example where I found problems:

(global-set-key (kbd "RET") #'newline-and-indent)     ; Not `<return>'!
(global-set-key (kbd "TAB") #'indent-for-tab-command) ; Not `<tab>'!

(global-set-key (kbd "<escape>") #'keyboard-quit) ; Not `ESC'!

that is only this way those commands would be bound as expected; the
opposite variants will not work at all.  Why?

It looks like there is no consistency...  Personally, I would prefer
to use angle brackets notation everywhere as it looks more friendly to
read but it seems like it just does not work sometimes.

Another problem is that C-m is RET, C-i is TAB and so on.  Does this
key dualism apply to angle bracket notation in the similar way?  Is
there no way to separate those in both GUI and terminal Emacs (without
dirty hacks of chained remapping)?

Finally, there exists <S-tab> to <backtab> mapping by default but there is no

(define-key function-key-map (kbd "<S-C-tab>") (kbd "<C-backtab>"))

Why?

Thanks,
Alexander



reply via email to

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