0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windowsでemacs風キーバインド設定

Posted at

Windows11 で emacs風キーバインド

GeForceなPCが使いたくて、久しぶりにWindowsマシンを買い替えたので
基本的なキーバインドをemacs風味にしたので、設定内容を備忘録的に記録しておきます。

対象PC

今回購入したPCはこちら

ちょっとメモリが少ない(16GB)ので、64GBに増設予定。

使用ツール

AutoHotkey 1.1
https://www.autohotkey.com/

設定ファイル

設定ファイルは以下の通り

emacs_keys.ahk
^b::Send, {Left}
^f::Send, {Right}
^p::Send, {Up}
^n::Send, {Down}
^a::Send, {Home}
^e::Send, {End}
^d::Send, {Delete}
^h::Send, {Backspace}
^k::Send, +{End}{Del}
^w::Send, ^x
!w::Send, ^c
^y::Send, ^v
^x::
    KeyWait, Control, T0.5  ; 一応、Ctrlが離れるのをちょっと待って安全処理
    Input, SubKey, L1 T1
    if (SubKey = "s")
        Send, ^s
    else if (SubKey = "c")
        Send, !{F4}
    return

^k で Yank Bufferにコピーができれば良いのだけど、うまくいかなかったぉ

起動時設定

スタートアップフォルダに ahkファイルのショートカットを設置する。

  • スタートアップフォルダを開く方法
    Win + R を押して、実行ダイアログを開いて shell:startup と入力する

再起動後AutoHotkeyの設定が有効になるまで少し時間がかかります。

追記

Nortonが ahk ファイルを IDP.Generic に感染していると誤認識する問題があるようでした。

CapsLock Ctrl 入れ替え

ahkファイルに CapsLock::Ctrl を記載すると入れ替えができるはずなのですが、
なぜか有効にならなかったため SharpKeys を利用した。
設定内容は↓のとおり

SharpKeys設定.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?