diff options
author | Peng Wu <alexepico@gmail.com> | 2014-06-24 13:32:38 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2014-06-24 13:32:38 +0800 |
commit | dde05bd283f1925549049f56f2d45e358831d28a (patch) | |
tree | 406fe057ecb79f04c9da9f1d64c45c7c51d74e24 /src | |
parent | 5aa587cfb1086ce875222062c7615e7e97bb9e01 (diff) | |
download | ibus-libzhuyin-dde05bd283f1925549049f56f2d45e358831d28a.tar.gz ibus-libzhuyin-dde05bd283f1925549049f56f2d45e358831d28a.tar.xz ibus-libzhuyin-dde05bd283f1925549049f56f2d45e358831d28a.zip |
Revert "fixes raw input"
This reverts commit 5aa587cfb1086ce875222062c7615e7e97bb9e01.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/ZYRawEditor.cc | 53 | ||||
-rw-r--r-- | src/ZYRawEditor.h | 5 |
3 files changed, 0 insertions, 59 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index aa8a220..b749f14 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,6 @@ ibus_engine_libzhuyin_c_sources = \ ZYSymbols.cc \ ZYZBuiltinSymbolSection.cc \ ZYZPhoneticSection.cc \ - ZYRawEditor.cc \ ZYEngine.cc \ ZYZZhuyinEngine.cc \ ZYMain.cc \ diff --git a/src/ZYRawEditor.cc b/src/ZYRawEditor.cc deleted file mode 100644 index 5435c13..0000000 --- a/src/ZYRawEditor.cc +++ /dev/null @@ -1,53 +0,0 @@ -/* vim:set et ts=4 sts=4: - * - * ibus-libzhuyin - New Zhuyin engine based on libzhuyin for IBus - * - * Copyright (c) 2014 Peng Wu <alexepico@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "ZYRawEditor.h" -#include "ZYText.h" - -namespace ZY { - -gboolean -RawEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers) -{ - - /* skip the key press event */ - if (! (modifiers & IBUS_RELEASE_MASK) ) - return TRUE; - - modifiers &= (IBUS_CONTROL_MASK | - IBUS_MOD1_MASK | - IBUS_SUPER_MASK | - IBUS_HYPER_MASK | - IBUS_META_MASK); - /* ignore key events with some masks */ - if (modifiers != 0) - return TRUE; - - if (isprint (keyval)) { - Text text (keyval); - commitText (text); - return TRUE; - } - - return TRUE; -} - -}; diff --git a/src/ZYRawEditor.h b/src/ZYRawEditor.h index 00ce6b5..1a1fa7c 100644 --- a/src/ZYRawEditor.h +++ b/src/ZYRawEditor.h @@ -29,11 +29,6 @@ class RawEditor : public Editor { public: RawEditor (ZhuyinProperties &props, Config & config) : Editor (props, config) { } - - virtual gboolean processKeyEvent (guint keyval, - guint keycode, - guint modifiers); - }; }; |