diff --git a/honoka/libhonoka/preeditor.cpp b/honoka/libhonoka/preeditor.cpp index 6530b08..bdef56f 100644 --- a/honoka/libhonoka/preeditor.cpp +++ b/honoka/libhonoka/preeditor.cpp @@ -329,10 +329,8 @@ { // �������٥�Ƚ�����񤭤ޤ��� // true���֤����Ȥǰʸ�ν������˴�����ޤ��� - if (isprint(key.code)){ - String s; - s = key.get_ascii_code(); - text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); + if (key.get_unicode_code()){ + text = text.substr(0,pos) + key.get_unicode_code() + text.substr(pos); pos ++; return true; } @@ -422,8 +420,7 @@ */ bool Honoka::PreEditor::isPrintable(KeyEvent &key) { - // �Ȥꤢ����get_ascii_code()��isprint�򤫤��롣 - if (isprint(key.get_ascii_code())) return true; + if (key.get_unicode_code()) return true; } diff --git a/honoka/plugins/asciiinput.cpp b/honoka/plugins/asciiinput.cpp index 31e2051..1319b5b 100644 --- a/honoka/plugins/asciiinput.cpp +++ b/honoka/plugins/asciiinput.cpp @@ -261,19 +261,17 @@ if (autoCommit) { if (autoCommitKey.comp(key)) { - String c; - if (isprint(key.get_ascii_code())) c += key.get_ascii_code(); - setCommitString(text.substr(0,pos) + utf8_mbstowcs(c)); + if (key.get_unicode_code()) + setCommitString(text.substr(0,pos) + key.get_unicode_code()); + else setCommitString(text.substr(0,pos)); reset(); pos = 0; return true; } } - if (isprint(key.get_ascii_code()) && (!key.is_alt_down()) && (!key.is_control_down())) { - String c; - c += key.get_ascii_code(); - text = text.substr(0,pos) + utf8_mbstowcs(c) + text.substr(pos); + if (key.get_unicode_code() && (!key.is_alt_down()) && (!key.is_control_down())) { + text = text.substr(0,pos) + key.get_unicode_code() + text.substr(pos); pos ++; return true; } diff --git a/honoka/plugins/kanainput.cpp b/honoka/plugins/kanainput.cpp index 3fbbfac..0605b54 100644 --- a/honoka/plugins/kanainput.cpp +++ b/honoka/plugins/kanainput.cpp @@ -232,10 +232,8 @@ } } } - if (isprint(key.code)) { - String s; - s += key.get_ascii_code(); - text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); + if (key.get_unicode_code()) { + text = text.substr(0,pos) + key.get_unicode_code() + text.substr(pos); pos ++; return true; } diff --git a/honoka/plugins/nicolainput.cpp b/honoka/plugins/nicolainput.cpp index aec1d58..d749194 100644 --- a/honoka/plugins/nicolainput.cpp +++ b/honoka/plugins/nicolainput.cpp @@ -274,10 +274,8 @@ map::iterator it = keymap.find(key); if (it == keymap.end()) { - if ((isprint(key.get_ascii_code())) && (!key.is_alt_down()) && (!key.is_control_down())) { - String s; - s += key.get_ascii_code(); - text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); + if (key.get_unicode_code() && (!key.is_alt_down()) && (!key.is_control_down())) { + text = text.substr(0,pos) + key.get_unicode_code() + text.substr(pos); pos ++; return true; } else return false; diff --git a/honoka/plugins/romkan.cpp b/honoka/plugins/romkan.cpp index 38f690d..ae1565f 100644 --- a/honoka/plugins/romkan.cpp +++ b/honoka/plugins/romkan.cpp @@ -689,6 +689,7 @@ insert(key.get_ascii_code()); return true; } + if (key.get_unicode_code()) return true; return false; } diff --git a/honoka/src/honoka_imengine.cpp b/honoka/src/honoka_imengine.cpp index b83c5a0..4c5f9e4 100644 --- a/honoka/src/honoka_imengine.cpp +++ b/honoka/src/honoka_imengine.cpp @@ -1366,7 +1366,7 @@ } // ����ʳ��Υ����ξ�硢ɽ����ǽ�����ʤ���ꤷ��PreEdit���Ϥ�Ƴ��� - if (key.get_ascii_code()) { // ����Ǥ��Դ�����ľ���� + if (key.get_unicode_code()) { commit_string(getConvertedText()); m_convertor->updateFrequency(); if (prediction) if (m_predictor->isConnected()) m_predictor->update(getConvertedText(),m_preeditor->getText(true)); @@ -1456,7 +1456,7 @@ } } - if (!key.get_ascii_code()) return true; + if (!key.get_unicode_code()) return true; m_prediction = false; commit_string(m_convList.kouho.at(m_convList.pos).kanji); m_preeditor->reset();