スルーするキーを追加してまとめる。
1 parent 91bbdb8 commit 532c5812b150831545385c995ee7a2d170a40e45
@tamra tamra authored on 11 May 2006
Showing 8 changed files
View
2
■■■
honoka/libhonoka/honokapluginbase.h
#include <set>
#include <scim.h>
#define Uses_SCIM_CONFIG_BASE
 
#define HONOKA_PLUGIN_VERSION 8
#define HONOKA_PLUGIN_VERSION 9
 
using namespace std;
using namespace scim;
 
View
78
honoka/libhonoka/preeditor.cpp
}
 
 
/*!
\fn Honoka::PreEditor::getCommitString()
*/
const WideString Honoka::PreEditor::getCommitString()
\fn PreEditor::getCommitString()
*/
const WideString PreEditor::getCommitString()
{
return commitString;
}
 
 
/*!
\fn Honoka::PreEditor::setCommitString(const WideString &t)
*/
void Honoka::PreEditor::setCommitString(const WideString &t)
\fn PreEditor::setCommitString(const WideString &t)
*/
void PreEditor::setCommitString(const WideString &t)
{
commitString = t;
}
 
 
/*!
\fn Honoka::PreEditor::resetCommitString()
*/
void Honoka::PreEditor::resetCommitString()
\fn PreEditor::resetCommitString()
*/
void PreEditor::resetCommitString()
{
commitString.clear();
}
 
 
/*!
\fn Honoka::PreEditor::isPrintable(const KeyEvent &key)
*/
bool Honoka::PreEditor::isPrintable(const KeyEvent &key)
\fn PreEditor::isPrintable(const KeyEvent &key)
*/
bool PreEditor::isPrintable(const KeyEvent &key)
{
if ((key.code == SCIM_KEY_Return) ||
(key.code == SCIM_KEY_Linefeed) ||
(key.code == SCIM_KEY_Tab)) return false;
if (key.get_unicode_code() && (!key.is_alt_down()) && (!key.is_control_down())) return true;
return false;
}
 
 
/*!
\fn PreEditor::isThrough(const KeyEvent &key)
*/
bool PreEditor::isThrough(const KeyEvent &key)
{
// 喰っておくべきもの。
if ((key.code == SCIM_KEY_Shift_L) ||
(key.code == SCIM_KEY_Shift_R) ||
(key.code == SCIM_KEY_Control_L) ||
(key.code == SCIM_KEY_Control_R) ||
(key.code == SCIM_KEY_Alt_L) ||
(key.code == SCIM_KEY_Alt_R) ||
(key.code == SCIM_KEY_Super_L) ||
(key.code == SCIM_KEY_Super_R) ||
(key.code == SCIM_KEY_Hyper_L) ||
(key.code == SCIM_KEY_Hyper_R) ||
(key.code == SCIM_KEY_Meta_L) ||
(key.code == SCIM_KEY_Meta_R) ||
(key.code == SCIM_KEY_Num_Lock) ||
(key.code == SCIM_KEY_Caps_Lock) ||
(key.code == SCIM_KEY_Shift_Lock) ||
(key.code == SCIM_KEY_Mode_switch) ||
(key.code == SCIM_KEY_ISO_Next_Group)) return true;
return false;
}
 
View
1
■■■■
honoka/libhonoka/preeditor.h
virtual void unSelected();
static const WideString getCommitString();
static void resetCommitString();
static bool isPrintable(const KeyEvent &key);
static bool isThrough(const KeyEvent &key);
 
