簡體   English   中英

在 Windows 上重新定義 Emacs 中的鍵

[英]Redefining keys in Emacs on Windows

我在 Mac OS X 上使用我的命令鍵作為額外的控制鍵(我相信太空學員鍵盤具有這種配置)。 我想通過在 Emacs 中將Alt切換為Ctrl並將Windows鍵切換為Alt來在我的 Windows 機器上模擬這一點。 這可能嗎? 我發現這篇文章暗示了類似

(setq w32-pass-lwindow-to-system nil 
      w32-pass-rwindow-to-system nil 
      w32-pass-apps-to-system nil 
      w32-lwindow-modifier 'super ;; Left Windows key 
      w32-rwindow-modifier 'super ;; Right Windows key 
      w32-apps-modifier 'hyper) ;; Menu key

在按下 windows 鍵時獲得superhyper鍵。 當我嘗試將其重新映射到'control以對其進行測試時(但最終我希望它是metaAltCtrl ,如前所述), windows-e仍然被 Windows (XP) 攔截並打開資源管理器,但看起來像一個開始的好地方? 我將不勝感激任何建議。

w32-pass-lwindow-to-system的文檔中:

請注意,左側“Windows”鍵與其他鍵的某些組合在低級別被 Windows 捕獲,因此在 Emacs 中綁定它們將無效。 例如 <lwindow>-r 總是彈出 Windows 運行對話框,<lwindow>-<Pause> 彈出“系統屬性”對話框等。但是,請參見 `w32-phantom-key-code' 的文檔字符串.

w32-phantom-key-code的文檔中:

用於生成“幻像”按鍵的虛擬鍵代碼。 值是一個介於 0 和 255 之間的數字。當 `w32-pass-lwindow-to-system' 或 `w32-pass-rwindow-to-系統'是零。

正如 Xah 的網站上所說:

除非您使用 AutoHotkey 等其他工具,否則無法解決此問題。 即使這樣,也可能無法禁用【Win+l】(鎖定窗口)和【Win+u】(輕松訪問)。

因此,如果它不適用於他描述的方法(這似乎是正確的),您應該查看 AutoHotKey

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM