3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

右Alt + {n} で仮想デスクトップ n 番目に切り替える。Windows 10

Last updated at Posted at 2020-04-23

ゴール

タイトルのまんまです。実現のために 右alt -> F13 キーマッピングを変更してます。(右altなのは個人的にほとんど使っていなかったため)

  1. F13(右alt) + o (右のデスクトップへ)
  2. F13(右alt) + i (左のデスクトップへ)
  3. F13(右alt) + 1 (1番目のデスクトップへ)
  4. F13(右alt) + 5 (5番目のデスクトップへ)

背景

Win + ctrl + 矢印←→ のショートカットしんどいっていうのが動機。
同様のこと (仮想デスクトップ n 番目に切り替え) ができるツール https://github.com/sdias/win-10-virtual-desktop-enhancer/releases を試してみたけど、
デスクトップ切り替え時、既に起動してるアプリが
asadf.gif
になるので使用を断念した。

手順

  1. インストールする -- https://autohotkey.com/download/

  2. 定義スクリプト C:\Program Files\AutoHotkey\MySettingKey.ahk を作成して右クリック Run Script

    MySettingKey.ahk

; move active window to adjacent desktop
F13 & I::Send,{Blind}#^{Left}
F13 & O::Send,{Blind}#^{Right}
F13 & 1::Send,{Blind}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}
F13 & 2::Send,{Blind}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Right}
F13 & 3::Send,{Blind}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Right}#^{Right}
F13 & 4::Send,{Blind}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Right}#^{Right}#^{Right}
F13 & 5::Send,{Blind}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Left}#^{Right}#^{Right}#^{Right}#^{Right}
```

※OS起動時に毎回実行するのはめんどいので`MySettingKey.ahk`ショートカット作成して実行するようにしてます。
  1. 右alt -> F13 キーマッピングを変更

    image.png

    コンピューター\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
    新規->バイナリ値: 「名前:Scancode Map」を作成する。

    Scancode Map

00 00 00 00 00 00 00 00
02 00 00 00 64 00 38 E0
00 00 00 00
```

  1. PCを再起動すると 右alt -> F13 が有効になってデスクトップ切り替えができる

(必要なら) デスクトップ番号表示

SylphyHorn 使わせてもらってます (インストールするとデフォルトのままで番号表示される)

3
2
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?