首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >emacs中的超级键绑定

emacs中的超级键绑定
EN

Stack Overflow用户
提问于 2013-09-25 05:33:00
回答 2查看 5.8K关注 0票数 10
代码语言:javascript
复制
(global-set-key (kbd "<s-d>") 'duplicate-line)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECB MODE;;;;;;;;;;;;;;;;;;;;;
(global-set-key (kbd "<s-left>") 'ecb-goto-window-methods)
(global-set-key (kbd "<s-right>") 'ecb-goto-window-edit1)
(global-set-key (kbd "<s-down>") 'ecb-goto-window-history)
(global-set-key (kbd "<s-up>") 'ecb-goto-window-sources)
(global-set-key (kbd "<s-home>") 'ecb-goto-window-directories)

这是我的.emacs文件的一部分。在绑定包含super密钥的密钥组合时,我遇到了一个奇怪的问题。每当我将一个函数绑定到super-key + <alphanumberic value>时,它就拒绝工作。

在上面的文件中,除了<s-d>之外,所有绑定都正常工作。

我用的是emacs 24.3在fedora 13

EN

回答 2

Stack Overflow用户

发布于 2013-09-25 06:22:47

在这里工作的一些选择:

代码语言:javascript
复制
(global-set-key [(super ?\ö)] 'ar-beginning-of-comment-atpt)

(global-set-key [(super ?\Ö)] 'ar-end-of-comment-atpt)

(global-set-key [(super p)] 'View-sroll-line-backward)

(global-set-key [(super s)] 'hs-hide-all)

(global-set-key [(super tab)] 'scroll-up)

(global-set-key [(super \{)] 'ar-brace-region-atpt)

(global-set-key [(super space)] 'ar-whitespace-to-minus)

(global-set-key [(super kp-4)] 'missing-py-variable-name-face-lp-1215791-test)
票数 2
EN

Stack Overflow用户

发布于 2013-09-25 16:48:48

所有这些都来自. . . /lisp/term/ns-win.el

代码语言:javascript
复制
(define-key global-map [?\s-,] 'customize)
(define-key global-map [?\s-'] 'next-multiframe-window)
(define-key global-map [?\s-`] 'other-frame)
(define-key global-map [?\s-~] 'ns-prev-frame)
(define-key global-map [?\s--] 'center-line)
(define-key global-map [?\s-:] 'ispell)
(define-key global-map [?\s-?] 'info)
(define-key global-map [?\s-^] 'kill-some-buffers)
(define-key global-map [?\s-&] 'kill-this-buffer)
(define-key global-map [?\s-C] 'ns-popup-color-panel)
(define-key global-map [?\s-D] 'dired)
(define-key global-map [?\s-E] 'edit-abbrevs)
(define-key global-map [?\s-L] 'shell-command)
(define-key global-map [?\s-M] 'manual-entry)
(define-key global-map [?\s-S] 'ns-write-file-using-panel)
(define-key global-map [?\s-a] 'mark-whole-buffer)
(define-key global-map [?\s-c] 'ns-copy-including-secondary)
(define-key global-map [?\s-d] 'isearch-repeat-backward)
(define-key global-map [?\s-e] 'isearch-yank-kill)
(define-key global-map [?\s-f] 'isearch-forward)
(define-key global-map [?\s-g] 'isearch-repeat-forward)
(define-key global-map [?\s-h] 'ns-do-hide-emacs)
(define-key global-map [?\s-H] 'ns-do-hide-others)
(define-key global-map [?\s-j] 'exchange-point-and-mark)
(define-key global-map [?\s-k] 'kill-this-buffer)
(define-key global-map [?\s-l] 'goto-line)
(define-key global-map [?\s-m] 'iconify-frame)
(define-key global-map [?\s-n] 'make-frame)
(define-key global-map [?\s-o] 'ns-open-file-using-panel)
(define-key global-map [?\s-p] 'ns-print-buffer)
(define-key global-map [?\s-q] 'save-buffers-kill-emacs)
(define-key global-map [?\s-s] 'save-buffer)
(define-key global-map [?\s-t] 'ns-popup-font-panel)
(define-key global-map [?\s-u] 'revert-buffer)
(define-key global-map [?\s-v] 'yank)
(define-key global-map [?\s-w] 'delete-frame)
(define-key global-map [?\s-x] 'kill-region)
(define-key global-map [?\s-y] 'ns-paste-secondary)
(define-key global-map [?\s-z] 'undo)
(define-key global-map [?\s-|] 'shell-command-on-region)
(define-key global-map [s-kp-bar] 'shell-command-on-region)
;; (as in Terminal.app)
(define-key global-map [s-right] 'ns-next-frame)
(define-key global-map [s-left] 'ns-prev-frame)

以下是ctrl+opt+command+s在美国苹果有线迷你键盘上的一个例子:

代码语言:javascript
复制
(define-key global-map (kbd "<M-C-s-268632083>") 'help-for-help)
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18996977

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档