LoginSignup
0
0

More than 5 years have passed since last update.

ThinkVantageボタンでコマンドを実行する on Lubuntu

Last updated at Posted at 2016-02-21

ThinkVantageボタンで端末を起動できるようにしたときのメモ。

まず、xevコマンドを使って、ThinkVantageボタンを押したときに、どんなキーコードが返ってくるか調べた。XF86Launch1というコードが返ってくるようだ。

キーコードがわかったら、Openboxの設定ファイル(~/.config/openbox/lubuntu-rc.xml)の、<keyboard></keyboard>内に、XF86Launch1が押されたときの設定を追加する。

gnome-terminalを起動させる例:

~/.config/openbox/lubuntu-rc.xml
<keyboard>
  <!-- 〜省略〜 -->

  <!-- ThinkVantageボタンで端末を起動する -->
  <!-- Launch gnome-terminal when ThinkVantage is pressed -->
  <keybind key="XF86Launch1">
    <action name="Execute">
      <command>gnome-terminal</command>
    </action>
  </keybind>
</keyboard>

別のコマンドを実行したければ<command></command>内を変えればよい。

設定ファイルの書き換えができたら、以下のコマンドを実行して設定を反映する。

$ openbox --reconfigure

LubuntuはLXDEをデスクトップ環境に使用しているが、キーボードショートカットの設定は、LXDEというより、その中に含まれているOpenboxの設定で行うようで、そこがわからず調べるときに少々時間がかかった。

参考にしたページ:

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