keyconfigで拡張の機能を利用してみる。

keyconfigでbookmarkletというのは相当ネタになっていると思うが、拡張の機能も呼び出せるようだ。
試したのはid:nyamaさんのSave Session :: Firefox Add-onsにある「セッションを保存して終了する機能」。
profileフォルダを掘り進めて、
c:/Documents and Settings/****/Application Data/Mozilla/Firefox/Profiles/****/extensions/savesession@noasobi.net/chrome/content/
というフォルダにあるsavesession.xulの中身を眺めたところ

    function save_exit() {
      var prefObj = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
      var Branch = prefObj.getBranch("browser.sessionstore.");
      Branch.setBoolPref("resume_session_once", true);
      goQuitApplication();
    }

という箇所を発見。「セッションを保存して終了する」機能はsave_exitということがわかった。
で試しに,新しいキーを追加から、save_exit();と打ち込んでおいたところ成功。

user_pref("keyconfig.main.xxx_key__セッションを保存して閉じる", "shift][S][][save_exit();][");

とprefs.jsに反映された。
全ての拡張の機能にキーの割り振りが利用できるのか不明だが、少なくともxulに反映するようなfunctionは十分応用が利きそう。