How to use the Windows key in Emacs keybindings
On my keyboard, there is a key with the Windows logo between Ctrl and Alt. I want to use it for my Emacs keybindings
Thanks to Xah:
http://xahlee.info/emacs/emacs/emacs_hyper_super_keys.html
In Emacs, the "Windows key" is named "Super". In keybindings it is lowecase "s".
So, for example, if you want to set:
So, for example, if you want to set:
"Windows + TAB" key combination: | s-<tab> |
"Windows + Enter" key combination: | s-<return> |
"Windows + Arrow down" key combination: | s-<down> |
"Windows + Arrow right" key combination: | s-<right> |
(define-key copilot-mode-map (kbd "s-<next>") #'copilot-next-completion)
(define-key copilot-mode-map (kbd "s-<prior>") #'copilot-previous-completion)
(define-key copilot-mode-map (kbd "s-<right>") #'copilot-accept-completion-by-word)
(define-key copilot-mode-map (kbd "s-<down>") #'copilot-accept-completion-by-line)
(define-key global-map (kbd "s-<return>") #'rktmb/copilot-complete-or-accept)