Can I bind action to a keypress in Emacs?

47 views Asked by At

I have (kbd "C-c S-<down>") and (kbd "C-c S-<up>") bound to shrink-window and enlarge-window, respectively.

It works, but I also want Emacs to change window size during a keypress, while I am holding S-<down> or S-<up>.

Is it possible in Emacs?

1

There are 1 answers

0
lawlist On BEST ANSWER
(define-key global-map [S-up] 'enlarge-window)

(define-key global-map [S-down] 'shrink-window)