Created
September 14, 2012 02:53
-
-
Save to/3719533 to your computer and use it in GitHub Desktop.
Windows 7 - キーボード設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; #InstallKeybdHook | |
/* | |
^ Ctrl | |
+ Shift | |
! Alt | |
# Win | |
<! 左Alt | |
>! 右Alt | |
*/ | |
;; キーリピートを取りこぼさないようにSendの間隔を無くす | |
SetKeyDelay, -1, -1 | |
#UseHook | |
^q::WinMinimize, A | |
+^w::WinClose, A | |
;; 方向キー | |
*>+j::Send, {Blind}{RShift Up}{Left}{RShift Down} | |
*>+l::Send, {Blind}{RShift Up}{Right}{RShift Down} | |
*>+i::Send, {Blind}{RShift Up}{Up}{RShift Down} | |
*>+k::Send, {Blind}{RShift Up}{Down}{RShift Down} | |
*>+y::Send, {Blind}{RShift Up}{PgUp}{RShift Down} | |
*>+u::Send, {Blind}{RShift Up}{PgDn}{RShift Down} | |
*>+n::Send, {Blind}{RShift Up}{Home}{RShift Down} | |
*>+m::Send, {Blind}{RShift Up}{End}{RShift Down} | |
#UseHook off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
// 右Shift(36) -> 無変換(7b) | |
// BS(0e) -> 変換(79) | |
// DEL(53e0) -> ひらがな(70) | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,04,00,00,00,36,00,7b,00,0e,00,79,00,53,e0,70,00,00,00,00,00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AHKとレジストリを組み合わせて、無変換キー + jkli周辺にカーソル移動を割り当てた。
Windows XPの時は無変換キーにWindowsキーを割り当てて同様のキー配置で利用していたが、Windows 7になりAeroスナップのキーと衝突し動作しなくなったため右シフトキーへ変更した。
Sendコマンドは、対象キーを送信する前に全ての修飾キーを一度上げ、送信後に再度下げる振る舞いをする。このため単純にSendコマンドでカーソルキーを送信すると、左シフトやコントロールキーとの組み合わせが使えなくなる(AHKによる上げられるため)。まず{Blind}を指定し、この動作を抑制する。そしてトリガの組み合わせに利用した右シフトだけを上げて無効にし対象キーを送信する。デフォルトで0.02秒程度のキーの押し込み待機があり、この間にキーリピートで入力が起きると取りこぼしスルーしてしまうため、SetKeyDelayで間隔を短くしこれを抑制する。
[変換]と[ひらがな]に削除系のキーを割り当てるのは危険が多いが、慣れると平気になる。
僕は、手近な良いところに割り当てられるキーが多いので、日本語キーボードが好きだ。