diff --git a/honoka/src/honoka_def.h b/honoka/src/honoka_def.h index 403dbb3..92a4fcf 100644 --- a/honoka/src/honoka_def.h +++ b/honoka/src/honoka_def.h @@ -69,6 +69,7 @@ #define HONOKA_DEFAULT_KEY_NEXT_CONVERTOR "Control+Page_Down" #define HONOKA_CONFIG_KEY_PREV_CONVERTOR "/IMEngine/Honoka/Key/PrevConvertor" #define HONOKA_DEFAULT_KEY_PREV_CONVERTOR "Control+Page_Up" +#define HONOKA_CONFIG_KEY_SELECTION_PREFIX "/IMEngine/Honoka/Key/Selection" #define HONOKA_CONFIG_KEY_CONVERSION_IKEIJI "/IMEngine/Honoka/Key/ConversionIkeiji" #define HONOKA_DEFAULT_KEY_CONVERSION_IKEIJI "Shift+F8" diff --git a/honoka/src/honoka_imengine.cpp b/honoka/src/honoka_imengine.cpp index 94c17e9..bb9b522 100644 --- a/honoka/src/honoka_imengine.cpp +++ b/honoka/src/honoka_imengine.cpp @@ -394,6 +394,14 @@ scim_string_to_key_list(k_result_to_preedit, _scim_config->read(String(HONOKA_CONFIG_KEY_RESULTTOPREEDIT), String(HONOKA_DEFAULT_KEY_RESULTTOPREEDIT))); + for(unsigned i = 0;i < 10;i ++) { + char a[3]; + sprintf(a,"%d",i); + scim_string_to_key_list(k_selection[i], + _scim_config->read(String(HONOKA_CONFIG_KEY_SELECTION_PREFIX) + String(a), + String(a))); + } + changePreEditor(defaultPreEditor); changeConvertor(defaultConvertor); @@ -869,7 +877,25 @@ } } } else + if (numkeyselect && m_lookup) { + for(unsigned int i = 0;i < 10;i ++) { + if (k_selection[i].comp(key)) { + int numc = i - 1; + if (numc < 0) numc = 9; + if (m_lookup_table.get_current_page_size() <= numc) return true; + m_convList.pos = numc + m_lookup_table.get_current_page_start(); + m_convertor->select(m_convList.pos); + m_convertor->setPos(m_convertor->getPos() + 1); + m_convList = m_convertor->getResultList(); + updateConversion(); + startLookup(); + return true; + } + } + } + if (key.get_ascii_code()) { + /* if (key.mask & (SCIM_KEY_AltMask | SCIM_KEY_ControlMask)) return false; if (m_lookup && numkeyselect) { char numk[] = "1234567890"; @@ -892,7 +918,7 @@ return true; } } - + */ commit_string(m_convertor->getText()); m_convertor->updateFrequency(); m_preeditor->reset(); diff --git a/honoka/src/honoka_imengine.h b/honoka/src/honoka_imengine.h index 5321eb0..c2cef79 100644 --- a/honoka/src/honoka_imengine.h +++ b/honoka/src/honoka_imengine.h @@ -173,7 +173,7 @@ k_conversion_ikeiji, // �۷����Ѵ� k_conversion_rensou, // Ϣ���Ѵ� k_select_yosoku, // ͽ¬���� - + k_selection[9], // �������򥷥硼�ȥ��å� k_dummy; };