protected:
static WideString text;
static int pos;
View
26
honoka/plugins/asciiinput.cpp
\fn AsciiInput::keyEvent(const KeyEvent &key)
*/
bool AsciiInput::keyEvent(const KeyEvent &key)
{
// 喰っておくべきもの。
if ((key.code == SCIM_KEY_Shift_L) ||
(key.code == SCIM_KEY_Shift_R) ||
(key.code == SCIM_KEY_Control_L) ||
(key.code == SCIM_KEY_Control_R) ||
(key.code == SCIM_KEY_Alt_L) ||
(key.code == SCIM_KEY_Alt_R) ||
(key.code == SCIM_KEY_Super_L) ||
(key.code == SCIM_KEY_Super_R) ||
(key.code == SCIM_KEY_Hyper_L) ||
(key.code == SCIM_KEY_Hyper_R)||
(key.code == SCIM_KEY_Mode_switch) ||
(key.code == SCIM_KEY_ISO_Next_Group)) return true;
if (PreEditor::isThrough(key)) return true;
 
if ((compose)) {
if (composeKey1.code == 0) {
composeKey1 = key.code;
View
24
honoka/plugins/kanainput.cpp
*/
bool KanaInput::inputEvent(const KeyEvent &key)
{
// 喰っておくべきもの。
if ((key.code == SCIM_KEY_Shift_L) ||
(key.code == SCIM_KEY_Shift_R) ||
(key.code == SCIM_KEY_Control_L) ||
(key.code == SCIM_KEY_Control_R) ||
(key.code == SCIM_KEY_Alt_L) ||
(key.code == SCIM_KEY_Alt_R) ||
(key.code == SCIM_KEY_Super_L) ||
(key.code == SCIM_KEY_Super_R) ||
(key.code == SCIM_KEY_Hyper_L) ||
(key.code == SCIM_KEY_Hyper_R) ||
(key.code == SCIM_KEY_Mode_switch) ||
(key.code == SCIM_KEY_ISO_Next_Group)) return true;
if (PreEditor::isThrough(key)) return true;
 
 
for(unsigned int i = 0;HonokaKanaInputTable[i].code != 0;++ i) {
if (key.code == HonokaKanaInputTable[i].code) {
View
26
honoka/plugins/nicolainput.cpp
\fn NicolaInput::inputEvent(const KeyEvent &key)
*/
bool NicolaInput::inputEvent(const KeyEvent &key)
{
// 喰っておくべきもの。
if ((key.code == SCIM_KEY_Shift_L) ||
(key.code == SCIM_KEY_Shift_R) ||
(key.code == SCIM_KEY_Control_L) ||
(key.code == SCIM_KEY_Control_R) ||
(key.code == SCIM_KEY_Alt_L) ||
(key.code == SCIM_KEY_Alt_R) ||
(key.code == SCIM_KEY_Super_L) ||
(key.code == SCIM_KEY_Super_R) ||
(key.code == SCIM_KEY_Hyper_L) ||
(key.code == SCIM_KEY_Hyper_R) ||
(key.code == SCIM_KEY_Mode_switch) ||
(key.code == SCIM_KEY_ISO_Next_Group)) return true;
if (PreEditor::isThrough(key)) return true;
 
 
map<KeyEvent,NicolaKey>::iterator it = keymap.find(key);
if (it == keymap.end()) {
View
26
honoka/plugins/romkan.cpp
\fn Romkan::inputEvent(const KeyEvent &key)
*/
bool Romkan::inputEvent(const KeyEvent &key)
{
// 喰っておくべきもの。
if ((key.code == SCIM_KEY_Shift_L) ||
(key.code == SCIM_KEY_Shift_R) ||
(key.code == SCIM_KEY_Control_L) ||
(key.code == SCIM_KEY_Control_R) ||
(key.code == SCIM_KEY_Alt_L) ||
(key.code == SCIM_KEY_Alt_R) ||
(key.code == SCIM_KEY_Super_L) ||
(key.code == SCIM_KEY_Super_R) ||
(key.code == SCIM_KEY_Hyper_L) ||
(key.code == SCIM_KEY_Hyper_R) ||
(key.code == SCIM_KEY_Mode_switch) ||
(key.code == SCIM_KEY_ISO_Next_Group)) return true;
if (PreEditor::isThrough(key)) return true;
 
if (key_a2k.comp(key)) {
asciiToKana();
return true;
View
24
honoka/src/honoka_imengine.cpp
preeditCache.clear();
// 変換時のキーイベント処理。
// 喰う!。
if (key.is_key_release()) return true;
if ((key.code == SCIM_KEY_Shift_L) ||
(key.code == SCIM_KEY_Shift_R) ||
(key.code == SCIM_KEY_Control_L) ||
(key.code == SCIM_KEY_Control_R) ||
(key.code == SCIM_KEY_Alt_L) ||
(key.code == SCIM_KEY_Alt_R) ||
(key.code == SCIM_KEY_Super_L) ||
(key.code == SCIM_KEY_Super_R) ||
(key.code == SCIM_KEY_Hyper_L) ||
(key.code == SCIM_KEY_Hyper_R) ||
(key.code == SCIM_KEY_Mode_switch) ||
(key.code == SCIM_KEY_ISO_Next_Group)) return true;
if (PreEditor::isThrough(key)) return true;
 
// 自動候補ポップアップのカウント計算。
if ((alp <= alp_count) && (alp != 0)) {
if (!m_lookup) startLookup();