[ubuntu-jp:5213] Re: Fcitx-Anthyのキーアサイン消失の件
AWASHIRO Ikuya
ikuya @ fruitsbasket.info
2015年 5月 10日 (日) 03:24:17 UTC
どもども、いくやです。
On Wed, 6 May 2015 10:25:53 +0900
AWASHIRO Ikuya <ikuya @ fruitsbasket.info> wrote:
> [キーのプロファイル]タブの[キーバインドのプロファイル]を[カスタマイズ]
> にし、[キー]タブで矛盾した設定をします。
矛盾とか全く関係なかったです。
src/imengine.cppの2178行目から、
std::string AnthyInstance::get_key_profile()
{
const char* key_profile[] = {
"",
"atok.sty",
"canna.sty",
"msime.sty",
"vje-delta.sty",
"wnn.sty",
m_config.m_key_theme_file
};
if (m_config.m_key_profile_enum >= ARRAY_LEN(key_profile))
m_config.m_key_profile_enum = 0;
return key_profile[m_config.m_key_profile_enum] ? key_profile[m_config.m_key_profile_enum] : "" ;
}
うんうん、これはいいですね。
2296行目から、
void AnthyInstance::configure()
{
StyleFile style;
std::string file;
bool loaded = false;
// load key bindings
char* filename = get_file_name(get_key_profile());
if (filename)
loaded = style.load (filename);
fcitx_utils_free(filename);
あれ?
カスタマイズしたキーバインドを読み込んでいないように見えます。
遡って2058行目から、
#define APPEND_ACTION(key, func) \
{ \
FcitxHotkey* hk = NULL; \
std::string name = #key; \
FcitxHotkeyFree(m_config.m_key_profile.m_hk_##key); \
if (loaded) { \
std::string str = (ACTION_CONFIG_##key##_KEY); \
std::string keystr; \
style.get_string (keystr, "KeyBindings", str); \
FcitxHotkeySetKey(keystr.c_str(), m_config.m_key_profile.m_hk_##key); \
hk = m_config.m_key_profile.m_hk_##key; \
} else \
hk = m_config.m_key_default.m_hk_##key; \
PMF f; \
f = &AnthyInstance::func; \
m_actions[name] = Action (name, hk, f); \
}
それっぽいところがコメントアウトされていますね。
ここを適合するように書き換えてやればいいのでしょうか。
ではでは。
--
AWASHIRO Ikuya
ikuya @ fruitsbasket.info / ikuya @ oooug.jp / ikunya @ gmail.com
GPG fingerprint:
1A19 AD66 C53F 2250 3537 1A9D 3A53 2C1D 20AB CC8A
ubuntu-jp メーリングリストの案内