Win10 で X-Mouse 設定

Posted on 2020-02-22

ウィンドウの一部が隠れている状態でも、マウスをウィンドウ上に移動するだけで選択でき、入力操作が可能になります。

通常、ウィンドウを操作するには、まずアクティブな状態 (選択された状態) にするために、ウィンドウをクリックして最前面に出す必要がありますが、 最前面に出さずに選択状態にできるので、 参照中の他のアプリ画面が隠れてしまうといった煩わしさから解放されます。

以下のレジストリを設定します。

Windows Registry Editor Version 5.00
; X-Mouse
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ActiveWndTrkTimeout"=dword:00000064
"UserPreferencesMask"=hex:91,00,27,80,10,00,00,00

ActiveWndTrkTimeout は切り替わるまでの時間(mS)で、100mS 程度がお勧め。
UserPreferencesMask 設定値のうち X-Mouse に関わるのは先頭の 1bit だけですので、現在の設定値が hex:90,00,27,80,10,00,00,00 となっていたら、 0x90 | 0x01 = 0x91 なので、hex:91,00,27,80,10,00,00,00 に書き換えれば良いです。
なお、設定の反映にはログアウトが必要。

UserPreferencesMask の詳しい説明

パフォーマンス改善等でよく弄られる UserPreferencesMask ですがここに纏めておきます。

# UserPreferencesMask = 90,12,07,80,10,00,00,00 の場合で説明
# 先頭1バイト: 0x90
0x90(1001 0000)
Bit00 Active window tracking: 0
Bit01 Menu animation: 0
Bit02 Slide open combo boxes (Combo box animation): 0
Bit03 Smooth-scroll list boxes (List box smooth scrolling): 0 
Bit04 Gradient captions: 1 
Bit05 Keyboard cues): 0
Bit06 Active window tracking Z order: 0
Bit07 Hot tracking: 1

# 2バイト目: 0x12
0x12(0001 0010) -> 0x00
Bit08 (reserved): 0
Bit09 Fade or slide menus into view (Menu fade): 1 -> 0
Bit10 Fade out menu items after clicking (Selection fade): 0
Bit11 Tool tip animation: 0
Bit12 Fade or slide ToolTips into view (Tool tip fade): 1 -> 0
Bit13 Show shadows under mouse pointer (Enable Pointer Shadow) (Cursor shadow): 0
Bit14 Show location of pointer when I press CTRL key: 0
Bit15 Turn On ClickLock (Mouse): 0

# 3バイト目: 0x07
0x07(0000 0111)
Bit16 Hide cursor while typing: 1
Bit17 Use visual styles on windows and buttons: 1
Bit18 Show shadows under menus: 1
Bit19 (reserved): 0
Bit20 (reserved): 0
Bit21 Show shadows under windows: 0
Bit22 Use Visual styles on windows and buttons: 0
Bit23 (reserved): 0

# 4バイト目: 0x80
0x80(1000 0000)
Bit31 UI effects: 1

# 5バイト目: 0x10
0x10(0001 0000)
Bit36 (Unknown): 1
Bit38 Animate controls and elements inside windows: 0

# 6バイト目: 0x00
0x00(0000 0000)
Bit40 IME Toolbar": 0

XP の頃に作成されたフラグもありますので、現行 OS で機能するかどうかは未保証です。

AccentColor / AccentColorInactive

タイトルバーの色が白くなってしまい、アクティブ/インアクティブの区別がつかなくなっている場合は、以下を設定します。

設定 -> 個人設定 -> にあるアクセントカラーを選ぶ。 タイトル バ-とウィンドウの境界線 にチェックを入れる。
レジストリエディターで AccentColorInactive 値を作成する。 DWORD 値の指定方法は 0xff+BBGGRR らしいが、アクセントカラーを変更すると AccentColor 値も変化するので、これを参考にしながら設定値を選ぶと良い。

Windows Registry Editor Version 5.00
; set Active/Inactive window color
[HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM]
"AccentColor"=dword:ffd77800
"AccentColorInactive"=dword:ffb16300