diff options
-rw-r--r-- | src/sclconnection-isf.cpp | 18 | ||||
-rw-r--r-- | src/sclcorecallback.h | 3 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index dedfb03..b8f4f4f 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -593,12 +593,12 @@ static void slot_check_ise_option_window(const scim::HelperAgent *agent, sclu32 } } -static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret, scim::uint32 keycode) { +static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); if (callback) { - callback->on_process_key_event(key, &ret, keycode); + callback->on_process_key_event(key, &ret); #ifdef WEBSOCKETweb_ret g_websocket.on_process_key_event(key.code, key.mask, key.layout, &ret); #endif @@ -606,6 +606,16 @@ static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEven } } +static void slot_process_key_event_with_keycode(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret, scim::uint32 keycode) { + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + ISCLCoreEventCallback *callback = impl->get_core_event_callback(); + if (callback) { + callback->on_process_key_event_with_keycode(key, &ret, keycode); + } + } +} + static void slot_candidate_show(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -769,6 +779,7 @@ sclboolean CSCLConnectionISF::init() m_helper_agent.signal_connect_resume_option_window(scim::slot(slot_resume_ise_option_window)); m_helper_agent.signal_connect_check_option_window(scim::slot(slot_check_ise_option_window)); m_helper_agent.signal_connect_process_key_event(scim::slot(slot_process_key_event)); + m_helper_agent.signal_connect_process_key_event_with_keycode(scim::slot(slot_process_key_event_with_keycode)); m_helper_agent.signal_connect_candidate_show(scim::slot(slot_candidate_show)); m_helper_agent.signal_connect_candidate_hide(scim::slot(slot_candidate_hide)); m_helper_agent.signal_connect_process_input_device_event(scim::slot(slot_process_input_device_event)); @@ -1244,7 +1255,8 @@ void CSCLConnectionISF::send_private_command(const sclchar *command) callback->on_associate_table_page_up(0, NULL); callback->on_associate_table_page_down(0, NULL); callback->on_update_associate_table_page_size(0, NULL, 0); - callback->on_process_key_event(key, NULL, 0); + callback->on_process_key_event(key, NULL); + callback->on_process_key_event_with_keycode(key, NULL, 0); callback->on_set_display_language(NULL); callback->on_set_rotation_degree(0); diff --git a/src/sclcorecallback.h b/src/sclcorecallback.h index f4f0516..aa6a204 100644 --- a/src/sclcorecallback.h +++ b/src/sclcorecallback.h @@ -73,7 +73,8 @@ struct ISCLCoreEventCallback { virtual void on_associate_table_page_up(sclint ic, const sclchar *uuid) {} virtual void on_associate_table_page_down(sclint ic, const sclchar *uuid) {} virtual void on_update_associate_table_page_size(sclint ic, const sclchar *uuid, sclint page_size) {} - virtual void on_process_key_event(scim::KeyEvent &key, sclu32 *ret, sclu32 keycode) {} + virtual void on_process_key_event(scim::KeyEvent &key, sclu32 *ret) {} + virtual void on_process_key_event_with_keycode(scim::KeyEvent &key, sclu32 *ret, sclu32 keycode) {} virtual void on_set_display_language(const sclchar *language) {} virtual void on_set_rotation_degree(sclint degree) {} |