Example #1
0
void
FrontEndHotkeyMatcher::add_hotkey (const KeyEvent &key, FrontEndHotkeyAction action)
{
    if (key.empty () || action < SCIM_FRONTEND_HOTKEY_TRIGGER || action > SCIM_FRONTEND_HOTKEY_SHOW_FACTORY_MENU) return;

    m_impl->m_matcher.add_hotkey (key, (int) action);
}
Example #2
0
void
IMEngineHotkeyMatcher::add_hotkey (const KeyEvent &key, const String &uuid)
{
    if (key.empty () || !uuid.length ()) return;

    size_t i;

    for (i = 0; i < m_impl->m_uuids.size (); ++i) {
        if (m_impl->m_uuids [i] == uuid)
            break;
    }

    if (i == m_impl->m_uuids.size ())
        m_impl->m_uuids.push_back (uuid);

    m_impl->m_matcher.add_hotkey (key, i);
}
Example #3
0
void
HotkeyMatcher::add_hotkey (const KeyEvent &key, int id)
{
    if (!key.empty ())
        m_impl->m_hotkeys [key] = id;
}