Having written a function (say,
my-func), I wanted to map it in
ledger-mode-map to the keypress that I will call "Control dollar," that is, the dollar sign $, typed while the Ctrl key is held down.
(define-key ledger-mode-map (kbd "C-$") 'my-func)
when executed does not indicate a failure, but a subsequent
C-h my-func indicates no key binding.
C-h k C-$ produces the output "C-$ is undefined".
I need a way to express "Control dollar" so that Emacs can recognize it as a keypress, if that is even possible. Here are a few of the alternatives I have tried to
|Expression||Result when evaluated|
|(kbd "C-[$]")||C- must prefix a single character, not [$]|
|[(control $)]||[(control $)]|
|[(control \$)]||[(control $)]|
@amitp: It does work if I use
global-map instead of
ledger-mode-map. It does not work if I use, say,
C-! instead of