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?

UbuntuでSuper (Windows) キーとAltキーを入れ替え

Posted at

キーの入れ替え

setxkbmap -option altwin:swap_alt_win

オプション一覧は次のコマンドの出力の !option 以下で確認できる.

less /usr/share/X11/xkb/rules/base.lst

Ubuntu起動時に自動的に実行

再起動後,先ほどのコマンドが自動的に実行されるように設定.

mkdir ~/auto_shell
cd ~/auto_shell

vi swap_alt_win.sh

~/auto_shell/swap_alt_win.sh
setxkbmap -option altwin:swap_alt_win
chmod +x swap_alt_win.sh

vi ~/.config/systemd/user/swap_alt_win.service

<User Name> は自身のユーザー名に置き換える.

~/.config/systemd/user/swap_alt_win.service
[Unit]
Description=swap alt keys with the windows key
After=graphical.target

[Service]
ExecStart=/home/<User Name>/auto_shell/swap_alt_win.sh
Restart=on-failure
RestartSec=10
StartLimitIntervalSec=300
StartLimitBurst=3

[Install]
WantedBy=default.target
systemctl --user daemon-reload
systemctl --user enable swap_alt_win.service
systemctl --user start swap_alt_win.service
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?