Skip to content

Commit

Permalink
Fix processKeyEvent methods again
Browse files Browse the repository at this point in the history
  • Loading branch information
epico committed Jan 30, 2024
1 parent 5fe4e0f commit f91bbc0
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PYEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Editor::~Editor (void)
gboolean
Editor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

modifiers &= (IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
IBUS_SUPER_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYEnglishEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ EnglishEditor::~EnglishEditor ()
gboolean
EnglishEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

//IBUS_SHIFT_MASK is removed.
modifiers &= (IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYExtEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ ExtEditor::setLuaPlugin (IBusEnginePlugin *plugin)
gboolean
ExtEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

//IBUS_SHIFT_MASK is removed.
modifiers &= (IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYFallbackEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ FallbackEditor::processPunct (guint keyval, guint keycode, guint modifiers)
gboolean
FallbackEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

gboolean retval = FALSE;

modifiers &= (IBUS_CONTROL_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYPDoublePinyinEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ gboolean
DoublePinyinEditor::processKeyEvent (guint keyval, guint keycode,
guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

/* handle ';' key */
if (G_UNLIKELY (keyval == IBUS_semicolon)) {
if (cmshm_filter (modifiers) == 0) {
Expand Down
3 changes: 3 additions & 0 deletions src/PYPFullPinyinEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ FullPinyinEditor::processKeyEvent (guint keyval,
guint keycode,
guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

/* handle 'A' - 'Z' key */
if (G_UNLIKELY (IBUS_A <= keyval && keyval <= IBUS_Z)) {
if (cmshm_filter (modifiers) == 0) {
Expand Down
3 changes: 3 additions & 0 deletions src/PYPPhoneticEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ PhoneticEditor::processFunctionKey (guint keyval, guint keycode, guint modifiers
gboolean
PhoneticEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

return FALSE;
}

Expand Down
3 changes: 3 additions & 0 deletions src/PYPPinyinEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ gboolean
PinyinEditor::processKeyEvent (guint keyval, guint keycode,
guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

modifiers &= (IBUS_SHIFT_MASK |
IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYPSuggestionEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ SuggestionEditor::setLuaPlugin (IBusEnginePlugin *plugin)
gboolean
SuggestionEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

//IBUS_SHIFT_MASK is removed.
modifiers &= (IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYPunctEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ PunctEditor::processPunct (guint keyval, guint keycode, guint modifiers)
gboolean
PunctEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

modifiers &= (IBUS_SHIFT_MASK |
IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
Expand Down
3 changes: 3 additions & 0 deletions src/PYTableEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ TableEditor::~TableEditor ()
gboolean
TableEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers)
{
if (modifiers & IBUS_MOD4_MASK)
return FALSE;

//IBUS_SHIFT_MASK is removed.
modifiers &= (IBUS_CONTROL_MASK |
IBUS_MOD1_MASK |
Expand Down

0 comments on commit f91bbc0

Please sign in to comment.