diff --git a/src/rime/gear/ascii_composer.cc b/src/rime/gear/ascii_composer.cc index 91b809f3b..8cd45911f 100644 --- a/src/rime/gear/ascii_composer.cc +++ b/src/rime/gear/ascii_composer.cc @@ -57,7 +57,7 @@ AsciiComposer::~AsciiComposer() { ProcessResult AsciiComposer::ProcessKeyEvent(const KeyEvent& key_event) { if ((key_event.shift() && key_event.ctrl()) || key_event.alt() || - key_event.hyper() || key_event.super()) { + key_event.hypershift() || key_event.super()) { shift_key_pressed_ = ctrl_key_pressed_ = false; return kNoop; } diff --git a/src/rime/gear/editor.cc b/src/rime/gear/editor.cc index bec8ae1ff..ed195fcfb 100644 --- a/src/rime/gear/editor.cc +++ b/src/rime/gear/editor.cc @@ -56,7 +56,7 @@ ProcessResult Editor::ProcessKeyEvent(const KeyEvent& key_event) { } } if (char_handler_ && !key_event.ctrl() && !key_event.alt() && - !key_event.super() && !key_event.hyper() && ch > 0x20 && ch < 0x7f) { + !key_event.super() && !key_event.hypershift() && ch > 0x20 && ch < 0x7f) { DLOG(INFO) << "input char: '" << (char)ch << "', " << ch << ", '" << key_event.repr() << "'"; return RIME_THIS_CALL(char_handler_)(ctx, ch); diff --git a/src/rime/gear/punctuator.cc b/src/rime/gear/punctuator.cc index 096caef60..b2ef5d359 100644 --- a/src/rime/gear/punctuator.cc +++ b/src/rime/gear/punctuator.cc @@ -1,4 +1,4 @@ -// encoding: utf-8 +// encoding: utf-8 // // Copyright RIME Developers // Distributed under the BSD License @@ -60,7 +60,7 @@ static bool punctuation_is_translated(Context* ctx) { ProcessResult Punctuator::ProcessKeyEvent(const KeyEvent& key_event) { if (key_event.release() || key_event.ctrl() || key_event.alt() || - key_event.hyper() || key_event.super()) + key_event.hypershift() || key_event.super()) return kNoop; int ch = key_event.keycode(); if (ch < 0x20 || ch >= 0x7f) diff --git a/src/rime/gear/recognizer.cc b/src/rime/gear/recognizer.cc index aa8583a84..65aab9404 100644 --- a/src/rime/gear/recognizer.cc +++ b/src/rime/gear/recognizer.cc @@ -80,7 +80,7 @@ Recognizer::Recognizer(const Ticket& ticket) : Processor(ticket) { ProcessResult Recognizer::ProcessKeyEvent(const KeyEvent& key_event) { if (patterns_.empty() || key_event.ctrl() || key_event.alt() || - key_event.hyper() || key_event.super() || key_event.release()) { + key_event.hypershift() || key_event.super() || key_event.release()) { return kNoop; } int ch = key_event.keycode(); diff --git a/src/rime/gear/selector.cc b/src/rime/gear/selector.cc index 70a1a9f67..063adfb33 100644 --- a/src/rime/gear/selector.cc +++ b/src/rime/gear/selector.cc @@ -116,7 +116,7 @@ inline static bool is_linear_layout(Context* ctx) { } ProcessResult Selector::ProcessKeyEvent(const KeyEvent& key_event) { - if (key_event.release() || key_event.alt() || key_event.hyper() || + if (key_event.release() || key_event.alt() || key_event.hypershift() || key_event.super()) return kNoop; Context* ctx = engine_->context(); diff --git a/src/rime/gear/shape.cc b/src/rime/gear/shape.cc index c90ca4568..6ed82f86a 100644 --- a/src/rime/gear/shape.cc +++ b/src/rime/gear/shape.cc @@ -39,7 +39,7 @@ ProcessResult ShapeProcessor::ProcessKeyEvent(const KeyEvent& key_event) { if (!engine_->context()->get_option("full_shape")) { return kNoop; } - if (key_event.ctrl() || key_event.alt() || key_event.hyper() || + if (key_event.ctrl() || key_event.alt() || key_event.hypershift() || key_event.super() || key_event.release()) { return kNoop; } diff --git a/src/rime/gear/speller.cc b/src/rime/gear/speller.cc index 85c13d17b..074c19b02 100644 --- a/src/rime/gear/speller.cc +++ b/src/rime/gear/speller.cc @@ -93,7 +93,7 @@ Speller::Speller(const Ticket& ticket) ProcessResult Speller::ProcessKeyEvent(const KeyEvent& key_event) { if (key_event.release() || key_event.ctrl() || key_event.alt() || - key_event.hyper() || key_event.super()) + key_event.hypershift() || key_event.super()) return kNoop; int ch = key_event.keycode(); if (ch < 0x20 || ch >= 0x7f) // not a valid key for spelling diff --git a/src/rime/key_event.h b/src/rime/key_event.h index 58b34305f..18d1084b3 100644 --- a/src/rime/key_event.h +++ b/src/rime/key_event.h @@ -1,4 +1,4 @@ -// encoding: utf-8 +// encoding: utf-8 // // Copyright RIME Developers // Distributed under the BSD License @@ -31,7 +31,7 @@ class KeyEvent { bool alt() const { return (modifier_ & kAltMask) != 0; } bool caps() const { return (modifier_ & kLockMask) != 0; } bool super() const { return (modifier_ & kSuperMask) != 0; } - bool hyper() const { return (modifier_ & kHyperMask) != 0; } + bool hypershift() const { return (modifier_ & kHyperMask) != 0; } bool release() const { return (modifier_ & kReleaseMask) != 0; } // 按鍵表示為形如「狀態+鍵名」的文字 // 若無鍵名,則以四位或六位十六进制数形式的文字來標識